Pages: 1 [2]   Go Down
Author Topic: error compiling on gcc-avr 4.6.1  (Read 14745 times)
0 Members and 1 Guest are viewing this topic.
Paris (France)
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

For those of you who don't have the gcc-avr-4.6.0-3 package anymore, you still can download it here :

http://schlunix.org/archlinux/pool/community/gcc-avr-4.6.0-3-i686.pkg.tar.xz
or
http://schlunix.org/archlinux/pool/community/gcc-avr-4.6.0-3-x86_64.pkg.tar.xz

And thanks for your patch, ygrek. It seems to work fine smiley-wink
Logged

Rochester NY
Offline Offline
Newbie
*
Karma: 0
Posts: 19
Expand your mind.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Just want to let you know that using  the following command in fedora15 i was able to get the Arduino IDE to compile again.

Code:
sudo yum downgrade avr-gcc avr-gcc-c++
Logged

Netherlands
Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

had the same issue here with gcc-avr-4.6.1 on Arch Linux. But today I could update to gcc-avr-4.6.2-1; and that solved it.
Logged

تهران
Offline Offline
Newbie
*
Karma: 0
Posts: 3
 Bigger Bigger  Smaller Smaller  Reset Reset

I have same problem!

Code:
const char num1[] PROGMEM = "09194986646", num2[] PROGMEM = "44166762";
char* num[]  PROGMEM = {(void *)num1, (void *)num2};

It works fine when compiling with WINAVR2010 but compiling
Code:
const char num1[] PROGMEM = "09194986646", num2[] PROGMEM = "44166762";
PGM_P num[]  PROGMEM = {(void *)num1, (void *)num2};
with gcc version 4.6.2 (AVR_8_bit_GNU_Toolchain_3.4.1_798) the compiler returns this error:
Code:
monitoring.c:10:7: error: variable 'num' must be const in order to be put into read-only section by means of '__attribute__((progmem))'

Have anybody solved this ptoblem?
Logged


Czech Republic
Offline Offline
Sr. Member
****
Karma: 4
Posts: 313
Absolute Beginner, yet.
Newbie in Arduino
since May 2013
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Two years ago, and I have same problem:
Using older versions of Arduino IDE is OK, but latest betas 1.5.6 , 1.5.7 and 1.5.8 produces same error:

error: variable Text'Info' must be const in order to be put into read-only section by means of '__attribute__((progmem))'

My program contains:
char TextInfo [] PROGMEM = "some text";

Changing to
const TextInfo [] PROGMEM = "some text";

causes another error:
error: 'TextInfo' does not name a type

Please, I am beginner and I do not uderstand all of C++ nuances, can you help me to solve this problem?
Logged

Arduino Uno R3, Arduino Mega 2560 R3, Ethermega (R3), and some Ethernet Shields (R3), Chronodots, TMP36 sensors, DS18B20 sensors, LCDs/TFTs, RS232C to learn and play...

Pages: 1 [2]   Go Up
Jump to: