# Copyright (c) 2021 Earle F.
Philhower, III
#
# Raspberry Pi RP2040 Core platform file
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# For more info:
# [Link]
specification
name=Raspberry Pi RP2040 Boards(1.2.1)
version=1.2.1
[Link]={[Link]}/bin/
# 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]}
[Link]="-I{[Link]}/pico_base/" "-
I{[Link]}/pico-sdk/src/rp2_common/pico_unique_id/include" "-
I{[Link]}/pico-sdk/src/rp2_common/pico_platform/include/" "-
I{[Link]}/pico-sdk/src/common/pico_base/include/" "-
I{[Link]}/pico-sdk/src/rp2040/hardware_regs/include/" "-
I{[Link]}/pico-sdk/src/rp2_common/hardware_timer/include/" "-
I{[Link]}/pico-sdk/src/common/pico_stdlib/include" "-
I{[Link]}/pico-sdk/src/rp2_common/hardware_gpio/include" "-
I{[Link]}/pico-sdk/src/rp2_common/hardware_i2c/include" "-
I{[Link]}/pico-sdk/src/rp2_common/hardware_flash/include" "-
I{[Link]}/pico-sdk/src/common/pico_base/include" "-
I{[Link]}/pico-examples/build/generated/pico_base" "-
I{[Link]}/pico-sdk/src/boards/include"
"-I{[Link]}/pico-sdk/src/rp2_common/pico_platform/include" "-
I{[Link]}/pico-sdk/src/rp2040/hardware_regs/include" "-
I{[Link]}/pico-sdk/src/rp2_common/hardware_base/include" "-
I{[Link]}/pico-sdk/src/rp2040/hardware_structs/include" "-
I{[Link]}/pico-sdk/src/rp2_common/hardware_claim/include" "-
I{[Link]}/pico-sdk/src/rp2_common/hardware_sync/include" "-
I{[Link]}/pico-sdk/src/rp2_common/hardware_uart/include" "-
I{[Link]}/pico-sdk/src/rp2_common/hardware_divider/include" "-
I{[Link]}/pico-sdk/src/common/pico_time/include" "-
I{[Link]}/pico-sdk/src/rp2_common/hardware_timer/include" "-
I{[Link]}/pico-sdk/src/common/pico_sync/include" "-
I{[Link]}/pico-sdk/src/common/pico_util/include" "-
I{[Link]}/pico-sdk/src/rp2_common/pico_runtime/include" "-
I{[Link]}/pico-sdk/src/rp2_common/hardware_clocks/include" "-
I{[Link]}/pico-sdk/src/rp2_common/hardware_resets/include" "-
I{[Link]}/pico-sdk/src/rp2_common/hardware_watchdog/include" "-
I{[Link]}/pico-sdk/src/rp2_common/hardware_xosc/include" "-
I{[Link]}/pico-sdk/src/rp2_common/hardware_pll/include" "-
I{[Link]}/pico-sdk/src/rp2_common/hardware_vreg/include" "-
I{[Link]}/pico-sdk/src/rp2_common/hardware_irq/include" "-
I{[Link]}/pico-sdk/src/rp2_common/pico_printf/include" "-
I{[Link]}/pico-sdk/src/rp2_common/pico_bootrom/include" "-
I{[Link]}/pico-sdk/src/common/pico_bit_ops/include" "-
I{[Link]}/pico-sdk/src/common/pico_divider/include" "-
I{[Link]}/pico-sdk/src/rp2_common/pico_double/include" "-
I{[Link]}/pico-sdk/src/rp2_common/pico_int64_ops/include" "-
I{[Link]}/pico-sdk/src/rp2_common/pico_float/include" "-
I{[Link]}/pico-sdk/src/common/pico_binary_info/include" "-
I{[Link]}/pico-sdk/src/rp2_common/hardware_pio/include" "-
I{[Link]}/pico-sdk/src/rp2_common/pico_stdio/include" "-
I{[Link]}/pico-sdk/src/rp2_common/hardware_dma/include" "-
I{[Link]}/pico-sdk/src/rp2_common/pico_stdio_uart/include" "-
I{[Link]}/pico-sdk/src/rp2040/hardware_regs/include/" "-
I{[Link]}/pico-sdk/lib/tinyusb/src/"
"-I{[Link]}/pico-sdk/src/rp2_common/pico_stdio_usb/include" "-
I{[Link]}/pico-sdk/src/rp2_common/hardware_spi/include" "-
I{[Link]}/pico-sdk/src/rp2_common/hardware_pwm/include" "-
I{[Link]}/pico-sdk/src/rp2_common/hardware_adc/include" "-
I{[Link]}/pico-sdk/src/rp2_common/pico_multicore/include" "-
I{[Link]}/cores/rp2040/api/deprecated-avr-comp/" "-
I{[Link]}/pico-sdk/src/rp2_common/pico_multicore/include" "-
I{[Link]}/pico-extras/src/rp2_common/pico_audio_i2s/include" "-
I{[Link]}/pico-extras/src/common/pico_audio/include" "-
I{[Link]}/pico-extras/src/common/pico_util_buffer/include"
[Link]=-Os -march=armv6-m -mcpu=cortex-m0plus -mthumb -ffunction-sections -
fdata-sections
[Link]=-Wl,--wrap=acos -Wl,--wrap=acosf -Wl,--wrap=acosh -Wl,--wrap=acoshf -
Wl,--wrap=__aeabi_cdcmpeq -Wl,--wrap=__aeabi_cdcmple -Wl,--wrap=__aeabi_cdrcmple -
Wl,--wrap=__aeabi_cfcmpeq -Wl,--wrap=__aeabi_cfcmple -Wl,--wrap=__aeabi_cfrcmple -
Wl,--wrap=__aeabi_d2f -Wl,--wrap=__aeabi_d2iz -Wl,--wrap=__aeabi_d2lz -Wl,--
wrap=__aeabi_d2uiz -Wl,--wrap=__aeabi_d2ulz -Wl,--wrap=__aeabi_dadd -Wl,--
wrap=__aeabi_dcmpeq -Wl,--wrap=__aeabi_dcmpge -Wl,--wrap=__aeabi_dcmpgt -Wl,--
wrap=__aeabi_dcmple -Wl,--wrap=__aeabi_dcmplt -Wl,--wrap=__aeabi_dcmpun -Wl,--
wrap=__aeabi_ddiv -Wl,--wrap=__aeabi_dmul -Wl,--wrap=__aeabi_drsub -Wl,--
wrap=__aeabi_dsub -Wl,--wrap=__aeabi_f2d -Wl,--wrap=__aeabi_f2iz -Wl,--
wrap=__aeabi_f2lz -Wl,--wrap=__aeabi_f2uiz -Wl,--wrap=__aeabi_f2ulz -Wl,--
wrap=__aeabi_fadd -Wl,--wrap=__aeabi_fcmpeq -Wl,--wrap=__aeabi_fcmpge -Wl,--
wrap=__aeabi_fcmpgt -Wl,--wrap=__aeabi_fcmple -Wl,--wrap=__aeabi_fcmplt -Wl,--
wrap=__aeabi_fcmpun -Wl,--wrap=__aeabi_fdiv -Wl,--wrap=__aeabi_fmul -Wl,--
wrap=__aeabi_frsub -Wl,--wrap=__aeabi_fsub -Wl,--wrap=__aeabi_i2d -Wl,--
wrap=__aeabi_i2f -Wl,--wrap=__aeabi_idiv -Wl,--wrap=__aeabi_idivmod -Wl,--
wrap=__aeabi_l2d -Wl,--wrap=__aeabi_l2f -Wl,--wrap=__aeabi_ldivmod -Wl,--
wrap=__aeabi_lmul -Wl,--wrap=__aeabi_memcpy -Wl,--wrap=__aeabi_memcpy4 -Wl,--
wrap=__aeabi_memcpy8 -Wl,--wrap=__aeabi_memset -Wl,--wrap=__aeabi_memset4 -Wl,--
wrap=__aeabi_memset8 -Wl,--wrap=__aeabi_ui2d -Wl,--wrap=__aeabi_ui2f -Wl,--
wrap=__aeabi_uidiv -Wl,--wrap=__aeabi_uidivmod -Wl,--wrap=__aeabi_ul2d -Wl,--
wrap=__aeabi_ul2f -Wl,--wrap=__aeabi_uldivmod -Wl,--wrap=asin -Wl,--wrap=asinf -
Wl,--wrap=asinh -Wl,--wrap=asinhf -Wl,--wrap=atan -Wl,--wrap=atan2 -Wl,--
wrap=atan2f -Wl,--wrap=atanf -Wl,--wrap=atanh -Wl,--wrap=atanhf -Wl,--wrap=calloc -
Wl,--wrap=cbrt -Wl,--wrap=cbrtf -Wl,--wrap=ceil -Wl,--wrap=ceilf -Wl,--wrap=__clz -
Wl,--wrap=__clzdi2 -Wl,--wrap=__clzl -Wl,--wrap=__clzll -Wl,--wrap=__clzsi2 -Wl,--
wrap=copysign -Wl,--wrap=copysignf -Wl,--wrap=cos -Wl,--wrap=cosf -Wl,--wrap=cosh -
Wl,--wrap=coshf -Wl,--wrap=__ctzdi2 -Wl,--wrap=__ctzsi2 -Wl,--wrap=drem -Wl,--
wrap=dremf -Wl,--wrap=exp -Wl,--wrap=exp10 -Wl,--wrap=exp10f -Wl,--wrap=exp2 -Wl,--
wrap=exp2f -Wl,--wrap=expf -Wl,--wrap=expm1 -Wl,--wrap=expm1f -Wl,--wrap=floor -
Wl,--wrap=floorf -Wl,--wrap=fma -Wl,--wrap=fmaf -Wl,--wrap=fmod -Wl,--wrap=fmodf -
Wl,--wrap=free -Wl,--wrap=hypot -Wl,--wrap=hypotf -Wl,--wrap=ldexp -Wl,--
wrap=ldexpf -Wl,--wrap=log -Wl,--wrap=log10 -Wl,--wrap=log10f -Wl,--wrap=log1p -
Wl,--wrap=log1pf -Wl,--wrap=log2 -Wl,--wrap=log2f -Wl,--wrap=logf -Wl,--wrap=malloc
-Wl,--wrap=memcpy -Wl,--wrap=memset -Wl,--wrap=__popcountdi2 -Wl,--
wrap=__popcountsi2 -Wl,--wrap=pow -Wl,--wrap=powf -Wl,--wrap=powint -Wl,--
wrap=powintf -Wl,--wrap=remainder -Wl,--wrap=remainderf -Wl,--wrap=remquo -Wl,--
wrap=remquof -Wl,--wrap=round -Wl,--wrap=roundf -Wl,--wrap=sin -Wl,--wrap=sincos -
Wl,--wrap=sincosf -Wl,--wrap=sinf -Wl,--wrap=sinh -Wl,--wrap=sinhf -Wl,--wrap=sqrt
-Wl,--wrap=sqrtf -Wl,--wrap=tan -Wl,--wrap=tanf -Wl,--wrap=tanh -Wl,--wrap=tanhf -
Wl,--wrap=trunc -Wl,--wrap=truncf
[Link]=arm-none-eabi-gcc
[Link]=-c {[Link]} {[Link]} {[Link]} -
std=gnu17 -g
[Link]=arm-none-eabi-g++
[Link]={[Link]} {[Link]} -Wl,--gc-sections -u
_printf_float -u _scanf_float
[Link]=arm-none-eabi-gcc
[Link]=-c -g -x assembler-with-cpp -MMD {[Link]} -g
[Link]=arm-none-eabi-g++
[Link]=-c {[Link]} {[Link]} {[Link]} -
std=gnu++17 -g
[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]=-O ihex -R .eeprom
[Link]=arm-none-eabi-objcopy
[Link]={[Link]} -Wl,--cref -Wl,--check-sections -Wl,--gc-sections
-Wl,--unresolved-symbols=report-all -Wl,--warn-common
[Link]=arm-none-eabi-size
[Link]=-DARDUINO=
[Link]=arm-none-eabi-readelf
# this can be overriden 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=
# Board configuration, set in [Link]. Present here to ensure substitution
works
build.flash_length=
build.eeprom_start=
build.fs_start=
build.fs_end=
build.boot2=boot2_generic_03h_4_padded_checksum
# Allow Pico boards do be auto-discovered by the IDE
[Link]="{[Link]}/python3"
"{[Link]}/tools/[Link]"
# Compile patterns
# ----------------
## Compile c files
## KH Add -DBOARD_NAME="{[Link]}"
[Link]="{[Link]}{[Link]}" {[Link]}
{[Link]} -DF_CPU={build.f_cpu} -DARDUINO={[Link]} -
DARDUINO_{[Link]} -DBOARD_NAME="{[Link]}" -DARDUINO_ARCH_{[Link]}
{compiler.c.extra_flags} {build.extra_flags} {build.debug_port} {build.debug_level}
{includes} "{source_file}" -o "{object_file}"
## Compile c++ files
## KH Add -DBOARD_NAME="{[Link]}"
[Link]="{[Link]}{[Link]}" {[Link]}
{[Link]} -DF_CPU={build.f_cpu} -DARDUINO={[Link]} -
DARDUINO_{[Link]} -DBOARD_NAME="{[Link]}" -DARDUINO_ARCH_{[Link]}
{[Link].extra_flags} {build.extra_flags} {build.debug_port}
{build.debug_level} {includes} "{source_file}" -o "{object_file}"
## Compile S files
## KH Add -DBOARD_NAME="{[Link]}"
[Link]="{[Link]}{[Link]}" {[Link]}
{[Link]} -DF_CPU={build.f_cpu} -DARDUINO={[Link]} -
DARDUINO_{[Link]} -DBOARD_NAME="{[Link]}" -DARDUINO_ARCH_{[Link]}
{compiler.S.extra_flags} {build.extra_flags} {build.debug_port} {build.debug_level}
{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]}/python3"
"{[Link]}/tools/[Link]" --input
"{[Link]}/lib/memmap_default.ld" --out
"{[Link]}/memmap_default.ld" --sub __FLASH_LENGTH__ {build.flash_length} --sub
__EEPROM_START__ {build.eeprom_start} --sub __FS_START__ {build.fs_start} --sub
__FS_END__ {build.fs_end}
[Link]="{[Link]}{[Link]}" "-L{[Link]}"
{[Link]} {[Link].extra_flags}
"-Wl,--script={[Link]}/memmap_default.ld"
"-Wl,-Map,{[Link]}/{build.project_name}.map" --specs=[Link] -Wl,--start-
group {[Link]} -o "{[Link]}/{build.project_name}.elf" {object_files}
"{[Link]}/{archive_file}" "{[Link]}/lib/libpico.a" -lm "-
I{[Link]}/pico-sdk/src/rp2040/hardware_regs/include/" "-
I{[Link]}/pico-sdk/src/common/pico_binary_info/include"
"{[Link]}/assembly/{build.boot2}.S" -lc -lstdc++ -Wl,--end-group
## Create output (UF2 file)
[Link]="{[Link]}/elf2uf2"
"{[Link]}/{build.project_name}.elf" "{[Link]}/{build.project_name}.uf2"
build.preferred_out_format=uf2
## Save hex
[Link].tmp_file={build.project_name}.{build.preferred_out_format}
[Link].save_file={build.project_name}.{[Link]}.
{build.preferred_out_format}
## Compute size
[Link]="{[Link]}{[Link]}" -A
"{[Link]}/{build.project_name}.elf"
[Link]=^(?:\.boot2|\.text|\.rodata|\.ARM\.extab|\.ARM\.exidx)\s+([0-
9]+).*
[Link]=^(?:\.data|\.bss|\.ram_vector_table|\.uninitialized_data)\s+
([0-9]+).*
[Link]=
# Because the variable expansion doesn't allow one tool to find another, the
following lines
# will point to "{[Link]}/tools/python3/python3" in GIT and
# "{[Link]}/python3" for JSON board manager releases.
[Link]={[Link]}/python3
[Link]=uf2
[Link]=
[Link]=
[Link]="{cmd}" "{[Link]}/tools/[Link]" --
serial "{[Link]}" --family RP2040 --deploy
"{[Link]}/{build.project_name}.uf2"
[Link]={[Link]}
[Link]=picoprobe
[Link]=
[Link]=
[Link]="{cmd}/bin/openocd" -f "interface/[Link]" -f
"target/[Link]" -s "{cmd}/share/openocd/scripts" -c "program
{[Link]}/{build.project_name}.elf verify reset exit"