- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have developed a PSOC4100SP firmware under ModusToolbox IDE. Now I need to develop a WPF .Net Framework application for serial production programming.
A few years ago we develop a similar application using the PSoCProgrammerCOM_Object (PP_COM_Wrapper.dll) provided I believe with the PSOC Programmer installation, it was for PSOC1 targets.
For now, does the PSoCProgrammerCOM_Object is still the appropriate programming interface to use or is it obsolete ? I am having difficulties to find information on which tool to use.
Up to here I have been using the "Cypress programmer" GUI tool to prrgram our prototype boards which is base on OpenOCD.
Thanks,
Regards
Nicolas
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @nicolas ,
The cymcuelf tool is not capable of creating this checksum in the hex file.
I have attached here a script which you can use for generating the checksum of the hexfile at 0x9030 0000 . All you have to do is pass the final hex file whose checksum is to be created as the argument to the script as shown below and it will generate a new .hex file (with csout_ extension) which will have the checksum of the hex file at the bottom.
Can you please try out the same and let me know if it works?
Example usage of the script:
Warm Regards
Alen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @nicolas
Yes, the PSoCProgrammerCOM_Object is still the appropriate programming interface to use. It is not obsolete. You can install the latest version of PSoC Programmer and use the tool. Please refer to the attached user guide(Table 1-1) to identify the PSoC Programmer APIs for the device.
Thanks and Regards
Leo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Leo
Thanks for your answer.
I am facing some issues with the format of the hex files generated in the ModusToolbox environment when trying to program with the COM object.
1- My hex file is a unified hex including bootloader and application generated with the cymcuelftool.
The hex file is discontinue due to bootloader unused memory zone + gap between boot and app sections.
Here the two consecutive lines showing this address discontinuity
:4047C000000000000000000000000000000000000000000000000000000000000000000000000000E9000000C100000000000000000000000000000000000000000000000F
:4090000000400020E9960000D1960000D396000000000000000000000000000000000000000000000000000000000000D19600000000000000000000D1960000D19600004C
Unfortunately when calling the HEX_ReadFile() function, the imageSize returned by the function only include the first part of the hex and so application part is not programmed correctly.
2- I wanted to workaround this problem by programming separately the bootloader and the application hex files. But when calling the HEX_ReadFile() on these files I am facing format errors. Below is the error returned when parsing hex file build with default build environment of ModusToolbox
Failed! Hex File parsing failure. Unknown record type.
Thinking it was the record type 03 that was causing issue, I deleted this record line at the end of the file, then got error below :
Failed! Hex File parsing failure. PSoC Programmer does not support current type of hex file
I noticed that original hex files from ModusToolbox have most record length value of 0x10, whereas unified elf file from cymcuelftool provide record length of 0x40.
Can you please help.
Thanks,
Regards
Nicolas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Leo,
Can you please advise on this problem, I am still blocked.
In the post below DheerajK_81 mentioned that there is no compatibility of a ModusToolbox hex file with the PSOC Programmer tool, so I supposed by extension that the PSoCProgrammerCOM_Object cannot also be used ?
Solved: Modus generated hex file cannot be parsed by PSoC ... - Infineon Developer Community
Thanks
Nicolas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @nicolas ,
Yes, the ModusToolbox generated hex file is different in format compared to the PSoC Creator generated hex file. Hence you will have to use the openOCD commands to program the hex files that is generated using ModusToolbox.
You can find the OpenOCD tool in the path <ModusToolbox installation directory>/ModusToolbox/tools_2.4/OpenOCD
Here, in the docs folder you can find the user guide of the same which guides you on how you can use the CLI commands of OpenOCD using modus shell to program your hex file on the the PSoC target. (attaching the same here for your reference)
Hope this helps.
Warm Regards
Alen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Alen,
Thanks for your reply.
I have used "arm-none-eabi-objcopy.exe" --pad-to=0x9000 --gap-fill=0x00" postbuild command on the bootloader elf file to workaround the gap issue with the HEX_ReadFile() function.
Though it was all fine to get it working with the PSoCProgrammerCOM_Object, but I am now blocked on the last step of the program that is the checksum verification between hex and flash memory. I don't know why the "cymcuelftool.exe" --sign" postbuild command always set a checksum value of 0 in the hex file at the 9030 record ...
Here is my postbuild command, if anyone have an idea, it is more than welcome
POSTBUILD="$(CY_MCUELFTOOL_DIR)/bin/cymcuelftool.exe" --merge bootloader.elf app.elf --output unified.elf;\
"$(CY_MCUELFTOOL_DIR)/bin/cymcuelftool.exe" --sign unified.elf --output unified_signed.elf --hex unified_signed.hex
If I can't get this checksum working I'll go with the OpenOCD one.
Regards
Nicolas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @nicolas ,
The cymcuelf tool is not capable of creating this checksum in the hex file.
I have attached here a script which you can use for generating the checksum of the hexfile at 0x9030 0000 . All you have to do is pass the final hex file whose checksum is to be created as the argument to the script as shown below and it will generate a new .hex file (with csout_ extension) which will have the checksum of the hex file at the bottom.
Can you please try out the same and let me know if it works?
Example usage of the script:
Warm Regards
Alen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Alen,
I am confused the cymcuelf is not able to generate this cheksum as "CyMCUElfTool 1.0 User Guide" page 10 describes the command line to sign the elf file and also generate the corresponding signed hex.
However thanks for the python script it works fine. I will just modify it a little bit because I have already the 9030 record in the hex file as it comes from a merge of bootloader and app using cymcuelf tool, and then include it in the build command.
Best regards
Nicolas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @nicolas ,
We have found a bug in the CyMCUElfTool which prevents the same from generating the checksum for the generated hex file. We are currently working on resolving the same.
Glad the script helped.
Please feel free to post any queries or issues you may have on Infineon products in the community and we will be happy to help.
Warm Regards
Alen