I'm developing a program for ARM architecture (bare metal) using a GCC cross compiler (arm-none-eabi-). To keep the code size small, I use a "--specs=nano.specs" linker flag, to link against newlib-nano. The problem I've ran into is having "long long" support in printf, i.e.:
long long int val = 1234;
pritnf("%lld", val);
Adding "-u _printf_float" linker flag does not solve this. It does cause the code size to increase by 9kB, but it only seems to be adding float support, without "long long" support. Linking against newlib (removing the "--specs=nano.specs" flag) - although does solve the issue - is not acceptable, as it causes the code size to increase by 46kB.
Are there any flags that re-enable only the "long long" support for newlib-nano version of printf?
uint32_t
s and printing those. – unwind-1234LL
– Jonathan Wakely