Hi,
I am using the controlCARD board (TMDCNCD28388D). I am trying to generate the hex format of my firmware using ARM Hex Utility. Then, I load the generated hex file on the flash memory of the CM core by using another firmware developed by myself. However, after loading the firmware and restarting the core, the new firmware will not successfully run. To figure it out, I compared the hex file content with the actual firmware which is generated by JTAG and loaded on the flash. I found out that almost all of both contents are the same except for some specific locations. So, I tried to make changes to the firmware generated by Hex Utility and make it similar to the firmware generated by the JTAG. In this way, after loading the firmware on the flash, the firmware was successfully executed and everything was ok. However, I could find out what was the exact root cause of this problem. But, I found two differences in these two files that might facilitate finding a solution. So, here I present the details of these two differences. I would appreciate it if someone can help me to figure out a solution for this issue.
1- There exist 6 additional bytes at the end of blocks that have the size of 0XFFFF in the firmware generated by Hex Utility while these 6 bytes do not exist in the same blocks in the firmware generated by the JTAG. In the following picture, I have highlighted the additional 6 bytes generated by the Hex Utility. This picture is a snapshot of the end of a block that has the size of 0xFFFF.
Also, I have shown the memory map of the CM in the picture below where the same block of the firmware, which is generated by the JTAG, is loaded. This picture is a snapshot of the end of the same block that I showed in the picture above.
2- The last byte in the firmware generated by the JTAG is "1F" while the last byte (I mean the last byte before those additional 6 bytes) in the firmware generated by the Hex Utility is "00".
Honestly, I do not know what these ending bytes mean. So, I just tried to find a solution. So, I tried to change the firmware generated by the Hex Utility and make it the same as the firmware generated by the JTAG.
Also, as another observation, I should mention that when I try to generate a small size firmware which for example has a size of less than a SECTOR of the flash memory, everything is ok. For example, when I generate a LED_blinky example with Hex Utility, the generated file is the same as the one generated by JTAG. However, when I try to generate a large size firmware, in my case ~170KB, which will be placed on more than one SECTORs of the flash memory, this problem will happen. I would appreciate it if someone can explain why this is happening.
Kind Regards,
Alex