We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
when a variable is declared and initialized along with it globally, it should be going to data segment of external memory( as per linker script provided). the variable gets stored at the expected location in the external ram, but it is not getting initialized with the provided value. some junk value is found in the location. but when we change the location of data segment to internal ram(in the linker script), it works fine. I'm using softcore of Cortex, M-1.
Hi Josie, For getting your variables initialized, you need to run the routines in the internal library. keil wraps the init code. this happens when you jump to 'main' from startup.s. ie you should not change the jump to "__main" your custom main function name. the MDK has a set of routines that are called if it is specified "__main" only. it executes these routines on the jump to "__main" and then it jumps to you "main()"
Hitting command "BKPT 0xAB" in the standard library initialization routine. I'm not able to continue from this place. this comes under the standard routine "_sys_open:" . this routine is called automatically if we jump to __main from _start