Module firmware development: avr32 toolchain

Yeah, start with 20.04 and work your way backwards. It seems as though the default Travis Ubuntu is 16.04.

it works! https://github.com/scanner-darkly/multipass-actions-experiments/actions/runs/411579980

i tried 20.04 and it seems fine. confirmed the actual firmware works. the job is actually faster too, this run completed in 35sec, which makes it possible to even use it as a replacement for local set up when needed.

this could also simplify things like creating releases or having an easier way for people to customize. should be easy to set up a fork that would reapply a patch and build a firmware whenever the upstream repo is updated.

2 Likes

was trying to setup the toolchain today and i ran into this. seems like a problem with the atmel server? is there a way around this or will this probably just resolve itself soon enough?

it’s not available from atmel anymore, use this instead: https://github.com/denravonska/avr32-toolchain

Hmmm so I just gave that a shot, substituting that repo for the old monome one in the instructions at https://github.com/monome/libavr32 and when i ran PREFIX=$HOME/avr32-tools make install-cross, it got 2 errors:

you’re likely missing other needed tools. you have to follow the instructions in the repo i linked instead of the ones in libavr32 repo.

you can also use @dewb’s docker image as a reference for what else is needed: https://github.com/Dewb/monome-build/blob/master/Dockerfile

alternatively, you can use https://github.com/monome/avr32-toolchain-linux and the set up steps described in the OP here (or take a look at my github actions, they’re for multipass but the toolchain set up is the same: https://github.com/scanner-darkly/multipass-actions-experiments/blob/main/.github/workflows/build_firmware.yml)

Hmm… well I tried following the instructions at that repo but I get the same two errors when I try and build it (even after a make clean).

I don’t really know anything about docker images or github actions, but I’m good at following a sequential list of commands to type into the terminal! :confused:

sorry - same here, i don’t have enough knowledge about the process, i got it working using the instructions i linked (for github actions, for my local dev i did the set up a long time ago when atmel headers were still available). hopefully somebody else will chime in.

as a temporary workaround, do try the github action option - it’s free and it’s fast enough that you could even use it instead of a local toolchain.

your github actions are linux-specific tho, right? i’m on macOS Catalina.

yes, it’s for linux. i use windows, no experience with mac, so you’ll need to try and apply the instructions from https://github.com/denravonska/avr32-toolchain. have you seen this section there? (messed up formatting in their readme makes it difficult to see somewhat):

=== Requirements (OS X) ===

You will need to have GCC, make and binutils on your machine to compile all of this. You can get all of these on Mac OS X, by just installing the Apple link:http://developer.apple.com/technologies/tools/[Developer Tools]. You should be able to download free versions of 3.x from the ADC website, install from the OS X install disc that came with your machine, or download XCode 4 from the App Store (now free again for all registered users).

You will also need gmp, mpfr and mpc first. I recommend installing these from link:https://github.com/mxcl/homebrew[homebrew] for now. I’ll add these to the Makefile once I have a consistent configuration that can be used for both Linux & OS X.

With homebrew you can install those dependencies like this:
brew install mpfr gmp libmpc texinfo

If you would like to build dfu-programmer, also install libusb:
brew install libusb-compat

yeah… i did some poking around and its the same instructions that are on the original repo that hasn’t been updated in 8 years so I’d assume a lot of stuff could’ve changed with mac dev tools since then that would break it. i also tried the variant where you set gcc to 4.2 or something, but it still had one error that I wouldn’t even begin to know how to solve. :frowning:

Just use Docker, no point in trying to get all this stuff to run on your own machine, it’ll just be a pain.

ok cool… i installed Docker. I was able to build teletype by following the instructions at Dewb’s repo.

thanks!

next stop: trying to get a blank multipass project running :slight_smile:

1 Like

i’ve just updated the multipass readme with the instructions on how to set up github actions if you want to give it a try!

hehe… well i just successfully built an empty multipass template with the docker method so i’m gonna stick to that for now.

1 Like

so i’m trying to install my multipass firmware onto my ansible, but i keep getting dfu-programmer: no device present. when I run the update-firmware.command.

i’m using a USB-C to USB-A cable. I don’t suppose there is anything special about those USB-A to USB-A cables is there?

edit: also tried the instructions here <SOLVED>Dfu programmer - device not present but no luck

it works for me with a usb-c to usb-a adapter and usb-a to usb-a cable but i’m on windows.

do try different cables (see this thread for more details: Updating modular firmware).

if you still can’t get it working i’d start a new thread as more people will see it than here and somebody might be able to offer mac specific advice.

hmmm… i’m not currently anywhere near my huge drawer-of-many-cables so i don’t really have a lot of options.

i tried to have the dfu-programmer check for the presence of my teletype as well and it didn’t see it, so this suggests to me that its not an issue with the ansible module, but something to do with either the cable or the computer (it’s a new one that i have just set up in the last week).

detection can be tricky. try: module powered off, connect USB A-A both ports, hold front button, power-up module.

For me this is the fix when I encounter the “no device present” error:

Unplug the USB cable, then switch off the modular, then replug the cable in on both sides (modular and computer) and then switch on the module with the button pressed.

Works every time for me!

1 Like