ulp_main.elf text not fit in ram (Solved)
Posted: Mon Aug 06, 2018 8:44 pm
Hi all,
I getting this error:
CPP main/ulp/readIO.S
ULP_AS build/main/readIO.ulp.o
ULP_LD build/main/ulp_main.elf
esp32ulp-elf-ld: ulp_main.elf section `.text' will not fit in region `ram'
esp32ulp-elf-ld: region `ram' overflowed by 72 bytes
/home/vini/projs/ams_projs/esp32/esp-idf/components/ulp/component_ulp_common.mk:45: recipe for target 'ulp_main.elf' failed
This is weird because this is a very small assembly code to read a GPIO and wake up main CPU.
I getting this error:
CPP main/ulp/readIO.S
ULP_AS build/main/readIO.ulp.o
ULP_LD build/main/ulp_main.elf
esp32ulp-elf-ld: ulp_main.elf section `.text' will not fit in region `ram'
esp32ulp-elf-ld: region `ram' overflowed by 72 bytes
/home/vini/projs/ams_projs/esp32/esp-idf/components/ulp/component_ulp_common.mk:45: recipe for target 'ulp_main.elf' failed
This is weird because this is a very small assembly code to read a GPIO and wake up main CPU.
Code: Select all
/* ULP assembly files are passed through C preprocessor first, so include directives
and C macros may be used in these files
*/
#include "soc/rtc_cntl_reg.h"
#include "soc/rtc_io_reg.h"
#include "soc/soc_ulp.h"
/* Define variables, which go into .bss section (zero-initialized data) */
.bss
/* RTC IO number used to sample the input signal.
Set by main program. */
.global io_number
io_number:
.long 0
/* Code goes into .text section */
.text
.global entry
entry:
/* Read the value of lower 16 RTC IOs into R0 */
READ_RTC_FIELD(RTC_GPIO_IN_REG, RTC_GPIO_IN_NEXT)
/* Load io_number, extract the state of input */
move r3, io_number
ld r3, r3, 0
rsh r0, r0, r3
and r0, r0, 1
move r2, 0x01
sub r2, r2, r0
/* State of input high? */
jump wake_up, eq
/* End program */
halt
.global wake_up
wake_up:
/* Check if the system can be woken up */
READ_RTC_FIELD(RTC_CNTL_LOW_POWER_ST_REG, RTC_CNTL_RDY_FOR_WAKEUP)
and r0, r0, 1
jump wake_up, eq
/* Wake up the SoC, end program */
wake
halt