-
Notifications
You must be signed in to change notification settings - Fork 3k
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
add NUCLEO_G031K8 target #13384
add NUCLEO_G031K8 target #13384
Conversation
@pilotak, thank you for your changes. |
The linker error indicates to me that the program you're trying to build does not fit in the small memory size of the NUCLEO_G031K8. I recall having to build with the baremetal profile to get a small enough output binary that would fit on this target. There are some other targets with similar memory constraints, can't remember which ones at the moment but if you look through the targets folder you should be able to find one. Maybe try looking at some of the STM32F0 or other Cortex-M0(+) targets for examples? I would suggest building this example: https://github.com/ARMmbed/mbed-os-example-blinky-baremetal |
yes using a baremetal fixes the problem |
Could you check greentea tests? |
@jeromecoutant I know this is a silly question but how am i going to run greentea tests? I did discuss it with @AGlass0fMilk and he doesn't know either |
mbed test -m NUCLEO_G031K8 -t ARM -v --test-config tests/configs/baremetal.json ? |
here is the result - hard for me judge if it passed or failed |
@pilotak Are you running these tests from an app (there are linker errors about main defined 2x) ? All tests failed to build in the log |
@jeromecoutant I can't get my Nucleo G031K8 ST Link to cooperate with testing. It times out constantly and was very difficult to even get to connect to the target. 🤷♂️ |
Same on my side... :-( |
I deleted the app and here is the result |
Note that as long as ARMmbed/mbed-os-tools#235 |
is it possible to test without real nucleo board? i have custom a PCB with serial and SWD breakout |
@0xc0170 in #13006 there are still a few things to be fix, this PR has everything up to date. Also @AGlass0fMilk has a rights to push into this PR it makes no sense to have two PRs opened |
@AGlass0fMilk Please close the other one and let's collaborate here |
@AGlass0fMilk You can solve the issue by using ST programmer tool: https://www.st.com/en/development-tools/stm32cubeprog.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.
Good job!
Please check my review commit: jeromecoutant@cd6373b
Thx
@@ -3074,7 +3074,7 @@ __STATIC_INLINE void LL_RTC_BKP_SetRegister(TAMP_TypeDef *TAMPx, uint32_t Backup | |||
*/ | |||
__STATIC_INLINE uint32_t LL_RTC_BKP_GetRegister(TAMP_TypeDef *TAMPx, uint32_t BackupRegister) | |||
{ | |||
const register __IO uint32_t *tmp; | |||
register __IO uint32_t *tmp; |
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.
To remove
To be honest I’m a bit irked that my original commits for this target are omitted from this PR. It’s not good git practice to rewrite history like that. Also it was quite a bit of work getting it that far... I’ll close my original PR. |
Fair point. Did not spot the changed history here. |
The main reason behind this PR is that the original one was opened in May and for two months nobody made requested changes, maybe due to lack of time, covid, etc. it can happen i'm fine with that. I have no intention to take the author credits whatsoever |
Also this PR is closed now 😞
@pilotak I thought we agreed on proceeding here. Both of you took an effort to push this to this stage, let's keep the boat moving please. Shall we reopen it ? I can fix the commits in this PR (if I have write access). |
@0xc0170 i know we did agree but that was before @AGlass0fMilk got irked. I would suggest let him decide, it's his work |
@pilotak I appreciate you continuing my work and am glad you may have found it useful in Mbed-enabling your new custom target. There's no hard feelings. If you're not familiar with this process, the best way to go about finishing/extending someone else's branch on GitHub would be to do the following steps:
Now you can make any changes you need to make and push the branch up to your fork. You can either open a new PR (if there wasn't one originally) or submit a PR to my fork on the feature branch. It's the same as contributing to mbed-os itself. In this case both of our original commits are retained in history, which is important both for proper credit and when looking at Would you want to check out my branch as above, apply the changes you made here, and then submit a PR to my mbed-os fork? I can then open #13006 and we can go from there. |
I will add that in some cases trying to submit a PR to someone's fork can be fruitless if the user doesn't seem to be very active. I work with Mbed on a daily basis both professionally and as a hobbyist so I am usually pretty responsive. Some of my PRs aren't work-related however (adding Nucleo G031K8 being one of them) and I don't always get the time to update them... |
Summary of changes
Added support for NUCLEO_G031K8 target
Impact of changes
Migration actions required
Documentation
Based on #13006
Pull request type
Test results
At the moment there is a problem with link scripts, but i have no clue how to fix this
Reviewers
@0xc0170, @jeromecoutant