aboutsummaryrefslogtreecommitdiffhomepage
path: root/targets
AgeCommit message (Collapse)Author
2023-06-08Support for the M5STACK M5StickC ESP32-PICO deviceivoszz
2023-06-01Add bluemicro840 boardPierre Constantineau
2023-05-20avr: add attiny1616 supportAyke van Laethem
This is just support for the chip, no boards are currently supported. However, you can use this target on a custom board. Notes: - This required a new runtime and machine implementation, because the hardware is actually very different (and much nicer than older AVRs!). - I had to update gen-device-avr to support this chip. This also affects the generated output of other AVRs, but I checked all chips we support and there shouldn't be any backwards incompatible changes. - I did not implement peripherals like UART, I2C, SPI, etc because I don't need them. That is left to do in the future. You can flash these chips with only a UART and a 1kOhm resistor, which is really nice (no special hardware needed). Here is the program I've used for this purpose: https://pypi.org/project/pymcuprog/
2023-05-17compileopts: don't filter build tags, use specific build tags insteadAyke van Laethem
This basically reverts https://github.com/tinygo-org/tinygo/pull/3357 and replaces it with a different mechanism to get to the same goal. I do not think filtering tags like this is a good idea: it's the wrong part of the compiler to be concerned with such tags (that part sets tags, but doesn't modify existing tags). Instead, I've written the //go:build lines in such a way that it has the same effect: WASI defaults to leveldb, everything else defaults to fnv, and it's possible to override the default using build tags.
2023-05-09pinetime: update the target fileAyke van Laethem
* Rename pinetime-devkit0 to pinetime because the production device is almost the same hardware (the only noticeable difference is a different accelerometer, which isn't part of the board file). * Remove the UART and set serial to none. The UART uses a lot of current by default, so it seems better to disable it. This is a breaking change, but honestly I think I'm the only one who has ever actually used TinyGo for the PineTime and I'm fine with this change :)
2023-04-26cortexm: add "gdb" as a debuggerAyke van Laethem
At least on Arch Linux ARM, there is no gdb-multiarch or something, just "gdb" and it works for 32-bit ARM as well.
2023-04-17targets: make msd-volume-name an arrayKenneth Bell
2023-03-30rp2040: unify all linker scripts using LDFLAGSAyke van Laethem
The only thing that's different between all these chips is the flash size, which can easily be passed as a linker flag instead. This removes a bunch of duplicate code in an uncommon language (linker script). I've also fixed a few boards with incorrect flash sizes: * nano-rp2040 has 16MB instead of 2MB * macropad-rp2040 has 8MB instead of 2MB * gopher-badge has 8MB instead of 1MB
2023-03-24feat: fix typosshivay
2023-03-22Added Gopher Badge supportDaniel Esteban
2023-03-12arm: enable functions in RAM for go & cgoKenneth Bell
2023-03-08targets: bump cortex-m-qemu default stack sizeDamian Gryski
2023-03-08builder: sizes: list interrupt vector as a pseudo-package for -size=fullAyke van Laethem
This is another bit of memory that is now correctly accounted for in `-size=full`.
2023-02-27machine/stm32, nrf: flash API (#3472)Ron Evans
machine/stm32, nrf: implement machine.Flash Implements the machine.Flash interface using the same definition as the tinyfs BlockDevice. This implementation covers the stm32f4, stm32l4, stm32wlx, nrf51, nrf52, and nrf528xx processors.
2023-01-29Support for the Espressif ESP32-C3-DevKit-RUST-1 development boardJohn Clark
Signed-off-by: John Clark <[email protected]>
2023-01-26Support for Makerfabs ESP32C3SPI35 TFT Touchscreen boardJohn Clark
Signed-off-by: John Clark <[email protected]>
2023-01-25Target MCU was not properly defined for LGT92 targetOlivier Fauchon
Change openocd interface from stlink-v2 to stlink (interface/stlink-v2.cfg is deprecated)
2023-01-19Allows the emulator to expand {tmpDir}Adrian Cole
This allows you to expand {tmpDir} in the json "emulator" field, and uses it in wasmtime instead of custom TMPDIR mapping logic. Before, we had custom logic for wasmtime to create a separate tmpDir when running go tests. This overwrite the TMPDIR variable when running, after making a mount point. A simpler way to accomplish the end goal of writing temp files is to use wasmtime's map-dir instead. When code is compiled to wasm with the wasi target, tempDir is always /tmp, so we don't need to add variables (since we know what it is). Further, the test code is the same between normal go and run through wasmtime. So, we don't need to make a separate temp dir first, and avoiding that reduces logic, as well makes it easier to swap out the emulator (for wazero which has no depedencies). To map the correct directory, this introduces a {tmpDir} token whose value is the host-specific value taken from `os.TempDir()`. The motivation I have for this isn't so much to clean up the wasmtime code, but allow wazero to execute the same tests. After this change, the only thing needed to pass tests is to change the emulator, due to differences in how wazero deals with relative lookups (they aren't restricted by default, so there's not a huge amount of custom logic needed). In other words, installing wazero from main, `make tinygo-test-wasi` works with no other changes except this PR and patching `targets/wasi.json`. ```json "emulator": "wazero run -mount=.:/ -mount={tmpDir}:/tmp {}", ``` On that note, if there's a way to override the emulator via arg or env, this would be even better, but in any case patching json is fine. Signed-off-by: Adrian Cole <[email protected]>
2023-01-11Support for Adafruit Feather M0 Express boardThomas Richner
2022-12-22board: Adafruit KB2040 (https://www.adafruit.com/product/5302)BCG
2022-12-20Add basic atmega32u support (#3337)Jesús Espino
machine/atmega32u: add support for arduino leonardo
2022-12-19Adding support for waveshare rp2040-zero (#3321)Jesús Espino
machine: adding support for waveshare rp2040-zero
2022-12-16Revert "Bump CMSIS to 5.9.0"Ron Evans
This reverts commit 92be61534e607a2564e6fe73bbed759533eef65a.
2022-12-16Bump CMSIS to 5.9.0Anton D. Kachalov
2022-11-18avr: support ThinLTOAyke van Laethem
ThinLTO results in a small code size reduction, which is nice (especially on these very small chips). It also brings us one step closer to using ThinLTO everywhere.
2022-11-14avr: fix .data initialization for binaries over 64kBAyke van Laethem
I found that .data is not correctly initialized with firmware images that use over 64kB of flash. The problem is that the data in .data (which is stored in flash, and copied to RAM at reset) is beyond the 64kB limit and must therefore be loaded using the elpm instruction instead of the lpm instruction. I encountered this issue while getting testdata/math.go to work for AVR. The following command mostly works with this patch, while it prints garbage withtout it: tinygo run -target=simavr -size=short -scheduler=none ./testdata/math.go (This also requires a patch to picolibc to work, see https://github.com/picolibc/picolibc/pull/371) It still doesn't work entirely with this patch: some of the math operations have an incorrect result. But at least it's an improvement as it won't print garbage anymore.
2022-11-06avr: drop GNU toolchain dependencyAyke van Laethem
- Use compiler-rt and picolibc instead of avr-libc. - Use ld.lld instead of avr-ld (or avr-gcc). This makes it much easier to get started with TinyGo on AVR because installing these extra tools (gcc-avr, avr-libc) can be a hassle. It also opens the door for future improvements such as ThinLTO. There is a code size increase but I think it's worth it in the long run. The code size increase can hopefully be reduced with improvements to the LLVM AVR backend and to compiler-rt.
2022-11-04esp: use LLVM Xtensa linker instead of Espressif toolchainAyke van Laethem
The Espressif fork of LLVM now has Xtensa support in the linker LLD. (This support was written mosly by me). This means we don't have to use the Espressif GNU toolchain anymore and makes installing TinyGo simpler. In the future, this also paves the way for ThinLTO support. Right now it is mostly just a way to simplify TinyGo installation and speed up CI slightly.
2022-10-19ci: add support for LLVM 15Ayke van Laethem
This commit switches to LLVM 15 everywhere by default, while still keeping LLVM 14 support.
2022-10-19riscv: add "target-abi" metadata flagAyke van Laethem
This flag is necessary in LLVM 15 because it appears that LLVM 15 has changed the default target ABI from lp64 to lp64d. This results in a linker failure. Setting the "target-abi" forces the RISC-V backend to use the intended target ABI.
2022-10-19wasm: fix GC scanning of allocasAyke van Laethem
Scanning of allocas was entirely broken on WebAssembly. The code intended to do this was never run. There were also no tests. Looking into this further, I found that it is actually not really necessary to do that: the C stack can be scanned conservatively and in fact this was already done for goroutine stacks (because they live on the heap and are always referenced). It wasn't done for the system stack however. With these fixes, I believe code should be both faster *and* more correct. I found this in my work to get opaque pointers supported in LLVM 15, because the code that was never reached now finally got run and was actually quite buggy.
2022-10-16targets: remove "acm:"` prefix for USB vid/pid pairAyke van Laethem
This prefix isn't actually used and only adds noise, so remove it. It may have been useful on Linux that makes a distinction between /dev/ttyACM* and /dev/ttyUSB* but it isn't now. Also, it's unlikely that the same vid/pid pair will be shared between an acm and usb driver anyway.
2022-10-14targets: do not set stack size per boardAyke van Laethem
The needed stack size is hard to determine by the compiler. It will try, but will fail in many common cases. Therefore, the runtime will pick a fixed stack size. There is a tradeoff between avoiding stack overflows and wasting RAM. This tradeoff depends on the application: some don't need large stack sizes but do need a lot of memory, while others need deep stacks but aren't so memory constrained. That's why I've added a flag to do this on the command line: https://github.com/tinygo-org/tinygo/pull/3159 It may be reasonable to use a different stack size per chip, for example chips with lots of RAM could default to a larger stack size. But I don't think it's a good idea to do this per board.
2022-09-17targets: remove usbpid of bootloadersago35
For more information, see https://github.com/tinygo-org/tinygo/pull/3168
2022-09-16wioterminal: remove serial-port setting of bootloadersago35
2022-09-09Set default-stack-size to 4096, and remove NEOPIXELS pluralization for ↵Isaac Rodman
qtpy-rp2040
2022-09-08wasm: do not allow undefined symbolsAyke van Laethem
--allow-undefined can be a problem: it allows compiling code that will fail when loaded. This change makes sure that if some symbols are undefined, they are reported as an error by the linker. Previously, people could get away with importing a function that was not defined, like this: func add(int a, int b) int func test() { println(add(3, 5)) } This was always unintended but mostly worked. With this change, it isn't possible anymore. Now every function needs to be marked with //export explicitly: //export add func add(int a, int b) int func test() { println(add(3, 5)) } As before, functions will be placed in the `env` module with the name set from the `//export` tag. This can be overridden with `//go:import-module`: //go:import-module math //export add func add(int a, int b) int func test() { println(add(3, 5)) } For the syscall/js package, I needed to give a list of symbols that are undefined. This list is based on the JavaScript functions defined in targets/wasm_exec.js.
2022-09-03targets: fix build tag duplicatesYurii Soldak
and add missing targets to smoke test
2022-09-02targets: remove hifive1-qemu targetAyke van Laethem
This target was added purely for running tests, and it is currently unused. When I try to use it, it causes runtime exceptions. The replacement riscv-qemu is much better behaved. This doesn't drop support for any actual hardware, the HiFive 1 B will remain supported.
2022-09-02Add qtpy-rp2040 to TinyGo v0.25.0Isaac Rodman
2022-08-29p1am-100: remove duplicate build tagsYurii Soldak
2022-08-28machine: Add support for Adafruit QT2040 board.Matt Schultz
2022-08-26boards: Add XIAO ESP32C3 boardYurii Soldak
2022-08-24Add Pimoroni's Tufty2040 boardDaniel Esteban
2022-08-07nrf52: cleanup s140v7 uf2 targetsYurii Soldak
2022-08-07nrf52: cleanup s140v6 uf2 targetsYurii Soldak
2022-08-04all: rename assembly files to .S extensionAyke van Laethem
The Go tools only consider lowercase .s files to be assembly files. By renaming these to uppercase .S files they won't be discovered by the Go toolchain and listed as the SFiles to be assembled. There is a difference between .s and .S: only uppercase .S will be passed through the preprocessor. Doing that is normally safe, and definitely safe in the case of these files.
2022-07-28rp2040: make picoprobe default openocd interfaceKenneth Bell
2022-07-26target: add gopherbot and gopherbot2 aliases to simplify for newer usersdeadprogram
Signed-off-by: deadprogram <[email protected]>
2022-07-21xiao-ble: add support for flash-1200-bps-resetsago35