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

[DOC]CONFUSION - configCHECK_FOR_STACK_OVERFLOW verses portHAS_STACK_OVERFLOW_CHECKING #1159

Open
duaneellissd opened this issue Oct 16, 2024 · 4 comments
Labels
documentation Improvements or additions to documentation

Comments

@duaneellissd
Copy link

When I read these - i see: config CHECK STACK OVERFLOW - and port STACK OVER FLOW CHECK

These are very similar and seem to be very unrelated - as if both are intended to be and do the exact same thing.

@duaneellissd duaneellissd added the documentation Improvements or additions to documentation label Oct 16, 2024
@kar-rahul-aws
Copy link
Member

Hi @duaneellissd
configCHECK_FOR_STACK_OVERFLOW enables software stack overflow checking and it is implemented for all ports. The application writer can set it to 1 or 2 in their FreeRTOSConfig.h to enable software stack-overflow checking.

portHAS_STACK_OVERFLOW_CHECKING enables hardware stack-overflow checking and is only implemented for ports where the hardware supports it (for example, ARMv8-M supports hardware stack-overflow checking using stack limit registers). This macro is set by the port itself and the application is not supposed to set it in FreeRTOSConfig.h.

@ActoryOu
Copy link
Member

Hi @duaneellissd,
I hope @kar-rahul-aws's explanation has been helpful in addressing your concerns.

We want to ensure that all your questions have been answered satisfactorily. Is there any aspect of the explanation that you'd like us to clarify further, or do you have any additional questions?

Thank you.

@duaneellissd
Copy link
Author

perhaps the name portHAS_STACK_OVERFLOW would be better named portHAS_HW_STACK_OVERFLOW

@ActoryOu
Copy link
Member

ActoryOu commented Nov 2, 2024

The "port" prefix is indeed used to indicate hardware-related elements. All definitions directly associated with hardware components carry this prefix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants