From 30e817c692d7594c48da1a1d66a0b8f873da9db8 Mon Sep 17 00:00:00 2001 From: Rikard Anglerud Date: Fri, 1 Nov 2024 13:10:45 +0000 Subject: [PATCH] fix: add the missing .cargo/config.toml for the example --- examples/rp-pico/.cargo/config.toml | 38 +++++++++++++++++++++++++++++ examples/rp-pico/.gitignore | 1 + 2 files changed, 39 insertions(+) create mode 100644 examples/rp-pico/.cargo/config.toml create mode 100644 examples/rp-pico/.gitignore diff --git a/examples/rp-pico/.cargo/config.toml b/examples/rp-pico/.cargo/config.toml new file mode 100644 index 0000000..3cc4dcc --- /dev/null +++ b/examples/rp-pico/.cargo/config.toml @@ -0,0 +1,38 @@ +# +# Cargo Configuration for the https://github.com/rp-rs/rp-hal.git repository. +# +# Copyright (c) The RP-RS Developers, 2021 +# +# You might want to make a similar file in your own repository if you are +# writing programs for Raspberry Silicon microcontrollers. +# +# This file is MIT or Apache-2.0 as per the repository README.md file +# + +[build] +# Set the default target to match the Cortex-M0+ in the RP2040 +target = "thumbv6m-none-eabi" + +# Target specific options +[target.thumbv6m-none-eabi] +# Pass some extra options to rustc, some of which get passed on to the linker. +# +# * linker argument --nmagic turns off page alignment of sections (which saves +# flash space) +# * linker argument -Tlink.x tells the linker to use link.x as the linker +# script. This is usually provided by the cortex-m-rt crate, and by default +# the version in that crate will include a file called `memory.x` which +# describes the particular memory layout for your specific chip. +# * no-vectorize-loops turns off the loop vectorizer (seeing as the M0+ doesn't +# have SIMD) +rustflags = [ + "-C", "link-arg=--nmagic", + "-C", "link-arg=-Tlink.x", + "-C", "no-vectorize-loops", + + "-C", "link-arg=-Tdefmt.x", +] + +# This runner will find a supported SWD debug probe and flash your RP2040 over +# SWD: +runner = "probe-rs run --chip RP2040" diff --git a/examples/rp-pico/.gitignore b/examples/rp-pico/.gitignore new file mode 100644 index 0000000..2f7896d --- /dev/null +++ b/examples/rp-pico/.gitignore @@ -0,0 +1 @@ +target/