I am a beginner now learning to program assembly code using keil uvision 5.41. I am running a basic program.Below is my code. When I build the target and run it in debugger. It shows that my R0 have a value of 0x20000000. But it just doesn't load the values from MyData to R1, R2 and so on.
AREA MyData, DATA, READWRITEnumbers DCD 0x1111, 0x2222, 0x3333 AREA mycode, CODE, READONLY ENTRY EXPORT __main__main LDR R0, =numbers LDR R1, [R0] LDR R2, [R0, #4] END
I have checked my read/write memory access, which is located at 0x200000 default location, with No Init box checked. I also unchecked my "Use memory layout from target dialog".below is the contents of my scatter fileLR_IROM1 0x08000000 0x00080000 { ; load region size_region ER_IROM1 0x08000000 0x00080000 { ; load address = execution address *.o (RESET, +First) *(InRoot$$Sections) .ANY (+RO) .ANY (+XO) } RW_IRAM1 0x20000000 UNINIT 0x00020000 { ; RW data .ANY (+RW +ZI) *(MyData) }}Need help from the community to help figure out my problem. Thanks in advance
You have marked RW_IRAM1 as UNINIT (uninitialized).
still same issue. could the issue be in the scatter file? when building my project. i got this warning but it build just fine