GIT woes (solved) / building Tides issue linux (solved)

So I am working on my xumbuntu based tool chain and have been having issues with git, I can clone the repo with ‘git clone https://github.com/pichenettes/eurorack.git’ without any problems but when I go to get the sub modules I get the following:

fatal: Not a git repository (or any of the parent directories): .git
altitude@altitude-ThinkPad-X40:~$ cd eurorack
altitude@altitude-ThinkPad-X40:~/eurorack$ git submodule init && git submodule update
Submodule ‘avr_audio_bootloader’ (git@github.com:pichenettes/avr-audio-bootloader.git) registered for path 'avr_audio_bootloader’
Submodule ‘avrlib’ (https://github.com/pichenettes/avril.git) registered for path 'avrlib’
Submodule ‘avrlibx’ (https://github.com/pichenettes/avrilx.git) registered for path 'avrlibx’
Submodule ‘stm_audio_bootloader’ (https://github.com/pichenettes/stm-audio-bootloader.git) registered for path 'stm_audio_bootloader’
Submodule ‘stmlib’ (https://github.com/pichenettes/stmlib.git) registered for path 'stmlib’
Cloning into ‘avr_audio_bootloader’…
Warning: Permanently added the RSA host key for IP address ‘192.30.252.129’ to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

This worked fine on my windows box. I know I can do it manually but it would be nice not to have to

Have you generated an ssh key pair so your computer can authenticate to GitHub? See https://help.github.com/articles/generating-ssh-keys/#platform-linux

Git uses ssh with key pairs by default. You can use git with username/passwords, over ssh or http, but GitHub doesn’t support those. So you need a keypair.

registering the SSH did the trick, thanks

While on this topic, I can’t seem to compile the tides firmware. Braids complies fine and the tides bootloader works fine as well but when I go to make tides, it craps out with this:

In file included from ./tides/generator.h:35:0,
from tides/generator.cc:29:
./stmlib/utils/ring_buffer.h: In member function ‘void tides::Generator::Init()’:
./stmlib/utils/ring_buffer.h:63:5: error: ‘s.tides::GeneratorSample::flags’ is used uninitialized in this function [-Werror=uninitialized]
buffer_[w] = v;
^
tides/generator.cc:80:21: note: ‘s.tides::GeneratorSample::flags’ was declared here
GeneratorSample s;
^
cc1plus: all warnings being treated as errors
make: ***** [build/tides/generator.o] Error 1

I just tried it, and Tides compiles fine for me.

you’re on a Mac correct? It’s odd that it will build the bootloader just fine but not the main hex. Do I need to build the resources?

Yup, OS X 10.10.2

Are you using the ARM EABI gcc to compile the code? Which version? Different versions may generate different warnings, and the makefile is set to treat warnings as errors. Here’s my gcc version info:

$ /usr/local/arm-cs-tools/bin/arm-none-eabi-gcc --version

arm-none-eabi-gcc (32-bit ARM EABI Toolchain JBS-FLOAT_IO-SGXXLITE_ML-2013.05-23-v2013.05-20-g7e710b6) 4.7.3
Copyright © 2012 Free Software Foundation, Inc.

Are you both using the same compiler version? They keep updating the warnings…
Quick fix could be to turn off the warning by adding -Wno-uninitialized to the compiler flags (CCFLAGS) in stmlib/makefile.inc around line 145, but a quick peek at the source looks like it might be right about the warning :wink:

arm-none-eabi-gcc —version -> Not installed

I built the tool chain this weekend from git so what ever was up there is what I have

also, when I go to build the resources it gives me the same error as when I go to to make the wav file so something is up there

ok

arm-none-eabi-gcc (4.8.2-14ubuntu1+6) 4.8.2

new error ;

python stmlib/tools/resources_compiler.py tides/resources/resources.py
Traceback (most recent call last):
File “stmlib/tools/resources_compiler.py”, line 276, in
main(sys.argv)
File “stmlib/tools/resources_compiler.py”, line 272, in main
Compile(argv[i])
File “stmlib/tools/resources_compiler.py”, line 261, in Compile
resource_module = import(base_name.replace(’/’, ‘.’))
File “/home/altitude/eurorack/tides/resources/resources.py”, line 71, in
import wavetables
File “/home/altitude/eurorack/tides/resources/wavetables.py”, line 246, in
file(‘tides/resources/waves.bin’, ‘rb’).read(), numpy.int16))
IOError: [Errno 2] No such file or directory: 'tides/resources/waves.bin’
make: ***** [tides/resources.cc] Error 1

Yup, so you’re using a later compiler. Try the jsynder toolchain as recommended by Olivier - that’s what I did. Exact compiler versions seem to matter when building code for these little MPUs, so best to use exactly what Olivier uses.

Yes, waves.bin seems to be missing. Worth asking Olivier about that - probably an oversight. But resources.cc is there so why do you need to recreate it, unless you’ve tweaked the resources files?

I’ll upload the waves.bin file in 20-30 mins once I’m back at work.

I am using the jsnyder toolchain. When I went to get the version of the arm-none-eabi-gcc it said it was not installed and simply did a apt-get and that’s the version that was delivered. I dont think it’s related though since I can compile the Braids firmware without any issue. Is tides/resources/waves.bin something that was simply missing from the git or is it something that needs to be generated? I’d like to get the tool chain set up correctly and learn all that I need to learn about getting the ARM code from code to binary to onto the chip so pardon all the questions…

The waves.bin file is not generated from anything (well it comes from a bunch of command line single cycle waveforms mangling tools). It was just missing.

ok, bin file solved the previous error but now I get this:

In file included from ./tides/generator.h:35:0,
from tides/generator.cc:29:
./stmlib/utils/ring_buffer.h: In member function ‘void tides::Generator::Init()’:
./stmlib/utils/ring_buffer.h:63:5: error: ‘s.tides::GeneratorSample::flags’ is used uninitialized in this function [-Werror=uninitialized]
buffer_[w] = v;
^
tides/generator.cc:80:21: note: ‘s.tides::GeneratorSample::flags’ was declared here
GeneratorSample s;
^
cc1plus: all warnings being treated as errors
make: ***** [build/tides/generator.o] Error 1

Ah, C++ templates…

Looks like the version of the compiler you use make some more stringent checks on uninitialized values. Not a big deal…

Add s.flags = 0; between lines 82 and 83 of generator.cc

bingo. that did it, thanks! Is this something that will come up again with other firmwares?

Could be… post here and I’ll fix it. Which version of gcc do you use?