Solved! Go to Solution.
I've run into the same problem with being unable to use the %x format specifier in printf() calls (results: no output of the hexadecimal numbers I am expecting). However my development is for Coldfire V1 architecture using the C_4i_CF_RegABI_MSL.a and the C_4i_CF_RegABI_Runtime.a libraries in a product currently in production. I'm inexperienced at recompiling the libraries, and I'm worried that I may FUBAR the whole thing. Can anyone provide me guidance on the matter? Thanks.
Similiar problem: %f in printf() doesn't work.
I've got this version of CodeWarriors installed: "CW MCU v10.0"
Could somebody update the instructions to enable %f (there is no *.mcp file in the installation directory).
My target is the Coldfire V2 processor MCF5232. It has EMAC, and I'm able to use floating point variables.
But no go on %f in printf().
P.S. - I'm thinking of just writing my own print_float() function for this, unless there is an easy fix.
Thought I'd go back and give the solutions to these old posts.
%f in printf(); will work if you do the following in your project and CodeWarriors:
Include the following libraries in your .c code (maybe some are not needed)
Highlight your configuration -> right click Properties/C/C++ Build/Settings/Tool/Settings/Librarian/Model = C9x
Print format = int_LL_FP
%f specifier in printf(); and the various other string functions should work.
I had the same problem using sprintf with %f.
On CW10.2, all you have to do is to include stdio.h and then go to Project > Properties > Settings. Under the Tool Settings tab, click on Librarian. On the right, in Print formats, select int_LL_FP. Leave the option above it as ewl.
Is this fix still applicable to CodeWarrior Dev Studio v. 7.1?
If so, can you update the project path and filename of the library project that needs to be modified? They appear to have been changed since you first posted the fix.
I tryed your printf files, but I have some problem. I'm using C_4i_CF_SZ.a for a mcf52221.
When I compile your files the linker gives me errors:
- undefined MIN
- undefined terminal_print
where can I find this code or how can I implement them?