how to implement imx1050 external bootloader

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

how to implement imx1050 external bootloader

1,370 Views
ivanlee
Contributor I

Dear ,

I know there is an internal bootloader in 1050 chipset, but it can NOt meet our requirement, so we need implement second bootloader. so normally, after power on, the internal bootloader in imx1050 will load the second bootloader(start at 0x60000000), the the seconder bootloader will load real APP(0x60010000).
My bootloader size is 0x10000 (64K), i set the APP 's flash address at 0x60010000

i use MCUXPresso flash programmer to program the hyperflash of EVK board, but i think it NOT program from 0x60010000 BUT from 0x60000000, it will erase my bootloader file.
here is log,:
......
Nt: Loading 'testApp.bin' Binary 0x60010000 len 0xE5D4
Nc: Opening flash driver MIMXRT1050-EVK_S26KS512S.cfx (already resident)
Nc: Sending VECTRESET to run flash driver
Nt: Writing 58836 bytes to address 0x60010000 in Flash
Pb: 1 of 1 ( 0) Writing pages 0-0 at 0x60010000 with 58836 bytes

Ps: ( 0) at 60000000: 0 bytes - 0/124372
Ps: ( 13) at 60000000: 16384 bytes - 16384/124372
Ps: ( 26) at 60004000: 16384 bytes - 32768/124372
Ps: ( 39) at 60008000: 16384 bytes - 49152/124372
Ps: ( 52) at 6000C000: 16384 bytes - 65536/124372

(i think it should be start at here, but please see above)
Ps: ( 65) at 60010000: 16384 bytes - 81920/124372
Ps: ( 79) at 60014000: 16384 bytes - 98304/124372
Ps: ( 92) at 60018000: 16384 bytes - 114688/124372
Ps: (100) at 6001C000: 16384 bytes - 131072/124372
Nt: Erased/Wrote page 0-0 with 58836 bytes in 8194msec
Nc: Closing flash driver MIMXRT1050-EVK_S26KS512S.cfx
Pb: (100) Finished writing Flash successfully.
Nt: Flash Write Done
Nt: Loaded 0xE5D4 bytes in 8632ms (about 6kB/s)
Nt: Reset target (core)
Nc: Starting execution using core reset
=========================================================================
Q1:
am i right about this?

Q2:
and i think use the MCUXPresso debug the app, it also NOT start at 0x60010000. am i right about this?
Q3:
i also notice that if i set the flash address from 0x6000000 to 0x60010000 (or any but not 0x60000000), the Image Vector Table (IVT) will not generated,
is this normal not no bad effect ?
Q4:
is there any good example\ source code of the bootloader or guide to reference ?

Please help me about this.

Best regards!
Ivan

2 Replies

1,211 Views
jamesk
Contributor III

Dear Ivan,

Could you let me know how your issue was resolved?

And also if you were able to

1) place your custom bootloader on the flash along with your main application

2) have the bootloader load the main application and execute 

0 Kudos
Reply

1,211 Views
Carlos_Musich
NXP Employee
NXP Employee

Hi Ivan,

In this scenario there are 2 vector tables. The bootloader Vector Table at 0x60000000 and the application´s Vector Table at 0x60010000. When your bootlaoder starts it will use the vector table located at 0x60000000, when you jump to your application you must change register VTOR to 0x60010000. This way you will indicate that the vector table has been moved to that address.

You can take a look to the following Apnote, it may be useful.

https://www.nxp.com/docs/en/application-note/AN12108.pdf 


Regards,
Carlos
NXP Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply