feat(kconfig): Add option to kconfig

Add option to enable reent function.
This commit is contained in:
Dong Heng
2018-05-08 16:02:57 +08:00
committed by Wu Jian Gang
parent f076399d45
commit 3a724ca78c
3 changed files with 59 additions and 0 deletions

View File

@ -0,0 +1,12 @@
menu "FreeRTOS"
config FREERTOS_ENABLE_REENT
bool "Enable \"reent\" function"
default n
select NEWLIB_ENABLE
help
Enable "reent" function and FreeRTOS should use "reent" function of newlib.
The configuration will enable newlib.
endmenu

View File

@ -65,6 +65,8 @@
#ifndef FREERTOS_CONFIG_H
#define FREERTOS_CONFIG_H
#include "sdkconfig.h"
/*-----------------------------------------------------------
* Application specific definitions.
*
@ -140,5 +142,9 @@ configKERNEL_INTERRUPT_PRIORITY setting. Here 15 corresponds to the lowest
NVIC value of 255. */
#define configLIBRARY_KERNEL_INTERRUPT_PRIORITY 15
#ifdef CONFIG_FREERTOS_ENABLE_REENT
#define configUSE_NEWLIB_REENTRANT 1
#endif
#endif /* FREERTOS_CONFIG_H */