Help needed – Cannot "make" OwlWare Bootloader

TL;DR - when i run “make bin”, i get an error saying ::std has not been declared.

Hey guys! I tried posting this on the OWL-forum but i didn’t get any answers, so i thought that i might as well give it a go here. I hope someone can help :slight_smile:

Hey there! I’m in desperate need of help, since my Owl Pedal is totally bricked.

I’m trying to update the bootloader using the following guide (https://hoxtonowl.com/mediawiki/index.php/Update_Bootloader),
which then led me to the git repo with another guide on how to build it (GitHub - pingdynasty/OwlWare: Firmware for the OWL programmable effects pedal)

I downloaded make, duf-util and the GNU ARM toolchain. After some troubleshooting i found out that the folder that the toolchain was in was named incorrectly. After fixing this, i went through a series of errors each time i tried to run “make”, where it said that “Tools” was not recognized as a command, and spitting out all the different .o-files. However, after running make a number of times, the console spits out another error(which i presume means that there was something weird going on with the .o-files, but that might(?) be fixed).

The new error says:

C:\Users\Mathi\OneDrive\Skrivebord\OwlWare>make
In file included from ./Source/Owl.cpp:2:0:
c:\users\mathi\onedrive\skrivebord\owlware\tools\gcc-arm-none-eabi-7-2017-q4-major\arm-none-eabi\include\stdlib.h:70:5: error: expected unqualified-id before ‘int’
int _EXFUN(abs,(int));
^
c:\users\mathi\onedrive\skrivebord\owlware\tools\gcc-arm-none-eabi-7-2017-q4-major\arm-none-eabi\include\stdlib.h:70:5: error: expected ‘)’ before ‘int’
c:\users\mathi\onedrive\skrivebord\owlware\tools\gcc-arm-none-eabi-7-2017-q4-major\arm-none-eabi\include\stdlib.h:70:5: error: expected ‘)’ before ‘int’
In file included from c:\users\mathi\onedrive\skrivebord\owlware\tools\gcc-arm-none-eabi-7-2017-q4-major\arm-none-eabi\include\c++\7.2.1\cstdlib:77:0,
from c:\users\mathi\onedrive\skrivebord\owlware\tools\gcc-arm-none-eabi-7-2017-q4-major\arm-none-eabi\include\c++\7.2.1\ext\string_conversions.h:41,
from c:\users\mathi\onedrive\skrivebord\owlware\tools\gcc-arm-none-eabi-7-2017-q4-major\arm-none-eabi\include\c++\7.2.1\bits\basic_string.h:6159,
from c:\users\mathi\onedrive\skrivebord\owlware\tools\gcc-arm-none-eabi-7-2017-q4-major\arm-none-eabi\include\c++\7.2.1\string:52,
from ./Source/PatchRegistry.h:4,
from ./Source/Owl.cpp:6:
c:\users\mathi\onedrive\skrivebord\owlware\tools\gcc-arm-none-eabi-7-2017-q4-major\arm-none-eabi\include\c++\7.2.1\bits\std_abs.h:52:11: error: ‘::abs’ has not been declared
using ::abs;
^~~
make: *** [Build/Owl.o] Error 1

A google search didn’t give me any answers, or at least not any that i understood properly.

I’m hoping that someone can help me, since i feel pretty damn stuck with this process at the moment.
Alternatively, if someone would make the firmware-binary (for the pedal), and send it to me, i would be eternally grateful!

Cheers,

Mathias :slightly_smiling_face:

Hi @mathiasfriis,

I think you are trying to compile the OwlWare firmware, not the bootloader, correct? From the output it looks like ::abs is already defined in the std library for your toolchain version. Try commenting out these lines in ./Source/Owl.h:

That should fix your error. You might run into issues when compiling the PatchLibrary next. If you do, post another message and hopefully we can fix it.

Good luck and cheers,
Ben

Okay - so I’m playing along at home here…

