Custom MCUBOOT bootloader development flow question (KV31)

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

Custom MCUBOOT bootloader development flow question (KV31)

Jump to solution
4,239 Views
ac80
Contributor II

Hello everyone,

We are going to develop a custom bootloader from the freedom bootloader example that ships with the mcuexpresso sdk for KV31. Since our serial interface is a UART connected to a half duplex RS485 interface, we need at least two modifications:

1. Enable the RS485 transmitter with GPIO before sending, and disable it when finished.
2. Disable the UART receiver on KV31 to prevent echos from being parsed (might not be necessary).

My question relates to the development flow of custom bootloaders:

How can a flash-resident bootloader be replaced / iterated?

 

The intent is to first flash the standard bootloader to the board as it ships in the sdk and confirm its working for us (by bypassing the RS485 and instead using a UART-USB part from FTDI). Next we will make incremental changes to the bootloader, replace the previous version on the board, and test.

I have two thoughts on how to replace the bootloader:

1. Build the flashloader and flashloader loader application to reside at 0xA000, and load it with the default bootloader. Then execute the floashloader from the bootloader, and overwrite the existing bootloader.

2. Buy a SWD programmer and iterate that way.

I dont like option 2, because in the final form, SWD ports will not be available. So if later we want to add features (we plan to implement some kind of encrypted firmware download support, for example), this would not work.

Id love to hear your thoughts or experience with this!

Kind regards,

AC80~

0 Kudos
Reply
1 Solution
4,210 Views
ac80
Contributor II

Ok, I found what I was looking for. This is well documented in the blhost User's Guide in Appendix B - Updating a bootloader image.

 

Apparently the flashloader can be programmed directly to ram, and then executed to upload a new bootloader starting at flash address 0x0.

View solution in original post

0 Kudos
Reply
3 Replies
4,211 Views
ac80
Contributor II

Ok, I found what I was looking for. This is well documented in the blhost User's Guide in Appendix B - Updating a bootloader image.

 

Apparently the flashloader can be programmed directly to ram, and then executed to upload a new bootloader starting at flash address 0x0.

0 Kudos
Reply
4,225 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi ac80,

KV3x has been preprogrammed with one-time-use flashloader when ship to customer. You can download your bootloader via UART directly.

 

Regards,

Jing

0 Kudos
Reply
4,216 Views
ac80
Contributor II

Hi Jing,

 

Thanks for your reply. Flashing the bootloader the first time is not an issue; the flashloader is well documented in the kv31 reference manual.

The question is how can a flash-resident bootloader be over-written during custom bootloader development?

0 Kudos
Reply