Skip to content
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

Flight: Implement Stack Unused Checks #1886

Merged
merged 2 commits into from Jul 26, 2017
Merged

Flight: Implement Stack Unused Checks #1886

merged 2 commits into from Jul 26, 2017

Conversation

tracernz
Copy link
Member

Chibi uses the following types of stacks:

  • main stack, used by interrupts
  • process stack, used by main thread from very early init
  • per-thread stacks, used by normal threads

This adds missing code to measure the first, and a new measurement for the second. Shows up #1875 when using an old bootloader.

Use it in SystemMod for IRQStackRemaining
And add a new field to SystemStats for it
@@ -191,6 +191,16 @@ int32_t PIOS_SYS_SerialNumberGet(char *str)
return 0;
}

size_t PIOS_SYS_IrqStackUnused(void)
Copy link
Member Author

@tracernz tracernz Jul 13, 2017

Choose a reason for hiding this comment

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

Doesn't have any code to fill the stack with a pattern... and looking at startup.c it uses different symbols for irq/msp stack for some reason.

@mlyle
Copy link
Member

mlyle commented Jul 13, 2017

jenkins, test this please

@mlyle mlyle merged commit 0151ab0 into d-ronin:next Jul 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants