Making firmware hacking easier


#101

I use git very often, too. Very useful tool. I find the command line interface very unconvenient (maybe because I’m too lazy to learn it properly) so I use Atlassian Source tree as a gui. Very handy, as it includes all the useful features and presents them on a very clean interface.


#102

There’s no excuse for not using Git when your handle is GaryInThailand.


#103

This might be interesting for newcomers: https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow


#104

@TheSlowGrowth, those are excellent tutorials on Git, thanks! A colleague and I have been trying to teach Git to researchers, and have struggled to find the right balance between oversimplification and mindless recipes and too many too-geeky details. The Atlasssian material looks like it has struck a better balance.


#105

I had totally forgot to post this up!

For people in OSX having issues with the vagrant box and the FTDI friend (well any FTDI-USB ) it’s due to Apple’s built in kernel driver being pretty bad.

Here’s a guide on disabling it. http://www.mommosoft.com/blog/2014/10/24/ftdi-chip-and-os-x-10-10/

Once done install the official drivers from ::

http://www.ftdichip.com/FTDrivers.htm

Restart and then ensure the VM passthrough is on.

I spent far too long and far too much time to try and get it to work until I had discovered a pretty buried thread on the Arduino forums. After replacing the bundled driver with the official one, no issues at all and I had a nice resurrected Tides. It appears that VirtualBox and OSX driver are not a match made in heaven.

Hope this helps a few people.

Steve


#106

Hello.

First things first: Thank you very much for the vagrant machine and the fact that you open-sourced the code.

I am currently trying to flash a factory build of a Clouds using the ARM-USB-OCD-H from the Vagrant machine on a Mac. I’ve connected the module as follows:

When I run `make -f clouds/makefile upload` the LED on the Olimex turns red and I get the following output:

Error: JTAG scan chain interrogation failed: all zeroes
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway…
Error: stm32f4xxx.cpu: IR capture error; saw 0x00 not 0x01
Warn : Bypassing JTAG setup events due to errors
Warn : Invalid ACK 0 in JTAG-DP transaction
Warn : Invalid ACK 0 in JTAG-DP transaction
Warn : Invalid ACK 0 in JTAG-DP transaction
Warn : Invalid ACK 0 in JTAG-DP transaction
Warn : Invalid ACK 0 in JTAG-DP transaction
Warn : Invalid ACK 0 in JTAG-DP transaction
Warn : Invalid ACK 0 in JTAG-DP transaction
Warn : Invalid ACK 0 in JTAG-DP transaction
Warn : Invalid ACK 0 in JTAG-DP transaction
Warn : Invalid ACK 0 in JTAG-DP transaction
Error: Target not examined yet

make: ***** [upload_combo_jtag_erase_first] Error 1

The full output can be found here: gist

Do you have an idea, how I could debug this problem?

Yours,
Pierre

EDIT:

It looks like the Vagrant machine captured the Olimex:

> VBoxManage list usbhost

UUID: 6926cb22-99d6-43c0-892a-5da79d95693b
VendorId: 0x15ba (15BA)
ProductId: 0x002b (002B)
Revision: 7.0 (0700)
Port: 1
USB version/speed: 0/High
Manufacturer: Olimex
Product: Olimex OpenOCD JTAG ARM-USB-OCD-H
SerialNumber: OLYSIFMY
Address: p=0x002b;v=0x15ba;s=0x000054d7355fbd48;l=0x14100000
Current State: Captured

SOLVED:

The problem was that I did not power the module. Connecting the module to the regular power source in addition to the JTAG cable solved the problem for me.

Looking at the data-sheet of the ARM-USB-OCD-H lead me to believe, that it would provide enough power for flashing. It might send a PR on the vagrant repo that adds this information in the README.


#107

I’ve been trying to install the Vagrant Vm environment so it will share files with the host. The CODE_DIRECTORY change mentioned in the instructions is not in the files but there is an item CODE_ROOT in 1_ clone-code.sh where I have changed the commenting and done the install. Problem is the files show in the host, but not in the VM. The default install places the repo files in the VM OK but not in the host.
Any help appreciated.


#108

Can you post the first lines of 1_clone-code.sh?


#109

Here is what I used to setup the shared files VM, with my 2 changes to the original file.
I’ve attached a text file as the forum changes the syntax completely. I am using Win10.


#110

Apparently, vagrant (or VirtualBox) does not support shared folders very well on Windows :frowning:

You can try adding this line in the Vagrantfile:

config.vm.synced_folder “.”, “/vagrant”, type: “smb”

I’ve found a few other workarounds online, but they rely on rsync.


#111

slow: what do you mean by “share files with the host”? Everything is in the folder you ran “vagrant up” from


#112

I’ll try that line, thanks. Failing that I’ll try SSH’ing my files into the VM

altitude: When the VM is installed default the repo is in the folder, but Oliver also gave the option to see them and transfer them between the host. I was wanting to do this to try to get older repo files in the folder for the VM to compile because my clouds build is v.2 and the repo is v.3. I’m told the firmwares are different


#113

I set this up last night, and one thing I noticed is the readme says that by default, eurorack-modules is installed in the /vagrant directory, but in actuality it is in /home/vagrant by default.

So that took me a little while to figure out (I’m on Win10 and couldn’t see the shared directory).
I also added an optical drive to the VM in virtualbox and installed the latest guest additions as well, I don’t know if that has anything to do with getting the shared stuff to work better, since I did that before realizing the eurorack-modules directory wasn’t in the right place for sharing.

But if anyone on Win10 has problems with the shared folders, try these things :slight_smile:


#114

Can I use the same Vagrant and Virtual Box set-up described here (and on the github) to start developing software for my STM32F4 Discovery board, or perhaps some AVR MCSs ?


#115

Sure, why not?


#116

Yes.


#117

I have been to run the WM succesfully as well as compiling the code for some modules. I do also have the FTDI dongle (adafruit friends) showing up in /dev name “ttyUSB0”. Unfortunatly when I want to upload this what I get :

Info : only one transport option; autoselect 'jtag’
adapter speed: 2000 kHz
adapter_nsrst_delay: 100
jtag_ntrst_delay: 100
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain connect_deassert_srst
Warn : Using DEPRECATED interface driver 'ft2232’
Info : Consider using the ‘ftdi’ interface driver, with configuration files in interface/ftdi/…
Error: unable to open ftdi device: device not found

Any ideas ?


#118

Which command do you use to send the firmware?


#119

make -f peaks/makefile upload


#120

This is the command for uploading the firmware with a JTAG interface. The command for doing this with a serial interface is given in the documentation.