Skip to content
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

pkg/wamr: Added support for THUMB_VFP in wamr Makefile #20628

Merged
merged 1 commit into from
Apr 30, 2024
Merged

pkg/wamr: Added support for THUMB_VFP in wamr Makefile #20628

merged 1 commit into from
Apr 30, 2024

Conversation

bmewen
Copy link
Contributor

@bmewen bmewen commented Apr 26, 2024

Contribution description

Edited wamr Makefile to support THUMB_VFP

Testing procedure

Build and test with arduino-nano-33-ble (nrf52840 cpu) for THUMB_VFP mode and built with nrf51dk for THUMB mode.

Issues/PRs references

@github-actions github-actions bot added the Area: pkg Area: External package ports label Apr 26, 2024
@benpicco benpicco requested a review from kfessel April 26, 2024 13:51
@benpicco benpicco added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Apr 29, 2024
Copy link
Contributor

@benpicco benpicco left a comment

Choose a reason for hiding this comment

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

Change looks good, you want to follow the commit title convention though, so plaese change the commit message to something like

pkg/wamr: add support for THUMB_VFP

You can do so with git rebase -i HEAD~2 - then you can also squash your commits.

pkg/wamr/Makefile Outdated Show resolved Hide resolved
pkg/wamr/Makefile Outdated Show resolved Hide resolved
@riot-ci
Copy link

riot-ci commented Apr 29, 2024

Murdock results

✔️ PASSED

150058e pkg/wamr: Added support of THUMB_VFP

Success Failures Total Runtime
10065 0 10066 14m:41s

Artifacts

Copy link
Contributor

@benpicco benpicco left a comment

Choose a reason for hiding this comment

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

Thank you for the patch!

@bmewen bmewen changed the title Added support for THUMB_VFP in wamr Makefile pkg/wamr: Added support for THUMB_VFP in wamr Makefile Apr 30, 2024
@benpicco benpicco added this pull request to the merge queue Apr 30, 2024
@@ -44,7 +44,11 @@ ifeq ($(findstring aarch,$(OS_ARCH)),aarch)
WAMR_BUILD_TARGET = ARM
endif
else ifeq ($(findstring arm,$(CPU_ARCH)),arm)
WAMR_BUILD_TARGET = THUMB
ifeq ($(findstring cortexm_fpu,$(FEATURES_PROVIDED)),cortexm_fpu)
Copy link
Member

Choose a reason for hiding this comment

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

Nit picking: Would it be possible to disable hardware FPU support if that is provided, and is this something that we need to be prepared for?

I think just using FEATURES_USED instead of FEATURES_PROVIDED would work. But there is a CI test that will fail if anyone uses the FEAUTRES_USED variable, which would prevent this from getting merged. I wonder if that CI check has outlived its usefulness anyway.

In either case, I think merging this is an improvement and this concern should not block this. But maybe we could add a follow up, if there is any merit to my concern.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Regarding the FEATURES_USED vs FEATURES_PROVIDED, since from my understanding VFP is an extension and therefore provides the same capabilities as the normal architecture I think that as long it doesn't create performance issues it should be used if the feature is provided.

Copy link
Member

Choose a reason for hiding this comment

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

Note that the ABI between hardfp and softfp is not compatible. You can safely run softfp code on a hardfpu MCU (if floats are actually used softfp will be both slower and larger, though). But you cannot link objects compiled for a softfp ABI together with objects compiled for a hardfp ABI.

Merged via the queue into RIOT-OS:master with commit f6e63d2 Apr 30, 2024
28 checks passed
@mguetschow mguetschow added this to the Release 2024.07 milestone Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: pkg Area: External package ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants