Different PSOC6 HEX record type from creator and KEIL MDK

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

cross mob
lock attach
Attachments are accessible only for community members.
JunjieC_16
Employee
Employee
Welcome!

I am porting PSOC6 projects into KEIL MDK(5.24). I follows the "AN219434" and help topics in the HELP of creator. I created a simple project using CM0 of PSOC6 only.

I can complie the project in MDK well but the record in the Hex file generated from KEIL is much different as Creator, and cannot be recognized by PSOC programmed (FAILED! Hex File parsing failure. Unknown record type.).  I attached the hexs from KEIL and Creator. Please advise. Thanks

0 Likes
1 Solution
JamesT_21
Moderator
Moderator
Moderator
10 solutions authored 5 solutions authored First solution authored

As it turns out, this is expected behavior. I've learned a little about the internal design of PSoC Programmer. It is not designed to use a pure hex file. Cypress tools (PSoC Creator) generate a standard hex file plus some additional information to identify the intended target, and to provide a quick checksum. In effect, it makes the standard hex file more robust - it can't end up on the wrong chip and cause failure.

So, a hex file created by a 3rd party IDE, use that party's programmer.

I will look into the idea of ALSO supporting standard hex files, but that has lots of potential repercussions. PSoC Programmer has worked like this for years, and it is a scriptable tool. We have no way of knowing who has built what scripts or command line tools that rely on parsing the PSoC Programmer hex file (which is well documented).

So for now, that's how it works. I appreciate the report, and the learning opportunity, and apologize that it did not work the way you expected.

I'm going to mark this answered. Let me know if you have any other questions.

View solution in original post

0 Likes
5 Replies
JamesT_21
Moderator
Moderator
Moderator
10 solutions authored 5 solutions authored First solution authored

Let me see what I can figure out. At this point I confirm that PSoC Programmer fails as described with the Keil hex file. I need to port the example into Keil and see if I can replicate your HEX file.

Jim

0 Likes
JamesT_21
Moderator
Moderator
Moderator
10 solutions authored 5 solutions authored First solution authored

Just a quick follow up. We are exploring. I'll keep you posted.

0 Likes
HaoW_21
Employee
Employee
First like received Welcome!

Hi JCUI,

I checked the hex file generated by Keil. The main difference with hex file generated by Creator is there is one line with record type '0x05' which means for specifying execution start address for the object file.

For example with the following line, the execution start address is 0x100000C1.

:04000005100000C126

I think PSoC programmer should ignore record type of '0x05'.

Hao

0 Likes
JamesT_21
Moderator
Moderator
Moderator
10 solutions authored 5 solutions authored First solution authored

Thanks Hao! I appreciate the update. The code example author is going to take a look on Monday - he's on business travel at the moment.

0 Likes
JamesT_21
Moderator
Moderator
Moderator
10 solutions authored 5 solutions authored First solution authored

As it turns out, this is expected behavior. I've learned a little about the internal design of PSoC Programmer. It is not designed to use a pure hex file. Cypress tools (PSoC Creator) generate a standard hex file plus some additional information to identify the intended target, and to provide a quick checksum. In effect, it makes the standard hex file more robust - it can't end up on the wrong chip and cause failure.

So, a hex file created by a 3rd party IDE, use that party's programmer.

I will look into the idea of ALSO supporting standard hex files, but that has lots of potential repercussions. PSoC Programmer has worked like this for years, and it is a scriptable tool. We have no way of knowing who has built what scripts or command line tools that rely on parsing the PSoC Programmer hex file (which is well documented).

So for now, that's how it works. I appreciate the report, and the learning opportunity, and apologize that it did not work the way you expected.

I'm going to mark this answered. Let me know if you have any other questions.

0 Likes