How to set the start address of main application area?

Hi,

I am using RA2L1 and e2 Studio. How to set the start address of main application area? I reserved 32kB area for the bootloader and I want to set the main program address as 0x00008000.

0x00000000 => Bootloader start address
0x00008000 => Main application start address

Parents
  • You would have to edit the linker script, to change the start address in Code flash of the application, however the file memory_regions.ld is an auto-generated file so any edits are overwritten. Make a copy of memory_regions.ld and give it a different name, e.g. memory_regions_application.ld.

    and change the reference from "memory_regions.ld" to the name of the copy of the file you made, at the top of fsp.ld :-

    /*
                      Linker File for Renesas FSP
    */

    INCLUDE memory_regions_application.ld

    in the file memory_regions_application.ld change the start address and size of the code flash :-

    FLASH_START = 0x00008000;
    FLASH_LENGTH = 0x38000;

    and then in the debug configuration for the application, in the "Run Commands"  at the bottom of the Startup tab set the Program counter, Initial Stack pointer and VTOR register to the moved location :- 

    set $pc = *0x00008004
    set $sp = *0x00008000
    set {int}0xE000ED08 = 0x00008000

    I have uploaded an example of this :- 

    https://renesasrulz.com/ra/m/files/3416/download 

Reply
  • You would have to edit the linker script, to change the start address in Code flash of the application, however the file memory_regions.ld is an auto-generated file so any edits are overwritten. Make a copy of memory_regions.ld and give it a different name, e.g. memory_regions_application.ld.

    and change the reference from "memory_regions.ld" to the name of the copy of the file you made, at the top of fsp.ld :-

    /*
                      Linker File for Renesas FSP
    */

    INCLUDE memory_regions_application.ld

    in the file memory_regions_application.ld change the start address and size of the code flash :-

    FLASH_START = 0x00008000;
    FLASH_LENGTH = 0x38000;

    and then in the debug configuration for the application, in the "Run Commands"  at the bottom of the Startup tab set the Program counter, Initial Stack pointer and VTOR register to the moved location :- 

    set $pc = *0x00008004
    set $sp = *0x00008000
    set {int}0xE000ED08 = 0x00008000

    I have uploaded an example of this :- 

    https://renesasrulz.com/ra/m/files/3416/download 

Children