Running boot code by embedded sram.

Discussion around product based on ARM Cortex M3 core.

Moderators: nferre, ncollot

PJH
Posts: 1
Joined: Fri Apr 23, 2010 5:53 am

Running boot code by embedded sram.

Fri Apr 23, 2010 6:25 am

Hello everybody.

I modify a flash.sct file in SAM3U-EK example code for running boot code that is stored in embedded flash memory(128KB) by sram(32KB)
Base concept is 'copy the codes from Flash to SRAM and jump to the SRAM and excute it'


Before

Code: Select all

Load_region 0x80000 0x20000
{
    ; Flash 128K
    Vector_region 0x80000
    {
        board_cstartup_keil.o (vectors, +FIRST)
    }
    Fixed_region +0
    {
        .ANY (+RO)
    }
    ; SRAM0 32K
    Relocate_region 0x20000100 (0x8000-0x100)
    {
        .ANY (+RW +ZI)
    }
    ; Configure Stack and Heap
    ARM_LIB_HEAP 0x20007000 EMPTY 0x400
    {
    }

    ARM_LIB_STACK 0x20007FFC EMPTY -0x400
    {
    }
}
After

Code: Select all

Load_region 0x80000 0x20000
{
    ; Flash 128K
    Vector_region 0x80000
    {
        board_cstartup_keil.o (vectors, +FIRST)
        * (InRoot$$Sections)
    }
    ; SRAM0 32K
    Relocate_region 0x20000100 (0x8000-0x100)
    {
        .ANY (+RO) 
        .ANY (+RW +ZI)
    }
    ; Configure Stack and Heap
    ARM_LIB_HEAP 0x20007000 EMPTY 0x400
    {
    }

    ARM_LIB_STACK 0x20007FFC EMPTY -0x400
    {
    }
}

But compile result message is
"Error: L6203E: Entry point (0x2000391) lies within non-root region Relocate_region."


How do I modify a flash.sct file ??

Return to “SAM3 Cortex-M3 MCU”

Who is online

Users browsing this forum: No registered users and 5 guests