1
1
diff --git a/src/rp2_common/pico_runtime/runtime.c b/src/rp2_common/pico_runtime/runtime.c
2
- index 70dd3bb..b8c1ed0 100644
2
+ index f9018d0..ae8c479 100644
3
3
--- a/src/rp2_common/pico_runtime/runtime.c
4
4
+++ b/src/rp2_common/pico_runtime/runtime.c
5
- @@ -17 ,6 +17 ,7 @@
5
+ @@ -20 ,6 +20 ,7 @@
6
6
#include "hardware/clocks.h"
7
7
#include "hardware/irq.h"
8
8
#include "hardware/resets.h"
9
9
+ #include "hardware/gpio.h"
10
10
11
11
#include "pico/mutex.h"
12
12
#include "pico/time.h"
13
- @@ -32 ,6 +33 ,21 @@
13
+ @@ -35 ,6 +36 ,21 @@
14
14
#include "pico/bootrom.h"
15
15
#endif
16
16
@@ -32,7 +32,7 @@ index 70dd3bb..b8c1ed0 100644
32
32
extern char __StackLimit; /* Set by linker. */
33
33
34
34
uint32_t __attribute__((section(".ram_vector_table"))) ram_vector_table[48];
35
- @@ -61,11 +77,18 @@ void runtime_install_stack_guard(void *stack_bottom) {
35
+ @@ -64,7 +80,13 @@ void runtime_install_stack_guard(void *stack_bottom) {
36
36
| 0x10000000; // XN = disable instruction fetch; no other bits means no permissions
37
37
}
38
38
@@ -47,12 +47,7 @@ index 70dd3bb..b8c1ed0 100644
47
47
// Reset all peripherals to put system into a known state,
48
48
// - except for QSPI pads and the XIP IO bank, as this is fatal if running from flash
49
49
// - and the PLLs, as this is fatal if clock muxing has not been reset on this boot
50
- // - and USB, syscfg, as this disturbs USB-to-SWD on core 1
51
- +
52
- reset_block(~(
53
- RESETS_RESET_IO_QSPI_BITS |
54
- RESETS_RESET_PADS_QSPI_BITS |
55
- @@ -86,7 +109,9 @@ void runtime_init(void) {
50
+ @@ -89,7 +111,9 @@ void runtime_init(void) {
56
51
RESETS_RESET_UART1_BITS |
57
52
RESETS_RESET_USBCTRL_BITS
58
53
));
@@ -63,19 +58,19 @@ index 70dd3bb..b8c1ed0 100644
63
58
// (basically anything in aeabi that uses bootrom)
64
59
65
60
diff --git a/src/rp2_common/pico_standard_link/crt0.S b/src/rp2_common/pico_standard_link/crt0.S
66
- index b2992f6..6091e70 100644
61
+ index d061108..e48d870 100644
67
62
--- a/src/rp2_common/pico_standard_link/crt0.S
68
63
+++ b/src/rp2_common/pico_standard_link/crt0.S
69
- @@ -9,6 +9,8 @@
70
- #include "hardware/regs/addressmap.h"
64
+ @@ -10,6 +10,8 @@
71
65
#include "hardware/regs/sio.h"
66
+ #include "pico/asm_helper.S"
72
67
#include "pico/binary_info/defs.h"
73
68
+ #include "hardware/regs/resets.h"
74
69
+ #include "hardware/regs/rosc.h"
75
70
76
71
#ifdef NDEBUG
77
72
#ifndef COLLAPSE_IRQS
78
- @@ -225 ,6 +227 ,23 @@ _reset_handler:
73
+ @@ -226 ,6 +228 ,23 @@ _reset_handler:
79
74
cmp r0, #0
80
75
bne hold_non_core0_in_bootrom
81
76
@@ -99,7 +94,7 @@ index b2992f6..6091e70 100644
99
94
// In a NO_FLASH binary, don't perform .data copy, since it's loaded
100
95
// in-place by the SRAM load. Still need to clear .bss
101
96
#if !PICO_NO_FLASH
102
- @@ -251 ,6 +270 ,10 @@ bss_fill_test:
97
+ @@ -252 ,6 +271 ,10 @@ bss_fill_test:
103
98
cmp r1, r2
104
99
bne bss_fill_loop
105
100
@@ -110,7 +105,7 @@ index b2992f6..6091e70 100644
110
105
platform_entry: // symbol for stack traces
111
106
// Use 32-bit jumps, in case these symbols are moved out of branch range
112
107
// (e.g. if main is in SRAM and crt0 in flash)
113
- @@ -314 ,6 +337 ,19 @@ data_cpy_table:
108
+ @@ -311 ,6 +334 ,19 @@ data_cpy_table:
114
109
runtime_init:
115
110
bx lr
116
111
@@ -130,7 +125,7 @@ index b2992f6..6091e70 100644
130
125
// ----------------------------------------------------------------------------
131
126
// If core 1 somehow gets into crt0 due to a spectacular VTOR mishap, we need to
132
127
// catch it and send back to the sleep-and-launch code in the bootrom. Shouldn't
133
- @@ -345 ,3 +381 ,9 @@ __get_current_exception :
128
+ @@ -335 ,3 +371 ,9 @@ hold_non_core0_in_bootrom :
134
129
.align 2
135
130
.equ HeapSize, PICO_HEAP_SIZE
136
131
.space HeapSize
0 commit comments