Custom MCUBOOT bootloader development flow question (KV31)

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Custom MCUBOOT bootloader development flow question (KV31)

ソリューションへジャンプ
4,319件の閲覧回数
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 件の賞賛
返信
1 解決策
4,290件の閲覧回数
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 件の賞賛
返信
3 返答(返信)
4,291件の閲覧回数
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 件の賞賛
返信
4,305件の閲覧回数
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 件の賞賛
返信
4,296件の閲覧回数
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 件の賞賛
返信