Libraries, utilities, bootloaders...
by martinsustek » Sun Jun 08, 2014 2:32 pm
Hi,
I am trying to compile some demo sketches, but I am unable to do so because of the following avr-gcc error:
- Code: Select all
In file included from /usr/share/arduino/hardware/arduino/cores/arduino/Arduino.h:8:0,
from /usr/share/arduino/libraries/SPI/SPI.h:15,
from sokobuino.ino:1:
/home/martin/sketchbook/libraries/Gamebuino/font3x5.c:8:29: error: variable ‘font’ must be const in order to be put into read-only section by means of ‘__attribute__((progmem))’
static unsigned char font[] PROGMEM = {
^
I've figured out that this is problem of the new avr-gcc (4.6.1 and newer). Each PROGMEM must be used with const. I tried to add this keyword but this error occured on another places then and it is over my abilities to fix them all.
According to this
http://forum.arduino.cc/index.php?PHPSESSID=2bl60rt9hbci64kce2dq71q2b5&topic=66710.15 one is able to fix it by downgrading avr-gcc, but do you think that it is possible to fix the library to work with the newest avr-gcc?
-
martinsustek
-
- Posts: 19
- Joined: Wed Mar 12, 2014 7:30 pm
by rodot » Sun Jun 08, 2014 3:12 pm
Thanks for sharing this issue, I'll try tot fix it asap.
You should downgrade avr-gcc for now, 'cause I don't know when I'll be able to fix this.
-
rodot
- Site Admin
-
- Posts: 1290
- Joined: Mon Nov 19, 2012 11:54 pm
- Location: France
-
by martinsustek » Mon Jun 09, 2014 11:00 am
Thank you. I've actually downgraded it but it was not an easy task because the older version library is not in repo now. So I had to install it manually with all dependencies.
I am now able to compile a game on my early bird Gamebuino, so I don't need a fix urgently. Maybe there will be more Linux users after final Gamebuino release.
Problem with rewriting library is that when you add const to declaration of variable, compiler requires it in function headers etc.
I had one more issue, with uploading compiled sketch to Gamebuino. Arduino didn't detected it. I thought it was a problem of Linux drivers but finally the cable I received with Gamebuino showed to be faulty, another cable solved it.
-
martinsustek
-
- Posts: 19
- Joined: Wed Mar 12, 2014 7:30 pm
by rodot » Mon Jun 09, 2014 12:35 pm
Thanks for you feed back, I'll install ubuntu and try to fix that today.
I tried several cables and they were all working fine. As Gamebuino uses a standard micro USB B cable, you can use any phone cable. I'm really sorry about that :/
-
rodot
- Site Admin
-
- Posts: 1290
- Joined: Mon Nov 19, 2012 11:54 pm
- Location: France
-
by rodot » Mon Jun 09, 2014 3:27 pm
The latest update is now on github, I added const everywhere but haven't tried it on ubuntu yet.
-
rodot
- Site Admin
-
- Posts: 1290
- Joined: Mon Nov 19, 2012 11:54 pm
- Location: France
-
by inversesandwich » Wed Jun 11, 2014 4:35 pm
martinsustek wrote:Maybe there will be more Linux users after final Gamebuino release.
I use GNU/Linux and open-source software and hardware religiously.
-
inversesandwich
-
- Posts: 32
- Joined: Sat Apr 19, 2014 10:34 pm
- Location: United Kingdom
-
by Drakker » Wed Jun 11, 2014 5:50 pm
Linux user here too!
-
Drakker
-
- Posts: 297
- Joined: Sun Mar 30, 2014 2:54 am
- Location: Québec, Canada
-
by rodot » Thu Jun 12, 2014 4:21 am
That's why I'm developping the toolkit (bitmap encoder, tracker, ...), using Java
Anybody had a chance to try to compile the latest version of the library with the latest version of avrgcc under Ubuntu ?
BTW I did some pretty nice improvements (especially in the loader.hex), so you should update the HEX files on you micro SD card for those who already have their Gamebuino
-
rodot
- Site Admin
-
- Posts: 1290
- Joined: Mon Nov 19, 2012 11:54 pm
- Location: France
-
by Sot0 » Thu Jun 12, 2014 3:16 pm
Had the same problem but on Linux Mint, i tried to fix it for several Hours, by intsalling older gcc versions. Had the Problem with other Arduino Libraries, too. Easiest fix is to install Arduino IDE v1.0.5 rather then the newer one from the Packet Manager.
https://code.google.com/p/arduino/downl ... inux32.tgzhttps://code.google.com/p/arduino/downl ... inux64.tgzEdit: i tried to compile with the newer IDE and the Library from Github, still fails:
- Code: Select all
/usr/share/arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -D__PROG_TYPES_COMPAT__ -I/usr/share/arduino/hardware/arduino/cores/arduino -I/usr/share/arduino/hardware/arduino/variants/standard -I/usr/share/arduino/libraries/SPI -I/home/user/sketchbook/libraries/Gamebuino /tmp/build6870249814536652552.tmp/a_Hello.cpp -o /tmp/build6870249814536652552.tmp/a_Hello.cpp.o
In file included from /usr/share/arduino/hardware/arduino/cores/arduino/Arduino.h:8:0,
from /usr/share/arduino/libraries/SPI/SPI.h:15,
from a_Hello.ino:2:
/home/user/sketchbook/libraries/Gamebuino/font3x5.c:8:29: error: variable ‘font’ must be const in order to be put into read-only section by means of ‘__attribute__((progmem))’
static unsigned char font[] PROGMEM = {
^
In file included from /home/user/sketchbook/libraries/Gamebuino/Display.h:48:0,
from /home/user/sketchbook/libraries/Gamebuino/Gamebuino.h:16,
from a_Hello.ino:4:
/home/user/sketchbook/libraries/Gamebuino/font3x5.c:8:22: warning: ‘font’ defined but not used [-Wunused-variable]
static unsigned char font[] PROGMEM = {
^
-
Sot0
-
- Posts: 31
- Joined: Sat Apr 26, 2014 3:31 pm
- Location: Germany
by rodot » Thu Jun 12, 2014 8:29 pm
Thanks for the feedback it should be fixed now as I added the "const" modifier the the "font" variable. But it created a conflicting variables compilation error to I had to rename the fonts, you can no longer switch between font sizes in settings.c. I'll fix that asap.
-
rodot
- Site Admin
-
- Posts: 1290
- Joined: Mon Nov 19, 2012 11:54 pm
- Location: France
-
Return to Software Development
Who is online
Users browsing this forum: No registered users and 38 guests