What are hex 03 or 05 type hex entries in iHex?
Entry Type 03: Start Segment Address For 80x86 processors, sets the initial contents of CS: IP registers. The address field is 0000, the number of bytes is 04, the first two bytes are the CS value, the last two bytes are the IP value.
Record type 05: Starting linear address . The address field is 0000 (not used), and the number of bytes is 04. Four data bytes are a 32-bit value loaded into the EIP register 80386 and a higher CPU.
Does that even make sense for an ARM program?
Whenever I create .hex for programming the embedded ARM, the ending looks something like this:
: 10851400B4040020BC040020BC040020C4040020D7
: 10852400C4040020CC040020CC040020D404002087
: 10853400D4040020DC040020DC040020E404002037
: 10854400E4040020EC040020EC040020F4040020E7
: 10855400F4040020FC040020FC040020FFFFFFFFC3
: 048564000000020011
: 040 000 05 08002910B6
: 00000001FF
I edited a programming application to ignore this entry, and only today an employee reported that his compiler created an entry like 03 in the second line, which prevented MPU programming.
Why is objcopy creating these entries? Can I stop him from doing this?
Relevant makefile lines:
FORMAT = ihex
OBJCOPY = arm-elf-objcopy
%.hex: %.elf
@echo
@echo $(MSG_FLASH) $@
$(OBJCOPY) -O $(FORMAT) $< $@