Hello,
We are currently working on stack and heap management on STM32F10x. Is there a way to access then __initial_sp and __heap_base values in the start up file at runtime.
We have found that when tracing the stack, that some code changes effect the position of both these values and rather then having to manual check after each build if the address has change we would like to do this at runtime.
Any suggestion on this can be achieved?
Cheers.
Just in case anybody else stumbles over this problem, the correct way to get the real values should be:
int main() { extern uint32_t __heap_base; extern uint32_t __heap_limit; uint32_t heap_base = (uint32_t)&__heap_base; uint32_t heap_limit = (uint32_t)&__heap_limit; ... }
Without these extra &s in assignment compiler will _always_ try to get the value at the label and not its address.