SECONDARY BOOT LOADER AND USER APPLICATION BY LPC1768

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SECONDARY BOOT LOADER AND USER APPLICATION BY LPC1768

938 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by dariush_abbasi868 on Wed Dec 24 05:15:56 MST 2014
Hi , everybody

I have seen usb boot loader example .
but I have to make my project in another way !

I have a boot loader that started normally and at the start up check a flge for new update from external data flash.

if it is not set( not any new update ) goes to application  .
Application should be in an special address ( 0xa000 for example) .
so I can go to this address by :
void boot_jump(WORD address)
{
    asm("LDR SP,[R0]"); //Load new stack pointer address
    asm("LDR PC,[R0,#4]");//Load new program counter address
}
//************************************
void execute_user_code(void)
{
   SCB->VTOR = USER_FLASH_START & 0x1FFFFF80;
    boot_jump(USER_FLASH_START);
}

but my problem perhaps is how I can make a boot loader that I put it in 0xa000 and so jump to that it work ?
actually I use IAR compiler.

Labels (1)
0 Kudos
2 Replies

677 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by dariush_abbasi868 on Tue Jun 09 00:39:17 MST 2015
Hi, every body
after about one year that I didnot work in lpc1768 project , now I want to work and make it's secondary bootloader by UART.

I have already problem because when I run this :
void boot_jump(WORD address)
{
asm("LDR SP,[R0]"); //Load new stack pointer address
asm("LDR PC,[R0,#4]");//Load new program counter address
}
//************************************
void execute_user_code(void)
{
SCB->VTOR = USER_FLASH_START & 0x1FFFFF80;
boot_jump(USER_FLASH_START);
}
#define USER_FLASH_START 0xa000
for to jump to 0xa000 address ( stat of secore 10) my program jump to another address I think ( I debug it by jtag debuger )\

sugest that my application in not ok , al least jumping by secondary bootloader should work own job !

if jumping in seconary bootloader depend on application  , would it bee posible for some one to send me a correct *.icf file for lpc1768 that is for the sector number 10 to start aplication .
 
0 Kudos

677 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by dariush_abbasi868 on Sat Dec 27 00:27:46 MST 2014
Does any body use iar ?
it is a very good compiler and i have to use it.
so in IAR I hace some problem?
0 Kudos