Flashing a Bootloader on K66F

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

Flashing a Bootloader on K66F

1,113 Views
sivatejareddyva
Contributor III

Hello,

I am trying to flash bootloader on K66F which does not have a bootloader. I am trying to use MCUBOOT - KDS and generate a .bin file from freedom_bootloader, flashloader_loader, flashloader. I believe that i must be using JTAG to flash the hardware. But what should be the start address ? 0x00 ? 

Any suggestions ?

Regards,

Siva    

Labels (1)
0 Kudos
5 Replies

774 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Siva,

   Please use freedom_bootloader, don't use flashloader_loader associate with flashloader.

  Because freedom_bootloader can be used all the time, but flashloader_loader associate with flashloader just can be used one time after you download the app.

  When you download the freedom_bootloader, you need to use swd interface associate with the debugger to download the code, the flash address is from 0, but the app you need to relocate, about the detail address, you need to check the code.  In my memory it is 0xa000, it's better to double check your bootloader code relocate address for the app.

Wish it helps you!

If you still have question about it, please kindly let me know.


Have a great day,
Kerry

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

0 Kudos

774 Views
sivatejareddyva
Contributor III

Hey Kerry,

In my code, i have found this 

"#define BL_APP_VECTOR_TABLE_ADDRESS 0xA000" 

can i flash any application at 0xa000 ?

Regards,

Siva   

0 Kudos

774 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Siva,

   Yes, you are right, you need to relocate your application code from 0xa000.

   Before you download the bootloader code, please also check the code size, make sure it is not larger than 0xa000, you should better use the release instead of the debug mode, because the debug will have larger code size than the release mode, it may larger than 0xa000, it's my own experience.

Wish it helps you!

If you still have question about it, please kindly let me know.


Have a great day,
Kerry

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

0 Kudos

774 Views
sivatejareddyva
Contributor III

Hey Kerry,

I have flashed release freedom_bootloader at 0x00 and i am still seeing it as USB Serial. Please check the image below

pastedImage_1.png

also, i tried to use blhost.exe, it went like this....

pastedImage_2.png

But, i have flashed Led_demo a000, and was able to see a flashing red LED.

Am i missing something ??

Thanks and Regards,

Siva

0 Kudos

774 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Siva,

    Before you connect the MCU with blhost get property command, do you press the reset button on the board at first? This is very important to ping the MCU, please try the reset, then do it again.

    Besides You can use the KinetisFlashTool to download the .app, that is the GUI, it's more easy to use.

Wish it helps you!


Have a great day,
Kerry

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

0 Kudos