Author Topic: How to view debug messages on the uTasker Simulator  (Read 2290 times)

Offline Matias

  • Newbie
  • *
  • Posts: 1
    • View Profile
How to view debug messages on the uTasker Simulator
« on: November 29, 2022, 12:33:13 AM »
Hello! I am getting started with uTasker and got stuck when trying to simulate debug messages sent over UART. I've been following the guide at https://www.utasker.com/docs/uTasker/uTaskerV1.4_user_guide.PDF and got to the point of actually seeing the "Hello Worlds" when running the project on my FRDM-K64F through a serial monitor on my PC. However, when running the simulator I see at the bottom that the UART0 is mapped to the COM 4, but there is no COM Port showing up in my device manager and I could not connect to it using a serial monitor.

Do you know how I could see these messages sent over UART? Am I supposed to be doing something differently?

Thank you for your help! I am still learning about embedded systems at university and found the uTasker project super interesting.

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Re: How to view debug messages on the uTasker Simulator
« Reply #1 on: November 30, 2022, 01:05:26 AM »
Hi

If you would like the simulated processor to connect to a UART on the PC (the UART needs to be available as either RS232 port or VCOM) you can set the define for the corresponding processor UART in app_hw_xxx.h (where xxx is the processor reference).

#define SERIAL_PORT_0    10                                          // if we open UART channel 0 we simulate using comx on the PC

This would connect the first UART (or LPUART) to COM 10 (so you would need an interface COM10 to be available).

The simulator doesn't "create" an interface, but instead "uses" one.

This technique allows the simulated processor to communicate with another system connected to the PC via a UART and supports multiple UART too.


The second technique is to install a virtual serial loop-back (like COM0COM - see https://www.utasker.com/forum/index.php?topic=2012.msg7618#msg7618) which creates two virtual COM ports on the PC that are connected. For example COM10 and COM11.

If this were configured the PC would have these two COM ports and the above configuration would communicate on COM10, which is looped-back to COM11. That means that a terminal emulator can be opened on COM11 that receives all data sent by the simulated processor on its first UART. All data sent by the terminal emulators is correspondingly received by the UART of the simulated processor so that it behaves as a terminal emulator connected to a device (as in the case of your terminal emulator connected to the serial interface of the FRDM-K64F board).

Regards

Mark