- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I work from a project from psoc creator 2.2 with cypress kit-014 and i try to build it with new psoc creator 4.0 and cypress kit-059
with my new custom board.
How modify my project to work correctly with sprintf ?
sprintf doesn't work.
// Calcul de la température en °Celcius
Tx = ( Nx * q ) / 0.01 - 273.15;
// Affichage du nombre Nx
CharLCD_Position(3,0);
CharLCD_PrintString("Nx = ");
CharLCD_PrintNumber(Nx);
// Affichage de la température
// avec le caractère spécial °
CharLCD_Position(2,0);
CharLCD_PrintString("T = ");
sprintf(tstr,"%+9.4f",Tx);
CharLCD_PrintString(tstr);
Thank you for the help.
Patrick Guérangé
Teacher
France
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Welcome in the forum.
When using sprintf()
Set "use newlib nano"
set "Use newlib nano float formatting" in Build Settings -> Linker
ans increase heap size to 0x0200 in system view.
Happy coding
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do you have this #include <stdio.h> at the start of the main.c ? Post you code so we can check it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Welcome in the forum.
When using sprintf()
Set "use newlib nano"
set "Use newlib nano float formatting" in Build Settings -> Linker
ans increase heap size to 0x0200 in system view.
Happy coding
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
It is ok with Bob information and before with cypress support.
Thank's.
Patrick