-
Notifications
You must be signed in to change notification settings - Fork 7.6k
soc: raspberrypi: rpi_pico: Improvement linker configuration #79460
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -435,4 +435,12 @@ | |
compatible = "raspberrypi,pico-temp"; | ||
status = "disabled"; | ||
}; | ||
|
||
image_def_flash: flash@10000000 { | ||
compatible = "zephyr,memory-region"; | ||
reg = <0x10000000 0x80>; | ||
zephyr,memory-region = "IMAGE_DEF_FLASH"; | ||
zephyr,memory-region-flags = "r"; | ||
status = "okay"; | ||
}; | ||
}; | ||
Comment on lines
+439
to
446
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Having looked at this further, I don't think this is correct. It needs changing. boards/raspberrypi/rpi_pico2/rpi_pico2.dtsi defines the partitions in flash. The RP2350A and RP2350B don't even have flash, so anything related to defining things in flash doesn't make sense in the base file Similarly, it's a board and/or application (app) specific thing to decide where this information is (it doesn't have to be at the very beginning of flash, for example). |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
* Copyright (c) 2014 Wind River Systems, Inc. | ||
* Copyright (c) 2021 Yonatan Schachter | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/* | ||
* The Second Stage Bootloader is only linked to the app that | ||
* resides at 0x100. This can be the application, or a bootloader | ||
* such as mcuboot. | ||
*/ | ||
|
||
.boot2 : { | ||
KEEP(*(.boot2)) | ||
} > BOOT_FLASH |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* | ||
* Copyright (c) 2024 Andrew Featherstone | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
.image_def : { | ||
LONG(0xffffded3) /* PICOBIN_BLOCK_MARKER_START */ | ||
LONG(0x10210142) /* IMAGE_DEF Item */ | ||
LONG(0x00000203) /* VECTOR_TABLE Item */ | ||
LONG(ABSOLUTE(_vector_start)) /* - Address of the vector table in flash */ | ||
LONG(0x000003ff) /* Last Item in Block */ | ||
LONG(0x00000000) /* End of block loop */ | ||
LONG(0xab123579) /* PICOBIN_BLOCK_MARKER_END */ | ||
} > IMAGE_DEF_FLASH |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we put this in 'unit address' order, this helps to highlight that something isn't right about this approach. Similarly, a quick grep of the codebase suggests that
flash@unitaddress
is always used to refer to some non-volatile storage, not to something stored at that location.