Forum Discussion
ETang2
Occasional Contributor
4 months agoNiosV and juart-terminal
I had a project which works fine under niosII. I upgrade all the project with niosv and all seems fine except printing values in juart-terminal. Here is the main code : #include <stdio.h> #inclu...
- 4 months ago
Summary:
- printf(%f) always prints 0, even if the variable contains valid floating-point number.
Change the On-Chip Ram size from decimal (such as 167.5KB / 167500 bytes) to binary (such as 167KiB / 171008 bytes). - Character é is printed wrongly.
Change the active code page of Windows's command prompt from 437 to 65001 (UTF-8)
- printf(%f) always prints 0, even if the variable contains valid floating-point number.
LiangYuG_Altera
Contributor
4 months agoHi ETang2 ,
Can you add this line of code after the %f prints?
I wonder if your system's printf (%f) is affected by newlib library configuration.
printf("Raw Decimal: %ld\n", *(alt_u32*)&co2Concentration);Example result:
Regards,
Liang Yu