diff options
author | Cristian Maglie <c.maglie@bug.st> | 2012-02-01 14:34:29 +0100 |
---|---|---|
committer | Cristian Maglie <c.maglie@bug.st> | 2012-02-01 14:34:29 +0100 |
commit | 5c57cbab0cbc519bb097993328ade730995c095e (patch) | |
tree | 7f3fba18072e059657e714aee7d301d9a163c472 | |
parent | b4ba455bc6b95ebba660d633e3b637a3cf74cb6a (diff) |
First attemp to generalize upload for mutiplatform IDE
-rw-r--r-- | boards.txt | 4 | ||||
-rw-r--r-- | platform.txt | 44 | ||||
-rw-r--r-- | programmers.txt | 17 |
3 files changed, 59 insertions, 6 deletions
@@ -1,6 +1,7 @@ ############################################################## uno.name=Arduino Uno +uno.upload.tool=avrdude uno.upload.protocol=arduino uno.upload.maximum_size=32256 uno.upload.speed=115200 @@ -175,7 +176,7 @@ mega.build.variant=mega ############################################################## mini328.name=Arduino Mini w/ ATmega328 -mini328.upload.protocol=stk500 +mini328.upload.protocol=stk500v1 mini328.upload.maximum_size=28672 mini328.upload.speed=115200 @@ -452,3 +453,4 @@ atmega8.build.mcu=atmega8 atmega8.build.f_cpu=16000000L atmega8.build.core=arduino atmega8.build.variant=standard + diff --git a/platform.txt b/platform.txt index fa3fdc3..59e2d16 100644 --- a/platform.txt +++ b/platform.txt @@ -26,22 +26,56 @@ compiler.upload.flags= # -------------------- ## Compile c files -recipe.c.o.pattern={compiler.path}{compiler.c.cmd} {compiler.c.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -D{software}={ide.version} {includes} {source_file} -o {object_file} +recipe.c.o.pattern={compiler.path}{compiler.c.cmd} {compiler.c.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -D{software}={runtime.ide.version} {includes} {source_file} -o {object_file} ## Compile c++ files -recipe.cpp.o.pattern={compiler.path}{compiler.cpp.cmd} {compiler.cpp.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -D{software}={ide.version} {includes} {source_file} -o {object_file} +recipe.cpp.o.pattern={compiler.path}{compiler.cpp.cmd} {compiler.cpp.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -D{software}={runtime.ide.version} {includes} {source_file} -o {object_file} ## Create archives recipe.ar.pattern={compiler.path}{compiler.ar.cmd} {compiler.ar.flags} {build.path}/{archive_file} {object_file} ## Combine gc-sections, archives, and objects -recipe.c.combine.pattern={compiler.path}{compiler.c.elf.cmd} {compiler.c.elf.flags} -mmcu={build.mcu} -o {build.path}/{project_name}.elf {object_files} {build.path}/{archive_file} -L{build.path} -lm +recipe.c.combine.pattern={compiler.path}{compiler.c.elf.cmd} {compiler.c.elf.flags} -mmcu={build.mcu} -o {build.path}/{build.project_name}.elf {object_files} {build.path}/{archive_file} -L{build.path} -lm ## Create eeprom -recipe.objcopy.eep.pattern={compiler.path}{compiler.objcopy.cmd} {compiler.objcopy.eep.flags} {build.path}/{project_name}.elf {build.path}/{project_name}.eep +recipe.objcopy.eep.pattern={compiler.path}{compiler.objcopy.cmd} {compiler.objcopy.eep.flags} {build.path}/{build.project_name}.elf {build.path}/{build.project_name}.eep ## Create hex -recipe.objcopy.hex.pattern={compiler.path}{compiler.elf2hex.cmd} {compiler.elf2hex.flags} {build.path}/{project_name}.elf {build.path}/{project_name}.hex +recipe.objcopy.hex.pattern={compiler.path}{compiler.elf2hex.cmd} {compiler.elf2hex.flags} {build.path}/{build.project_name}.elf {build.path}/{build.project_name}.hex +# AVR Uploader/Programmers tools +# ------------------- + +tools.avrdude.upload.cmd=avrdude +tools.avrdude.upload.path={runtime.ide.path}/hardware/tools +tools.avrdude.upload.config.path={upload.path}/avrdude.conf +tools.avrdude.upload.params.verbose=-v -v -v -v +tools.avrdude.upload.params.quiet=-q -q +tools.avrdude.upload.pattern={upload.path}/{upload.cmd} -C{upload.config.path} {upload.verbose} -p{build.mcu} -c{upload.protocol} -P{serial.port} -b{upload.speed} -D -Uflash:w:{build.path}/{build.project_name}.hex:i + +# /home/megabug/git/ARM-merged/build/linux/work/hardware/tools/avrdude +# -C/home/megabug/git/ARM-merged/build/linux/work/hardware/tools/avrdude.conf +# -q -q +# -patmega328p +# -carduino +# -P/dev/ttyACM0 +# -b115200 +# -D +# -Uflash:w:/tmp/build366783256629686367.tmp/Blink.cpp.hex:i + +tools.avrdude.program.cmd=avrdude +tools.avrdude.program.path={runtime.ide.path}/hardware/tools +tools.avrdude.program.config.path={program.path}/avrdude.conf +tools.avrdude.program.params.verbose=-v -v -v -v +tools.avrdude.program.params.quiet=-q -q +tools.avrdude.program.pattern={program.path}/{program.cmd} -C{program.config.path} {program.verbose} -p{build.mcu} -c{protocol} {program.extra_params} -Uflash:w:{build.path}/{build.project_name}.hex:i + +# /home/megabug/git/ARM-merged/build/linux/work/hardware/tools/avrdude +# -C/home/megabug/git/ARM-merged/build/linux/work/hardware/tools/avrdude.conf +# -q -q +# -patmega328p +# -cusbasp +# -Pusb +# -Uflash:w:/tmp/build8190214930979711138.tmp/Blink.cpp.hex:i diff --git a/programmers.txt b/programmers.txt index 02457d9..a055193 100644 --- a/programmers.txt +++ b/programmers.txt @@ -1,24 +1,41 @@ avrisp.name=AVR ISP avrisp.communication=serial avrisp.protocol=stk500v1 +avrisp.program.protocol=stk500v1 +avrisp.program.tool=avrdude +avrisp.program.extra_params=-P{serial.port} avrispmkii.name=AVRISP mkII avrispmkii.communication=usb avrispmkii.protocol=stk500v2 +avrispmkii.program.protocol=stk500v2 +avrispmkii.program.tool=avrdude +avrispmkii.program.extra_params=-Pusb usbtinyisp.name=USBtinyISP usbtinyisp.protocol=usbtiny +usbtinyisp.program.tool=avrdude +usbtinyisp.program.extra_params= usbasp.name=USBasp usbasp.communication=usb usbasp.protocol=usbasp +usbasp.program.protocol=usbasp +usbasp.program.tool=avrdude +usbasp.program.extra_params=-Pusb parallel.name=Parallel Programmer parallel.protocol=dapa parallel.force=true # parallel.delay=200 +parallel.program.tool=avrdude +parallel.program.extra_params= arduinoisp.name=Arduino as ISP arduinoisp.communication=serial arduinoisp.protocol=stk500v1 arduinoisp.speed=9600 +arduinoisp.program.protocol=stk500v1 +arduinoisp.program.speed=9600 +arduinoisp.program.tool=avrdude +arduinoisp.program.extra_params=-P{serial.port} -b{program.speed} |