1. Related posts
A few people already tried to use the Atmel-ICE with the Arduino Due:
Unfortunately, these posts were closed without a solution being provided. So I open another one here
2. Context
I'm in a team building this new IDE for microcontrollers:
Currently, we're trying to support the Arduino Due in Embeetle. The functionality we added for other Arduino boards, generally consists of:
- Flash firmware through the COM-port (default setting)
- Flash firmware through an external device (eg.
Atmel-ICE
orAVR ISP mkII
) - Flash bootloader through external device (eg.
Atmel-ICE
orAVR ISP mkII
)
For the Arduino Due, I've successfully implemented the first functionality: flashing firmware through the COM-port. As for the other two functionalities, I just can't get it to work.
3. Flashing firmware through COM-port: works
Flashing firmware through the COM-port works fine. I simply observed what Arduino does when flashing the firmware, which is something like this:
bossac.exe -i
-d
--port=COM16
-U false
-e
-w
-v
-b
C:/Users/.../Blink.ino.bin
-R
With that information, it wasn't difficult to implement something similar in Embeetle IDE.
4. Flashing firmware (and/or bootloader) through external device: doesn't work
Flashing firmware (application or a bootloader) through an external device doesn't work. In Arduino there's simply nothing available:
I tried adding the following code to the "C:/Users[Username]/AppData/Local/Arduino15/packages/arduino/hardware/sam/1.6.12/programmers.txt"
file:
atprogram_atmelice_isp.name=Atmel Studio ATMEL-ICE (ISP)
atprogram_atmelice_isp.program.tool=atprogram
atprogram_atmelice_isp.program.extra_params=-t atmelice -i ISP
atprogram_atmelice_isp.help=Connect the programmer to the ICSP port
The ATMEL-ICE
shows up in the Arduino IDE, but it still doesn't work. It results in an error message:
Error while uploading: missing 'program.params.verbose' configuration parameter
I copied the code for programmers.txt
from this post: Atmel-ICE with Arduino IDE ? - #2 by epinc
I don't know how to modify it, to solve the error.
5. Question
I'd like to know how to flash firmware (or a bootloader) to the Arduino Due through an external device (eg. Atmel-ICE
). Preferrably with a shell command - a Windows cmd
or Linux bash
command. But if you can show me how to do it in the Arduino IDE, I can deduce the shell command later on by looking at the Arduino (verbose) output.