Compile error playing with OLD Medusa Mini

I have tried to fire up my Medusa for a little experiment, but there is a bump here…

Downloaded the SDK via [quote]
You need to install the Gadgeteering SDK, but we no longer host it. You can unzip into “My Documents\Arduino”. Make sure you have a folder path like “My Documents\Arduino\hardware\GHI Electronics\avr” (among other folders).

Verifying the basis project (default start project) results in this:

In file included from C:\Users\njb\Documents\Arduino\libraries\Gadgeteering\src\Modules\FLASH.cpp:17:0:

C:\Users\njb\Documents\Arduino\libraries\Gadgeteering\src\Modules\FLASH.h:42:48: error: field initializer is not constant
    static const unsigned int BLOCK_SIZE = 64 * 1024;
C:\Users\njb\Documents\Arduino\libraries\Gadgeteering\src\Modules\FLASH.cpp: In member function 'bool gadgeteering::modules::flash::erase_block(unsigned int, unsigned int)':
C:\Users\njb\Documents\Arduino\libraries\Gadgeteering\src\Modules\FLASH.cpp:115:11: error:   in evaluation of 'operator+=(unsigned int, const unsigned int)'
   address += flash::BLOCK_SIZE;
exit status 1
Error compiling.

Any idea why that happens?

@ andre.m - Thanks but that thread did not change anything…have added wire and spi h-files, but did not try downgrading to 1.0.6 though…

I am using Arduino IDE 1.6.6. On Win10-64.

Do I have to downgrade?

I was able to repro this in 1.6.3. It’s a weird error, especially given that the previous line does a similar computation, but there is a brute-force fix. If you change 64 * 1024 in flash.h to 65536, then the base project compiles correctly (under 1.6.3, my current version).


@ mcalsyn - Thanks mucho, it worked! Moving a few bootloader files was also needed.

I dont like that kind of errors, they creep me up in my computer science trust to compilers!

1 Like