Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit bfa11cf

Browse filesBrowse files
authored
Merge pull request #11 from fpistm/fix
Add configUSE_NEWLIB_REENTRANT
2 parents 38eefa3 + 2b67908 commit bfa11cf
Copy full SHA for bfa11cf

File tree

Expand file treeCollapse file tree

2 files changed

+13
-1
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+13
-1
lines changed

‎portable/MemMang/heap_useNewlib.c

Copy file name to clipboardExpand all lines: portable/MemMang/heap_useNewlib.c
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ void *__wrap_malloc(size_t nbytes) {
127127
void *p = __real_malloc(nbytes); // Solely for debug breakpoint...
128128
return p;
129129
};
130-
void *__wrap__malloc_r(void *reent, size_t nbytes) {
130+
void *__wrap__malloc_r(void *reent __attribute__((__unused__)), size_t nbytes) {
131131
extern void * __real__malloc_r(size_t nbytes);
132132
void *p = __real__malloc_r(nbytes); // Solely for debug breakpoint...
133133
return p;

‎src/FreeRTOSConfig_Default.h

Copy file name to clipboardExpand all lines: src/FreeRTOSConfig_Default.h
+12Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,18 @@ extern char _Min_Stack_Size; /* Defined in the linker script */
126126
#define configUSE_APPLICATION_TASK_TAG 0
127127
#define configUSE_COUNTING_SEMAPHORES 1
128128
#define configGENERATE_RUN_TIME_STATS 0
129+
/*
130+
* If configUSE_NEWLIB_REENTRANT is set to 1 then a newlib reent structure
131+
* will be allocated for each created task.
132+
*
133+
* Note Newlib support has been included by popular demand, but is not used
134+
* by the FreeRTOS maintainers themselves. FreeRTOS is not responsible for
135+
* resulting newlib operation. User must be familiar with newlib and must
136+
* provide system-wide implementations of the necessary stubs.
137+
* Be warned that (at the time of writing) the current newlib design implements
138+
* a system-wide malloc() that must be provided with locks.
139+
*/
140+
#define configUSE_NEWLIB_REENTRANT 1
129141

130142
/* Co-routine definitions. */
131143
#define configUSE_CO_ROUTINES 0

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.