Giter VIP home page Giter VIP logo

arscons's Introduction

!!DEPRECATED!! This repo is not maintained over 8 years! Recommand to use arduino-cli

Arscons : scons script for Arduino

build & upload Arduino sketch on the command line with scons!

  • No java needed!
  • Use Arduino IDE's conf. so, all board which supported by Arduino supported by arscons.
  • Works on Ubuntu Linux, Mac OS X and Windows.
  • Need pyserial to triggering reset just before upload.

Basic Usage:

  • make a folder which have same name of the sketch (ex. Blink/ for Blink.pde)

  • put the sketch and the SConstruct under the folder.

  • to make the HEX do following in the folder:

    $ scons

  • to upload the binary, do following in the folder:

    $ scons upload

  • refer Expert Usage for change the confs.

  • refer Arscons Users for arscons in practice (and hacks!)

Thanks to:

arscons's People

Contributors

b4zz4 avatar bergey avatar dnet avatar glawler avatar jeroendoggen avatar kylegordon avatar mignev avatar mmurdoch avatar noahgoldman avatar nurikk avatar ponty avatar rasmuspeders1 avatar rshk avatar suapapa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arscons's Issues

Problem when there are multiple .pde files

Arduino seems to concatenate multiple .pde files, if more than one exist in the project.

So if have Blink/Blink.pde and Blink/Foo.pde then arduino compiles both of these, and furthermore it seems to concatenate them.

If I put a #define in Blink.pde, then I can reference that #define in Foo.pde and get no errors when building under arduino, but it fails to build when using arscons.

I did some experimentation, and it seems to sort the .pde's alphabetically, with the exception that the one that has the same name as the directory is at the beginning of the list.

Interpretation error

Hello,
I have had an error while trying to execute arscons, python throws me an error : ImportError: No module named path, on line 40
it cames from the from path import path instruction, i've searched about this module and about the Environnement() function, but I didn't find anything.
I tried on python 2.7 and 2.4 and I run over windows vista (don't hit me !)
Thanks in advance

Linux : change default sketchbook folder

On linux the default sketchbook folder is ~/sketchbook

So on the SConstruct file, replace this line :
SKETCHBOOK_HOME = resolve_var('SKETCHBOOK_HOME', path.expanduser('/share/arduino/sketchbook/'))
by this line
SKETCHBOOK_HOME = resolve_var('SKETCHBOOK_HOME', '
/sketchbook/')

Remove README.md

arscons can used as skel for an sketch. like;

$ cp arscons my_sketch
$ cd my_sketch
$ git rename origin arscons_upsteam
$ git mv arscons.ino my_sketch.ino
$ git commit -m "Begin of my_sketch"

This is good because any update from arscons can easyly merged with current sketch:

$ git fetch arscons_upstream
$ git merge arscons_upstream/master

In this scenario, arscon's README.md will confilct if my_sketch has it's own READMD.md.

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

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.

arscons isn't working with Arduino Leonardo

Hi!

I'm having problem trying to upload a very simple program (blink sample) with scons on LEONARDO board. When i use Arduino IDE it works well with the Leonardo, but scons can't dialog with it.

This is what i got:
Connecting to programmer: .
Found programmer: Id = "TESTATA"; type = A
Software Version = T.E; Hardware Version = S.T
avrdude: error: buffered memory access not supported. Maybe it isn't
a butterfly/AVR109 but a AVR910 device?

I tried with AVR910 and AVR911 but it's worth.

Linux : change default avr-g++ folder

On Linux Ubuntu, the avr-g++ default folder is /usr/bin

So on the SConstruct file, replace this line :
AVR_HOME = resolve_var('AVR_HOME', path.join(ARDUINO_HOME, 'hardware/tools/avr/bin'))
by this line :
AVR_HOME = resolve_var('AVR_HOME', '/usr/bin/')

build\core.a: No such file or directory

When I try
scons ARDUINO_PORT=COM5 ARDUINO_BOARD=atmega328 ARDUINO_VER=1.0.1 ARDUINO_HOME=C:\Arduino upload

I get these messages;;;
fnCompressCore(["build\core.a"], ["build\core\WInterrupts.o", "build\core\wiring
.o", "build\core\wiring_analog.o", "build\core\wiring_digital.o", "build\core\wi
ring_pulse.o", "build\core\wiring_shift.o", "build\core\CDC.o", "build\core\Hard
wareSerial.o", "build\core\HID.o", "build\core\IPAddress.o", "build\core\new.o",
"build\core\Print.o", "build\core\Stream.o", "build\core\Tone.o", "build\core\U
SBCore.o", "build\core\WMath.o", "build\core\WString.o"])
C:\Arduino\hardware/tools/avr/bin\avr-gcc -mmcu=atmega328p -Os -Wl,--gc-sections
-o sketch.elf build\sketch.o build\lib_00\LiquidCrystal\LiquidCrystal.o build\l
ib_00\NS_LCD_01\NS_LCD.o build\core.a -lm
avr-gcc: build\core.a: No such file or directory
scons: *** [sketch.elf] Error 1
scons: building terminated because of errors.

why build\core.a dosen't exists?

bb206967 regression in path to avr-ar

In HEAD, AVR_BIN_PREFIX is set twice, to /usr/share/arduino/hardware/tools/avr/bin/avr- and to /usr/share/arduino/hardware/tools

At least on debian sid, the first is where ar is located.

Prior to
bb20696

arscons finds avr-ar.

I'm happy to write a patch, but I'm not sure what bb20696 is meant to do. Is it sufficient to use AVR_HOME_DUDE in calling avrdude, as in #18?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.