Skip to content

Commit 7becead

Browse files
committed
BOARDS and ARCH defines from boards.txt
See arduino#308
1 parent b76dd01 commit 7becead

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

boards.txt

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ arduino_due_x_dbg.upload.wait_for_upload_port=false
88
arduino_due_x_dbg.upload.native_usb=false
99
arduino_due_x_dbg.build.mcu=cortex-m3
1010
arduino_due_x_dbg.build.f_cpu=84000000L
11+
arduino_due_x_dbg.build.board=ARDUINO_DUE
1112
arduino_due_x_dbg.build.core=arduino
1213
arduino_due_x_dbg.build.extra_flags=-D__SAM3X8E__ -mthumb -DUSB_PID={build.pid} -DUSB_VID={build.vid} -DUSBCON
1314
arduino_due_x_dbg.build.ldscript=linker_scripts/gcc/flash.ld
@@ -25,6 +26,7 @@ arduino_due_x.upload.wait_for_upload_port=true
2526
arduino_due_x.upload.native_usb=true
2627
arduino_due_x.build.mcu=cortex-m3
2728
arduino_due_x.build.f_cpu=84000000L
29+
arduino_due_x.build.board=ARDUINO_DUE
2830
arduino_due_x.build.core=arduino
2931
arduino_due_x.build.extra_flags=-D__SAM3X8E__ -mthumb -DUSB_PID={build.pid} -DUSB_VID={build.vid} -DUSBCON
3032
arduino_due_x.build.ldscript=linker_scripts/gcc/flash.ld

platform.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ compiler.libsam.c.flags="-I{build.system.path}/libsam" "-I{build.system.path}/CM
3030
# ---------------------
3131

3232
## Compile c files
33-
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -mcpu={build.mcu} -DF_CPU={build.f_cpu} -D{software}={runtime.ide.version} {build.extra_flags} {compiler.libsam.c.flags} {includes} "{source_file}" -o "{object_file}"
33+
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -mcpu={build.mcu} -DF_CPU={build.f_cpu} -D{software}={runtime.ide.version} -D{build.board} -DARDUINO_ARCH_{build.arch} {build.extra_flags} {compiler.libsam.c.flags} {includes} "{source_file}" -o "{object_file}"
3434

3535
## Compile c++ files
36-
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -mcpu={build.mcu} -DF_CPU={build.f_cpu} -D{software}={runtime.ide.version} {build.extra_flags} {compiler.libsam.c.flags} {includes} "{source_file}" -o "{object_file}"
36+
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -mcpu={build.mcu} -DF_CPU={build.f_cpu} -D{software}={runtime.ide.version} -D{build.board} -DARDUINO_ARCH_{build.arch} {build.extra_flags} {compiler.libsam.c.flags} {includes} "{source_file}" -o "{object_file}"
3737

3838
## Create archives
3939
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} "{build.path}/{archive_file}" "{object_file}"

0 commit comments

Comments
 (0)