0% found this document useful (0 votes)
16 views3 pages

Platform

The document outlines the configuration and compilation settings for Arduino ARM (32-bits) boards, specifically version 1.6.12. It includes details on compiler paths, flags, and commands for compiling C, C++, and assembly files, as well as the process for uploading code using the BOSSA tool. Additionally, it provides patterns for creating archives and output files, along with USB configuration settings.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views3 pages

Platform

The document outlines the configuration and compilation settings for Arduino ARM (32-bits) boards, specifically version 1.6.12. It includes details on compiler paths, flags, and commands for compiling C, C++, and assembly files, as well as the process for uploading code using the BOSSA tool. Additionally, it provides patterns for creating archives and output files, along with USB configuration settings.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

# Arduino SAM Core and platform.

# ------------------------------
#
# For more info:
# [Link]
specification

name=Arduino ARM (32-bits) Boards


version=1.6.12

# SAM3 compile variables


# ----------------------

compiler.warning_flags=-w
compiler.warning_flags.none=-w
compiler.warning_flags.default=
compiler.warning_flags.more=-Wall
compiler.warning_flags.all=-Wall -Wextra

[Link]={[Link]}/bin/
[Link]=arm-none-eabi-gcc
[Link]=-c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections
-fdata-sections -nostdlib --param max-inline-insns-single=500 -Dprintf=iprintf -MMD
# KH, Error here to use gcc, mjust use g++
#[Link]=arm-none-eabi-gcc
[Link]=arm-none-eabi-g++
[Link]=-Os -Wl,--gc-sections
[Link]=arm-none-eabi-gcc
[Link]=-c -g -x assembler-with-cpp -MMD
[Link]=arm-none-eabi-g++
[Link]=-c -g -Os {compiler.warning_flags} -std=gnu++11 -ffunction-
sections -fdata-sections -nostdlib -fno-threadsafe-statics --param max-inline-
insns-single=500 -fno-rtti -fno-exceptions -MMD
[Link]=arm-none-eabi-ar
[Link]=rcs
[Link]=arm-none-eabi-objcopy
[Link]=-O ihex -j .eeprom --set-section-
flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0
[Link]=-O binary
[Link]=arm-none-eabi-objcopy
[Link]=
[Link]=arm-none-eabi-size
[Link]=-DARDUINO=
[Link]=-u _sbrk -u link -u _close -u _fstat -u _isatty -u _lseek -u
_read -u _write -u _exit -u kill -u _getpid

# This can be overridden in [Link]


build.extra_flags=

# These can be overridden in [Link]


compiler.c.extra_flags=
[Link].extra_flags=
[Link].extra_flags=
compiler.S.extra_flags=
[Link].extra_flags=
compiler.elf2hex.extra_flags=
[Link]="-I{[Link]}/libsam"
"-I{[Link]}/CMSIS/CMSIS/Include/"
"-I{[Link]}/CMSIS/Device/ATMEL/"

# USB Flags
# ---------
build.usb_flags=-DUSB_VID={[Link]} -DUSB_PID={[Link]} -DUSBCON '-
DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}'

# Default usb manufacturer will be replaced at compile time using


# numeric vendor ID if available or by board's specific value.
build.usb_manufacturer="Unknown"

# SAM3 compile patterns


# ---------------------

## Compile c files
[Link]="{[Link]}{[Link]}" {[Link]} -
mcpu={[Link]} -mthumb -DF_CPU={build.f_cpu} -DARDUINO={[Link]} -
DARDUINO_{[Link]} -DARDUINO_ARCH_{[Link]} {compiler.c.extra_flags}
{build.extra_flags} {[Link]} {includes} "{source_file}" -o
"{object_file}"

## Compile c++ files


[Link]="{[Link]}{[Link]}" {[Link]} -
mcpu={[Link]} -mthumb -DF_CPU={build.f_cpu} -DARDUINO={[Link]} -
DARDUINO_{[Link]} -DARDUINO_ARCH_{[Link]} {[Link].extra_flags}
{build.extra_flags} {[Link]} {includes} "{source_file}" -o
"{object_file}"

## Compile S files
[Link]="{[Link]}{[Link]}" {[Link]} -
mcpu={[Link]} -mthumb -DF_CPU={build.f_cpu} -DARDUINO={[Link]} -
DARDUINO_{[Link]} -DARDUINO_ARCH_{[Link]} {compiler.S.extra_flags}
{build.extra_flags} {[Link]} {includes} "{source_file}" -o
"{object_file}"

## Create archives
# archive_file_path is needed for backwards compatibility with IDE 1.6.5 or older,
IDE 1.6.6 or newer overrides this value
archive_file_path={[Link]}/{archive_file}
[Link]="{[Link]}{[Link]}" {[Link]}
{[Link].extra_flags} "{archive_file_path}" "{object_file}"

## Combine gc-sections, archives, and objects


[Link]="{[Link]}{[Link]}" -mcpu={[Link]} -
mthumb {[Link]} "-T{[Link]}/{[Link]}" "-Wl,-Map,
{[Link]}/{build.project_name}.map" {[Link].extra_flags} -o
"{[Link]}/{build.project_name}.elf" "-L{[Link]}" -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,--start-group
{[Link]} {object_files}
"{[Link]}/{build.variant_system_lib}" "{[Link]}/{archive_file}" -
Wl,--end-group -lm -lgcc

## Create output (.bin file)


[Link]="{[Link]}{[Link]}"
{[Link]} {compiler.elf2hex.extra_flags}
"{[Link]}/{build.project_name}.elf" "{[Link]}/{build.project_name}.bin"

## Save hex
[Link].tmp_file={build.project_name}.bin
[Link].save_file={build.project_name}.{[Link]}.bin

## Compute size
[Link]="{[Link]}{[Link]}" -A
"{[Link]}/{build.project_name}.elf"
[Link]=\.text\s+([0-9]+).*

# SAM3 Uploader tools


# -------------------

# BOSSA
[Link]={[Link]}
[Link]=bossac
[Link]=[Link]

[Link]=-i -d
[Link]=
[Link]=-v
[Link]="{path}/{cmd}" {[Link]} --
port={[Link]} -U {upload.native_usb} -e -w {[Link]} -b
"{[Link]}/{build.project_name}.bin" -R

tools.bossac_remote.[Link]=/usr/bin/run-bossac {[Link]} --
port=ttyATH0 -U {upload.native_usb} -e -w -v -b /tmp/[Link] -R

You might also like