AN4379 rewritten to provide SREC file USB bootloader

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

AN4379 rewritten to provide SREC file USB bootloader

3,769 次查看
iancull
Contributor III

For a new company project, one requirement was a bootloader that allowed USB connection with drag/drop of a text file (easy to transfer by email/etc); I found AN4379 but that seemed to be quite old and not suitable for the K22F Kinetis processor we had chosen.

I therefore wrote my own, slightly based on / inspired by AN4379; I started from the MSD RAMDISK example to give a USB framework, and then integrated code to provide the USB drag/drop feature.

I have an "archive" zip file but I'm not sure if it's ok to submit the finished code here ... I've attached one file which is the "heart" of the code, that processes incoming USB data packets to parse the S19 file and write it to processor flash memory.

0 项奖励
回复
3 回复数

3,753 次查看
iancull
Contributor III

But does that bootloader support SREC files? The one I looked at only supported BIN files, which are often blocked by company websites as "unsafe"

0 项奖励
回复

3,748 次查看
jingpan
NXP TechSupport
NXP TechSupport

Hi,

USB MSC download only supports SB file drag-and-drop. You can use ELFTOSB tool to convert SREC file to .sb file.

https://www.nxp.com/docs/en/user-guide/MBOOTELFTOSBUG.pdf

https://www.nxp.com/docs/en/reference-manual/MCUBOOTRM.pdf

 

Regards,

Jing

0 项奖励
回复

3,760 次查看
jingpan
NXP TechSupport
NXP TechSupport

Hi iancull,

Yes, AN4379 is old. But you needn't do it by yourself. The bootloader project in FRDM-K22F SDK v2.9.0 support USB-MSC function. You can enable it by change BL_CONFIG_USB_MSC definition to 1 in bootloader_config.h.

 

Regards,

Jing

0 项奖励
回复