1#include "sdkconfig.h" 2 3#if CONFIG_ESP32S2_ULP_COPROC_RESERVE_MEM 4#define LOCAL_ULP_COPROC_RESERVE_MEM CONFIG_ESP32S2_ULP_COPROC_RESERVE_MEM 5#else 6#define LOCAL_ULP_COPROC_RESERVE_MEM CONFIG_ESP32_ULP_COPROC_RESERVE_MEM 7#endif 8 9#define ULP_BIN_MAGIC 0x00706c75 10#define HEADER_SIZE 12 11MEMORY 12{ 13 ram(RW) : ORIGIN = 0, LENGTH = LOCAL_ULP_COPROC_RESERVE_MEM 14} 15 16SECTIONS 17{ 18 .text : AT(HEADER_SIZE) 19 { 20 *(.text) 21 } >ram 22 .data : 23 { 24 . = ALIGN(4); 25 *(.data) 26 } >ram 27 .bss : 28 { 29 . = ALIGN(4); 30 *(.bss) 31 } >ram 32 33 .header : AT(0) 34 { 35 LONG(ULP_BIN_MAGIC) 36 SHORT(LOADADDR(.text)) 37 SHORT(SIZEOF(.text)) 38 SHORT(SIZEOF(.data)) 39 SHORT(SIZEOF(.bss)) 40 } 41} 42