Intended to be used together with Céu-Maker, SelectDevice
is an application that lists the connected Arduino boards and allows the user to select one.
In Céu-Maker, all Céu-Arduino applications should contain a board.conf
file, which defines for which Arduino board and port the application should be uploaded to. It stores 3 settings, separated by a blank space:
If this file doesn't exists, the Céu-Arduino.exe
run SelectDevice
so the user select a connected board. This process generates a board.conf
file in the application's folder. The following uploads will not ask for board selection, since the file already exists. If you want to change the upload configurations without change the board.conf
manually, drag and drop your application's folder or file to SelectDevice.exe
.
There is also possible to define a global configuration, so all uploads uses it in case no board.conf
is provided with the application.
This app was developed using Visual Studio Community 2017 and only supports boards from package "arduino" and arch "avr". Actually, it only supports boards from /hardware/arduino/avr/
that have vid and pid specified. Here is the list for expected boards to work:
The Arduino IDE uses the file hardware\arduino\avr\boards.txt to identify ports and boards. With a VID/PID combination we can identify the USB device that is plugged and then search in this file for more information, such as the name of the board.
To create a new release version, make sure to move the exe generated by the Visual Studio from SelectDevices/bin/Release/ to ceu-maker/ceu-maker-windows/bin
In the SelectDevice/Form1.cs, we can find blocks of code using #if DEBUG
:
#if DEBUG
string text = System.IO.File.ReadAllText(@"absolute-path-to\arduino-1.8.3\hardware\arduino\avr\boards.txt");
#else
string text = System.IO.File.ReadAllText(@"..\arduino-1.8.3\hardware\arduino\avr\boards.txt");
#endif
The above code was included to facilitate the location of boards.txt file in develop stage. If you're compiling a debug version o SelectDevice, you can use the absolute path of boards.txt
changing the string in the second line. For release, use a relative path.