Hi, I ran and tested hello_world project, debug output work. I'm trying to set up debug functionality in ble prj (MCUXpresso 10.0.2_411, SDK2.2_MKW41Z, frdmkw41z_wireless_examples_bluetooth_temperature_sensor) and have problem.
1) I added to linker script GROUP (libcr_semihost_nf.a libcr_c.a libcr_eabihelpers.a) and _pvHeapStart region.
2)Preprocessor:
CR_INTEGER_PRINTF
DEBUG
FRDM_KW41Z
FREEDOM
PRINTF_FLOAT_ENABLE=0
SCANF_FLOAT_ENABLE=0
PRINTF_ADVANCED_ENABLE=0
SCANF_ADVANCED_ENABLE=0
SDK_DEBUGCONSOLE=0
__MCUXPRESSO
__USE_CMSIS
CPU_MKW41Z512VHT4_cm0plus
CPU_MKW41Z512VHT4
__REDLIB__
3)Calling
BOARD_InitPins();
BOARD_BootClockRUN();
BOARD_InitDebugConsole();
PRINTF("hello world.\r\n");
But nothing is output to the console. What's wrong?
Hi Gerardo,
is it possible to perform this step once project has already been imported please ? i already modificate and import a lot in my project but my console is still not working ... ( i have a compilation error on _printf not defined ...)
https://community.nxp.com/message/1067949?q=console
Thanks a lot
Hello Artem Kabakov,
The bluetooth_temperature_sensor doesn't have console output enabled by default since it is a low power enabled demo. You can check out the BLE temperature collector demo which enables a shell console and writes data with the shell_write("...") function.
While importing the BLE project, to use the UART for printing (instead of the default semihosting), clear the “Enable semihost” checkbox under the project options. Then, click on Next.
On the Advanced Settings wizard, clear the checkbox “Redirect SDK “PRINTF” to C library “printf” in order to use the MCUXpresso SDK console functions for printing instead of generic C library ones. Then click on Finish.
Let me know if you have any question.
Regards,
Gerardo