New/Updated version of BOSSA for Arduino Due

I've got a project that uses a Due that I've been wanting to open up to a broader, non-technical audience with pre-compiled firmware. (http://nw2s.net)

Unfortunately, there's nothing out there that really works. bossac is fine if you are comfortable with the command line, but even then, it requires you to initiate the boot loader first. Then there's no GUI version that works with the Due.

So I finally motivated myself to update bossa to have a simple enough UI and enough code to be able to make it easy for a non-technical person to get the job done. I also updated bossac to be able to force the Due into the bootloader with a new command-line parameter. In the process, I updated it to use wxwidgets 3.

Unfortunately, I've only gotten a binary working for Mavericks, but if anyone wants to check it out, and offer any feedback or even build a distribution for other OS, feel free.

I'll upload the binary a bit later, but wanted to post before getting back to other work.

-s

The Mavericks-only version of the app is available for download:

http://nw2s.net/downloads/

-s

Hi

I've got it compiled and running on Ubuntu 14.04 LTS Trusty Tahr (the GUI comes up, I haven't tried flashing anything with it) after installing the wx library:

sudo aptitude install libwxgtk3.0-dev

(It pulled some dependencies and I probably had all other required libraries / packages already installed.)

and applying this patch:

diff --git a/src/bossac.cpp b/src/bossac.cpp
index 6d97f77..a8c30fa 100755
--- a/src/bossac.cpp
+++ b/src/bossac.cpp
@@ -21,6 +21,7 @@
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <unistd.h>
 
 #include "CmdOpts.h"
 #include "Samba.h"

and then makeing it:

make CXX=g++

Happy hacking!

Regards,
flipflip

Hey,

What do you guys think of the possibility of getting something similar running on the Raspberry Pi? (Raspbian)

I'm not a raspberry user, so I'm unfamiliar with the use case. Would you need the UI? If not, and you only need the command line, then you would probably do well to just create a CLI-only make target and it would have very few other dependencies.

Next on my todo list, however would be to 1. get a version that can build on Ubuntu (Thanks @flipflip!) and 2. Create a binary distribution for Windows.

scott

nw2s:
I'm not a raspberry user, so I'm unfamiliar with the use case. Would you need the UI? If not, and you only need the command line, then you would probably do well to just create a CLI-only make target and it would have very few other dependencies.

Next on my todo list, however would be to 1. get a version that can build on Ubuntu (Thanks @flipflip!) and 2. Create a binary distribution for Windows.

scott

Thanks Scott. Unfortunately I'm not an Rasp Pi user or Linux user. I'm looking to use a raspberry pi as a remote programmer for 2 Arduino Dues. I've gotten pretty good at Arduino programming, Rasp Pi and Linux and PC development are completely new to me. I'll try to look into "CLI-only make target"s. You're right that I wouldn't need the GUI.

I see. In that case, this may not get you to where you want to be going.

To back up a little bit... First there was (is) SAM-ba - this is Atmel's system programmer. It supports lots of connectivity modes, but is a pain to configure and is not end-user friendly.

Then someone wrote BOSSA which was meant to be a more specific version, less configurable, and therefore, easier to use for end-users. Both of these were GUI interfaces, but have CLI interfaces as well.

Neither of them work on Arduino, so someone forked v1.2 of bossa, but only fixed the command-line version, and made bossac 1.3a. This is the version that is included with the Arduino 1.5 IDE and will program the Due, but need some special wrapper software to be able to initialize the Due into boot loader mode.

I simply took the 1.3a code and cleaned up the UI a little bit to make it even more end-user friendly and made it able to initialize the Due bootloader. I also made the same changes to the command-line.

So yes, you might be able to use it... but, you will need USB connectivity from your raspberry to the arduinos - which may or may not be feasible. Alternatively, you could use SPI which would allow you instead to use a more straightforward ISP protocol instead of USB->usb emulator->baudrate detector->reset switch->uart programmer that is what is implemented on the Due.

s

nw2s:
I see. In that case, this may not get you to where you want to be going.

To back up a little bit... First there was (is) SAM-ba - this is Atmel's system programmer. It supports lots of connectivity modes, but is a pain to configure and is not end-user friendly.

Then someone wrote BOSSA which was meant to be a more specific version, less configurable, and therefore, easier to use for end-users. Both of these were GUI interfaces, but have CLI interfaces as well.

Neither of them work on Arduino, so someone forked v1.2 of bossa, but only fixed the command-line version, and made bossac 1.3a. This is the version that is included with the Arduino 1.5 IDE and will program the Due, but need some special wrapper software to be able to initialize the Due into boot loader mode.

I simply took the 1.3a code and cleaned up the UI a little bit to make it even more end-user friendly and made it able to initialize the Due bootloader. I also made the same changes to the command-line.

So yes, you might be able to use it... but, you will need USB connectivity from your raspberry to the arduinos - which may or may not be feasible. Alternatively, you could use SPI which would allow you instead to use a more straightforward ISP protocol instead of USB->usb emulator->baudrate detector->reset switch->uart programmer that is what is implemented on the Due.

s

I kind of had the impression that this was far more complicated than it first seemed.

An SPI solution would be ideal however, correct me if I'm wrong, I don't believe the Due supports programming over SPI. I've found a way to boot the Due into it's bootloader through Sketch code so I was hoping to skip the whole "Baud 1200" situation and jump straight to loading the programm.

I wonder if there is a simple way of programming the flash over the hardware serial port? i.e. Load a Bin/Hex(?) file into the Pi and directly send it out through the serial port? Connections between the Pi and the Arduinos are flexible so I'd be willing to try any solution.

Sorry to Hijack your thread. This is something I've been working on for a few weeks and I've had very little replies from anyone.

Cheers,

Jack

Hi,

Works smoothly in both ports, many thanks.

Armindo

Back to @JWScotSat - you can actually upload code to UART0 using this program, either command-line or GUI. The only limitation is that the microcontroller has to have the bootloader running, but it sounds like you've solved that problem (there's a register available to do that).

I've used this method with success using the Adafruit Bluetooth breakout board, in case you're curious.

Porting the CLI version running on Rasperry will take a little time tho, and you may have more luck with that on a RaspPi type of board rather than an Arduino board cause I know I have no experience with that.

-s