Mac Tutorial: How to compile and upload the firmware of MIs eurorack modules


#121

When i set up the toolchain like discribed in the pdf there is no bin folder with the executables in the main folder .gcc-arm…4.8… Mr. ubiubu can you explain me please which step i must take to get an bin folder with the executables. During the build process of that toolchain there are no errors and only the local (nativ) build folder(s) is written. For the other module like tides i got that related toolchain to work after reading all shell massages and this thread careful. Is the process with install-cross for this toolchain needed? Might be stupid questions, but…


#122

Mr radioelcamino … I’m by no means an expert on toolchains, let alone on building them. I think I’ve simply unzipped the tarball; et voilà.


#123

Anyone can recommend a cheap/reliable AVR programmer in Europe? I saw this one… http://www.fischl.de/usbasp/ any feedback?


#124

Hmmm sounds a bit off-topic isn’t it?


#125

>>Hmmm sounds a bit off-topic isn’t it?

Unless he wants to compile and upload the firmware for Branches :wink:
By the way: have someone tried an alternative firmware for Branches, yet? (still a bit off topic, I know)


#126

cj55> By the way: have someone tried an alternative firmware for Branches, yet? (still a bit off topic, I know)

I’m planning some Branches hacks, as soon as I acquire a Branches. Any ideas or requests, let me know, but I can’t promise anything, and be aware that the MPU in Branches is tiny, so there are very distinct limits as to what can be done.


#127

Being a greenhorn regarding compiling I am stuck with the Grids firmware. The repository is cloned and I ran git submodule init && git submodule update

In /eurorack/,
make -f /grids/makefile
gets me

  • No rule to make target `/grids/makefile’. Stop.

make -f makefile (or only make) in /eurorack/grids/ results in
cat build/grids/adc.d build/grids/random.d build/grids/serial.d build/grids/string.d build/grids/time.d build/grids/wii_nunchuk.d > build/grids/depends.mk
/usr/local/CrossPack-AVR/bin/avr-gcc -mmcu=atmega328p -lm -Os -Wl,–gc-sections -o build/grids/grids.elf build/grids/adc.o build/grids/random.o build/grids/serial.o build/grids/string.o build/grids/time.o build/grids/wii_nunchuk.o -lc
/usr/local/CrossPack-AVR-20131216/lib/gcc/avr/4.8.1/…/…/…/…/avr/lib/avr5/crtm328p.o:(.init9+0x0): undefined reference to `main’
collect2: error: ld returned 1 exit status

Now I am guessing that some path(s) to files needed for compiling are wrong or missing. Is this the right track? Definitely my abilities need much improvement, but I am willing to learn. Not really looking for a detailed solution — a little pointer would be really helpful. Thanks a bunch!


#128

The correct command is:

make -f grids/makefile


#129

Thank you Olivier :slight_smile: Now I am getting somewhere.


#130

Can someone point me in the right direction to get started on Windows? Id be so greatful for a similar tutorial for windows.


#131

Hi there I tried compiling branches and it told me the method adc.ready was missing. Strangely enough it is on the github repository but not in the local I cloned. So I added

static bool ready() {
return !AdcConvert::value();
}

to the avrlib/adc.h and seemed to work. Is it just me?


#132

How do I know if the compiling worked?


#133

No error message? .elf file generated? Good sign. Then it’s time to flash the code on the device!


#134

Yep no error and .elf. Think I’m on the right way, Waiting for the usbtiny to arrive …thanx


#135

I’m having trouble with openocd and arm-usb-ocd-h. Maybe something should be added to stmlib/programming/jtag/interface.cfg?

…or, it looks like it would help to switch to a previous version of openocd, since ft2232 drivers haven’t been supported since 0.8.

