[on Wed 30 of Dec., 2009 08:48 EST, by rsbohn]
The files in */trunk/library allow you to use the Arduino(Wiring) libraries to program the Maple board. Here is how it worked for me on Ubuntu. You should probably read http://leaflabs.com/Blinky first, the instructions there are excellent.
-Install dfu-util
-Install subversion
-Fetch a copy of the Leaflabs code from http://leaflabs.googlecode.com/svn/
-Go to */trunk/library
-Make any changes to src/main.cpp
-run 'make clean'
-run the following to build the software as a RAM image
MAPLE=~/leaflabs-read-only/trunk/maple/build/linux/dist
ARM_BIN=$DIST/tools/arm/bin
PATH=$ARM_BIN:$PATH make LINKER=lanchon-stm32-user-ram.ld DEFFLAGS=VECT_TAB_RAM
(I put that in a script called 'go', then ran 'sh go')
-Next connect the maple board. You may see a message informing you that
the Maple is not a modem. (dmesg | tail to see the message) This is expected
and not a problem.
-Make sure dfu-util can see the board:
dfu-util -l
You should see two lines with the Maple vendor:product id 0x0110:0x1001.
The alt=0 is the RAM target and the alt=1 is the Flash (ROM) target.
-Now run 'sudo make program' to transfer the image to the Maple board. dfu-util will connect to the board, put it into dfuIDLE mode, then upload the image. After the upload the board is reset and your program should start running. The default image will blink the blue LED on pin 13. It will send startup messages out Serial2 (pins D0 and D1). It also sends 'blink...\n' on the usb port (Serial1), which you can see if you run 'cat /dev/ttyACM0'.
Your program is loaded in RAM, so it won't be there if you cycle the power on the Maple board. If you want to put it in flash you need the following (which I have not yet tried):
make LINKER=lanchon-stm32-user-rom.ld DEFFLAGS=VECT_TAB_RAM