Skip to content

Commit 4b76cae

Browse files
committed
Update to use the heap_useNewlib_ST.c from Dave Nadler
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent 4eca9f9 commit 4b76cae

File tree

4 files changed

+6
-172
lines changed

4 files changed

+6
-172
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ By default, the `heap_useNewlib.c` is used. It can be changed thanks a define in
3434
```
3535
/* Define memory allocation implementations to use:
3636
* 1 to 5 for heap_[1-5].c
37-
* -1 for heap_useNewlib.c
37+
* -1 for heap_useNewlib_ST.c
3838
* Default -1 see heap.c
3939
*/
4040
```

portable/MemMang/heap_useNewlib.c

Lines changed: 0 additions & 166 deletions
This file was deleted.

src/FreeRTOSConfig_Default.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
/* Begin custom definitions for STM32 */
4545
/* Define memory allocation implementations to use:
4646
* 1 to 5 for heap_[1-5].c
47-
* -1 for heap_useNewlib.c
47+
* -1 for heap_useNewlib_ST.c
4848
* Default -1 see heap.c
4949
*/
5050
/*#define configMEMMANG_HEAP_NB 3*/
@@ -82,7 +82,7 @@
8282

8383
#define configMINIMAL_STACK_SIZE ((uint16_t)128)
8484
#define configTOTAL_HEAP_SIZE ((size_t)(15 * 1024))
85-
85+
#define configISR_STACK_SIZE_WORDS (0x100)
8686
#else
8787
extern char _end; /* Defined in the linker script */
8888
extern char _estack; /* Defined in the linker script */
@@ -97,7 +97,7 @@ extern char _Min_Stack_Size; /* Defined in the linker script */
9797
*/
9898
#define configMINIMAL_STACK_SIZE ((uint16_t)((uint32_t)&_Min_Stack_Size/8))
9999
#define configTOTAL_HEAP_SIZE ((size_t)(&_estack - _Min_Stack_Size - &_end))
100-
100+
#define configISR_STACK_SIZE_WORDS ((uint32_t)&_Min_Stack_Size/4)
101101
#endif /* configUSE_CMSIS_RTOS_V2 */
102102

103103
#define configUSE_PREEMPTION 1

src/heap.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* @file heap.c
33
* @author Frederic Pillon <frederic.pillon@st.com> for STMicroelectronics.
44
* @brief Provide Memory allocation implementations included in the FreeRTOS source
5-
* heap_useNewlib - thread-safe memory manager using C runtime (Newlib)
5+
* heap_useNewlib_ST - thread-safe memory manager using C runtime (Newlib)
66
* heap_1 - the very simplest, does not permit memory to be freed
77
* heap_2 - permits memory to be freed, but not does coalescence adjacent free blocks.
88
* heap_3 - simply wraps the standard malloc() and free() for thread safety
@@ -16,7 +16,7 @@
1616
#endif
1717

1818
#if (configMEMMANG_HEAP_NB == -1)
19-
#include "../portable/MemMang/heap_useNewlib.c"
19+
#include "../portable/MemMang/heap_useNewlib_ST.c"
2020
#elif (configMEMMANG_HEAP_NB == 1)
2121
#include "../portable/MemMang/heap_1.c"
2222
#elif (configMEMMANG_HEAP_NB == 2)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy