From 1790624743d5ed639690bc709478069158a4837b Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Tue, 20 Sep 2005 16:58:07 +0000 Subject: [PATCH] Integrated bootloader into Mac and Windows dists. Burn scripts now in platform dirs; make.sh builds bootloader. Set baud rate back to 9600 for backwards compatibility. --- bootloader/ATmegaBOOT.bin | Bin 1844 -> 0 bytes bootloader/ATmegaBOOT.c | 2 +- bootloader/Makefile | 2 +- bootloader/fixmybootloader.command | 29 ------------------ build/macosx/make.sh | 8 +++++ .../windows/dist/bootloader/burn.bat | 0 build/windows/make.sh | 19 ++++++------ 7 files changed, 19 insertions(+), 41 deletions(-) delete mode 100755 bootloader/ATmegaBOOT.bin delete mode 100755 bootloader/fixmybootloader.command rename bootloader/program.bat => build/windows/dist/bootloader/burn.bat (100%) diff --git a/bootloader/ATmegaBOOT.bin b/bootloader/ATmegaBOOT.bin deleted file mode 100755 index 702bdea3e67a576e164688e37789754a60ed3292..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1844 zcmZ`(Z%kWN6n_sH^cf88Sm>r@6jujovvzDkO=d>?6Td8hL?fHd6gLB7!^j8!CM4@{ znKP;5y|%A|4hQnV4@M1d_=g4tx6O~(#~h`{jN`}#5#-Iw$3 zJ?D4M`JF%aZA4F^C(z@l234c&=rQC#+t8z^3fWO5+KMWW4LyP$Mixiqgq;2r|1mi| zX~u(@VZ3lF*wQy1m()x|%HmeV(jRJ>N?%VFUVqY8%^PP|SlcS-@5eOETy zU&m>aabXvy1>^i~POFa#Ag%ELNG2|VycXl1;0PMf88j?(uoK6JgB>gq zTA7s4#w1GTD^tNX1_fIg;Qa)__m0vnx;t*rD2XRsV}DPm`#cvO>G-gB|{hZu7UwIMpB}5xu@{o??EUT~a4Z;CJdB zQu-;@nOrybo%-D2RRL~_;@(vBm$#X+@Jl{VHhaQzAlvQXwAaw-r#bCKM5e31@o%V) z@y7LCS)SJIb)L;CIr$|b^*sqwys;-4iX@eC>L=7dVqL`n9K>^!s6+_uF-xYNO{asSD2K^xQ8Aa5hg@PLsVJ7&|kDBYoAMj+jK_{?=IO Q_e-ILh!QECFo{0qUvJU%MgRZ+ diff --git a/bootloader/ATmegaBOOT.c b/bootloader/ATmegaBOOT.c index 7ff752503..ce63aea61 100755 --- a/bootloader/ATmegaBOOT.c +++ b/bootloader/ATmegaBOOT.c @@ -47,7 +47,7 @@ /* We, Malmoitians, like slow interaction * therefore the slow baud rate ;-) */ -#define BAUD_RATE 19200 +#define BAUD_RATE 9600 /* 6.000.000 is more or less 8 seconds at the * speed configured here diff --git a/bootloader/Makefile b/bootloader/Makefile index 02d943ee3..7fa8ad8ae 100644 --- a/bootloader/Makefile +++ b/bootloader/Makefile @@ -17,7 +17,7 @@ ISPPARAMS = -dprog=stk500 -dserial=/dev/com1 -dspeed=115200 # You should not have to change anything below here. ############################################################ -DIRAVR = /usr/local/avr +#DIRAVR = /usr/local/avr DIRAVRBIN = $(DIRAVR)/bin DIRAVRUTILS = $(DIRAVR)/utils/bin DIRINC = . diff --git a/bootloader/fixmybootloader.command b/bootloader/fixmybootloader.command deleted file mode 100755 index 622693806..000000000 --- a/bootloader/fixmybootloader.command +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh - -# fixmybootloader.command 25.06.2005 mbanzi -# -# Arduino project http://arduino.berlios.de -# -# quick and dirty script to set the proper fuses and lock bits -# while loading the bootloader onto a brand new arduino board -# -# very useful also when for some reasons the bootloader disappears -# -# TODO: cleanup and make it more user friendly -# TODO: move this (and related) scripts to platform dist/ dirs -# -# expects an STK500 compatible programmer on the specified serial port -# if you use the parallel port programmer you need to change the dprog -# parametre -# - -#BINDIR=/usr/local/avr/bin -BINDIR=../build/macosx/work/tools/avr/bin -#PORT=/dev/tty.usbserial0 -#PORT=/dev/tty.USA19QW3b1P1.1 -PORT=/dev/tty.USA19QW1b1P1.1 - -$BINDIR/uisp -dpart=ATmega8 -dprog=stk500 -dserial=$PORT -dspeed=115200 --wr_lock=0xFF -$BINDIR/uisp -dpart=ATmega8 -dprog=stk500 -dserial=$PORT -dspeed=115200 --wr_fuse_l=0xdf --wr_fuse_h=0xc8 -$BINDIR/uisp -dpart=ATmega8 -dprog=stk500 -dserial=$PORT -dspeed=115200 --erase --upload if=ATMegaBOOT.hex -v -$BINDIR/uisp -dpart=ATmega8 -dprog=stk500 -dserial=$PORT -dspeed=115200 --wr_lock=0xCF diff --git a/build/macosx/make.sh b/build/macosx/make.sh index 4e82f986f..c92a5ddb7 100755 --- a/build/macosx/make.sh +++ b/build/macosx/make.sh @@ -53,6 +53,7 @@ cp -r ../../core work echo Copying dist files... cp -r dist/lib work/ cp -r dist/core work/ +cp -r dist/bootloader work/ ### -- START BUILDING ------------------------------------------- @@ -63,6 +64,13 @@ cd ../.. ### -- BUILD GCC ------------------------------------------------ # in the future we will build avr-gcc and tools (if they don't exist) +### -- BUILD BOOTLOADER ---------------------------------------- +cd bootloader +export DIRAVR=../build/macosx/work/tools/avr +make +cp ATmegaBOOT.hex ../build/macosx/work/bootloader +cd .. + ### -- BUILD JAVA ----------------------------------------------- # set classpath diff --git a/bootloader/program.bat b/build/windows/dist/bootloader/burn.bat similarity index 100% rename from bootloader/program.bat rename to build/windows/dist/bootloader/burn.bat diff --git a/build/windows/make.sh b/build/windows/make.sh index c0a39bd57..951a8b05c 100755 --- a/build/windows/make.sh +++ b/build/windows/make.sh @@ -60,6 +60,8 @@ else #chmod +x work/jikes.exe cp dist/ICE_JNIRegistry.dll work/ + mkdir work/bootloader + cp dist/bootloader/*.* work/bootloader cp dist/serial/*.* work/lib/ mkdir work/tools cp dist/avr_tools.zip . @@ -119,6 +121,13 @@ cd ../.. fi +### -- BUILD BOOTLOADER ----------------------------------------- + +cd bootloader +export AVRDIR=../build/windows/work/tools/avr +make +cp ATmegaBOOT.hex ../build/windows/work/bootloader +cd .. ### -- BUILD PDE ------------------------------------------------ @@ -162,16 +171,6 @@ CORE=..\\..\\build\\$PLATFORM\\work\\lib\\core.jar LIBRARIES=..\\..\\build\\$PLATFORM\\work\\libraries -# PARTICLES LIBRARY -#echo Build particles library... -#cd ../lib/particles -#$JIKES -target 1.1 +D -d . *.java -#rm -f library/particles.jar -#zip -r0q library/particles.jar simong -#rm -rf simong -#mkdir -p $LIBRARIES/particles/library/ -#cp library/particles.jar $LIBRARIES/particles/library/ - echo echo Done.