-
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
Fix bare metal support on Cypress targets #13425
Conversation
@LDong-Arm, thank you for your changes. |
Hello, SDIO_HOST.c and cyhal_system.c are not Mbed-specific: https://github.com/cypresssemiconductorco/udb-sdio-whd/blob/release-v1.0.1/SDIO_HOST.c It is not good to use MBED_CONF_RTOS_PRESENT in these sources. |
Do you know any header files (e.g. config files) in TARGET_Cypress that belong to Mbed but get included by those? If one exists, we can move the check there. Another approach is to define the macro in https://github.com/ARMmbed/mbed-os/blob/master/rtos/source/TARGET_CORTEX/mbed_lib.json using Any thoughts? |
I analyzed the include hierarchies and concluded there is no Mbed-specific header included by psoc6hal or udb-sdio-whd - this is on purpose. In TARGET_PSOC6 directory, we have standard base headers like cmsis.h and device.h, but those are included only by Mbed-specific HAL layer, hence not useful in this situation. Is it possible to override this in mbed_lib.json for base TARGET_PSOC6, instead of listing all PSoC 6 boards? |
Thanks for confirming this.
Yes. |
d9a1bde
to
c748486
Compare
c748486
to
017b043
Compare
@@ -81,6 +81,9 @@ | |||
}, | |||
"NUVOTON": { | |||
"idle-thread-stack-size-debug-extra": 512 | |||
}, | |||
"MCU_PSOC6_M4": { | |||
"target.macros_add": ["CY_RTOS_AWARE"] |
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.
@vmedcy This is the idea. Though it looks slightly less than ideal, since the macro itself is not generic Mbed. But I can't think of another way of doing this?
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.
@LDong-Arm - agree, this is the good way to achieve the desired level of configurability. I don't know if generic FW code provided by another vendors has similar macro switch to enable/disable RTOS awareness without depending on any specific RTOS.
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 don't know if generic FW code provided by another vendors has similar macro switch to enable/disable RTOS awareness without depending on any specific RTOS.
Not I'm aware of. But I guess some vendors may modify a few files when importing to Mbed OS, which probably means less struggle with the build configs but more work when updating to a newer version of the upstream code. I'm not exactly familiar with it.
CI started |
Jenkins CI Test : ✔️ SUCCESSBuild Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
It's waiting for @ARMmbed/team-cypress approval |
If it gets approved, shall we also add baremetal tests for a few Cypress targets in CI? http://mbed-os-ci.s3-website-eu-west-1.amazonaws.com/?prefix=jenkins-ci/ARMmbed/mbed-os/mbed-os-ci/PR-13425/artifacts/13425/1/build-GCC_ARM/PASS/ |
Summary of changes
Fixes: #13108
Cypress support (
targets/TARGET_Cypress/TARGET_PSOC6
) uses the macroCY_RTOS_AWARE
to determine RTOS availability. Setting it globally intargets.json
doesn't taken into account the bare metal use case and leads to build failures.This PR makes the macro dependent on
MBED_CONF_RTOS_PRESENT
. Now mbed-os-example-blinky-baremetal compiles on Cypress targets.Impact of changes
The bare metal profile now works on Cypress targets.
Migration actions required
None.
Documentation
None.
Pull request type
Test results
If bare metal tests are disabled for Cypress targets in CI, please re-enable them.
Reviewers
@MarceloSalazar @ARMmbed/mbed-os-core