1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-01 12:24:14 +01:00

Adapting Rick's platform work to other platform changes.

This commit is contained in:
David A. Mellis 2011-06-25 12:51:56 -04:00
parent f7f9f78b5a
commit 05d622f3ac
6 changed files with 24 additions and 12 deletions

View File

@ -1558,7 +1558,7 @@ public class Base {
Target target = Base.targetsTable.get(Preferences.get("target"));
if (target == null) {
System.out.println("default target is not in list. Replace with default.");
Preferences.set("target", "arduino");
Preferences.set("target", "avr");
target = Base.targetsTable.get(Preferences.get("target"));
}
return target;

View File

@ -135,17 +135,19 @@ public class Compiler implements MessageConsumer {
re.hideStackTrace();
throw re;
}
String corePath;
String corePath, systemPath;
if (core.indexOf(':') == -1) {
Target t = Base.getTarget();
File coreFolder = new File(new File(t.getFolder(), "cores"), core);
corePath = coreFolder.getAbsolutePath();
systemPath = new File(t.getFolder(), "system").getAbsolutePath();
} else {
Target t = Base.targetsTable.get(core.substring(0, core.indexOf(':')));
File coreFolder = new File(t.getFolder(), "cores");
coreFolder = new File(coreFolder, core.substring(core.indexOf(':') + 1));
corePath = coreFolder.getAbsolutePath();
systemPath = new File(t.getFolder(), "system").getAbsolutePath();
}
String pins = configPreferences.get("build.pins");
@ -154,11 +156,11 @@ public class Compiler implements MessageConsumer {
if (pins != null) {
if (pins.indexOf(':') == -1) {
Target t = Base.getTarget();
File pinsFolder = new File(new File(t.getFolder(), "pins"), pins);
File pinsFolder = new File(new File(t.getFolder(), "variants"), pins);
pinsPath = pinsFolder.getAbsolutePath();
} else {
Target t = Base.targetsTable.get(pins.substring(0, pins.indexOf(':')));
File pinsFolder = new File(t.getFolder(), "pins");
File pinsFolder = new File(t.getFolder(), "variants");
pinsFolder = new File(pinsFolder, pins.substring(pins.indexOf(':') + 1));
pinsPath = pinsFolder.getAbsolutePath();
}
@ -169,6 +171,7 @@ public class Compiler implements MessageConsumer {
ArrayList<String> includePaths = new ArrayList();
includePaths.add(corePath);
includePaths.add(systemPath);
if (pinsPath != null) includePaths.add(pinsPath);
for (File file : sketch.getImportedLibraries()) {
includePaths.add(file.getPath());

View File

@ -208,6 +208,14 @@
<fileset file="macosx/dist/eeprom.h" />
</copy>
<exec executable="unzip">
<arg value="-q" />
<arg value="-n" />
<arg value="-d" />
<arg value="macosx/work/Arduino.app/Contents/Resources/Java/hardware/tools" />
<arg value="macosx/dist/CodeSourcery_arm.zip" />
</exec>
<antcall target="assemble">
<param name="target.path" value="macosx/work/Arduino.app/Contents/Resources/Java" />
</antcall>
@ -430,6 +438,7 @@
<!-- Unzip AVR tools -->
<unzip dest="windows/work/hardware" src="windows/avr_tools.zip" overwrite="false"/>
<unzip dest="windows/work/hardware/tools" src="windows/CodeSourcery_arm.zip" overwrite="false"/>
<copy todir="windows/work/hardware/tools/avr/avr/include/avr">
<fileset file="windows/eeprom.h" />

View File

@ -238,7 +238,7 @@ run.present.exclusive.macosx = true
# ARDUINO PREFERENCES
board = uno
target = arduino
target = avr
platform = avr
software=ARDUINO

View File

@ -38,12 +38,12 @@ avr.recipe.objcopy.hex.pattern={0}{1}|{2}|{3}.elf|{4}.hex
########################################################
avr.name=Arduino
avr.name=avr
#avr.compiler.path Official default is correct, only need to change this if you want to overide the initial default
#avr.compiler.path={0}/hardware/tools/avr/bin/
avr.compiler.c.cmd=avr-gcc
avr.compiler.c.flags=|-c|-g|-Os|-w|-ffunction-sections|-fdata-sections
avr.compiler.c.elf.flags=|-Os|-Wl|--gc-sections
avr.compiler.c.elf.flags=|-Os|-Wl,--gc-sections
avr.compiler.c.elf.cmd=avr-gcc
avr.compiler.S.flags=|-c|-g|-assembler-with-cpp
avr.compiler.cpp.cmd=avr-g++
@ -59,6 +59,6 @@ avr.compiler.cpudef=-mmcu=
avr.compiler.upload.cmd=
avr.compiler.upload.flags=
avr.compiler.define=-DARDUINO=
avr.library.path=./hardware/arduino/cores/arduino
avr.library.path=./hardware/avr/cores/arduino
avr.library.core.path=./libraries

View File

@ -1,13 +1,13 @@
##############################################################
sam3s_ek.name=Atmel SAM3S-EK
sam3s_ek.platform=sam
sam3s_ek.upload.protocol=sam-ba
sam3s_ek.upload.maximum_size=49152
sam3s_ek.upload.speed=115200
sam3s_ek.bootloader.path=sam3s_boot
sam3s_ek.bootloader.file=sam3s_boot.bin
sam3s_ek.build.mcu=sam3s4c
sam3s_ek.build.mcu=cortex-m3
sam3s_ek.build.f_cpu=64000000L
sam3s_ek.build.core=at91
sam3s_ek.build.core=sam
sam3s_ek.build.pins=sam3s-ek