Building Braids fw from source

I cloned and updated the git tree and built the cross compiler on Ubuntu.
Everything seems to work but I get a compiler error for an unused variable temp in adc.h .

Suggestions? Should I turn off error reporting or hack adc.h or is it something else?

Thanks, Mitch

You can temporarily turn off the reporting of warnings as errors. I actually have a version of the code in which I have fixed all warnings introduced by the latest versions of gcc - if you wait for 10 days I’ll move it to the public branch.

Thanks.

I’m have an issue building make wav and make upload_combo_jtag now.
Looks like something to do with stm_audio_bootloader

Regards, Mitch

What is the problem exactly?

/eurorack$ make -f braids/makefile upload_combo_jtag
make: ***** No rule to make target `build/braids_bootloader/braids_bootloader.hex’, needed by `build/braids/braids_bootloader_combo.bin’. Stop.

and looks like a python complaint

/eurorack$ make -f braids/makefile wav

… stuff deleted …

python stm_audio_bootloader/qpsk/encoder.py \\
-s 48000 -b 12000 -c 6000 -p 256 \\
build/braids/braids.bin
Traceback (most recent call last):
File “stm_audio_bootloader/qpsk/encoder.py”, line 35, in
from stm_audio_bootloader import audio_stream_writer
ImportError: No module named stm_audio_bootloader
make: ***** [wav] Error 1

Thanks, Mitch

Problem 1: make -f braids/bootloader/makefie hex
Problem 2: is a stm_audio_bootloader directory present? It is a git submodule.

>Problem 1: make -f braids/bootloader/makefie hex
cool, worked and uploaded to the 103…

>Problem 2: is a stm_audio_bootloader directory present? It is a git submodule.
/eurorack$ ls stm_audio_bootloader/
audio_stream_writer.py fsk init.py LICENSE qpsk README.md

Yes and I think I did the submodule init and update correctly

Oh I know what’s wrong with the python stuff. You need to have . in the PYTHONPATH (unless your python path is set to something else, use export PYTHONPATH=. in your bashrc)

wow, that did it, could not figure out how make it to pick up the file…

I’ve got a bit of work to do to see how things all work.

Questions:
How stable is the DAC8551 sync clock?
did you consider the dual DAC8552 ?

Thanks, Mitch

> How stable is the DAC8551 sync clock?

It’s not a codec, it doesn’t have a clock. It gets refreshed everytime you tell it to do so. The code that does that in the Braids firmware is robust (interrupt with highest priority and deterministic code path from the moment the interrupt is raised to the moment the dac is refreshed).

> did you consider the dual DAC8552 ?

Used for Tides & Peaks.

When do we see T&P ?

End of december / mid january

I got pretty far into compiling Braids code, but it stops on this:

build/braids/startup_stm32f10x_md.o: In function `LoopFillZerobss’:
(.text.Reset_Handler+0x2e): undefined reference to `main’
collect2.exe: error: ld returned 1 exit status
make: ***** [build/braids/braids.elf] Error 1

Any ideas?

Thanks!

Oh, I’m compiling under Windows and got the ToolChain here: https://launchpad.net/gcc-arm-embedded for 4.7-2013-q3. I still can’t wrap my head around compiling under OSX for some reason.

The world is fine now, ignore the crazy errors above, I had to make a build/braids directory under eurorack-master, needed someplace for the the code to go. You know if you mess around long enough, or think about stuff when you’re not half asleep, the answers will come.

OK, now I’d like to be able to build the oscillator_test code, the benefits of that are quite obvious. :slight_smile: This is what I’m getting now:

C:\\eurorack-master>make -f braids/test/makefile_test && ./oscillator_test
braids/test/makefile_test:39: build/oscillator_test/depends.mk: No such file or
directory
mkdir -p build/oscillator_test/
g++ -MM -DTEST -I. analog_oscillator.cc -MF build/oscillator_test/analog_oscilla
tor.d -MT build/oscillator_test/analog_oscillator.o
process_begin: CreateProcess(NULL, g++ -MM -DTEST -I. analog_oscillator.cc -MF b
uild/oscillator_test/analog_oscillator.d -MT build/oscillator_test/analog_oscill
ator.o, …) failed.
make (e=2): The system cannot find the file specified.
make: ***** [build/oscillator_test/analog_oscillator.d] Error 2

If I copy and past .d and .o files from the regular Braids build that worked into the build/oscillator_test/ directory, I am able to one by one move beyond these errors (I’m not sure if that’s a good way to move beyond these errors, and if I’m actually moving beyond them). I run into a problem with oscillator_test.cc because I haven’t compiled that yet. My problems thus far have been with having proper directory structures in place and calling the make command from the right directory. I just want to be sure that the files in braids/test are where they should be and that the make file (which I renamed to makefile_test so that I can move it around) are in the right place to be able to find all the stuff that it needs to do a build.

Thanks!

There is no need to move and rename anything. The command must be run from the “eurorack” directory (the one that contains braids, edges, grids…).

So the right command is “make -f braids/test/makefile”

1 Like

I believe the command fails because you don’t have g++ installed. Is that correct?

Yeah, didn’t seem to have a g++ compiler. Now I do. I’m using Cygwin Terminal for the build. Found the oscillator_test.exe. Running it gave: “The procedure entry point posix_memalign could not be located in the dynamic link library cygwin1.dll.” I had to move the Path environment variables for WinAvr after Cygwin, I was then able to create my first wav file. The file probably isn’t the intended sound (osc.set_shape(MACRO_OSC_SHAPE_STRUCK_DRUM);
osc.set_parameters(16000, 24000)), it’s 10 seconds long and very muffled, sounds like someone running across the floor, probably helps to look at the waveform, attached, I had to cut it in 1/2 to make it fit the upload size. I seem to get this same waveform no matter how I change the code in oscillator_test.cc to test other oscillator types. So, progress, at least.

What else have you changed in the code? It looks like it plays a super low note.