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
@pennam pennam force-pushed the disable-shell-v3 branch 2 times, most recently from 8dc70b5 to 654f55f Compare December 16, 2025 16:24
@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 👎
Display 👍

@pennam
Copy link
Author

pennam commented Dec 17, 2025

Portenta H7 Tests
WiFi 👎
ArduinoBLE LED.ino 👍
MallocToDeath 👍 267kB
ThreadsMutex 👍
ThreadsEvents 👍
Logging - Run Crash Debug/standard ⚠️ Debug crash log needs pennam/zephyr@9913b6b

Comment on lines +46 to +48
CONFIG_THREAD_STACK_INFO=y
CONFIG_DYNAMIC_THREAD=y
CONFIG_DYNAMIC_THREAD_ALLOC=y

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?

Copy link
Author

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 make k_thread_stack_alloc and friends to work.

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 main those options were Not set for Portenta H7, Giga etc..


CONFIG_LLEXT_STORAGE_WRITABLE=n
CONFIG_SHELL_STACK_SIZE=1024
CONFIG_HEAP_MEM_POOL_SIZE=1024

Choose a reason for hiding this comment

The 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?

Comment on lines 31 to 32
#CONFIG_LOG_PROCESS_THREAD_STACK_SIZE=8192
#CONFIG_IDLE_STACK_SIZE=8192

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd remove these commented options.

log_backend_init already initializes usb cdc_acm peripheral
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