mirror of
https://github.com/raspberrypi/pico-sdk.git
synced 2026-03-14 21:19:43 +01:00
Move and add example to Bazel docs for changing linker scripts
This commit is contained in:
parent
72adb670c1
commit
e47fe099bd
3 changed files with 9 additions and 18 deletions
|
|
@ -33,15 +33,6 @@ use_linker_script_file(
|
|||
script = "memmap_no_flash.ld",
|
||||
)
|
||||
|
||||
# It's possible to set linker scripts globally or on a per-binary basis.
|
||||
#
|
||||
# Setting globally:
|
||||
# * Set --@pico-sdk//bazel/config:PICO_DEFAULT_LINKER_SCRIPT to point to your
|
||||
# desired linker script.
|
||||
#
|
||||
# Setting per-binary:
|
||||
# * Set --@pico-sdk//bazel/config:PICO_DEFAULT_LINKER_SCRIPT=@pico-sdk//bazel:empty_cc_lib
|
||||
# * Manually add your desired linker script to each cc_binary.
|
||||
cc_library(
|
||||
name = "default_linker_script",
|
||||
target_compatible_with = ["//bazel/constraint:rp2040"],
|
||||
|
|
|
|||
|
|
@ -32,15 +32,6 @@ use_linker_script_file(
|
|||
script = "memmap_no_flash.ld",
|
||||
)
|
||||
|
||||
# It's possible to set linker scripts globally or on a per-binary basis.
|
||||
#
|
||||
# Setting globally:
|
||||
# * Set --@pico-sdk//bazel/config:PICO_DEFAULT_LINKER_SCRIPT to point to your
|
||||
# desired linker script.
|
||||
#
|
||||
# Setting per-binary:
|
||||
# * Set --@pico-sdk//bazel/config:PICO_DEFAULT_LINKER_SCRIPT=@pico-sdk//bazel:empty_cc_lib
|
||||
# * Manually add your desired linker script to each cc_binary.
|
||||
cc_library(
|
||||
name = "default_linker_script",
|
||||
target_compatible_with = ["//bazel/constraint:rp2350"],
|
||||
|
|
|
|||
|
|
@ -18,6 +18,15 @@ generated_pico_flash_region(
|
|||
}),
|
||||
)
|
||||
|
||||
# It's possible to set linker scripts globally or on a per-binary basis.
|
||||
#
|
||||
# Setting globally:
|
||||
# * Set --@pico-sdk//bazel/config:PICO_DEFAULT_LINKER_SCRIPT to point to your
|
||||
# desired linker script (eg @pico-sdk//src/pico_standard_link:no_flash_linker_script)
|
||||
#
|
||||
# Setting per-binary:
|
||||
# * Set --@pico-sdk//bazel/config:PICO_DEFAULT_LINKER_SCRIPT=@pico-sdk//bazel:empty_cc_lib
|
||||
# * Manually add your desired linker script to each cc_binary.
|
||||
alias(
|
||||
name = "default_linker_script",
|
||||
actual = select({
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue