AN4379 rewritten to provide SREC file USB bootloader

cancel
Showing results for 
Search instead for 
Did you mean: 

AN4379 rewritten to provide SREC file USB bootloader

73 Views
iancull
Contributor II

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 Kudos
3 Replies

57 Views
iancull
Contributor II

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 Kudos

52 Views
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 Kudos

64 Views
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 Kudos