The ::abs error can be fixed by moving the “Owl.h” include to the bottom of the include list in the Owl.cpp file. That way the correct definition gets included before it gets overridden.

Regarding the patches - I think they’ll cause you problems too.

The instructions were to download the pre-built patches, but if you do that you’ll find a few problems. One is that the patches get unzipped into a folder with the wrong name. That’s easy to fix. The next issue is that the OliLarken patches are missing (it seems like when the release file was created, the OliLarken submodule wasn’t included).

I went down the path of using the source repo directly - so from within the /Libraries folder:

$ git clone https://github.com/pingdynasty/OwlPatches.git
$ git submodule init
$ git submodule update

That will pull down all of the patch files source files, and since OliLarken’s repository is a submodule, it will also download his files.

However, there are some errors in the patch source files that make me think this may not have been compiled for a while - eg:

./Libraries/OwlPatches/JotReverbPatch.hpp:133:2: error: 'uin16_t' does not name a type; did you mean 'uint16_t'?
  uin16_t   primeNumberTable[PRIME_NUMBER_TABLE_SIZE];
  ^~~~~~~
  uint16_t

I tried for a while to get this patch to work, but ended up giving up and commenting it out in factory.cpp and factory.h . (I changed uin16_t to char, and at that point there were a bunch of other complaints in the same file that seemed like they’d be a bit of a time sink to look into).

I also commented out the mdaports/MdaTransientPatch in factory.cpp/factory.h - this patch appeared to use the exp10f function from math.h, which wasn’t available because the compile options include -fno-builtin.

After those changes I was able to get an OwlWare.bin file created.

$ ls -l *.bin
-rwxrwxr-x 1 user user  381448 Oct 10 04:34 OwlWare.bin

$ md5sum OwlWare.bin 
dcd4c11852ea8b10728cdf9d733517dd  OwlWare.bin

I can’t upload the file here because the forum only seems to allow images, but if you’re still stuck, and interested I can try to find a way to get it to you.

D.

1 Like

Whoops - I just re-read the above and realised that it was the BootLoader, not the firmware you’re after. In which case, it’s already in the source tree:

make bootloader should upload it.

D.

Hi there!

Thanks for the thorough answer, it’s much appreciated! :slight_smile:

Honestly, i’m not sure whether it’s the bootloader or the firmware that’s the problem in my case. The case is that the pedal is unresponsive, and OwlControl doesn’t recognize it either.

I tried following what you did, and came to the same results. I managed to compile a binary-file, and used “dfu-util config=RELEASE” to successfully download the file.

However…

The pedal is still unresponsive, and the only change now is that when i connect it via USB, it blinks very rapidly for about a tenth of a second (i can just barely see the green LED blinking now as well, but needed a slow-motion camera to confirm this, it’s that quickly), and then it blinks red 2-3 times at a slower rate. Windows doesn’t recognize the USB device, and neither does OwlControl.

At this point, i’m honestly not sure what to do.

Again, thank you for taking your time to help, it is much appreciated! :slight_smile:

Thanks for taking the time to help :slight_smile:

As this produced a whole bunch of new errors, i’m trying out gundy’s way first. I’ll get back to you, if it doesn’t work out :slight_smile:

1 Like

No worries, the quick workaround i suggested worked when i compiled OwlWare the other day. @gundy s suggestion is the cleaner way to fix it :slight_smile:

Regarding your bricked pedal, have you tried first uploading a newly built version of the bootloader, then checking if the bootloader will boot into DFU mode: $ dfu-util -l → should show you that the bootloader is running properly when connected via usb. Then try again to upload OwlProgram and reboot? There are also some defines to set to define the target platform allthough I think the default is for the owl pedal. Could be you already tried this but maybe it helps.

Good luck!
…Ben

Just out of interest, what is the arm-gcc toolchain version you are using?

Another thing I’ve just noticed… there appears to be a considerably “fresher” codebase available in the OpenWare repo:

