Monday, 26 August 2013

Passing long long int with ARM GCC

Passing long long int with ARM GCC

I'm working in bare metal on the Raspberry Pi, and I have found that if I
try to pass an unsigned long long integer to my printf function, the value
is truncated, and replaced with garbage.
I'm trying to figure out why this is happening. I have confirmed that the
stack is setup on a good boundary (0x8000). This is written in C, so GCC
should handle pushing/poping to pass values to printf, so I don't think it
is a simple alignment problem.
Does the Raspberry Pi definitely use EABI (not OABI)? I'm currently using
arm-none-eabi-gcc as the compiler.
Any ideas?
Thanks

No comments:

Post a Comment