mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-16 11:21:18 +03:00
Compilation process for ARM (WIP)
This commit is contained in:
@ -2,19 +2,11 @@
|
||||
<classpath>
|
||||
<classpathentry excluding="processing/app/tools/format/" kind="src" path="src"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/core"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/dxf"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/net"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/opengl">
|
||||
<attributes>
|
||||
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="opengl/library"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/pdf"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/serial"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/video"/>
|
||||
<classpathentry kind="lib" path="lib/antlr.jar"/>
|
||||
<classpathentry kind="lib" path="lib/jna.jar"/>
|
||||
<classpathentry kind="lib" path="lib/ecj.jar"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/processing-core"/>
|
||||
<classpathentry kind="lib" path="lib/apple.jar"/>
|
||||
<classpathentry kind="lib" path="lib/RXTXcomm.jar"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
@ -960,9 +960,9 @@ public class Base {
|
||||
|
||||
try {
|
||||
//Find the current target. Get the platform, and then select the correct name and core path.
|
||||
String platformname = this.getBoardPreferences().get("platform");
|
||||
String targetname = this.getPlatformPreferences(platformname).get("name");
|
||||
String libraryPath = this.getPlatformPreferences(platformname).get("library.core.path");
|
||||
String platformname = getBoardPreferences().get("platform");
|
||||
String targetname = getPlatformPreferences(platformname).get("name");
|
||||
String libraryPath = getPlatformPreferences(platformname).get("library.core.path");
|
||||
|
||||
JMenuItem platformItem = new JMenuItem(targetname);
|
||||
platformItem.setEnabled(false);
|
||||
@ -1554,7 +1554,7 @@ public class Base {
|
||||
|
||||
static public Target getTarget() {
|
||||
System.out.println("Base.targetsTable.get(Preferences.get(\"target\"))" + Base.targetsTable.get(Preferences.get("target")));
|
||||
System.out.println("Preferences.get(\"target\")" + Preferences.get("target"));
|
||||
System.out.println("Preferences.get(\"target\") = " + Preferences.get("target"));
|
||||
Target target = Base.targetsTable.get(Preferences.get("target"));
|
||||
if (target == null) {
|
||||
System.out.println("default target is not in list. Replace with default.");
|
||||
@ -1643,14 +1643,15 @@ static public Map<String, String> getPlatformPreferences() {
|
||||
return map;
|
||||
}
|
||||
|
||||
static public Map<String, String> getBoardPreferences() {
|
||||
static public Map<String, String> getBoardPreferences() {
|
||||
Target target = getTarget();
|
||||
Map map = new LinkedHashMap();
|
||||
if (target != null) {
|
||||
map = target.getBoards();
|
||||
map = (Map) map.get(Preferences.get("board"));
|
||||
}
|
||||
return map;
|
||||
if (target != null) {
|
||||
Map<String, Map<String, String>> map = target.getBoards();
|
||||
Map<String, String> res = map.get(Preferences.get("board"));
|
||||
if (res != null)
|
||||
return res;
|
||||
}
|
||||
return new HashMap<String, String>();
|
||||
}
|
||||
|
||||
static public File getSketchbookFolder() {
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -39,4 +39,16 @@ arduino_due.build.mcu=cortex-m3
|
||||
arduino_due.build.f_cpu=96000000L
|
||||
arduino_due.build.core=sam
|
||||
arduino_due.build.pins=arduino_due
|
||||
arduino_due.build.extra_flags=-D__SAM3U4E__
|
||||
arduino_due.build.extra_include_dirs=system/libsam|system/libsam/include|system/CMSIS/Include|system/libsam/cmsis/sam3u/source/templates|system/libsam/cmsis/sam3u/include
|
||||
arduino_due.core.extra_source_dirs=sam
|
||||
arduino_due.system.extra_source_dirs=libsam/source|libsam/cmsis/sam3u/source/templates|libsam/cmsis/sam3u/source/templates/gcc
|
||||
arduino_due.variants.extra_source_dirs=arduino_due|common
|
||||
#hardware/sam/system/libsam/source/
|
||||
#hardware/sam/system/libsam/cmsis/sam3u/source/
|
||||
#hardware/sam/variants/arduino_due
|
||||
#hardware/sam/variants/common
|
||||
#hardware/sam/cores/sam
|
||||
arduino_due.build.ldscript=linker_scripts/gcc/flash.ld
|
||||
|
||||
|
||||
|
@ -12,12 +12,12 @@
|
||||
########sam compile pattern ##########
|
||||
#sam.recipe.c.o.pattern={0=compiler.path}{1=compiler.c.cmd}{2=compiler.c.flags}{3=compiler.cpudef}{4=build.mcu}-DF_CPU={5=build.f_cpu}-D{7=ARDUINO}={6=Base.REVISION}{7=-I/INCLUDE_PATHS} {8=SOURCE_NAME} -o{9=OBJECT_NAME}
|
||||
#object name seems to have build path in it.
|
||||
sam.recipe.c.o.pattern={0}{1}|{2}|{3}{4}|-DF_CPU={5}|-D{6}={7}|{8}|{9}|-o|{10}
|
||||
sam.recipe.c.o.pattern={0}{1}|{2}|{3}{4}|-DF_CPU={5}|-D{6}={7}|{11}|{8}|{9}|-o|{10}
|
||||
|
||||
|
||||
##compile cc object files
|
||||
#sam.recipe.cc.o.pattern={0=compiler.path}{1=compiler.cc.cmd}{2=compiler.c.flags}{3=compiler.cpudef}{4=build.mcu}-DF_CPU={5=build.f_cpu}-DARDUINO={6=Base.REVISION}{-7=I/INCLUDE_PATHS} {8=SOURCE_NAME} -o{9=BUILD_PATH}{10=OBJECT_NAME}
|
||||
sam.recipe.cpp.o.pattern={0}{1}|{2}|{3}{4}|-DF_CPU={5}|-D{6}={7}|{8}|{9}|-o|{10}
|
||||
sam.recipe.cpp.o.pattern={0}{1}|{2}|{3}{4}|-DF_CPU={5}|-D{6}={7}|{11}|{8}|{9}|-o|{10}
|
||||
##create archives
|
||||
#sam.recipe.ar.pattern={0=compiler.path}{1=compiler.ar.cmd}{2=compiler.ar.flags}{3=BUILD_PATH}{4=CORE_NAME=core.a}{5=BUILD_PATH}{6=OBJECT_NAME}
|
||||
sam.recipe.ar.pattern={0}{1}|{2}|{3}{4}|{5}
|
||||
@ -25,7 +25,7 @@ sam.recipe.ar.pattern={0}{1}|{2}|{3}{4}|{5}
|
||||
##combine gc-sections| archives, and objects
|
||||
#sam.recipe.c.combine.pattern={0=compiler.path}{1=compiler.c.cmd}{2=compiler.combine.flags}{3=compiler.cpudef}{4=build.mcu} -o {5=BUILD_PATH}{6=SOURCE_NAME}.elf {7=BUILD_PATH}{8=SOURCE_NAME}.o {9=BUILD_PATH}{10=CORE_NAME=core.a} -L{11=BUILD_PATH} -lm
|
||||
#sam.recipe.c.combine.pattern={0}{1}|{2}|{3}{4}|-o|{5}{6}.elf|{7}{8}|{9}|-L{10}|-lm
|
||||
sam.recipe.c.combine.pattern={0}{1}|{2}|{3}{4}|-o|{5}{6}.elf|{7}|{8}|-L{9}|-lm
|
||||
sam.recipe.c.combine.pattern={0}{1}|{2}|{3}{4}|-T{11}|-Wl,-Map,{5}{6}.map|-o|{5}{6}.elf|-L{9}|-lm|-lgcc|-mthumb|-Wl,--cref|-Wl,--check-sections|-Wl,--gc-sections|-Wl,--entry=Reset_Handler|-Wl,--unresolved-symbols=report-all|-Wl,--warn-common|-Wl,--warn-section-align|-Wl,--warn-unresolved-symbols|-Wl,--start-group|{7}|{8}|-Wl,--end-group
|
||||
|
||||
##create eeprom
|
||||
#sam.recipe.objcopy.eep.pattern={0=compiler.path}{1=compiler.objcopy.cmd}{2=compiler.objcopy.eep.flags} {3=BUILD_PATH}{4=SOURCE_NAME}.elf {5=BUILD_PATH}{6=SOURCE_NAME}.eep
|
||||
@ -42,17 +42,17 @@ sam.name=Atmel SAM
|
||||
#sam.compiler.path Official default is correct, only need to change this if you want to overide the initial default
|
||||
sam.compiler.path={0}/hardware/tools/CodeSourcery_arm/bin/
|
||||
sam.compiler.c.cmd=arm-none-eabi-gcc
|
||||
sam.compiler.c.flags=|-c|-g|-Os|-w|-mthumb|-mlong-calls|-ffunction-sections
|
||||
sam.compiler.c.flags=|-c|-g|-Os|-w|-mthumb|-mlong-calls|-ffunction-sections|-nostdlib|--param|max-inline-insns-single=500|-Dprintf=iprintf
|
||||
sam.compiler.c.elf.flags=|-Os|-Wl,--gc-sections
|
||||
sam.compiler.c.elf.cmd=arm-none-eabi-gcc
|
||||
sam.compiler.S.flags=|-c|-g|-assembler-with-cpp
|
||||
sam.compiler.cpp.cmd=arm-none-eabi-g++
|
||||
sam.compiler.cpp.flags=|-c|-g|-Os|-w|-mthumb|-mlong-calls|-ffunction-sections
|
||||
sam.compiler.cpp.flags=|-c|-g|-Os|-w|-mthumb|-mlong-calls|-ffunction-sections|-nostdlib|--param|max-inline-insns-single=500|-fno-rtti|-fno-exceptions|-Dprintf=iprintf
|
||||
sam.compiler.ar.cmd=arm-none-eabi-ar
|
||||
sam.compiler.ar.flags=rcs
|
||||
sam.compiler.objcopy.cmd=arm-none-eabi-objcopy
|
||||
sam.compiler.objcopy.eep.flags=|-O|ihex|-j|.eeprom|--set-section-flags=.eeprom=alloc,load|--no-change-warnings|--change-section-lma|.eeprom=0
|
||||
sam.compiler.elf2hex.flags=|-O|ihex|-R|.eeprom
|
||||
sam.compiler.elf2hex.flags=|-O|binary
|
||||
sam.compiler.elf2hex.cmd=arm-none-eabi-objcopy
|
||||
sam.compiler.ldflags=
|
||||
sam.compiler.cpudef=-mcpu=
|
||||
|
Reference in New Issue
Block a user