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 Changing Arduino Core HardwareSerial.h Defines (Read 114 times)
groz
Junior Member
**
Offline


Posts: 24
Joined: Feb 21st, 2018
Changing Arduino Core HardwareSerial.h Defines
Nov 27th, 2024 at 10:54pm
Print Post  
For the life of me, why is there not a way to include the below defines# into the sketch and have the arduino core adjust the serial buffers during build:
SERIAL_TX_BUFFER_SIZE 
SERIAL_RX_BUFFER_SIZE 

There are multiple options for "Configure IDE Locations" which change where the HardwareSerial.h is located. If new versions of the Arduino software are installed, manually declared #defines are replaced.

A secondary question is: where are the core files stored when set to Visual Micro (NO IDE) ?

Note: I'm using a non-preemptive interrupt board atmega2560 and have critical hardware events which may delay serial port processing, hence the reason to increase buffer size.

Thanks
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Online


Posts: 2499
Joined: Feb 13th, 2019
Re: Changing Arduino Core HardwareSerial.h Defines
Reply #1 - Nov 28th, 2024 at 9:21am
Print Post  
You can add these into vMicro > Project Properties > Micro General: Configuration Defines, which will affect all core/libraries/project code (and you will see them in the compiler output):
e.g. SERIAL_TX_BUFFER_SIZE=10;SERIAL_RX_BUFFER_SIZE=10;
Doc: https://visualmicro.com/page/User-Guide.aspx?doc=Project-Properties-Reference.ht...

When the "Visual Micro (No IDE)" Option is set, the default location for board packages is "%LOCALAPPDATA%\arduino15" (which is the default for the Arduino IDE), unless this is overridden on the IDE Locations screen with the "Optional Physical Folder for Downloaded Board Packages Location" field.
Doc:https://visualmicro.com/page/User-Guide.aspx?doc=Advanced-Config-Manager.html
« Last Edit: Nov 28th, 2024 at 9:22am by Simon@Visual Micro »  
Back to top
IP Logged
 
groz
Junior Member
**
Offline


Posts: 24
Joined: Feb 21st, 2018
Re: Changing Arduino Core HardwareSerial.h Defines
Reply #2 - Nov 29th, 2024 at 2:55am
Print Post  
Thanks you so much Simon  Smiley

This is exactly what I was looking for. You may want to put a note on this in the FAQ page for defines as it pertains to buffer size.

If you look at the Arduino forum, its just a cat fight on how you should handle serial data better. I will make sure I make a mention on their site how VM has a very clean way to handle this. 

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