Bootloader configuration

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

Bootloader configuration

739 Views
sandeepc
Contributor IV

Hi,

We implemented custom bootloader, its working, fine. 

Case1:working

When i configure the Boot project and Application project same configuration , its jumping to the specified application but we observed a execution delay.

Note: We are using SDAM configuration its configured using DCD config tool.

 

Case 2: Not working

 

When boot project and application project has different configuration. i mean if i did not configure SDRAM in boot project , i will configure SDRAM config only in application, in this scenario application is not working.

 

My question is it mandatary of having boot project and application same configuration ? If not how can i debug this issue.

Can you verify below snippet code.

void JumpApplicationOne(void)

{

 

/*! @brief Jump to application function pointer datatype. */

typedef void (*F_Bootloader_Jump_t)(void);

PRINTF("jump_application :1\n\r");

 

//NOTE: Don't modify the below code and no Debug printf

 

 

// Disable both D and I caches, Application will enable them back.

SCB_DisableDCache();

SCB_DisableICache();

// Data memory barrier.

__DMB();

DisableGlobalIRQ();

 

// Relocate vector table.

SCB->VTOR = (__IOM uint32_t)APP1_BASE_ADDRESS;

 

 

// Define Application function.

uint32_t jumpAddress = *(uint32_t*)(APP1_BASE_ADDRESS + 4U );

F_Bootloader_Jump_t jump = (F_Bootloader_Jump_t)jumpAddress;

 

// Set stack pointers to the Application stack pointer.

__set_MSP(*(uint32_t*)APP1_BASE_ADDRESS);

__set_PSP(*(uint32_t*)APP1_BASE_ADDRESS);

// Jump to Application.

jump();

 

}

 

@kerryzhou @bootloader @nxp 

Regards,

sandeep C

 

0 Kudos
Reply
3 Replies

726 Views
kef2
Senior Contributor V

DCD commands are processed by boot ROM prior to jumping to your image. Since bootloader starts first, only bootloaders DCD is processed, DCD specified in application is ignored, unless you equip your bootloader with DCD interpreter. 

0 Kudos
Reply

722 Views
sandeepc
Contributor IV

Thanks for the reply

 

i am storing build bin file in external nor flash, it will work in XIP mode.

App address:0x30025000

How can we configure the DCD interpreter?

because we application jumping to the specified application correctly. but we are encountering delay in  response for given input.

 

For example if i am transmitting CAN messages with 10ms but we are getting CAN response in about 13-15ms sec.

Response can visualize in LVGL display.

@kef2 

 

 

Regards,

Sandeep C

0 Kudos
Reply

699 Views
kef2
Senior Contributor V

DCD format is explained in your device Reference Manual. For IMXRT1064, it is chapter 9.7.2 Device Configuration Data (DCD). DCD format is very simple, just write command, check command and NOP command. So you DIY you DCD interpreter, or just decode your self DCD binary data into sequence of memory write, bit set, bit clear or wait for bit pattern commands. Perhaps your SDRAM configuration tool allows to output C statements instead of DCD. 

0 Kudos
Reply