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

Ethernet Bootlader from flash magic

Hi all ,
I’ve got a problem with Flash Magic Ethernet BootLoader .
The original sample for LPC1768 works fine but with a little change I made in the source code of the bootloader program . Here’s the line I added :
SCB->VTOR = 0x00002000; in the code below:

void execute_user_code(void)
{
    void (*user_code_entry)(void);
     SCB->VTOR = 0x00002000;
        user_code_entry = (void (*)(void))(USER_START_SECTOR_ADDRESS | 0x00000001);
    user_code_entry();
}


I can load some of my own programs into the microcontroller through ethernet (Via Flash Magic) , But when I load Some others , they don’t work at all .
Thanks in advanced

Bootloader Settings :

IROM1 = 0 , SIZE = 0x80000
IROM2 Not Used

IRAM1 Not Used
IRAM2 = 0x20082000 , Size = 0x1000

/////////////

Program Settings :

IROM1 = 0x2000 , SIZE = 0x80000
IROM2 Not Used

IRAM1 =0x10000000,size=0x8000
IRAM2 = 0x2007C000 , Size = 0x6000

It seems the problem lies on IRAM1 & IRAM2 Settings or lies on the different initialization settings between the bootloader program and my own programs which are loaded into the microcontroller or lies on SCB->VTOR.
I don’t exactly know how to set IRAM1 & IRAM2 in different programs . I just use different places in RAM and don’t know if some places are allocated to something or not or am I free to choose wherever interested or not ?

Isn’t the programs loaded supposed not to dependent on the bootloader program initialization ?
For example PLL ,TIMER, UART,… settings are set for some programs and they work perfectly when not using a bootloader . Now the bootloader has some settings for PLL and timer and uart .
For uart the first initialization is executed(BootLoader) and now the second is executed(The program loaded) with some changes . If I don’t have the exact same settings as bootloader settings on my program , the uart doesn’t work on the program !

The strange point is why there wasn’t the line I added to the bootloader program
(SCB->VTOR = 0x00002000;) ?

any help ?

Thanks in advanced

0