It seems that static and global data is NOT set to zero during start-up. This is supposed to happen according to the C-standard. How to do this in a proper manner, i.e. to get the addresses (begin..end) of this block of memory?
It seems that static and global data is NOT set to zero during start-up. This is supposed to happen according to the C-standard. How to do this in a proper manner, i.e. to get the addresses (begin..end) of this block of memory?
Well I just found a checkbox in the 'target' tab in 'project options' for RAM settings called 'noinit', by unchecking that data seems to be set to zero. So business as usual again.
As you've found out, this zeroing is not supposed to happen in the actual assembly file, but is handled in the __main method, that the Reset_Handler branches to at the end. Whether or not zeroing is done is then dependent on the target options selected in µVision.
See also this question.
Yepp, I first thought that __main was 'my' main, but I realized that it must be in the C-lib. This is one of all the important things to learn when you start with a new silicon or a new compiler.
Thank you very much it"s working