Skip to content

Commit

Permalink
[ext] Add local config inclusion for FreeRTOS
Browse files Browse the repository at this point in the history
  • Loading branch information
salkinium committed Aug 30, 2020
1 parent bbe65ba commit 821677b
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 2 deletions.
5 changes: 4 additions & 1 deletion ext/aws/FreeRTOSConfig.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,10 @@ standard names. */
#define vPortSVCHandler SVC_Handler
#define xPortSysTickHandler SysTick_Handler

/* A header file that defines trace macro can be included here. */
/* A header file that overwrites with local project settings. */
#if __has_include(<FreeRTOSConfigLocal.h>)
#include <FreeRTOSConfigLocal.h>
#endif

#endif /* FREERTOS_CONFIG_H */

5 changes: 5 additions & 0 deletions ext/aws/FreeRTOSIPConfig.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -305,4 +305,9 @@ disconnecting stage will timeout after a period of non-activity. */
#define ipconfigZERO_COPY_TX_DRIVER 1
#define ipconfigUSE_LINKED_RX_MESSAGES 1

/* A header file that overwrites with local project settings. */
#if __has_include(<FreeRTOSIPConfigLocal.h>)
#include <FreeRTOSIPConfigLocal.h>
#endif

#endif // FREERTOS_IP_CONFIG_H
26 changes: 25 additions & 1 deletion ext/aws/module.lb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,19 @@
class FreeRTOS_TCP(Module):
def init(self, module):
module.name = "tcp"
module.description = "FreeRTOS-Plus-TCP"
module.description = """
# a:FreeRTOS-Plus-TCP
This module defines a default FreeRTOS IP config. If you need to change a
configuration setting, then you can define a `FreeRTOSConfigIPLocal.h` file, which
is included *after* at the end of the config. You must therefore first `#undef`
the config macros, then redefine them with your options, for example:
```c
#undef ipconfigUSE_DNS
#define ipconfigUSE_DNS 1
```
"""

def prepare(self, module, options):
return True
Expand All @@ -33,6 +45,18 @@ def init(module):
# a:FreeRTOS
Amazon FreeRTOS port for modm to be used with via the `modm:processing:rtos` module.
## Custom Configuration
This module defines a default FreeRTOS config. If you need to change a
configuration setting, then you can define a `FreeRTOSConfigLocal.h` file, which
is included *after* at the end of the config. You must therefore first `#undef`
the config macros, then redefine them with your options, for example:
```c
#undef configCHECK_FOR_STACK_OVERFLOW
#define configCHECK_FOR_STACK_OVERFLOW 0
```
"""

def prepare(module, options):
Expand Down

0 comments on commit 821677b

Please sign in to comment.