KW36 bluetooth : Semihost console compilation error

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

KW36 bluetooth : Semihost console compilation error

906 Views
zhi_wang
Contributor III

Hi someone,

i have met a issue when using semihost console mode, the demo can not pass the compilation.

the details as below:

Demo code : 

   frdmkw36_wireless_examples_bluetooth_glucose_s_freertos 

settings for printf: 

   checked or unchecked “Redirect SDK “PRINTF” to C library “printf” , both have tried while importing the demo

Setting for  SDK_DEBUGCONSOLE:

pastedImage_4.png

pastedImage_6.png

Code changed:

   ported the BOARD_InitDebugConsole related code from hello work demo

Results:

1) Set to Semihost cosole mode, the demo cannot pass the compilation while PRINTF is called.

the error test is :  C:\Users\DELL\Documents\MCUXpressoIDE_11.0.0_2516\workspace\frdmkw36_wireless_examples_bluetooth_glucose_s_freertos\Debug/../source/glucose_sensor.c:241: undefined reference to `_printf'

thePRINTF is called here:

pastedImage_14.png

on this condition, no matter the setting of “printf ” lib

2) Setting to uart console mode

the compilation is ok, and the uart terminator is printed the expected strings.

pastedImage_17.png

summarize: if the  SDK_DEBUGCONSOLE = 0, 

pastedImage_18.png

the printf and related fucntions should defined from the IDE lib, should not have this compilation error.

But why this happen?

Labels (4)
0 Kudos
Reply
1 Reply

805 Views
estephania_mart
NXP TechSupport
NXP TechSupport

Hello,

The wireless connectivity examples need the debug console set as a UART as the stacks has some timing requirements that are not met when using the semihosting as well as the resources used in order to achieve it.

Sorry for the inconveniences this might cause you.

Regards,

Estephania

0 Kudos
Reply