Skip to content

Commit 073044d

Browse files
committed
test: use memory mapped address if CONFIG_LLEXT_STORAGE_WRITABLE=n
1 parent 23e5449 commit 073044d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

loader/boards/arduino_giga_r1_m7.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ CONFIG_USB_CDC_ACM_RINGBUF_SIZE=512
99
CONFIG_UART_LINE_CTRL=y
1010
CONFIG_CDC_ACM_DTE_RATE_CALLBACK_SUPPORT=y
1111

12+
CONFIG_LLEXT_STORAGE_WRITABLE=n
13+
1214
CONFIG_FPU=y
1315

1416
CONFIG_ADC=y

loader/main.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ static int loader(const struct shell *sh)
6868
return rc;
6969
}
7070
#else
71-
uint32_t offset = FIXED_PARTITION_OFFSET(user_sketch);
71+
// Assuming the sketch is stored in the same flash device as the loader
72+
// uint32_t offset = DT_REG_ADDR(DT_CHOSEN(zephyr_flash)) + DT_REG_ADDR(DT_NODELABEL(user_sketch));
73+
uint32_t offset = DT_REG_ADDR(DT_GPARENT(DT_NODELABEL(user_sketch))) + DT_REG_ADDR(DT_NODELABEL(user_sketch));
7274
uint8_t* sketch_buf = (uint8_t*)(offset+header_len);
7375
#endif
7476

0 commit comments

Comments
 (0)