5 Replies Latest reply on Nov 8, 2017 12:33 PM by jett

    Different PSOC6 HEX record type from creator and KEIL MDK

    jcui

      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

        • 1. Re: Different PSOC6 HEX record type from creator and KEIL MDK
          jett

          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

          • 2. Re: Different PSOC6 HEX record type from creator and KEIL MDK
            jett

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

            • 3. Re: Different PSOC6 HEX record type from creator and KEIL MDK
              whao

              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

              • 4. Re: Different PSOC6 HEX record type from creator and KEIL MDK
                jett

                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.

                • 5. Re: Different PSOC6 HEX record type from creator and KEIL MDK
                  jett

                  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.