Creating SREC file for HAB bootable image generation

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

Creating SREC file for HAB bootable image generation

843 Views
tj787
Contributor I

I'm generating command line tools for flashing the application image to the NOR flash of the MIMXRT1170 (EVKB board).

I know that the nxpimage tool helps create SREC format files from axf/elf files like this: 

nxpimage utils binary-image convert -i "%AXF_FILE%" -f s19 -o "%SREC_FILE%"
 
But the SREC file generated is different from the SREC file that is created when using the MCUXpresso Secure Provisioning Tool in terms of the contents and addressing. When I use the MCUXpresso Secure Provisioning Tool to load an elf/axf file to create a bootable image, it adds the srec file and parsed dcd file in the source folder of the MCUXpresso Secure Provisioning Tool's workspace.  I would like to know how those srec and parsed dcd file is generated by the MCUXpresso Secure Provisioning Tool. Also checking if there is a way to extract the parsed DCD file from SREC/elf/axf file separately with any CLI tools?
 
I know that the MCUXpresso Secure Provisioning Tool can be invoked from CLI to automate the whole process, but we are trying to create a script that can flash the MCU with just the nxpimage and blhost tools.
 
 
0 Kudos
Reply
1 Reply

786 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @tj787 ,

 

What can be seen here is the following command creates this output into specified “parsed-directory”:

nxpimage.exe hab parse -f mimxrt1176 -o parsed-directory -b my-application-with-dcd.bin

Kan_Li_0-1770780123329.png

 

Hope that helps,

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

 

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2313956%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ECreating%20SREC%20file%20for%20HAB%20bootable%20image%20generation%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2313956%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI'm%20generating%20command%20line%20tools%20for%20flashing%20the%20application%20image%20to%20the%20NOR%20flash%20of%20the%26nbsp%3BMIMXRT1170%20(%3CSPAN%3EEVKB%20board%3C%2FSPAN%3E).%3C%2FP%3E%3CP%3EI%20know%20that%20the%20nxpimage%20tool%20helps%20create%20SREC%20format%20files%20from%20axf%2Felf%20files%20like%20this%3A%26nbsp%3B%3C%2FP%3E%3CDIV%3E%3CDIV%3E%3CSPAN%3Enxpimage%3C%2FSPAN%3E%3CSPAN%3E%20utils%20binary-image%20%3C%2FSPAN%3E%3CSPAN%3Econvert%3C%2FSPAN%3E%3CSPAN%3E%20-i%20%3C%2FSPAN%3E%3CSPAN%3E%22%3C%2FSPAN%3E%3CSPAN%3E%25AXF_FILE%25%3C%2FSPAN%3E%3CSPAN%3E%22%3C%2FSPAN%3E%3CSPAN%3E%20-f%20s19%20-o%20%3C%2FSPAN%3E%3CSPAN%3E%22%3C%2FSPAN%3E%3CSPAN%3E%25SREC_FILE%25%3C%2FSPAN%3E%3CSPAN%3E%22%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EBut%20the%20SREC%20file%20generated%20is%20different%20from%20the%20SREC%20file%20that%20is%20created%20when%20using%20the%26nbsp%3BMCUXpresso%20Secure%20Provisioning%20Tool%20in%20terms%20of%20the%20contents%20and%20addressing.%20When%20I%20use%20the%26nbsp%3BMCUXpresso%20Secure%20Provisioning%20Tool%20to%20load%20an%20elf%2Faxf%20file%20to%20create%20a%20bootable%20image%2C%20it%20adds%20the%20srec%20file%20and%20parsed%20dcd%20file%20in%20the%20source%20folder%20of%20the%26nbsp%3BMCUXpresso%20Secure%20Provisioning%20Tool's%20workspace.%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3EI%20would%20like%20to%20know%20how%20those%20srec%20and%20parsed%20dcd%20file%20is%20generated%20by%20the%20MCUXpresso%20Secure%20Provisioning%20Tool.%20Also%20checking%20if%20there%20is%20a%20way%20to%20extract%20the%20parsed%20DCD%20file%20from%20SREC%2Felf%2Faxf%20file%20separately%20with%20any%20CLI%20tools%3F%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EI%20know%20that%20the%26nbsp%3BMCUXpresso%20Secure%20Provisioning%20Tool%20can%20be%20invoked%20from%20CLI%20to%20automate%20the%20whole%20process%2C%20but%20we%20are%20trying%20to%20create%20a%20script%20that%20can%20flash%20the%20MCU%20with%20just%20the%20nxpimage%20and%20blhost%20tools.%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2315988%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Creating%20SREC%20file%20for%20HAB%20bootable%20image%20generation%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2315988%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F259035%22%20target%3D%22_blank%22%3E%40tj787%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EWhat%20can%20be%20seen%20here%20is%20the%20following%20command%26nbsp%3Bcreates%20this%20output%20into%20specified%20%E2%80%9Cparsed-directory%E2%80%9D%3A%3C%2FP%3E%0A%3CP%3Enxpimage.exe%20hab%20parse%20-f%20mimxrt1176%20-o%20parsed-directory%20-b%20my-application-with-dcd.bin%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Kan_Li_0-1770780123329.png%22%20style%3D%22width%3A%20518px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Kan_Li_0-1770780123329.png%22%20style%3D%22width%3A%20518px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F376434i3819ACCB1B0DF330%2Fimage-dimensions%2F518x126%3Fv%3Dv2%22%20width%3D%22518%22%20height%3D%22126%22%20role%3D%22button%22%20title%3D%22Kan_Li_0-1770780123329.png%22%20alt%3D%22Kan_Li_0-1770780123329.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EHope%20that%20helps%2C%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EHave%20a%20great%20day%2C%3CBR%20%2F%3EKan%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3E-------------------------------------------------------------------------------%3CBR%20%2F%3ENote%3A%3CBR%20%2F%3E-%20If%20this%20post%20answers%20your%20question%2C%20please%20click%20the%20%22Mark%20Correct%22%20button.%20Thank%20you!%3CBR%20%2F%3E-%20We%20are%20following%20threads%20for%207%20weeks%20after%20the%20last%20post%2C%20later%20replies%20are%20ignored%3CBR%20%2F%3EPlease%20open%20a%20new%20thread%20and%20refer%20to%20the%20closed%20one%2C%20if%20you%20have%20a%20related%20question%20at%20a%20later%20point%20in%20time.%3CBR%20%2F%3E-------------------------------------------------------------------------------%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E