Skip to content

Migrate NUCLEO_F303K8 to Mbed OS 5 baremetal #12663

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

hugueskamba
Copy link
Collaborator

@hugueskamba hugueskamba commented Mar 20, 2020

Summary of changes

  • Use two memory regions in ARM toolchain linker file to support Microlib
  • Replace target.default_lib with target.c_lib
  • Specify supported lib sizes per toolchain
  • Add support for Mbed OS 5

This was tested with all supported toolchains (GCC_ARM, ARM, and IAR).
This PR is needed to build with the IAR toolchain.

The test included building and running mbed-os-example-blinky-baremetal as well as running the bare metal Greentea test suite (mbed test -t arm -m NUCLEO_F303K8 --app-config TESTS/configs/baremetal.json). All tests were successful.

Impact of changes

The NUCLEO_F303K8 target can now be built with Mbed OS 5 bare metal profile.

Migration actions required

N/A

Documentation

N/A


Pull request type

[X] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[X] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers

@evedon @jeromecoutant @rajkan01


Copy link
Collaborator

@jeromecoutant jeromecoutant left a comment

Choose a reason for hiding this comment

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

I can't currently test as I didn't plan to work on that target now that we are working at home...

@hugueskamba hugueskamba force-pushed the hk-NUCLEO_F303K8-fix-microlib-support-optimize-ram branch from edafefb to 0753eba Compare March 20, 2020 13:16
@ciarmcom ciarmcom requested review from evedon, jeromecoutant, rajkan01 and a team March 20, 2020 14:00
@ciarmcom
Copy link
Member

@hugueskamba, thank you for your changes.
@rajkan01 @evedon @jeromecoutant @ARMmbed/mbed-os-maintainers please review.

@evedon
Copy link
Contributor

evedon commented Mar 20, 2020

Great to see one more target ported to bare metal!
Could you update the "Impact of changes" section and put N/A for the other sections.
Also please add a comment to say on which toolchains you tested.

Copy link
Contributor

@evedon evedon left a comment

Choose a reason for hiding this comment

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

Code change looks good.

@jeromecoutant
Copy link
Collaborator

@hugueskamba
Could you provide test results ?

@0xc0170
As this PR affects all STM32, can you start CI to check ?

@hugueskamba
Copy link
Collaborator Author

@hugueskamba
Could you provide test results ?

Done.

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 23, 2020

CI started meanwhile

evedon
evedon previously approved these changes Mar 23, 2020
@0xc0170
Copy link
Contributor

0xc0170 commented Mar 23, 2020

Looking at the test failures, #12665 is needed here , I'll set the preceding PR needed

@hugueskamba
Copy link
Collaborator Author

hugueskamba commented Mar 25, 2020

Looking at the test failures, #12665 is needed here , I'll set the preceding PR needed

This one instead #12691

@hugueskamba
Copy link
Collaborator Author

Looking at the test failures, #12665 is needed here , I'll set the preceding PR needed

This one instead #12691

The required changes to fix IAR support have now been merged to master.
@0xc0170 can you please run the CI tests or do I have to rebase my branch?

@hugueskamba hugueskamba force-pushed the hk-NUCLEO_F303K8-fix-microlib-support-optimize-ram branch from 0753eba to e443aa7 Compare April 20, 2020 18:49
@mergify mergify bot dismissed evedon’s stale review April 20, 2020 18:49

Pull request has been modified.

@hugueskamba
Copy link
Collaborator Author

This force-push updates the targets.json file as per the Mbed 2 target porting guidelines.

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 20, 2020

CI started

@mbed-ci
Copy link

mbed-ci commented Apr 21, 2020

Test run: FAILED

Summary: 1 of 6 test jobs failed
Build number : 2
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_greentea-test

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 21, 2020

test restarted

"release_versions": [
"2"
],
"supported_application_modes":["bare-metal"],
Copy link
Contributor

Choose a reason for hiding this comment

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

Migration guide was updated to use supported_application_profiles.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

* Use two memory regions in ARM toolchain linker file to support Microlib
* Replace `target.default_lib` with `target.c_lib`
* Specify supported lib sizes per toolchain
* Add support for Mbed OS versions after Mbed 2
@hugueskamba hugueskamba force-pushed the hk-NUCLEO_F303K8-fix-microlib-support-optimize-ram branch from e443aa7 to 4e61240 Compare April 21, 2020 11:11
@0xc0170
Copy link
Contributor

0xc0170 commented Apr 21, 2020

CI restarted

@mbed-ci
Copy link

mbed-ci commented Apr 21, 2020

Test run: SUCCESS

Summary: 6 of 6 test jobs passed
Build number : 3
Build artifacts

@0xc0170 0xc0170 merged commit e33e936 into ARMmbed:master Apr 22, 2020
@mergify mergify bot removed the ready for merge label Apr 22, 2020
@hugueskamba hugueskamba deleted the hk-NUCLEO_F303K8-fix-microlib-support-optimize-ram branch April 22, 2020 09:07
@@ -3630,12 +3635,14 @@
}
},
"overrides": {
"lse_available": 0
"lse_available": 0,
"boot-stack-size": "0x400",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why?
As explained in
https://os.mbed.com/docs/mbed-os/v5.15/porting/porting-bootstrap.html
/* This value is normally defined by the tools to 0x1000 for bare metal and 0x400 for RTOS */

So why don't we keep default 0x1000 value ?
Thx

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.

7 participants