-
-
Notifications
You must be signed in to change notification settings - Fork 64
How to develop with Visual Studio
As an IDE Visual Studio with the extension Visual Micro can be used.
The Visual Micro plugin allows to use board.txt
files, that overwrites the usb settings when uploading to a board.
So when using Visual Studio you do not have to use the CLP Boards you can use the normal boards settings for uploading.
When using Visual Studio most steps from the normal setup with Arduino IDE apply. But the following you have to consider when using Visual Studio as IDE:
- Installing libraries can be done with the integrated Library-Manager
- When compiling with Visual Studio use the "Release" configuration
- For debugging don't use the integrated debugger of Visual Studio, as it will most likely break the USB communication.
- Don't forget to include a
board.txt
file in the root directory of your sketch, if you don't use the CLP Boards.
example of a board.txt
file:
# build properties for LightingNodePRO
build.vid=0x1b1c
build.pid=0x0c0b
build.usb_product="Lighting Node PRO"
build.usb_manufacturer="Corsair"
Use Serial Monitor and upload the sketch with the Debug mode enabled.
To enable the Debug mode, add the following line to the board.txt
:
build.extra_flags={build.usb_flags} -DDEBUG
If the board.txt
file already contains build.extra_flags
add -DDEBUG
to the end of the line and remove the #
at the beginning of the line if there is one.
For advanced debugging you can use the DebugSketch.
In the board.txt file, the default values for the debugging options can be set.
After uploading the sketch open the serial monitor with baud rate 115200 and set the line ending to "Line Feed"/"Newline" (\n
).