2

I am interested in writing a simple C program outside of the Arduino IDE and respective libraries, but deploying it directly to an Arduino Due (which uses a SAM3X8E ARM MCU). I am trying to figure out what comms/serial protocols are used for:

  • Flashing/deploying the program to the ARM MCU; and
  • Connecting the program to a debugger

And, not just the protocols used, but what tools are compatible with these protocols, and henceforth, can be used for both use cases. How can I tell what my viable options are?

3

The Due (more specifically the SAM3X) uses its own proprietary protocol. It's all embedded in the bootloader, which is hard wired in the ROM and can never be changed (idiotic if you ask me).

I know of two systems for communicating with it. Atmel's SAM-BA program, and the open source BOSSA. The command line version of BOSSA (bossac) is used by the Arduino IDE for programming.

  • Thanks @Majenko (+1) - a few quick followups if you don't mind: (1) Can you confirm that BOSSA/bossac can be used for both flashing and debugging? (2) If I'm understanding you correctly, the ROM (containing proprietary protocol) is a part of the MCU itself, and that's why it can't be changed, yes? And last, (3) Then how is it that BOSSA/bossac can "speak" this proprietary protocol? Did they ink a special deal with Atmel? Thanks again! – smeeb May 13 '15 at 15:36
  • 1) No idea, I have never tried it. 2) Yes, that's right. 3) Probably a combination of software examination, protocol decoding and reverse engineering. – Majenko May 13 '15 at 15:41
  • While documentation is nice, I disagree with the permanence of factory bootloaders being a bad thing: they make it very hard to "brick" a device, and save you from needing any special tools to initialize new chips (not that SWD/JTAG adapters are expensive). If you decide you would prefer to have your own custom bootloader, just write one and put it in ordinary flash and make it reluctant to overwrite itself. – Chris Stratton May 13 '15 at 16:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.