This website works better with JavaScript.
Home
Explore
Help
Register
Sign In
github
/
tinygo
mirror of
https://github.com/tinygo-org/tinygo.git
Watch
1
Star
0
Fork
0
Code
Issues
Projects
Releases
Wiki
Activity
wasm
stm32
webassembly
microcontroller
arm
avr
spi
wasi
adafruit
arduino
circuitplayground-express
gpio
i2c
llvm
microbit
nrf51
nrf52
nrf52840
samd21
tinygo
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2326
Commits
99
Branches
41
Tags
26 MiB
Tree:
af4d0fe191
add-nrfjprog-settings
alpine-static-3
ardnew-usb-common
atsame5x-adc
avr-compiler-rt
avr-gc-precise
aykevl-llvmfix-perf
bdwgc
bitcode-path
block-reading-of-uart-and-usb
boardsimu
build-llvm-image
build-ssa-in-jobs
builder-parallel
builder-real-thinlto
builder-rwmutex
cgo-noescape
cgo-stdint-alias
ch32v003
ci-macos-arm64
cortexm-optimize-HardFault
debug-flag
dependabot/go_modules/golang.org/x/net-0.23.0
dev
device
device-files
dkegel-gc-leaking-noinline
esp32-i2c
espnet
fault-handler
feature/hifive-spi-improvement
file-embed
fix-docker-llvm-build
fix-flash-eraseblock
fix-heap2stack-alignment
fix-samd21-sdi
flash-bounds-api
gc-precise
gen-device-svd
get-default-port
goasm3
i2c-freq-constants
i2c-mimxrt1062
i386-baremetal
improve-msd-flash
interface-type-assert-table
interp-max-depth
interrupts-gba
llvm19
machine-explicit-pins
machine-pinmodes
machinecheck
make-smoketest-faster-make-j
makefile-fix-node-check
mips
nix-buildid
parallel-test
pkgpath-dont-redefine
pr3119
print-all-errors
pybd-sf2
race-debug
race-impossible-stacktrace
readme-update-windows
reflect-AssignableTo
reflect-chan-runtime-mstats
reflect-map-keyflag
release
renesas-repo
revert-1574-floatsat
rp2040-spi-fix-baud
rp2350-add
scheduler-main
serial-none-noop-read
shadowstack
simplify-clang-detect
slog
smoketest-with-go-script
smoketest-with-go-script-org
smoketest-with-go-script-org2
spi-dma
spi-txn-atsamd51
test-new-packages
test-other-architectures
testing-bench-cleanup
tmp-teensy40
tools-svd-parallel
unix-signal
usb-common-samd51-iad
usb-refactor-01-rp2040
vscode
wasip1-no-json
wasm-extension
wasm-js-syscall
wasm-legacy
wasm-malloc-track
wasm-multi-value
wasm-no-malloc
wasm-recover
v0.1
v0.10.0
v0.11.0
v0.12.0
v0.13.0
v0.13.1
v0.14.0
v0.14.1
v0.15.0
v0.16.0
v0.17.0
v0.18.0
v0.19.0
v0.2.0
v0.20.0
v0.21.0
v0.22.0
v0.23.0
v0.24.0
v0.25.0
v0.25.0-beta1
v0.26.0
v0.27.0
v0.28.0
v0.28.1
v0.29.0
v0.3.0
v0.30.0
v0.31.0
v0.31.1
v0.31.2
v0.32.0
v0.33.0
v0.4.0
v0.4.1
v0.5.0
v0.6.0
v0.7.0
v0.7.1
v0.8.0
v0.9.0
Branches
Tags
${ item.name }
Create tag
${ searchTerm }
Create branch
${ searchTerm }
from 'af4d0fe191'
${ noResults }
tinygo
/
targets
/
cortex-m3.json
6 lines
100 B
Raw
Normal View
History
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.
4 years ago
{
"inherits"
:
[
"cortex-m"
]
,
targets: match LLVM triple to the one Clang uses The target triples have to match mostly to be able to link LLVM modules. Linking LLVM modules is already possible (the triples already match), but testing becomes much easier when they match exactly. For macOS, I picked "macosx10.12.0". That's an old and unsupported version, but I had to pick _something_. Clang by default uses "macos10.4.0", which is much older.
3 years ago
"llvm-target"
:
"thumbv7m-unknown-unknown-eabi"
,
targets: add CPU property everywhere This is for consistency with Clang, which always adds a CPU flag even if it's not specified in CFLAGS. This commit also adds some tests to make sure the Clang target-cpu matches the CPU property in the JSON files. This does have an effect on the generated binaries. The effect is very small though: on average just 0.2% increase in binary size, apparently because Cortex-M3 and Cortex-M4 are compiled a bit differently. However, when rebased on top of https://github.com/tinygo-org/tinygo/pull/2218 (minsize), the difference drops to -0.1% (a slight decrease on average).
3 years ago
"cpu"
:
"cortex-m3"
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.
4 years ago
}