Like SMCE, this command line frontend requires a C++20 toolchain.
IMPORTANT
As is, SMCE_Client is not guaranteed to work on Windows machines!
Due to a bug that causes the running sketch to crash when sending or reciving messages on uart.
cd client
cmake -S . -B build/
cmake --build build/
You can now find the executable "SMCE_client" in the ./build
directory.
SMCE_client -f <fqbn> -p <path_to_sketch>
where
- FQBN: Fully Qualified Board Name Testing has been done with fqbn = arduino:sam:arduino_due_x
- Sketch path: Relative or absolute path to the sketch to run
-f,--fqbn -> = Fully qualified board name -p,--path <path_to_sketch> -> <path_to_sketch> = Relative or absolute path to the sketch to run -d,--dir <arduino_root_dir> -> <arduino_root_dir> = Relative or absolute path to desired location of arduino root folder -s,--SMCE <smce_resource_dir> -> <smce_resource_dir> = Relative or absolute path to SMCE_RESOURCE folder -u,--file <write_to_file> -> <write_to_file> = Set to true if uart should write to file (created in the set arduino root folder)
(-s or -- SMCE, can be used if binary is not compiled and already linked to the SMCE_RESOURCE folder for the current computer.)
As is, configuring of GPIO pins on the board is done in the source file SMCE_Client.cpp, as seen here:
smce::BoardConfig board_conf{
.pins = {0,1},
.gpio_drivers = {
smce::BoardConfig::GpioDrivers{0,
smce::BoardConfig::GpioDrivers::DigitalDriver{true,true},
smce::BoardConfig::GpioDrivers::AnalogDriver{false,false}
},
...
...
}
.pins = a list of all a pins on the board. .gpio_drivers = specifies the drivers for each pin, configured as:
smce::BoardConfig::GpioDrivers{<pin>,
smce::BoardConfig::GpioDrivers::DigitalDriver{<read>,<write>},
smce::BoardConfig::GpioDrivers::AnalogDriver{<read>,<write>}
}
DigitalDriver and AnalogDriver has two parameters {,}, these are set as true or false depending on what the pin should be able to do.