aboutsummaryrefslogtreecommitdiffhomepage
path: root/targets/cortex-m7.json
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2021-04-14 03:10:25 +0200
committerRon Evans <[email protected]>2021-04-14 09:17:54 +0200
commitd919905c96dba355fd03355f322760b076268efc (patch)
treefdb49384df26c890f17f50bcc2b54c4565308cc3 /targets/cortex-m7.json
parent96b1b76483a99647cc12b1c0f1d15c95f1d54025 (diff)
downloadtinygo-d919905c96dba355fd03355f322760b076268efc.tar.gz
tinygo-d919905c96dba355fd03355f322760b076268efc.zip
all: clean up Cortex-M target files
In this commit I've moved all core-specific flags to files for that specific core. This is a bit of a cleanup (less duplicated JSON) but should also help in the future when core-specific changes are made, such as core specific build tags or when the FPU finally gets supported in TinyGo. Some notable specific changes: - I've removed floating point flags from the Teensy 3.6 target. The reason is that the FPU is not yet supported in TinyGo (in goroutine stack switching for example) and floating point numbers would only be supported by C files, not Go files (because the LLVM FPU feature flags aren't used). This would create an ABI mismatch across CGo. - I've added the "cpu":"cortex-m7" to the cortex-m7.json file to match the configuration for the Teensy 4.0. This implies a change to the nucleo-f722ze (because now it has its CPU field set). Somehow that reduces the code size, so it looks like a good change. I don't believe any of these changes should have any practical consequences. One issue I've found is in the Cortex-M33 target: it uses armv7m, which is incorrect: it should be armv8m. But the chip is backwards compatible so this should mostly work. Switching to armv8m led to a compilation failure because PRIMASK isn't defined, this may be an actual bug.
Diffstat (limited to 'targets/cortex-m7.json')
-rw-r--r--targets/cortex-m7.json5
1 files changed, 4 insertions, 1 deletions
diff --git a/targets/cortex-m7.json b/targets/cortex-m7.json
index dcaa42577..f63490eb2 100644
--- a/targets/cortex-m7.json
+++ b/targets/cortex-m7.json
@@ -1,7 +1,10 @@
{
"inherits": ["cortex-m"],
"llvm-target": "armv7em-none-eabi",
+ "cpu": "cortex-m7",
"cflags": [
- "--target=armv7em-none-eabi"
+ "--target=armv7em-none-eabi",
+ "-mcpu=cortex-m7",
+ "-mfloat-abi=soft"
]
}