Skip to content

Conversation

@pennam
Copy link

@pennam pennam commented Dec 15, 2025

  • Enable llext heap and main stack relocation for OPTA and GIGA and PORTENTA H7
  • Disable SHELL for all variants
  • Disable CPP for all variants
  • Add log uart overlay to boards with cdc_acm perpheral to be used from the loader to print logs if shell is disabled and debug enabled OPTA GIGA PORTENTA H7 PORTENTA C33 NANO 33 BLE
  • Ensure DYNAMIC_THREAD is enabled for all boards if not explicitly disabled in the variant (NANO MATTER)

Boards to be checked before disabling SHELL for all variants and CPP

  • nano33ble disabled SHELL - CPP - Enabled log backend
  • niclasense
  • unoq
  • nano matter
  • ek_ra8d1
  • frdm_mcxn947
  • frdm_rw612

@pennam pennam changed the title misc: optimize flash and memory usage to other variants misc: extend flash and memory usage optimizations to other variants Dec 15, 2025
iabdalkader and others added 23 commits December 16, 2025 17:21
Add debug config fragment to easily build debug images.

Usage: ./extra/build.sh <board> --debug

The build includes extra/debug.conf which enables:

- Debug mode with assertions and verbose output
- Debug-level logging (level 4)
- Stack overflow detection
- Thread monitoring
- Debug optimizations (-Og)
- Enable shell.

Signed-off-by: iabdalkader <[email protected]>
The created sketch log structures depends on the config:

CONFIG_LOG (IMMEDIATE/DEFERRED): creates log_const_sketch struct.
CONFIG_LOG_RUNTIME_FILTERING (implied by CONFIG_SHELL): creates log_dynamic_sketch struct.
CONFIG_LOG_MODE_IMMEDIATE + CONFIG_SHELL: creates both.

Signed-off-by: iabdalkader <[email protected]>
- Disable CPP
- Disable shell
- Disable any debug log level
- Disable init stacks.

Signed-off-by: iabdalkader <[email protected]>
In DEBUG mode if SHELL is disabled and board has a logging uart,
loader will use it to print logs
uart will be used by loader for logging when SHELL is not enabled
uart will be used by loader for logging when SHELL is not enabled
uart will be used by loader for logging when SHELL is not enabled
uart will be used by loader for logging when SHELL is not enabled
uart will be used by loader for logging when SHELL is not enabled
@pennam pennam marked this pull request as ready for review December 16, 2025 16:25
@pennam
Copy link
Author

pennam commented Dec 16, 2025

@pennam
Copy link
Author

pennam commented Dec 16, 2025

GIGA R1 Tests
Logging - Run Crash Debug/standard 👍
ArduinoBLE LED.ino 👍
MallocToDeath 👍 230kB
ThreadsEvents 👍
ThreadsMutex 👍
WiFi 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants