diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2019-07-27 17:03:18 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2019-07-27 21:32:04 -0400 |
commit | 7bc0a261abdf295d0f35b89bfe51168a9f1c0b37 (patch) | |
tree | 54266d7da76d4e1093bf6488a049994da05b30c3 /src/stm32f4/main.c | |
parent | 16616662eddb17abe204c61abcf7066e6b526bf3 (diff) | |
download | kutter-7bc0a261abdf295d0f35b89bfe51168a9f1c0b37.tar.gz kutter-7bc0a261abdf295d0f35b89bfe51168a9f1c0b37.tar.xz kutter-7bc0a261abdf295d0f35b89bfe51168a9f1c0b37.zip |
stm32f4: Automatically calculate dynmem start/end
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/stm32f4/main.c')
-rw-r--r-- | src/stm32f4/main.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/stm32f4/main.c b/src/stm32f4/main.c index a6424770..b3069cc9 100644 --- a/src/stm32f4/main.c +++ b/src/stm32f4/main.c @@ -11,6 +11,22 @@ DECL_CONSTANT_STR("MCU", CONFIG_MCU); +// Return the start of memory available for dynamic allocations +void * +dynmem_start(void) +{ + extern uint32_t _ebss; + return &_ebss; +} + +// Return the end of memory available for dynamic allocations +void * +dynmem_end(void) +{ + extern uint32_t _sstack; + return &_sstack; +} + void command_reset(uint32_t *args) { |