I'm having problem with double precision constants when using Yagarto
and associated libraries.
The problem seems to be that the lower 4 bytes are swapped with the
upper 4 bytes, compared to what the libraries and GDB expects.
A simple line of code
results in GDB reporting the value as 5.31664595E-315
whereas lines like:
1 | int i = 10;
|
2 | double d = i;
|
has the wanted result. Manually entering values in GDB results in values
GDB understands.
This is probably caused by some wrong or missing compiler option(s), but
I haven't figured out what I'm missing.
Currently the following CFLAGS are used:
CFLAGS= -g -O0 -mcpu=arm7tdmi -mthumb-interwork
And the following linker flags:
LFLAGS= -L $(YAGARTO_DIR)/lib/gcc/arm-elf/4.4.2/thumb/interwork
I have tried this with other/older version of Yagarto and the GNU tools,
but with same result.
Does anyone know which options to use and/or the options used to
generated the libraries?
Regards,
Klaus