Skip to content

Commit 6d6030f

Browse files
committed
Move section_xip_ram and sections_psram before data in linker scripts
Initialised data must come before uninitialised, so section_xip_ram must come before section_persistent_data Neither of these place anything in SRAM for default binaries, so this doesn't change the ram_vector_table location
1 parent 5626d0e commit 6d6030f

5 files changed

Lines changed: 8 additions & 8 deletions

File tree

src/rp2_common/pico_standard_link/script_include/sections_copy_to_ram.incl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
INCLUDE "sections_copy_to_ram_text.incl"
44
INCLUDE "section_generated_post_text.incl"
55
INCLUDE "section_extra_post_text.incl"
6+
INCLUDE "sections_psram.incl"
7+
INCLUDE "section_xip_ram.incl"
68
INCLUDE "sections_copy_to_ram_data.incl"
79
INCLUDE "section_generated_post_data.incl"
810
INCLUDE "section_extra_post_data.incl"
@@ -11,8 +13,6 @@ INCLUDE "sections_scratch.incl"
1113
INCLUDE "section_generated_post_scratch.incl"
1214
INCLUDE "section_extra_post_scratch.incl"
1315
INCLUDE "sections_stack.incl"
14-
INCLUDE "sections_psram.incl"
15-
INCLUDE "section_xip_ram.incl"
1616
INCLUDE "section_flash_end.incl"
1717
INCLUDE "section_end.incl"
1818
INCLUDE "section_generated_post_end.incl"

src/rp2_common/pico_standard_link/script_include/sections_default.incl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
INCLUDE "sections_default_text.incl"
44
INCLUDE "section_generated_post_text.incl"
55
INCLUDE "section_extra_post_text.incl"
6+
INCLUDE "sections_psram.incl"
7+
INCLUDE "section_xip_ram.incl"
68
INCLUDE "sections_default_data.incl"
79
INCLUDE "section_generated_post_data.incl"
810
INCLUDE "section_extra_post_data.incl"
@@ -11,8 +13,6 @@ INCLUDE "sections_scratch.incl"
1113
INCLUDE "section_generated_post_scratch.incl"
1214
INCLUDE "section_extra_post_scratch.incl"
1315
INCLUDE "sections_stack.incl"
14-
INCLUDE "sections_psram.incl"
15-
INCLUDE "section_xip_ram.incl"
1616
INCLUDE "section_flash_end.incl"
1717
INCLUDE "section_end.incl"
1818
INCLUDE "section_generated_post_end.incl"

src/rp2_common/pico_standard_link/script_include/sections_no_flash.incl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
INCLUDE "sections_no_flash_text.incl"
44
INCLUDE "section_generated_post_text.incl"
55
INCLUDE "section_extra_post_text.incl"
6+
INCLUDE "sections_psram.incl"
7+
INCLUDE "section_xip_ram.incl"
68
INCLUDE "sections_no_flash_data.incl"
79
INCLUDE "section_generated_post_data.incl"
810
INCLUDE "section_extra_post_data.incl"
@@ -11,8 +13,6 @@ INCLUDE "sections_scratch.incl"
1113
INCLUDE "section_generated_post_scratch.incl"
1214
INCLUDE "section_extra_post_scratch.incl"
1315
INCLUDE "sections_stack.incl"
14-
INCLUDE "sections_psram.incl"
15-
INCLUDE "section_xip_ram.incl"
1616
INCLUDE "section_end.incl"
1717
INCLUDE "section_generated_post_end.incl"
1818
INCLUDE "section_extra_post_end.incl"

test/pico_low_power_test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ if (NOT PICO_RP2040)
5252
pico_encrypt_binary(low_power_test_timers_encrypted_xip_sram ${PICO_SDK_PATH}/tools/example_keys/privateaes.bin ${PICO_SDK_PATH}/tools/example_keys/ivsalt.bin EMBED)
5353
pico_set_persistent_data_loc(low_power_test_timers_encrypted_xip_sram xip_ram)
5454
# Also check encrypting with code in xip_sram
55-
pico_use_xip_sram_for_time_critical(low_power_test_timers_encrypted_xip_sram)
55+
pico_set_time_critical_placement(low_power_test_timers_encrypted_xip_sram xip_ram)
5656
set_target_properties(low_power_test_timers_encrypted_xip_sram PROPERTIES PICO_TEST_TIMEOUT 35)
5757
set_target_properties(low_power_test_timers_encrypted_xip_sram PROPERTIES PICO_TEST_FAILURE_STRING "ERROR:")
5858
set_target_properties(low_power_test_timers_encrypted_xip_sram PROPERTIES PICO_TEST_BUDDY_FILE external_sleep_timer.elf)

test/pico_xip_sram_test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ if (NOT PICO_RP2040 AND NOT PICO_C_COMPILER_IS_CLANG)
105105
target_link_libraries(pico_critical_xip_sram_test_packaged PRIVATE hardware_riscv_platform_timer)
106106
endif()
107107
pico_set_binary_type(pico_critical_xip_sram_test_packaged no_flash)
108-
pico_use_xip_sram_for_time_critical(pico_critical_xip_sram_test_packaged)
108+
pico_set_time_critical_placement(pico_critical_xip_sram_test_packaged xip_ram)
109109
pico_package_uf2_output(pico_critical_xip_sram_test_packaged)
110110
pico_add_extra_outputs(pico_critical_xip_sram_test_packaged)
111111
endif()

0 commit comments

Comments
 (0)