rp2: Mark gc_heap NOLOAD for faster boot.
Create a new linker section .unitialized_bss for bss that does not need zero-initialising. Move gc_heap to this section, which saves ~30ms from rising edge of RESET to setting a pin HIGH in MicroPython. Zero fill happens in Pico SDK crt0.S before ROSC is configured. It's very, very slow. Signed-off-by: Phil Howard <phil@gadgetoid.com>
This commit is contained in:
parent
6e51dbd95a
commit
71f6eb5ac9
ports/rp2
@ -66,7 +66,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern uint8_t __StackTop, __StackBottom;
|
extern uint8_t __StackTop, __StackBottom;
|
||||||
static char gc_heap[MICROPY_GC_HEAP_SIZE];
|
__attribute__((section(".uninitialized_bss"))) static char gc_heap[MICROPY_GC_HEAP_SIZE];
|
||||||
|
|
||||||
// Embed version info in the binary in machine readable form
|
// Embed version info in the binary in machine readable form
|
||||||
bi_decl(bi_program_version_string(MICROPY_GIT_TAG));
|
bi_decl(bi_program_version_string(MICROPY_GIT_TAG));
|
||||||
|
@ -180,6 +180,12 @@ SECTIONS
|
|||||||
*(.uninitialized_data*)
|
*(.uninitialized_data*)
|
||||||
} > RAM
|
} > RAM
|
||||||
|
|
||||||
|
/* bss without zero init on startup */
|
||||||
|
.uninitialized_bss (NOLOAD): {
|
||||||
|
. = ALIGN(4);
|
||||||
|
*(.uninitialized_bss*)
|
||||||
|
} > RAM
|
||||||
|
|
||||||
/* Start and end symbols must be word-aligned */
|
/* Start and end symbols must be word-aligned */
|
||||||
.scratch_x : {
|
.scratch_x : {
|
||||||
__scratch_x_start__ = .;
|
__scratch_x_start__ = .;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user