when building program based on MPC5744P

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

when building program based on MPC5744P

716 Views
billie60
Contributor I

hello! I am using s32ds for power. when I build my project, there were some errors in my project. like Ld error: undefined reference to '__close_console', Ld error: undefined reference to '__read_console', Ld error: undefined reference to '__write_console' and make:***[....] Error 1.   Can you help me? 

 

Thanks 

0 Kudos
Reply
3 Replies

707 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

As the error describes, there is missing definition for the macros you call.

Check if there are any program branches like #if / #ifdef which leads to the definition of the missing macros.

best regards,
Peter

0 Kudos
Reply

695 Views
billie60
Contributor I

Hello, peter. I have never defined macros such as '_XXX_console'. I checked the whole project and couldn't find where '_XXX_console' was. This is the .zip of my project. Can you help me to check the problem? Thank you sooo much!  

best wishes

bille

6b0c74df7498188113bc899d0788796.png

0 Kudos
Reply

682 Views
jiri_kral
NXP Employee
NXP Employee

Hi, 

you need to implement such functions by yourself - typically this functions sends or reads data from UART.. printf and scanf are calling these functions at the end.

 

For reference you can look at this example - 

https://community.nxp.com/t5/S32-Design-Studio-Knowledge-Base/EXAMPLE-S32k144-UART-printf-scanf-unde...

0 Kudos
Reply