However, I can’t get the code there to build either. It seems to be missing a FreeRTOS.h header file. I’m sure it’s probably something simple that I’m missing :confused:

Currently, i’m trying with gcc-arm-none-eabi-7-2017-q4-major.

make bootloader
./Tools/dfu-util/dfu-util -d 0483:df11 -c 1 -i 0 -a 0 -s 0x8000000 -D ./Libraries/OwlBoot/OwlBoot.bin
dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

Invalid DFU suffix signature
A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device…
ID 0483:df11
Run-time device DFU version 011a
Claiming USB DFU Interface…
Setting Alternate Setting #0
Determining device status: state = dfuERROR, status = 10
dfuERROR, clearing status
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 2048
DfuSe interface name: "Internal Flash "
Downloading to address = 0x08000000, size = 14484
Download [=========================] 100% 14484 bytes
Download done.
File downloaded successfully
Uploaded ./Libraries/OwlBoot/OwlBoot.bin to OWL bootsector


dfu-util -l
dfu-util 0.8

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util(at)lists.gnumonks.org

Found DFU: [0483:df11] ver=2200, devnum=6, cfg=1, intf=0, alt=3, name="(at)Device Feature/0xFFFF0000/01004 e", serial=“385134703233”
Found DFU: [0483:df11] ver=2200, devnum=6, cfg=1, intf=0, alt=2, name="(at)OTP Memory /0x1FFF7800/01
512 e,01016 e", serial=“385134703233”
Found DFU: [0483:df11] ver=2200, devnum=6, cfg=1, intf=0, alt=1, name="(at)Option Bytes /0x1FFFC000/01
016 e", serial=“385134703233”
Found DFU: [0483:df11] ver=2200, devnum=6, cfg=1, intf=0, alt=0, name="(at)Internal Flash /0x08000000/04016Kg,01064Kg,07*128Kg", serial=“385134703233”


make dfu
./Tools/dfu-util/dfu-util -d 0483:df11 -c 1 -i 0 -a 0 -s 0x8008000:leave -D ./Build/OwlWare.bin
dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
Invalid DFU suffix signature
A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device…
ID 0483:df11
Run-time device DFU version 011a
Claiming USB DFU Interface…
Setting Alternate Setting #0
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 2048
DfuSe interface name: "Internal Flash "
Downloading to address = 0x08008000, size = 330072
Download [=========================] 100% 330072 bytes
Download done.
File downloaded successfully
Transitioning to dfuMANIFEST state
Uploaded ./Build/OwlWare.bin to OWL firmware

This all looks good to me, but it’s still unresponsive :frowning:

Holy moly!

I’m not quite sure how it happened, but somewhere along the way, this seemed to fix the issue! I could have sworn that i have done exactly this about a hundred times already, though! I probably hadn’t though…

Anyways, thanks a lot for the help to both of you, and have a good day! :slight_smile:

Cheers,

Mathias :slight_smile:

2 Likes

Hey @gundy, this is the new firmware that is used on the magus, wizard,alchemist. It adds some new stuff to operate the display e.g. amongst other things.

Havent tried to build OpenWare yet but sounds like a missing/wrong include directive to me. FreeRTOS is used for some lightweight task/sheduling stuff, its also used in OwlWare so hopefully should be something fixable.

@mathiasfriis glad you got it working :slight_smile:

Cheers,

hi @mathiasfriis!

The old forum on hoxtonowl.com has been abandonded, the links on that website should take you here.

There are releases published so that you don’t necessarily have to build your own OwlWare: Releases · pingdynasty/OwlWare · GitHub

But I’m glad you managed to build it in the end, it’s an empowering thing to do!

Is the pedal working for you now, or do you still need to re-flash the bootloader?

If you’re feeling stuck, then send it back to us an we’ll sort it out for you.

best,

Martin Klang / Rebel Technology

1 Like