Hello everyone,
I recently started working with CodeWarrior on the TRK-MPC5606B development board.
I used the project included in the DVD and I was able to run it on the board.
I then made a few changes to the code using standard C library built-in functions (nothing complicated, just printf, sprintf and some string manipulation functions).
The project was compiled but the linker failed to finish the build with the following error for each of the function used:
>undefined: 'sprintf'
>Referenced from 'main' in main_c.obj
C:/Freescale/CW MCU v10.5/MCU/PA_Tools/Command_Line_Tools/mwldeppc|Linker|Error
>Link failed.
Of course, the header files: string.h, stdio.h & stdlib.h are already included in the source code.
I also checked the include paths and the directory containing the necessary files is there (see screenshot below).
Any help would be appreciated.
Best Regards,
Riadh
已解决! 转到解答。
Hi Riadh,
I don't have a board so I can not test it.
I've created an example based on MCU V10.6 and on MCU V10.5
In the example, I've added sprintf code and was able to build the project on both version without problem.
Attached you will fidn the example I've created for MCU v10.5
Have a great day,
Pascal
Freescale Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Riadh,
I don't have a board so I can not test it.
I've created an example based on MCU V10.6 and on MCU V10.5
In the example, I've added sprintf code and was able to build the project on both version without problem.
Attached you will fidn the example I've created for MCU v10.5
Have a great day,
Pascal
Freescale Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Pascal,
All the functions are working fine now.
However, I could not identify the difference between the example project and the one you sent me, which is somewhat confusing.
Anyway, thank you for your support.
Best Regards,
Riadh