Hello,
I have a console application project in MCUXpresso, and I can interact with the built-in console application of MCUXpresso.
Now I want to access the console of MCUXpresso using PuTTY, but the communication is being refused.
What configuration can I modify in MCUXpresso to allow this access? I’m using the latest version of MCUXpresso (v11.9.0).
My main goal is to use MCUXpresso as an application server, and then develope another client application to interact with the server.
Thank you for your help.
Best regards,
Nobby
解決済! 解決策の投稿を見る。
Hi @Nobby,
I'm sorry, I hadn't noted that you were using an NFC reader chip. It is my understanding that these readers do not initiate the UART module in most of the example codes, which means that the DEBUG_PRINTF("") function can only be used via Semihosting, through the SWO pins. This is why you are unable to see any output on a serial terminal.
That said, in the SDK you can find some UART example codes that initiate the UART module and do serial transfers to it when the project is set up with "UART Console". Using these examples, you will be able to add UART communication to your application. My suggestion is to first import one of the examples and set it up according to the readme.txt file of the project in order to test the serial communication, and once you have achieved serial communication, port this initialization to your application.
BR,
Edwin.
Hi @Nobby,
What error message are you getting when you try to set the communication with PuTTY? It is worth mentioning that only one connection to the COM port can be achieved at once, so there is no way of having both MCUXpresso serial terminal and PuTTY receiving the UART output of your device.
BR,
Edwin.
Hello Edwin,
Thank you for your response.
For information, I selected two different ways for my test on the MCUXpresso:
MCUOption1: Quick Settings / SDK Debig Console / Semihost console
MCUOption2: Quick Settings / SDK Debig Console / UART console
I also tested two different ways on PUTTY:
PuttyOption1: using SSH, from the IP adress and Port adress displayed on the LinkServer Debug
PuttyOption2: using Serial, from the COM numbre on the Device Manager
Case1: When I selected MCUOption1, I can access to the console of MCUXpresso, and when I try PuttyOption1, I get an error "Network error: Connection refused". This is the case you said that I cannot have access to both consoles simultaneously.
Case2: When I selected MCUOption2, I cannot acces to the console of the MCUXPresso, and when I try PuttyOption1, I get the same error as bellow (Case1): "Network error: Connection refused".
Case3: When I selected MCUOption1 and PuttyOption2, I have nothing displayed on the console of Putty and also no erros. I have to mentioned that I called the function DEBUG_PRINTF("") in my code.
Case4: When I selected MCUOption1 and PuttyOption2, I get the same error as bellow (Case3)
Best Regards
Nobby
Hi @Nobby,
Case 1 & 2 are based on UART console, which means that you should be able to receive DEBUG_PRINTF("") calls on a serial terminal like PuTTY, Tera Term or the MCUXpresso IDE built-in terminal, as such:
On the other hand, Case 3 & 4 are based on Semihost console. This means that the DEBUG_PRINTF("") calls are not sent via UART, and will instead be seen on the direct connection with the MCUXpresso console, as such:
This is you don't get any explicit errors on case 3 & 4, but you also don't see anything in PuTTY.
With respect on Case 2, this is the case that you should be able to access with no issue. Do you also see this issue on other serial terminals like Tera Term or the IDE built-in terminal?
BR,
Edwin.
Hi @EdwinHz
Thank you for the response.
I still have nothing from the output message using the case 2 with UART console from the built-in terminal of the MCUXpresso.
Maybe we do not have the same console configuration ? like different Baude rate? This is the configuration I used
BR
Nobby
Hi @Nobby,
I'm sorry, I hadn't noted that you were using an NFC reader chip. It is my understanding that these readers do not initiate the UART module in most of the example codes, which means that the DEBUG_PRINTF("") function can only be used via Semihosting, through the SWO pins. This is why you are unable to see any output on a serial terminal.
That said, in the SDK you can find some UART example codes that initiate the UART module and do serial transfers to it when the project is set up with "UART Console". Using these examples, you will be able to add UART communication to your application. My suggestion is to first import one of the examples and set it up according to the readme.txt file of the project in order to test the serial communication, and once you have achieved serial communication, port this initialization to your application.
BR,
Edwin.