tinygo/targets/cortex-m.json
Ayke van Laethem abb09e869e runtime, internal/task: refactor to simplify stack switching
The Cortex-M target isn't much changed, but much of the logic for the
AVR stack switcher that was previously in assembly has now been moved to
Go to make it more maintainable and in fact smaller in code size. Three
functions (tinygo_getCurrentStackPointer, tinygo_switchToTask,
tinygo_switchToScheduler) have been changed to one: tinygo_swapTask.

This reduction in assembly code should make the code more maintainable
and should make it easier to port stack switching to other
architectures.

I've also moved the assembly files to src/internal/task, which seems
like a more appropriate location to me.
2020-12-05 09:02:11 +01:00

32 строки
675 Б
JSON

{
"build-tags": ["cortexm", "baremetal", "linux", "arm"],
"goos": "linux",
"goarch": "arm",
"compiler": "clang",
"gc": "conservative",
"scheduler": "tasks",
"linker": "ld.lld",
"rtlib": "compiler-rt",
"libc": "picolibc",
"automatic-stack-size": true,
"default-stack-size": 1024,
"cflags": [
"-Oz",
"-mthumb",
"-Werror",
"-fshort-enums",
"-fomit-frame-pointer",
"-fno-exceptions", "-fno-unwind-tables",
"-ffunction-sections", "-fdata-sections"
],
"ldflags": [
"--emit-relocs",
"--gc-sections"
],
"extra-files": [
"src/device/arm/cortexm.s",
"src/internal/task/task_stack_cortexm.S",
"src/runtime/gc_arm.S"
],
"gdb": "gdb-multiarch"
}