Skip to content

Conversation

@iabdalkader
Copy link

@iabdalkader iabdalkader commented Nov 17, 2025

Add debug config overlay 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)

Note: I think we should disable the logging module by default for production builds, what good is it for the user? It's just taking space and processing.

@iabdalkader iabdalkader requested a review from pillo79 November 18, 2025 08:12
@iabdalkader iabdalkader marked this pull request as draft November 21, 2025 07:36
@iabdalkader
Copy link
Author

FYI @pillo79 @pennam for some reason enabling log level=4 (debug for everything) causes a hardfault on Portenta-H7. It shouldn't be a stack overflow issue, but I tried increasing all stacks anyway and it doesn't help. That said, it is very convenient and I have been using it locally, instead of adding debug options manually to conf files, so I will get it fixed somehow and let you know.

Add debug config overlay 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)

Signed-off-by: iabdalkader <[email protected]>
@iabdalkader iabdalkader marked this pull request as ready for review November 21, 2025 14:14
@iabdalkader
Copy link
Author

Actually, it turns out that it's just some log thread overflow, fixable by increasing stack sizes. However,, I decided to Not enable debug logs globally, because we don't really have extra memory for that and it makes it much harder to see the debug log you're looking for.

@iabdalkader iabdalkader requested a review from pennam November 21, 2025 14:19
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.

1 participant