Skip to content

Commit 9301664

Browse files
loader: sketch heap size config defined
Defined config for sketch heap size, now LLEXT_HEAP_SIZE defaults to this value Signed-off-by: Andrea Gilardoni <a.gilardoni@arduino.cc>
1 parent b193855 commit 9301664

9 files changed

Lines changed: 18 additions & 8 deletions

File tree

loader/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
# SPDX-License-Identifier: Apache-2.0
55
#
66

7+
config LLEXT_HEAP_SIZE
8+
int
9+
default SKETCH_HEAP_SIZE
10+
711
source "Kconfig.zephyr"
812

913
config LLEXT_HEAP_REGION
@@ -17,3 +21,9 @@ config MAIN_STACK_REGION
1721
depends on CODE_DATA_RELOCATION
1822
help
1923
Specify the memory region for main stack.
24+
25+
config SKETCH_HEAP_SIZE
26+
int "Sketch heap size in KB"
27+
default 32
28+
help
29+
Specify the size in KB for the sketch heap

variants/arduino_giga_r1_stm32h747xx_m7/arduino_giga_r1_stm32h747xx_m7.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ CONFIG_LLEXT_STORAGE_WRITABLE=n
1414
CONFIG_SHARED_MULTI_HEAP=y
1515
CONFIG_HEAP_MEM_POOL_SIZE=32768
1616
CONFIG_MAIN_STACK_SIZE=32768
17-
CONFIG_LLEXT_HEAP_SIZE=128
17+
CONFIG_SKETCH_HEAP_SIZE=128
1818
CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE=-1
1919

2020
CONFIG_CODE_DATA_RELOCATION=y

variants/arduino_nano_33_ble_nrf52840_sense/arduino_nano_33_ble_nrf52840_sense.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ CONFIG_PWM=y
3232

3333
CONFIG_LLEXT_STORAGE_WRITABLE=n
3434
CONFIG_HEAP_MEM_POOL_SIZE=16384
35-
CONFIG_LLEXT_HEAP_SIZE=128
35+
CONFIG_SKETCH_HEAP_SIZE=128
3636
CONFIG_MAIN_STACK_SIZE=16384
3737
CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE=-1
3838

variants/arduino_nano_matter_mgm240sd22vna/arduino_nano_matter_mgm240sd22vna.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
CONFIG_MAIN_STACK_SIZE=16000
22
CONFIG_HEAP_MEM_POOL_SIZE=112000
3-
CONFIG_LLEXT_HEAP_SIZE=64
3+
CONFIG_SKETCH_HEAP_SIZE=64
44
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
55
CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE=-1
66

variants/arduino_nicla_sense_me_nrf52832/arduino_nicla_sense_me_nrf52832.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ CONFIG_ADC=y
2323

2424
CONFIG_LLEXT_STORAGE_WRITABLE=n
2525
CONFIG_HEAP_MEM_POOL_SIZE=8192
26-
CONFIG_LLEXT_HEAP_SIZE=15
26+
CONFIG_SKETCH_HEAP_SIZE=15
2727
CONFIG_MAIN_STACK_SIZE=2048
2828
CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE=-1

variants/arduino_opta_stm32h747xx_m7/arduino_opta_stm32h747xx_m7.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ CONFIG_LLEXT_STORAGE_WRITABLE=n
1313

1414
CONFIG_HEAP_MEM_POOL_SIZE=32768
1515
CONFIG_MAIN_STACK_SIZE=32768
16-
CONFIG_LLEXT_HEAP_SIZE=128
16+
CONFIG_SKETCH_HEAP_SIZE=128
1717
CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE=-1
1818

1919
CONFIG_CODE_DATA_RELOCATION=y

variants/arduino_portenta_c33_r7fa6m5bh3cfc/arduino_portenta_c33_r7fa6m5bh3cfc.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ CONFIG_LOG_BACKEND_UART_AUTOSTART=n
2525
CONFIG_LOG_DEFAULT_LEVEL=2
2626

2727
CONFIG_MAIN_STACK_SIZE=32768
28-
CONFIG_LLEXT_HEAP_SIZE=128
28+
CONFIG_SKETCH_HEAP_SIZE=128
2929
CONFIG_HEAP_MEM_POOL_SIZE=32768
3030
CONFIG_ISR_STACK_SIZE=8192
3131
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=8192

variants/arduino_portenta_h7_stm32h747xx_m7/arduino_portenta_h7_stm32h747xx_m7.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ CONFIG_ARM_MPU=y
2929
CONFIG_MAX_THREAD_BYTES=4
3030

3131
CONFIG_MAIN_STACK_SIZE=32768
32-
CONFIG_LLEXT_HEAP_SIZE=128
32+
CONFIG_SKETCH_HEAP_SIZE=128
3333

3434
CONFIG_CODE_DATA_RELOCATION=y
3535
CONFIG_MAIN_STACK_REGION="DTCM"

variants/arduino_uno_q_stm32u585xx/arduino_uno_q_stm32u585xx.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
CONFIG_LLEXT_STORAGE_WRITABLE=n
22
CONFIG_HEAP_MEM_POOL_SIZE=32768
3-
CONFIG_LLEXT_HEAP_SIZE=128
3+
CONFIG_SKETCH_HEAP_SIZE=128
44
CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE=-1
55

66
CONFIG_FPU=y

0 commit comments

Comments
 (0)