Hello
CodeWarrior for MCU is delivered with reduce working set MSL libraries.
In this library, printf does not support all format modifiers. This allows us to reduce the footprint of function printf.
You can activate support for display of Hexadecimal number in the following way:
- Start the IDE
- Open the project {Install}\ColdFire_Support\msl\MSL_C\MSL_ColdFire\Project\MSL_C.CF.v1.word.mcp (where {Install} refers to your CodeWarrior installation directory)
- Activate target "2i ColdFire RegABI"
- Open the target settings dialog (press ALT+F7)
- Switch to the "C/C++ Preprocessor" panel
- Add following line in there:
#define LIBDEF_PRINTF_ALLOW_HEXINT 1
- Close the Target Settings dialog pressing OK
- Press the Make button to rebuild the library
- rebuild your project.
printf should support %X from now on.
CrasyCat