Skip to content

Commit

Permalink
Fix for dangerous relocation: l32r: literal target out of range
Browse files Browse the repository at this point in the history
  • Loading branch information
ewoudwijma committed Sep 12, 2024
1 parent 042a828 commit f262ba5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ build_flags =
-D VERSION=24091213 ; Date and time (GMT!), update at every commit!!
-D LFS_THREADSAFE ; enables use of semaphores in LittleFS driver
-D STARBASE_DEVMODE
-mtext-section-literals ;otherwise [UserModLive::setup()]+0xa17): dangerous relocation: l32r: literal target out of range (try using text-section-literals)
;for StarLight, first only for s2, now for all due to something in UserModLive.Setup...
${ESPAsyncWebServer.build_flags} ;alternatively PsychicHttp
${STARBASE_USERMOD_E131.build_flags}
${STARBASE_USERMOD_MPU6050.build_flags}
Expand Down Expand Up @@ -175,7 +177,6 @@ platform = [email protected] ; this one behaves better for debugging 6.5.0 is
upload_speed = 256000
build_flags =
${env.build_flags}
-mtext-section-literals ;otherwise [UserModLive::setup()]+0xa17): dangerous relocation: l32r: literal target out of range (try using text-section-literals)
; -DARDUINO_ARCH_ESP32 ; no proof of necessity yet...
-D CONFIG_IDF_TARGET_ESP32S2=1
-D ARDUINO_USB_CDC_ON_BOOT=1 -D ARDUINO_USB_DFU_ON_BOOT=1 -D ARDUINO_USB_MSC_ON_BOOT=0 ; for debugging over USB
Expand Down
2 changes: 2 additions & 0 deletions src/User/UserModLive.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ class UserModLive:public SysModule {
void setup() override {
SysModule::setup();

//note: -mtext-section-literals needed in pio.ini, first only for s2, now for all due to something in setup...

parentVar = ui->initUserMod(parentVar, name, 6310);

ui->initSelect(parentVar, "script", UINT16_MAX, false , [this](JsonObject var, unsigned8 rowNr, unsigned8 funType) { switch (funType) { //varFun
Expand Down

0 comments on commit f262ba5

Please sign in to comment.