Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 8 Replies) Serial.println: No output for STM32 Nucleo Boards (Read 1989 times)
RichardK
Junior Member
**
Offline


Posts: 47
Joined: Jul 11th, 2023
Serial.println: No output for STM32 Nucleo Boards
Jul 29th, 2023 at 12:27pm
Print Post  
I have two vMicro projects for the two STM boards (STM32 C0... and STM32 H7...) using Visual Micro Release 2023.0507.14 - 26th July 2023.

These projects are created using

   Generic STM32C0 series and
   Generic STM32H7 series

My problem is: By using 

   Serial.println("Hello World");

I get no output on the serial console. 

Any help appreciated.

Thanks
Richard
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12166
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Serial.println: No output for STM32 Nucleo Boards
Reply #1 - Jul 29th, 2023 at 1:05pm
Print Post  
Make sure the DTR checkbox at the bottom of the serial monitor is ON. If that is not the issue then provide the information requested in yellow at the top of this page.
  
Back to top
IP Logged
 
RichardK
Junior Member
**
Offline


Posts: 47
Joined: Jul 11th, 2023
Re: Serial.println: No output for STM32 Nucleo Boards
Reply #2 - Jul 29th, 2023 at 1:55pm
Print Post  
Hi Tim,

the DTR checkbox at the bottom of the serial monitor is ON. 

Attached you find the Compiler Build Properties.

Thanks
Richard
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12166
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Serial.println: No output for STM32 Nucleo Boards
Reply #3 - Jul 29th, 2023 at 8:47pm
Print Post  
Assume you are connecting to the correct port (see device manager to confirm). and also that you set the correct baud rate on the bottom tool bar of the serial monitor?

Does it work in puTTy or the arduino ide?
  
Back to top
IP Logged
 
RichardK
Junior Member
**
Offline


Posts: 47
Joined: Jul 11th, 2023
Re: Serial.println: No output for STM32 Nucleo Boards
Reply #4 - Jul 30th, 2023 at 10:43am
Print Post  
No, it does not work with the Arduino IDE 2.1.1. I get

Sketch uses 12012 bytes (36%) of program storage space. Maximum is 32768 bytes.
Global variables use 1176 bytes (19%) of dynamic memory, leaving 4968 bytes for local variables. Maximum is 6144 bytes.
      -------------------------------------------------------------
                       STM32CubeProgrammer v2.13.0                  
      -------------------------------------------------------------

ST-LINK SN  : 066AFF313050353043144645
ST-LINK FW  : V2J41M27
Board       : NUCLEO-C031C6
Voltage     : 3.24V
SWD freq    : 4000 KHz
Connect mode: Under Reset
Reset mode  : Hardware reset
Device ID   : 0x453
Revision ID : Rev Z
Device name : STM32C03x
Flash size  : 32 KBytes
Device type : MCU
Device CPU  : Cortex-M0+
BL Version  : 0x52



Memory Programming ...
Opening and parsing file: STM32_C0.ino.bin
  File          : STM32_C0.ino.bin
  Size          : 11.94 KB 
  Address       : 0x08000000 


Erasing memory corresponding to segment 0:
Erasing internal memory sectors [0 5]
Download in Progress:


File download complete
Time elapsed during download operation: 00:00:00.453

RUNNING Program ... 
  Address:      : 0x8000000
Application is running, Please Hold on...
Start operation achieved successfully


With the scetch

Code (C++)
Select All
void setup()
{
  Serial.begin(115200);
  while (!Serial) {}

  Serial.println("Setup STM32-C0");
}

void loop()
{
Serial.println("loop STM32-C0");
}
 



nothing is displayed on the serial monitor.

Richard
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2499
Joined: Feb 13th, 2019
Re: Serial.println: No output for STM32 Nucleo Boards
Reply #5 - Jul 31st, 2023 at 9:17am
Print Post  
Can you confirm if the boards you are using have the STLink probe built-in? (if possible provide links to the specific boards)
  
Back to top
IP Logged
 
RichardK
Junior Member
**
Offline


Posts: 47
Joined: Jul 11th, 2023
Re: Serial.println: No output for STM32 Nucleo Boards
Reply #6 - Jul 31st, 2023 at 5:03pm
Print Post  
Yes, both boards have the STLink probe. 

On the boards they are identified by

   Nucleo-C031C6 NucC031C6$KU2
   Nucleo-H745ZI-Q NuH745ZIQ$AT3

Richard
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2499
Joined: Feb 13th, 2019
Re: Serial.println: No output for STM32 Nucleo Boards
Reply #7 - Jul 31st, 2023 at 5:55pm
Print Post  
Thanks for clarifying the boards in use.

The Nucleo-H745ZI-Q NuH745ZIQ$AT3 does not appear to be supported by this board package currently (see your other thread with details)

The Nucleo-C031C6 NucC031C6$KU2 can be found under "Nucleo 64" board in this package, and then selecting the "Nucleo C031C6" chip.

Let us know if selecting the correct Nucleo variant helps at all?

If it does not it may be worth trying the Serial1 and Serial2 objects instead.

Also check the jumpers on the STLink are correct from the ST documentation.
  
Back to top
IP Logged
 
RichardK
Junior Member
**
Offline


Posts: 47
Joined: Jul 11th, 2023
Re: Serial.println: No output for STM32 Nucleo Boards
Reply #8 - Jul 31st, 2023 at 8:30pm
Print Post  
Hi Simon,

using the Nucleo-64 board group was the key. Thank you so much.

I would never have thought that a board named "STM32 ..." with a 32-bit M0 belongs to a board group named "Nucleo-64". 

When I was trying to solve the problem by searching the internet, I got a lot of confusing information. Quite a lot of people failed with this problem, and finished with the conclusion, that it is not possible to use serial.println with STM boards and the Visual Micro extension.

Thank you
Richard


  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint