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
Normal Topic how to DISABLE_HWSERIAL (Read 23 times)
jimf
Junior Member
**
Offline


Posts: 23
Joined: May 30th, 2015
how to DISABLE_HWSERIAL
Jan 20th, 2026 at 4:10am
Print Post  
hi, I'm trying to use the GDBstub with a Nano and am getting the compiler error indicating multiple definitions of __vector_18.  I believe the problem is that both hardware serial and GDBstub both want to use the interrupt for USART RX.  I've had several conversations with chatGPT and it is recommending I disable compilation of HWSERIAL.  My project has a .ino file (containing #include<avr_debugger.h>) and other .h and .cpp files.  As recommended by chatGPT, I tried #define DISABLE_HWSERIAL at the top of my .ino file but get the same error.  Next it said: DISABLE_HWSERIAL is too late for the Arduino core build. By the time your .ino is seen, HardwareSerial.cpp has already been compiled.  It recommends putting DISABLE_HWSERIAL as a Compiler define.  I'm not able to find where that goes.....sooooo, if this all sounds plausible to a human reader, please tell me where to find in VisualMicro the place to enter DISABLE_HWSERIAL.  I'm using Visual studio 2026 and the accompanying Visualmicro.  Of course, chatGPT could be way off base...it is like having a smart friend that is not always right Smiley

Any help here is much appreciated.....jim
  

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


Posts: 2841
Joined: Feb 13th, 2019
Re: how to DISABLE_HWSERIAL
Reply #1 - Jan 20th, 2026 at 9:30am
Print Post  
Thanks for the report.   

From the log it seems you have the Serial Debugger enabled in vMicro, which you can disable by changing to the Release Build Configuration:
https://www.visualmicro.com/page/User-Guide.aspx?doc=Build-Configurations.html

This should help as currently the added code from the Serial Debugger will be dragging in all of the Hardware Serial functionality.

If you do need to add any additional defines for the core or libraries, these can be done from the vMicro > Project Properties > Configuration Defines, and they will be included in all compiler statements.
https://www.visualmicro.com/page/User-Guide.aspx?doc=Project-Properties-Referenc...
  
Back to top
IP Logged
 
jimf
Junior Member
**
Offline


Posts: 23
Joined: May 30th, 2015
Re: how to DISABLE_HWSERIAL
Reply #2 - Jan 20th, 2026 at 3:49pm
Print Post  
  Thank you!  Changing from debug to release did the trick! This will be my first time using the GDBstub and the VS debugger.....fingers crossed Smiley   
I've used the Visual Micro debugger a fair amount but really miss the ability to step, step into, and step over.  Thanks again....jim
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint