My tools are: MCUXpresso 10.1 & FRDM-K64F KSDK v 2.4
Configuring new project with "Empty board file", generates simple main.c with
PRINTF("Hello World").
Using SDK debug console with "UART" option, PRINTF() is executed but no output to console.
The same setup but with "Semihosting" is working well.
Hello shaul dorf,
When you Configuring new project with "Empty board file", there is no configure code for UART,
the inti UART pins function "BOARD_InitBootPins();" and init configuration UART function " BOARD_InitDebugConsole();" are all empty. so you can't printf data through UART.
So If you want use UART to printf, you can choose "Default board files" when create new project,
or copy the UART configuraiton code into your own project .
BTW, recommend you use the latest version MCUXPresso IDE v10.2.1 :https://community.nxp.com/community/mcuxpresso/mcuxpresso-ide/blog/2018/07/27/mcuxpresso-ide-v1021-n...
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello Alice
Thank's
My idea was to have tool which opens empty project with console debugging option.
This project will be used to configure peripherals without API (direct access to peripheral registers)
Your suggestion is working fine, but manual adjustments are needed:
If you want to use this project as a template than you will need export and import without
Debug.lunch and *.mex files.
I think it works fine but a lot of overhead.
My assumption was that it is done with "empty board" option
Shaul
Hello Shaul,
Printf to Console view of IDE (without UART) is working well when create empty proejct .
If you want to use UART printf to teminal of PC , we need configure UART, also the configuration code of UART
can directly setting registers by yourself (do not use the SDK API) 。
BR
Alice
Hello shaul dorf,
Please add the definition of "SDK_DEBUGCONSOLE" as below :
then clean , build your project , it can work well , I test on my side :
Hope it helps,
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Alice Thanks
Sorry I don't know where to fined this definition of "SDK_DEBUGCONSOLE"?
Shaul
Hello Shaul,
I take screenshots to show the steps :
Hope it helps,
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello Alice
I just created new empty board project and have added:
SDK_DEBUGCONSOLE=1
REDLIB
FSL_RTOS_BM
SDK_OS_BAREMETAL
CR_INTEGER_PRINTF
PRINTF_FLOAT_ENABLE=0
CPU_MK64FN1M0VLL12
CPU_MK64FN1M0VLL12_cm4
_MCUXPRESSO
USECMSIS
DEBUG
The result was no print to terminal or console.
In my demo that you have tested I changed board.c file to support debugger.
I have attached doc. file how to create empty project that will support printf.
I'm attaching this doc. again.
A. So my question is:
1. using this doc I generate empty project (as a template for empty project)
2. export this project as zip file
3. import it to working space
4. rename it and use it for a new project.
What wrong with this procedure?
B. Another way is:
In working directory:
1. Use Cut and Paste for new project (Which generates new project with different index)
2. Rename it
Regards
Shaul
Hello Shaul,
Your proejct can work well on my side.
When you import proejct, Recommend you use import project button in Quickstart Penal :
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------