Open
Description
The current code in ihex_mem_copy() assumes that bytes in a 16- or 32-bit word have to be swapped when the target is specified as big-endian. This is only true for little-endian host architectures like x86 where the library is compiled.
I propose to add compile-time checking of the host endianness to the configure script to make it work on big-endian CPUs like some ARM. However, I have yet to find a portable way of doing so.
A specifier for IHEX_ORDER_NATIVE would also be of benefit to disable byte-swapping completely, independent of the host endianness.