Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
jeanguerin
Level 1
Level 1
5 sign-ins First like received First reply posted

Hello,

 

I need to combined bootloader and bootloadble hex file on a PSoC4 chip for production purpose using modusToolbox 2.4 IDE.

According to this post https://community.infineon.com/t5/PSoC-4/combine-bootloader-and-bootloadable-hex-files-in-a-single-h... it is done in the generated bootloadable.hex. Does it work with modusToolbox as well?

It doesn't not work on my side. The .cyacd2 works well. Any idea?

 

Sincerely yours,

Jean

0 Likes
1 Solution
BiBi_1928986
Level 7
Level 7
First comment on blog 500 replies posted 250 replies posted

Hello.

I don't use ModusToolbox.
However, with Creator (and this should apply to MTB), the bootloadable project .hex file contains both the bootloader and the bootloadable.  Manufacturing only needs the bootloadable hex file.

You can verify if MTB behaves similar to Creator by programming the resulting bootloadable hex file into your target and test to see if it behaves as expected.  i.e., it boots and runs the bootloadable.  It boots and allows downloading a bootloadable.  You can also verify by dumping the flash contents to a hex file using PSoC Programmer and checking the hex file contents for both the bootloader and bootloadable image.

If MTB doesn't generate the single hex file as Creator does, you could dump flash contents to a hex file (after you've programmed the bootloader and the bootloadable) using PSoC Programmer.  This way you'll know you've got everything in a single file.  And, you don't need to work with cyacd2 file.

View solution in original post

0 Likes
4 Replies
BiBi_1928986
Level 7
Level 7
First comment on blog 500 replies posted 250 replies posted

Hello.

I don't use ModusToolbox.
However, with Creator (and this should apply to MTB), the bootloadable project .hex file contains both the bootloader and the bootloadable.  Manufacturing only needs the bootloadable hex file.

You can verify if MTB behaves similar to Creator by programming the resulting bootloadable hex file into your target and test to see if it behaves as expected.  i.e., it boots and runs the bootloadable.  It boots and allows downloading a bootloadable.  You can also verify by dumping the flash contents to a hex file using PSoC Programmer and checking the hex file contents for both the bootloader and bootloadable image.

If MTB doesn't generate the single hex file as Creator does, you could dump flash contents to a hex file (after you've programmed the bootloader and the bootloadable) using PSoC Programmer.  This way you'll know you've got everything in a single file.  And, you don't need to work with cyacd2 file.

0 Likes
jeanguerin
Level 1
Level 1
5 sign-ins First like received First reply posted

Hello, 

Thank you for your two suggestions. 

I don't know why but the .hex file generated with MTB in the bootloadable is not working. PSoC Programmer returns "Hex File parsing failure. Unknown record type". 

Your second solution worked! Using PSoC Creator, I dumped flash from an already flashed chip (using DFU Tool), it gives me a .hex file flashable. I just have about UserPage and other flash page specific to each device; I guess it is not very selective on the flash copy!  

Thank you for your help

 

0 Likes
Sidramesh_S
Moderator
Moderator
Moderator
250 sign-ins 100 replies posted 25 solutions authored

Hi @jeanguerin ,

How you have created Bootloader and Bootloadable applications in ModusToolbox 2.4?
I.e.are you porting it from PSoC Creator to Modustoolbox or
Are you following the steps given in Device Firmware Update (DFU) Middleware Library:-https://infineon.github.io/dfu/html/index.html#section_dfu_quick_start  to create both the bootloader and bootloadable application?

The exiting https://github.com/Infineon/mtb-example-psoc6-dfu-basic CE built for PSoC 6 Devices. When I built this CE  blinky.hex file did not contain the code and data of both bootloader and bootloadable, It had only the contents of the blinky application.

By providing the bootloader and blinky project name in the MERGE variable in common MakeFile we can generate app_combined.hex (will be present in the common build folder) which will contain code and data of both bootloader and bootloadable.Are you looking for the same?

Sidramesh_0-1693996344717.png

Thanks and regards,
Sidramesh

Hi Sidramesh,

Thank you for your answer. The project on ModusToolbox 2.4 was built from the quick start.

For now, I can't test your solution using the common Makefile as it is only available in ModusToolbox 3.0.

Sincerely youyrs,

Jean

0 Likes