Skip to content

porting: Rename MBED_BOOT_STACK_SIZE to MBED_CONF_TARGET_BOOT_STACK_SIZE #1362

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

Conversation

rwalton-arm
Copy link
Contributor

MBED_BOOT_STACK_SIZE is a duplicated definition of
MBED_CONF_TARGET_BOOT_STACK_SIZE, which we are removing as it is
causing issues in mbed-os.

This commit updates the porting guide to only mention
MBED_CONF_TARGET_BOOT_STACK_SIZE when referring to the define for the
boot stack size.

MBED_BOOT_STACK_SIZE is a duplicated definition of
MBED_CONF_TARGET_BOOT_STACK_SIZE, which we are removing as it is
causing issues in mbed-os.

This commit updates the porting guide to only mention
MBED_CONF_TARGET_BOOT_STACK_SIZE when referring to the define for the
boot stack size.
Copy link
Contributor

@Patater Patater left a comment

Choose a reason for hiding this comment

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

LGTM

@iriark01
Copy link
Contributor

Which versions of Mbed OS does this apply to?

@rwalton-arm
Copy link
Contributor Author

Which versions of Mbed OS does this apply to?

We haven't merged the PR to change this yet, so it won't be until at least 6.2.2.

@@ -54,9 +54,9 @@ If you are using the below linker script, then you need to update all the define
#define MBED_APP_SIZE MBED_ROM_SIZE
#endif

#if !defined(MBED_BOOT_STACK_SIZE)
#if !defined(MBED_CONF_TARGET_BOOT_STACK_SIZE)

Choose a reason for hiding this comment

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

Is this really useful?
In Mbed environment, this macro has to be defined... or we have some other issue ?
Which use case do you protect ?
Thx

Copy link
Contributor

Choose a reason for hiding this comment

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

The intended (and likely desired) behavior here is to prefer MBED_CONF_TARGET_BOOT_STACK_SIZE if present, and to fall back to MBED_BOOT_STACK_SIZE if not. If MBED_BOOT_STACK_SIZE is not defined, then we fall back to a hard-coded value.

Choose a reason for hiding this comment

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

Yes, I can see this :-)
But which uses case do you see to add this fall back system ?

@@ -28,7 +28,7 @@ If you are updating your own linker script, you must:
- Arm - The boot stack is the `ARM_LIB_STACK` region.
- GCC_ARM - The boot stack starts at the symbol `__StackLimit` and ends at the symbol `__StackTop`.
- Add defines for a relocatable application - `MBED_APP_START` and `MBED_APP_SIZE`.
- Add the define for boot stack size - `MBED_BOOT_STACK_SIZE`.
- Add the define for boot stack size - `MBED_CONF_TARGET_BOOT_STACK_SIZE`.

Choose a reason for hiding this comment

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

Maybe, indicate that define has to be define in rtos json lib config ?

Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure this is required to specified in the Mbed config. The linkerscript can specify a fallback value. I may be wrong about this being optional, though.

@iriark01
Copy link
Contributor

@Patater the code PR was merged. Please can you work through the discussions here so we can merge this?

@Patater
Copy link
Contributor

Patater commented Oct 30, 2020

Nothing left to discuss on docs. The doc matches what landed on Mbed OS. This PR should be merged.

@iriark01 iriark01 merged commit d7ac051 into ARMmbed:development Oct 30, 2020
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.

4 participants