Skip to content

Makefile: Build uVisor for M3, even on M4s #421

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

Merged
merged 1 commit into from
Apr 7, 2017

Conversation

Patater
Copy link
Contributor

@Patater Patater commented Apr 7, 2017

Currently, uVisor builds with -mcpu=cortex-m4, even on Cortex M3 CPUs.
This can lead to using unavailable instructions. Build uVisor using the
least common denominator architecture. This avoids using unavailable
instructions when targeting Cortex M3 CPUs.

@AlessandroA @niklas-arm

Makefile Outdated
@@ -140,7 +140,7 @@ ifeq ("$(PROGRAM_VERSION)","")
PROGRAM_VERSION:='unknown'
endif

FLAGS_CM4:=-mcpu=cortex-m4 -march=armv7e-m -mthumb
FLAGS_CM4:=-mcpu=cortex-m3 -march=armv7-m -mthumb
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you rename FLAGS_CM4 to FLAGS_CORE? Other than that, LGTM.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed

Currently, uVisor builds with `-mcpu=cortex-m4`, even on Cortex M3 CPUs.
This can lead to using unavailable instructions. Build uVisor using the
least common denominator architecture. This avoids using unavailable
instructions when targeting Cortex M3 CPUs.
Copy link
Contributor

@AlessandroA AlessandroA left a comment

Choose a reason for hiding this comment

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

Thanks! Merging with green CI.

@AlessandroA AlessandroA merged commit 2481a90 into ARMmbed:master Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants