whitequark / libfx2

Chip support package for Cypress EZ-USB FX2 series microcontrollers
BSD Zero Clause License
73 stars 26 forks source link

fx2.format: Ignore record type 05 in input #8

Closed gregdavill closed 2 years ago

gregdavill commented 2 years ago

I'm using https://github.com/GlasgowEmbedded/glasgow/pull/185 to program some CC2530's with the glasgow. The IAR compiler for those ICs generates a ihex file that contains a 0x05 record at the end to indicate the restart address.

Because that applet makes use of the ihex input parser in libfx2, this PR is here.

Record 0x05 is defined as follows https://en.wikipedia.org/wiki/Intel_HEX#Record_types

05 Start Linear Address The byte count is always 04, the address field is 0000. The four data bytes represent a 32-bit address value (big-endian). In the case of CPUs that support it, this 32-bit address is the starting execution address).