make -f streams/makefile upload_combo_jtag
openocd -f stmlib/programming/jtag/interface.cfg -f stmlib/programming/jtag/stm32f10x.cfg -f stmlib/programming/jtag/prelude_f10x.cfg -f stmlib/programming/jtag/erase_f10x.cfg -c “flash write_bank 0 build/streams/streams_bootloader_combo.bin 0x0” -c “verify_image build/streams/streams_bootloader_combo.bin” -f stmlib/programming/jtag/postlude.cfg || openocd -f stmlib/programming/jtag/interface.cfg -f stmlib/programming/jtag/stm32f10x.cfg -f stmlib/programming/jtag/prelude_f10x.cfg -f stmlib/programming/jtag/erase_f10x.cfg -c “flash write_bank 0 build/streams/streams_bootloader_combo.bin 0x0” -c “verify_image build/streams/streams_bootloader_combo.bin” -f stmlib/programming/jtag/postlude.cfg
Open On-Chip Debugger 0.9.0 (2015-06-12-21:39)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Error: The specified debug interface was not found (ft2232)
The following debug interfaces are available:
1: ftdi
2: usb_blaster
3: usbprog
4: jlink
5: vsllink
6: rlink
7: ulink
8: arm-jtag-ew
9: hla
10: osbdm
11: opendous
12: aice
13: cmsis-dap

make: ***** [upload_combo_jtag] Error 1


#136

I think they just renamed “ft232” into “ftdi”.


#137

Thanks–it looks like they also renamed instances of “jtag” to “adapter” and “cortex_m3” to “cortex_m”.
Changing those out got me this far:

make -f streams/makefile upload_combo_jtag
openocd -f stmlib/programming/jtag/interface.cfg -f stmlib/programming/jtag/stm32f10x.cfg -f stmlib/programming/jtag/prelude_f10x.cfg -f stmlib/programming/jtag/erase_f10x.cfg -c “flash write_bank 0 build/streams/streams_bootloader_combo.bin 0x0” -c “verify_image build/streams/streams_bootloader_combo.bin” -f stmlib/programming/jtag/postlude.cfg || openocd -f stmlib/programming/jtag/interface.cfg -f stmlib/programming/jtag/stm32f10x.cfg -f stmlib/programming/jtag/prelude_f10x.cfg -f stmlib/programming/jtag/erase_f10x.cfg -c “flash write_bank 0 build/streams/streams_bootloader_combo.bin 0x0” -c “verify_image build/streams/streams_bootloader_combo.bin” -f stmlib/programming/jtag/postlude.cfg
Open On-Chip Debugger 0.9.0 (2015-06-12-21:39)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
adapter speed: 1000 kHz
adapter_nsrst_delay: 200
jtag_ntrst_delay: 200
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain connect_deassert_srst
Info : clock speed 1000 kHz
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway…
Error: stm32.cpu: IR capture error; saw 0x0f not 0x01
Warn : Bypassing JTAG setup events due to errors
Warn : Invalid ACK 0x7 in JTAG-DP transaction
Warn : Invalid ACK 0x7 in JTAG-DP transaction
Warn : Invalid ACK 0x7 in JTAG-DP transaction
Warn : Invalid ACK 0x7 in JTAG-DP transaction
Warn : Invalid ACK 0x7 in JTAG-DP transaction
Warn : Invalid ACK 0x7 in JTAG-DP transaction
Warn : Invalid ACK 0x7 in JTAG-DP transaction
Warn : Invalid ACK 0x7 in JTAG-DP transaction
Warn : Invalid ACK 0x7 in JTAG-DP transaction
Warn : Invalid ACK 0x7 in JTAG-DP transaction
Error: Target not examined yet


#138

I usually get this error messages when the JTAG programmer is connected backwards, when the cable is damaged, or when the connector has a bad solder joint.


#139

Yes, thank you! It was a bad joint.


#140

HI so my elf file is generated, now I’m trying to upload on mac, but the usbtiny is not found. I used this one: http://www.ebay.com/itm/291452854482?_trksid=p2060353.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT I added “PROGRAMMER = usbtiny” in the makefile.mk I get this error:

/usr/local/CrossPack-AVR/bin/avrdude -V -p m88p -c usbtiny -P usb \\
-B 1 -U flash:w:build/branches/branches.hex:i -U lock:w:0x2f:m
avrdude: Error: Could not find USBtiny device (0x1781/0xc9f)

avrdude done. Thank you.

make: ***** [upload] Error 1