printf and float
So, I'm having an issue getting the printf() function suite to work with floating point values.
First, understand that I am not using STM32CubeIDE. It's a good tool, but I've had too many issues/complications using it. I use a custom Makefile and VScode for my development environment.
That said: With STM32CubeIDE I *can* go into the options and select "Use float with printf from newlib-nano (-u _printf_float)"
This adds "-u _printf_float" to the linker flags and floating point values work.
In My Makefile, I've added "-u _printf_float" to the linker arguments and floating point values are always "0.0".
I'm not sure what else would be causing this.
STM32's linker line versus mine:
arm-none-eabi-gcc -o "CT_ReadG431.elf" @"objects.list"
-mcpu=cortex-m4 -TSTM32G431KBTx_FLASH.ld
--specs=nosys.specs -Wl,-Map="CT_ReadG431.map" -Wl,--gc-sections -static --specs=nano.specs
-mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -u _printf_float -Wl,--start-group -lc -lm -Wl,--end-groupMine:
arm-none-eabi-gccm [Object list omitted for brevity] -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard
-specs=nano.specs -TSTM32G431KBTx_FLASH.ld -lc -lm -lnosys
-Wl,-Map=build/CT_ReadG431.map,--cref -Wl,--gc-sections -u _printf_float
-o build/CT_ReadG431.elfCould it be something else?