Commit 126c261
committed
ports/stm32: Use dynamic heap with proper .noinit section handling.
Replace the 80KB static heap with dynamic heap allocation by properly
handling the .noinit section in the linker script. Zephyr kernel stacks
are placed in .noinit, and the heap now starts after this section.
This reduces BSS from 179KB to 97KB when threading is enabled, and has
zero overhead when threading is disabled (.noinit is empty).
Changes:
- Add .noinit section to common_bss_heap_stack.ld with _enoinit symbol
- Update stm32f429.ld to use _enoinit for _heap_start
- Remove static 80KB heap array from main.c, use MICROPY_HEAP_START/END1 parent c4cc5d2 commit 126c261
File tree
3 files changed
+12
-12
lines changed- ports/stm32
- boards
3 files changed
+12
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
14 | 23 | | |
15 | 24 | | |
16 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
312 | 312 | | |
313 | 313 | | |
314 | 314 | | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | 315 | | |
325 | 316 | | |
326 | 317 | | |
| |||
362 | 353 | | |
363 | 354 | | |
364 | 355 | | |
365 | | - | |
366 | | - | |
| 356 | + | |
| 357 | + | |
367 | 358 | | |
368 | 359 | | |
369 | 360 | | |
| |||
0 commit comments