This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

L6221E execution regions overlap error

I am working on Keil uVision4 and just started learning ARM Cortex-M3 assembly. Executing a program but have this error during the build process:


.\mycode1.axf: Error: L6221E: Execution region ER_RO with Execution range [0x00000000,0x00000038) overlaps with Execution region ER_RW with Execution range [0x00000000,0x00000008).
.\mycode1.axf: Error: L6221E: Execution region ER_RO with Execution range [0x00000000,0x00000038) overlaps with Execution region ER_ZI with Execution range [0x00000008,0x00000108).


How can it be fixed?


p.s. I have attached my simple code i am working on.

my_code.txt.zip
Parents
  • Hi Vickey,

    Glad to see you starting to experiment with ARM assembler.

    The issue above is a linker error, and is caused by the default settings from MDK, when a specific MCU is not used. Click on the 'magic wand' Options icon (or Alt+F7), and navigate to the Linker pane. You will see settings for locations for RO and RW code, which default to 0x0. Relocate them (for example I moved RW to 0x100), and the code will build.

    mdk_settings.png
Reply
  • Hi Vickey,

    Glad to see you starting to experiment with ARM assembler.

    The issue above is a linker error, and is caused by the default settings from MDK, when a specific MCU is not used. Click on the 'magic wand' Options icon (or Alt+F7), and navigate to the Linker pane. You will see settings for locations for RO and RW code, which default to 0x0. Relocate them (for example I moved RW to 0x100), and the code will build.

    mdk_settings.png
Children
No data