| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Compile Wiring By Hand

Page history last edited by PBworks 16 years, 2 months ago

Does not seem to be description on website of the compilation process.

 

Downloaded wiring source by:

svn co svn://wiring.uniandes.edu.co/trunk/wiring

 

Downloaded wiring environment (version 0013) from:

http://wiring.org.co/download/wiring-0013.dmg

 

First Step: Wrapper code for files

  1. Started file,
    wiringHello.pde
  2. Wrote simple blink program
  3. Uploaded to board via wiring environment

 

Notes

wiringHello.pde contains exactly the sketch written in the environment. No other metadata.

  1. When a subsketch was created, it makes a new .pde file with the name of the subsketch, and contains the same data in the wiring environment.
  2. A file called wiringHello.cpp was created in the applet subdirectory. This file contains the following header:

#include "WProgram.h"

#include "HardwareSerial.h"

#include "HardwareSerial.h"

(yes, it #included HardwareSerial.h twice...)

 

The header is followed by the main sketch file verbatim, followed by the subsketch text verbatim. So the file looks like this

<header>
<sketch code>
<subsketch code>

 

Second Step: Compile Manually using avr toolchain and wiring source

1/22/08 - Once you have your .cpp file, you can then compile it against the wiring libraries using a Makefile. The Makefile is based on the Arduino Makefile (I used the Arduino one because it was better organized and easier to modify. It was also more flexible in terms of easily changing what source files you need to include in your project). I unfortunately cannot try programming the chip just yet, since I need a 10 pin header on my programmer (mine has a 6 pin header). Will have to wait till I have access to the stk500.

 


Wiring bootloaders

The bootloader on our wiring boards seems to be incompatible with avrdude. Links:

 

http://wiring.org.co/cgi-bin/yabb/YaBB.pl?num=1192470635

http://www.chip45.com/index.pl?page=Crumb128_Downloads&lang=en

http://www.avride.com/article/wiring/

 

We burned the bootloader from avride onto the wiring board, and avrdude succeeded in uploading code. I uploaded my wiringHello.hex file that I compiled with the Makefile to the board and the LED blinked. Huzzah!

Used "make upload" in my updated makefile to program the wiring board.

Comments (0)

You don't have permission to comment on this page.