This repo provides developers with the ability to load TelosAir boards into the Arduino IDE.
Paste this path in Arduino IDE via:
File->Preferences->Additional Board Manager URLS
- Navigate to
ArduinoPackage/telosairBoards/telosairDuets/boards.txt - Copy and paste any variant/mark block. For Example:
d_mk1.name=TelosAir Duet Mk1
d_mk1.vid.0=0x1B4F
d_mk1.pid.0=0x214F
d_mk1.vid.1=0x1B4F
d_mk1.pid.1=0x215F
d_mk1.upload.tool=bossac
d_mk1.upload.protocol=sam-ba
d_mk1.upload.maximum_size=262144
d_mk1.upload.use_1200bps_touch=true
d_mk1.upload.wait_for_upload_port=true
d_mk1.upload.native_usb=true
d_mk1.build.mcu=cortex-m0plus
d_mk1.build.f_cpu=48000000L
d_mk1.build.usb_product="Duet Mk1"
d_mk1.build.usb_manufacturer="TelosAir"
d_mk1.build.board=SAMD_ZERO
d_mk1.build.core=arduino
d_mk1.build.extra_flags=-D__SAMD21G18A__ {build.usb_flags}
d_mk1.build.ldscript=linker_scripts/gcc/flash_with_bootloader.ld
d_mk1.build.openocdscript=openocd_scripts/arduino_zero.cfg
d_mk1.build.variant=mk1
d_mk1.build.variant_system_lib=
d_mk1.build.extra_combine_flags=
d_mk1.build.vid=0x1B4F
d_mk1.build.pid=0x214F
d_mk1.bootloader.tool=openocd
d_mk1.bootloader.file=zero/telosair_duet_mk1.bin
- Next update the following bolded areas with the new variant name. I've provided an example for a hypothetical mk5 with some additional comments/observations in italics.
d_mk5.name=TelosAir Duet Mk5 The name that shows up in Arduino IDE
I don't know what the id's are for, but duplicate id's don't seem to matter
d_mk5.vid.0=0x1B4F
d_mk5.pid.0=0x214F
d_mk5.vid.1=0x1B4F
d_mk5.pid.1=0x215F
d_mk5.upload.tool=bossac
d_mk5.upload.protocol=sam-ba
d_mk5.upload.maximum_size=262144
d_mk5.upload.use_1200bps_touch=true
d_mk5.upload.wait_for_upload_port=true
d_mk5.upload.native_usb=true
d_mk5.build.mcu=cortex-m0plus
d_mk5.build.f_cpu=48000000L
d_mk5.build.usb_product="Duet Mk5"
d_mk5.build.usb_manufacturer="TelosAir"
d_mk5.build.board=SAMD_ZERO
d_mk5.build.core=arduino
d_mk5.build.extra_flags=-D__SAMD21G18A__ {build.usb_flags}
d_mk5.build.ldscript=linker_scripts/gcc/flash_with_bootloader.ld
d_mk5.build.openocdscript=openocd_scripts/arduino_zero.cfg
d_mk5.build.variant=mk5 important, corresponds with the variants folder
d_mk5.build.variant_system_lib=
d_mk5.build.extra_combine_flags=
d_mk5.build.vid=0x1B4F
d_mk5.build.pid=0x214F
d_mk5.bootloader.tool=openocd
d_mk5.bootloader.file=zero/telosair_duet_mk5.bin This a copy of the sparkfun bootloader and, I believe hasn't actually changed between duet marks.
- Navigate to
./ArduinoPackage/telosairBoards/telosairDuets/bootloaders/zero - Copy a previous .bin and .hex file, or provide your own.
- Make sure this change is reflected in
boards.txtlined_mk1.bootloader.file=zero/telosair_duet_mk1.bin
- Navigate to
./ArduinoPackage/telosairBoards/telosairDuets/variants - Copy a previous
Mkfolder. - Rename the copied folder so that matches the name of the line
d_mk?.build.variant=mk?inboards.txt. - Upload the new
variant.handvariant.cppfiles.
- Navigate to
/ArduinoPackage/telosairBoards - Create a .zip of
telosDuets - Move the new
telosDuets.zipinto/ArduinoPackagereplacing the old .zip
- Navigate to
/ArduinoPackage - Utilizing
ls -algrab the new file size oftelosDuets.zip. - Save this size for the next step.
- Utilizing
sha256sum /ArduinoPackage/telosDuets.zipgrab the new checksum of the .zip file. - Save this checksum for the next step.
Note: This filename must be in the following format package_name_index.json.
Note II: Checksum and size are important, arduino will complain if they are not correct/updated.
- Navigate to
./ArduinoPackage/package_telosair_index.json - Place the newly recorded checksum and size in their respective .json entries.
"checksum": "SHA-256:bfe2213135c682e63638419b189e196c44873fdf5f83288f88b81e3bca1975c3",
"size": "1333767", - Add the new board varient to the boards arrays.
"boards": [ { "name": "TelosAir Duet Mk4"},{ "name": "TelosAir Duet Mk3"},{ "name": "TelosAir Duet Mk1"},{ "name": "TelosAir Duet Mk5"} ] - Increment the version. This is the verison of the board manager seen by Arduino IDE
"version": "1.0.13", - Push these new changes to the repo via
git push
Sometimes a new board manager version is slow to be picked up by Arduino IDE. It can be forced by performing the following steps.
- Navigate to the
/.Arduino15folder or respective version. Note: On Linux this folder is under/homebut will depend on your install and OS. - Delete
package_telosair_index.json - Delete
package_index.jsonandpackage_index.sig - Delete
.arduino15/staging/packages/telosairDuets.zip - Delete
.arduino15/packages/TelosAir - Restart the Arduino IDE.
For more in-depth information on how to perform these steps, or add a whole new board entirely refer to the following links.