fix targets extra files
This commit is contained in:
@@ -16,9 +16,5 @@
|
||||
"-T", "targets/avr.ld",
|
||||
"--gc-sections"
|
||||
],
|
||||
"extra-files": [
|
||||
"src/internal/task/task_stack_avr.S",
|
||||
"src/runtime/asm_avr.S"
|
||||
],
|
||||
"gdb": ["avr-gdb"]
|
||||
}
|
||||
|
||||
@@ -17,8 +17,6 @@
|
||||
"--gc-sections"
|
||||
],
|
||||
"extra-files": [
|
||||
"src/internal/task/task_stack_avr.S",
|
||||
"src/runtime/asm_avr.S",
|
||||
"targets/avrtiny.S"
|
||||
],
|
||||
"gdb": ["avr-gdb"]
|
||||
|
||||
@@ -22,9 +22,7 @@
|
||||
"--gc-sections"
|
||||
],
|
||||
"extra-files": [
|
||||
"targets/device/arm/cortexm.S",
|
||||
"src/internal/task/task_stack_cortexm.S",
|
||||
"src/runtime/asm_arm.S"
|
||||
"targets/device/arm/cortexm.S"
|
||||
],
|
||||
"gdb": ["gdb-multiarch", "arm-none-eabi-gdb", "gdb"]
|
||||
}
|
||||
|
||||
@@ -11,8 +11,7 @@
|
||||
"libc": "picolibc",
|
||||
"linkerscript": "targets/esp32.ld",
|
||||
"extra-files": [
|
||||
"targets/device/esp/esp32.S",
|
||||
"src/internal/task/task_stack_esp32.S"
|
||||
"targets/device/esp/esp32.S"
|
||||
],
|
||||
"binary-format": "esp32",
|
||||
"flash-command": "esptool.py --chip=esp32 --port {port} write_flash 0x1000 {bin} -ff 80m -fm dout",
|
||||
|
||||
@@ -10,8 +10,7 @@
|
||||
"libc": "picolibc",
|
||||
"linkerscript": "targets/esp8266.ld",
|
||||
"extra-files": [
|
||||
"targets/device/esp/esp8266.S",
|
||||
"src/internal/task/task_stack_esp8266.S"
|
||||
"targets/device/esp/esp8266.S"
|
||||
],
|
||||
"binary-format": "esp8266",
|
||||
"flash-command": "esptool.py --chip=esp8266 --port {port} write_flash 0x00000 {bin} -fm qio"
|
||||
|
||||
@@ -20,8 +20,7 @@
|
||||
],
|
||||
"linkerscript": "targets/gameboy-advance.ld",
|
||||
"extra-files": [
|
||||
"targets/gameboy-advance.s",
|
||||
"src/runtime/asm_arm.S"
|
||||
"targets/gameboy-advance.s"
|
||||
],
|
||||
"gdb": ["gdb-multiarch"],
|
||||
"emulator": "mgba -3 {}"
|
||||
|
||||
@@ -28,8 +28,6 @@
|
||||
"linkerscript": "targets/nintendoswitch.ld",
|
||||
"extra-files": [
|
||||
"targets/nintendoswitch.s",
|
||||
"src/internal/task/task_stack_arm64.S",
|
||||
"src/runtime/asm_arm64.S",
|
||||
"src/runtime/runtime_nintendoswitch.S"
|
||||
"targets/runtime_nintendoswitch.S"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
],
|
||||
"linkerscript": "targets/nrf51.ld",
|
||||
"extra-files": [
|
||||
"lib/nrfx/mdk/system_nrf51.c",
|
||||
"targets/device/nrf/nrf51.s"
|
||||
],
|
||||
"openocd-transport": "swd",
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
],
|
||||
"linkerscript": "targets/nrf52.ld",
|
||||
"extra-files": [
|
||||
"lib/nrfx/mdk/system_nrf52.c",
|
||||
"targets/device/nrf/nrf52.s"
|
||||
],
|
||||
"openocd-transport": "swd",
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
],
|
||||
"linkerscript": "targets/nrf52833.ld",
|
||||
"extra-files": [
|
||||
"lib/nrfx/mdk/system_nrf52833.c",
|
||||
"targets/device/nrf/nrf52833.s"
|
||||
],
|
||||
"openocd-transport": "swd",
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
],
|
||||
"linkerscript": "targets/nrf52840.ld",
|
||||
"extra-files": [
|
||||
"lib/nrfx/mdk/system_nrf52840.c",
|
||||
"targets/device/nrf/nrf52840.s"
|
||||
],
|
||||
"openocd-transport": "swd",
|
||||
|
||||
@@ -17,8 +17,6 @@
|
||||
],
|
||||
"extra-files": [
|
||||
"targets/device/riscv/start.S",
|
||||
"src/internal/task/task_stack_tinygoriscv.S",
|
||||
"src/runtime/asm_riscv.S",
|
||||
"targets/device/riscv/handleinterrupt.S"
|
||||
],
|
||||
"gdb": ["riscv64-unknown-elf-gdb"]
|
||||
|
||||
40
targets/runtime_nintendoswitch.S
Normal file
40
targets/runtime_nintendoswitch.S
Normal file
@@ -0,0 +1,40 @@
|
||||
// Macro for writing less code
|
||||
.macro FUNC name
|
||||
.section .text.\name, "ax", %progbits
|
||||
.global \name
|
||||
.type \name, %function
|
||||
.align 2
|
||||
\name:
|
||||
.endm
|
||||
|
||||
FUNC armGetSystemTick
|
||||
mrs x0, cntpct_el0
|
||||
ret
|
||||
|
||||
// Horizon System Calls
|
||||
// https://switchbrew.org/wiki/SVC
|
||||
FUNC svcSetHeapSize
|
||||
str x0, [sp, #-16]!
|
||||
svc 0x1
|
||||
ldr x2, [sp], #16
|
||||
str x1, [x2]
|
||||
ret
|
||||
|
||||
FUNC svcExitProcess
|
||||
svc 0x7
|
||||
ret
|
||||
|
||||
FUNC svcSleepThread
|
||||
svc 0xB
|
||||
ret
|
||||
|
||||
FUNC svcOutputDebugString
|
||||
svc 0x27
|
||||
ret
|
||||
|
||||
FUNC svcGetInfo
|
||||
str x0, [sp, #-16]!
|
||||
svc 0x29
|
||||
ldr x2, [sp], #16
|
||||
str x1, [x2]
|
||||
ret
|
||||
@@ -22,9 +22,5 @@
|
||||
"--stack-first",
|
||||
"--no-demangle"
|
||||
],
|
||||
"extra-files": [
|
||||
"src/runtime/asm_tinygowasm.S",
|
||||
"src/runtime/gc_boehm.c"
|
||||
],
|
||||
"emulator": "wasmtime run --dir={tmpDir}::/tmp {}"
|
||||
}
|
||||
|
||||
@@ -24,9 +24,6 @@
|
||||
"--no-demangle",
|
||||
"--no-entry"
|
||||
],
|
||||
"extra-files": [
|
||||
"src/runtime/asm_tinygowasm.S"
|
||||
],
|
||||
"emulator": "wasmtime run --wasm component-model -Sinherit-network -Sallow-ip-name-lookup --dir={tmpDir}::/tmp {}",
|
||||
"wit-package": "{root}/lib/wasi-cli/wit/",
|
||||
"wit-world": "wasi:cli/command"
|
||||
|
||||
@@ -23,8 +23,5 @@
|
||||
"--no-demangle",
|
||||
"--no-entry"
|
||||
],
|
||||
"extra-files": [
|
||||
"src/runtime/asm_tinygowasm.S"
|
||||
],
|
||||
"emulator": "wasmtime run --dir={tmpDir}::/tmp {}"
|
||||
}
|
||||
|
||||
@@ -23,9 +23,5 @@
|
||||
"--stack-first",
|
||||
"--no-demangle"
|
||||
],
|
||||
"extra-files": [
|
||||
"src/runtime/asm_tinygowasm.S",
|
||||
"src/runtime/gc_boehm.c"
|
||||
],
|
||||
"emulator": "node {root}/targets/wasm_exec.js {}"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user