forked from zephyrproject-rtos/arduino-core-zephyr
-
-
Notifications
You must be signed in to change notification settings - Fork 40
misc: extend flash and memory usage optimizations to other variants #292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
pennam
wants to merge
23
commits into
arduino:main
Choose a base branch
from
pennam:disable-shell-v3
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
62478c7
extra: Add debug config fragment.
iabdalkader 2278b10
loader: Export the correct sketch log symbols.
iabdalkader 5d17b27
loader: Support relocating sections to different memory regions.
iabdalkader bc16aae
variants: Disable some features for production build.
iabdalkader 500f3f0
variants: Relocate llext heap and main stack.
iabdalkader 1b88f0b
loader: redirect logs to uart
pennam 7736d7e
giga: relocate llext heap and main stack
pennam e02c0a0
giga: add log uart
pennam 14b5152
portentah7: add log uart
pennam b907d47
portentac33: add log uart
pennam 968f739
opta: disable shell and cpp
pennam c6a11ec
opta: relocate llext heap and main stack
pennam 0f7d90e
opta: add log uart
pennam 1336fa9
nano33ble: disable shell and cpp
pennam 3874927
nano33ble: add log uart
pennam a426474
nano33ble: autosize malloc arena
pennam 7eeac8a
nicla sense: disable shell and cpp
pennam 972d692
unoq: disable shell and cpp
pennam b42c4cb
unoq: restore immediate log mode
pennam 83f3ae8
unoq: remove unused config
pennam 0665c15
prj: make sure DYNAMIC_THREAD is enabled also with SHELL disabled
pennam 58a0b9a
prj: disable SHELL and CPP for alla variants
pennam 654f55f
nano matter: disable CONFIG_DYNAMIC_THREAD and CONFIG_DYNAMIC_THREAD_…
pennam File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # Debug configuration for Arduino Core Zephyr | ||
|
|
||
| # Enable debug mode | ||
| CONFIG_DEBUG=y | ||
|
|
||
| # Enable assertions | ||
| CONFIG_ASSERT=y | ||
| #CONFIG_ASSERT_VERBOSE=y | ||
|
|
||
| # Enable stack overflow detection | ||
| CONFIG_STACK_SENTINEL=y | ||
| CONFIG_STACK_CANARIES=y | ||
|
|
||
| # Enable thread monitoring and debugging | ||
| CONFIG_THREAD_MONITOR=y | ||
| CONFIG_THREAD_NAME=y | ||
| CONFIG_DEBUG_THREAD_INFO=y | ||
|
|
||
| # Disable compiler optimizations | ||
| #CONFIG_DEBUG_OPTIMIZATIONS=y | ||
|
|
||
| # Enable and configure the shell | ||
| CONFIG_SHELL=y | ||
| #CONFIG_NET_SHELL=y | ||
| #CONFIG_NET_L2_WIFI_SHELL=y | ||
| CONFIG_SHELL_STACK_SIZE=8192 | ||
|
|
||
| # Enable runtime statistics | ||
| CONFIG_SYS_HEAP_RUNTIME_STATS=y | ||
| CONFIG_THREAD_RUNTIME_STATS=y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # | ||
| # Copyright (c) 2025 Arduino | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
|
|
||
| source "Kconfig.zephyr" | ||
|
|
||
| config LLEXT_HEAP_REGION | ||
| string "LLEXT heap memory region" | ||
| depends on CODE_DATA_RELOCATION | ||
| help | ||
| Specify the memory region for LLEXT heap. | ||
|
|
||
| config MAIN_STACK_REGION | ||
| string "Main stack memory region" | ||
| depends on CODE_DATA_RELOCATION | ||
| help | ||
| Specify the memory region for main stack. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,21 +9,20 @@ CONFIG_BT_BUF_EVT_DISCARDABLE_SIZE=255 | |
| CONFIG_BT_MAX_CONN=4 | ||
| CONFIG_BT_CTLR_ADV_EXT=y | ||
| CONFIG_BT_CTLR_ADV_PERIODIC=y | ||
|
|
||
| CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=512 | ||
| CONFIG_BT_RX_STACK_SIZE=1024 | ||
| CONFIG_BT_HCI_TX_STACK_SIZE=1024 | ||
|
|
||
| # Workaround: Unable to allocate command buffer when using K_NO_WAIT since | ||
| # Host number of completed commands does not follow normal flow control. | ||
| CONFIG_BT_BUF_CMD_TX_COUNT=10 | ||
|
|
||
| CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=512 | ||
|
|
||
| CONFIG_ADC=y | ||
| #CONFIG_PWM=y | ||
|
|
||
| CONFIG_LLEXT_STORAGE_WRITABLE=n | ||
| CONFIG_SHELL_STACK_SIZE=1024 | ||
| CONFIG_HEAP_MEM_POOL_SIZE=1024 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 1K heap seems too small, even the stack is 2K. Maybe consider increasing this? |
||
| CONFIG_LLEXT_HEAP_SIZE=15 | ||
| CONFIG_MAIN_STACK_SIZE=2048 | ||
|
|
||
| CONFIG_BT_RX_STACK_SIZE=1024 | ||
| CONFIG_BT_HCI_TX_STACK_SIZE=1024 | ||
| CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE=-1 | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
they were y selected by
SHELL, and are needed to makek_thread_stack_allocand friends to work.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They're not selected by the shell, and if you build
mainthose options were Not set for Portenta H7, Giga etc..