mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-16 10:43:29 +00:00
esp32: add PHY DRAM symbols to linker
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
+12
-4
@@ -15,9 +15,11 @@
|
|||||||
|
|
||||||
MEMORY
|
MEMORY
|
||||||
{
|
{
|
||||||
/* SRAM2 (0x3FFAE000-0x3FFE0000, 200K): a single safe contiguous block used
|
/* SRAM2 usable DRAM (0x3FFB0000-0x3FFE0000, 192K): reserve the first 8KB
|
||||||
* for the stack, initialized .data, .bss, and the whole Go GC heap. */
|
* (0x3FFAE000-0x3FFB0000) for ROM PHY data (rom_phyFuns at 0x3FFAE0C0),
|
||||||
DRAM (rw) : ORIGIN = 0x3FFAE000, LENGTH = 200K
|
* then use the rest for the stack, initialized .data, .bss, and the Go
|
||||||
|
* GC heap. */
|
||||||
|
DRAM (rw) : ORIGIN = 0x3FFB0000, LENGTH = 192K
|
||||||
|
|
||||||
/* Top of SRAM1 (0x3FFF0000-0x40000000, 64K): pool 7 + pool 6. This is the
|
/* Top of SRAM1 (0x3FFF0000-0x40000000, 64K): pool 7 + pool 6. This is the
|
||||||
* ONLY part of SRAM1 that is safe for us to use:
|
* ONLY part of SRAM1 that is safe for us to use:
|
||||||
@@ -185,7 +187,7 @@ SECTIONS
|
|||||||
_globals_start = _sbss;
|
_globals_start = _sbss;
|
||||||
_globals_end = _wifi_bss_end;
|
_globals_end = _wifi_bss_end;
|
||||||
_heap_start = _edata;
|
_heap_start = _edata;
|
||||||
/* Go GC heap = the rest of SRAM2 above .bss (~121KB), a single safe contiguous
|
/* Go GC heap = the rest of SRAM2 above .data (~113KB), a single safe contiguous
|
||||||
* block. The WiFi arena lives in DRAM1 (SRAM1 pool 7/6), so its ~64KB does not
|
* block. The WiFi arena lives in DRAM1 (SRAM1 pool 7/6), so its ~64KB does not
|
||||||
* consume Go heap and its DMA is isolated from GC objects. The heap never
|
* consume Go heap and its DMA is isolated from GC objects. The heap never
|
||||||
* touches SRAM1's ROM/MAC-dump regions (0x3FFE0000-0x3FFF0000, left unused). */
|
* touches SRAM1's ROM/MAC-dump regions (0x3FFE0000-0x3FFF0000, left unused). */
|
||||||
@@ -193,6 +195,12 @@ _heap_end = 0x3FFE0000;
|
|||||||
|
|
||||||
_stack_size = 4K;
|
_stack_size = 4K;
|
||||||
|
|
||||||
|
/* ESP32 ROM-owned PHY DRAM symbols from ESP-IDF esp32.rom.ld.
|
||||||
|
* Exposed as linker symbols so firmware code can reference them without
|
||||||
|
* hardcoding addresses in C sources. */
|
||||||
|
PROVIDE ( rom_phyFuns = 0x3ffae0c0 );
|
||||||
|
PROVIDE ( g_phyFuns_instance = 0x3ffae0c4 );
|
||||||
|
|
||||||
/* From ESP-IDF:
|
/* From ESP-IDF:
|
||||||
* components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
|
* components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
|
||||||
* This is the subset that is sometimes used by LLVM during codegen, and thus
|
* This is the subset that is sometimes used by LLVM during codegen, and thus
|
||||||
|
|||||||
Reference in New Issue
Block a user