AnsweredAssumed Answered

problem in jumping from bootloader to Application code

Question asked by sudhakar p on Feb 4, 2016

hi,

     i am working on FRDMk64 controller. i am using KDS3.0 and ksdk1.2.0 example. i did bootloader code. but i am facing some problem in jumping from bootloader to application location.

in my bootloader code am reading data from external data flash  and am writing that day to internal flash. when my application code size less than 512kB without any problem its working, and also its jumping to application code.

 

when my application code size increasing more than 512kb its not jumping to application location. my device was resetting continuously.is problem related to any  stack or RAM or interrupt? give some suggestion.i am using following function for jumping from boot loader to application location.

 

#define UTASKER_APP_START     (32 * 1024) //0x8000 my appliction code was starting**/

void start_application(unsigned long app_link_location)

{

    #if !defined KINETIS_KL || defined KINETIS_KE                         // {67} cortex-M0 assembler code

        #if !defined _WINDOWS

    asm(" ldr r1, [r0,#0]");                                             // get the stack pointer value from the program's reset vector

    asm(" mov sp, r1");                                                  // copy the value to the stack pointer

    asm(" ldr r0, [r0,#4]");                                             // get the program counter value from the program's reset vector

    asm(" blx r0");                                                      // jump to the start address

        #endif

    #else                                                                // cortex-M3/M4 assembler code

        #if !defined _WINDOWS

    asm(" ldr sp, [r0,#0]");                                             // load the stack pointer value from the program's reset vector

    asm(" ldr pc, [r0,#4]");                                             // load the program counter value from the program's reset vector to cause operation to continue from there

        #endif

    #endif

}

 

i attached my bootloader code.

i used KSDK1.2.0 dspi_loop_back example  for bootloader and for my application am using KSDK1.3.0 (ethernet_to_serial) is there any problem?

please give some suggession.

 

if you give some example code is useful to me..

 

regards,

sudhakar p

Original Attachment has been moved to: dspi_loopback.zip

Outcomes