-
Notifications
You must be signed in to change notification settings - Fork 3k
STM32 baremetal support step1 (F0/F1/F3/H7/L0) #12992
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
STM32 baremetal support step1 (F0/F1/F3/H7/L0) #12992
Conversation
@jeromecoutant, thank you for your changes. |
@@ -1358,6 +1358,9 @@ | |||
"macro_name": "CLOCK_SOURCE" | |||
} | |||
}, | |||
"overrides": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this necessary given this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes as #12988 is not merged
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should it be as dependency and this updated once it is merged?
* | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this header be included in the appropriate linker files?
#endif | ||
|
||
StackSize = MBED_BOOT_STACK_SIZE; | ||
/* Round up VECTORS_SIZE to 8 bytes */ | ||
#define NVIC_NUM_VECTORS 48 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is already defined in cmsis_nvic.h
.
#endif | ||
|
||
#define Stack_Size MBED_BOOT_STACK_SIZE | ||
/* Round up VECTORS_SIZE to 8 bytes */ | ||
#define NVIC_NUM_VECTORS 48 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is already defined in cmsis_nvic.h
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but cmsis_nvic.h for M0 core is not so simple as other cores.
So redefining value here is a good workaround.
I ill make it better later
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont understand, we can't get the value from the header file to be in here ? Or at least to check if its not already defined ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we can, but no with a "quick" patch.
So I used the method described in https://os.mbed.com/docs/mbed-os/v5.15/porting/porting-bootstrap.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is it also in cmsis_nvic.h
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because mbed needs it...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True. Linker script should do #include "../cmsis_nvic.h"
and not define it again. This is a bug in our docs.
@hugueskamba can you create an issue if you agree? the docs should be updated. The default place in our targets is cmsis_nvic.h file, and linker script should include it (or we need to change this and refactor most of our targets).
Hi @0xc0170 and @MarceloSalazar |
@jeromecoutant I am reviewing now. Just add it here, we allow only fixes for rc2 until we release. |
"baremetal support" is not considered as fix ? |
To clarifyr, only fixes that are found during OOB we are currently doing, exceptions could be made. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With a note about possible doc update
CI started |
Test run: SUCCESSSummary: 6 of 6 test jobs passed |
good :-) |
This PR does not contain release version label after merging. |
Summary of changes
Major patches are linker script updates to support baremetal.
@MarceloSalazar @evedon @0xc0170
@ARMmbed/team-st-mcd
Impact of changes
Baremetal tests are OK:
mbed test xxx --test-config tests/configs/baremetal.json
Migration actions required
Documentation
Pull request type
Test results
Reviewers