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

Bootloader RTX jump RTX app

Hello !

I am working on bootloader application using RTX on mdk 5.

The bootloader load the user application using Ethernet communication and proceed to the jump after a reset.

When i use an simple blinky example and modify the BCA, the jump WORKS WELL !

BUT If I use an RTX application, the jump don't works.

I used the bootloader's vendor (without RTX) the jump to my RTX application works..

I suspect that RTX application erased some thing at initialization

Some one already seen that before

Board used : FRDM K64F

IDE : mdk 5

Parents
  • To correct jumping you also will need disable interrupts and clear pending interrupts. Also don`t forget initialize stack/vectors and etc in user app. 

    for example:

    void bootloader_run_application()

    {

    // Stopping active threads, RTOS etc..

    // Disabling CPU interrupts

    cpu_irq_disable();  

    // Clear Pending interrupts 

    cpu_pending_irq_clear();

    // Execute your application 

    execute_app();

    // infinite loop

    while(1);

    }

    void execute_app(void)
    {
    void (*user_code_entry)(void) = (void (*)(void))(USER_APP_ADDR);

    user_code_entry();
    }

Reply
  • To correct jumping you also will need disable interrupts and clear pending interrupts. Also don`t forget initialize stack/vectors and etc in user app. 

    for example:

    void bootloader_run_application()

    {

    // Stopping active threads, RTOS etc..

    // Disabling CPU interrupts

    cpu_irq_disable();  

    // Clear Pending interrupts 

    cpu_pending_irq_clear();

    // Execute your application 

    execute_app();

    // infinite loop

    while(1);

    }

    void execute_app(void)
    {
    void (*user_code_entry)(void) = (void (*)(void))(USER_APP_ADDR);

    user_code_entry();
    }

Children
No data