Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code compiles with Arduino IDE, but does not compile with scons #8

Open
tpimh opened this issue Sep 13, 2012 · 2 comments
Open

Code compiles with Arduino IDE, but does not compile with scons #8

tpimh opened this issue Sep 13, 2012 · 2 comments

Comments

@tpimh
Copy link

tpimh commented Sep 13, 2012

I have Arduino IDE 1.0.1 with it's libraries on Linux and Arduino with ATMEGA8 microcontroller.

Compiling example sketch (https://github.com/suapapa/arscons/blob/master/arscons.ino) with Arduino IDE for ATMEGA8 is okay, compiling for ATMEGA328P with scons is okay too, but if I execute "scons ARDUINO_BOARD=atmega8", I get this:

scons: Reading SConscript files ...
{   'ARDUINO_BOARD': ('arg', 'atmega8'),
    'ARDUINO_HOME': ('dfl', '/usr/share/arduino/'),
    'ARDUINO_PORT': ('dfl', None),
    'ARDUINO_VER': ('dfl', 0),
    'AVR_HOME': ('dfl', ''),
    'EXTRA_LIB': ('dfl', None),
    'RST_TRIGGER': ('dfl', None),
    'SKETCHBOOK_HOME': ('dfl', '/home/golovin/share/arduino/sketchbook/')}
No Arduino version specified. Discovered version 100 or above
maximum size for hex file: 7168 bytes
scons: done reading SConscript files.
scons: Building targets ...
scons: building associated VariantDir targets: build/local build
avr-g++ -o build/core/CDC.o -c -ffunction-sections -fdata-sections -fno-exceptions -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Os -Wall -mmcu=atmega8 -DARDUINO=100 -DF_CPU=16000000L -Ibuild/core -I/usr/share/arduino/hardware/arduino/variants/standard build/core/CDC.cpp
avr-g++ -o build/core/HID.o -c -ffunction-sections -fdata-sections -fno-exceptions -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Os -Wall -mmcu=atmega8 -DARDUINO=100 -DF_CPU=16000000L -Ibuild/core -I/usr/share/arduino/hardware/arduino/variants/standard build/core/HID.cpp
avr-g++ -o build/core/HardwareSerial.o -c -ffunction-sections -fdata-sections -fno-exceptions -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Os -Wall -mmcu=atmega8 -DARDUINO=100 -DF_CPU=16000000L -Ibuild/core -I/usr/share/arduino/hardware/arduino/variants/standard build/core/HardwareSerial.cpp
build/core/HardwareSerial.cpp:93:11: error: attempt to use poisoned "SIG_UART_RECV"
build/core/HardwareSerial.cpp:94:4: error: #error "Don't know what the Data Received vector is called for the first UART"
build/core/HardwareSerial.cpp: In function 'void store_char(unsigned char, ring_buffer*)':
build/core/HardwareSerial.cpp:82:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
build/core/HardwareSerial.cpp: In member function 'virtual size_t HardwareSerial::write(uint8_t)':
build/core/HardwareSerial.cpp:390:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
scons: *** [build/core/HardwareSerial.o] Error 1
scons: building terminated because of errors.

Looks like errors in Arduino libraries, but it's okay, when using Arduino IDE. Don't know how to fix it.

@suapapa
Copy link
Owner

suapapa commented Sep 17, 2012

I'm using the arscons with Ubuntu 12.04 with arduino-core package.

$ dpkg -s arduino-core
Package: arduino-core
...
Version: 1:1.0+dfsg-9
Depends: gcc-avr, avrdude, gcc, avr-libc
...

No such a problem in my case. You have two solution:

  1. Find out what's diffrent between the IDE and arscons, fix arscons and, send me pull request. Refer Hacking page
  2. Wait till the ubuntu package upgraded to v1.0.1 so, I have same problem. :)

@bergey
Copy link
Contributor

bergey commented Jul 3, 2013

Works fine for me with debian sid, arduino-core 1:1.0.5+dfsg2-1

Ubuntu 12.10 (quantal) and 13.04 (raring) both have arduino-core >=1.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants