aboutsummaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2020-09-17Prepare for 0.15.0 releasev0.15.0deadprogram
Signed-off-by: deadprogram <[email protected]>
2020-09-17atsamd2x: fix BAUD valuesago35
2020-09-17atsamd5x: fix BAUD valuesago35
2020-09-17nintendoswitch: simplified assembly codeLucas Teske
2020-09-17arm64: make dynamic loader structs and constants privateLucas Teske
2020-09-17nintendoswitch: fix import cycle on dynamic_arm64.goLucas Teske
2020-09-17nintendoswitch: Add dynamic loader for runtime loading PIE sectionsLucas Teske
2020-09-17bluepill: Enable stm32's USART2 for the board and map it to UART1 tinygo's ↵Olivier Fauchon
device
2020-09-16stacksize: deal with DW_CFA_advance_loc1Ayke van Laethem
In some cases this operation is emitted. It appears to be emitted when a switch is lowered to a jump table in the ARM backend.
2020-09-15microbit: reelboard: flash using OpenOCD when neededAyke van Laethem
When using a SoftDevice, the MSD flash method is not appropriate as it will erase the entire flash area before writing the new firmware. This also wipes the SoftDevice. Instead, use OpenOCD to only rewrite the parts of flash that need to be rewritten and leave the SoftDevice alone.
2020-09-14esp32: add SPI supportAyke van Laethem
2020-09-14add basic UART handlerardnew
2020-09-13esp32: configure the I/O matrix for GPIO pinsAyke van Laethem
Only some pins (notably including GPIO2 aka machine.LED) have GPIO for the default function 1. Other pins (such as GPIO 15) had a different function by default. Function 3 means GPIO for all the pins, so always use that when configuring a pin to use as a GPIO pin. In the future, the mux configuration will need to be updated for other functions such as SPI, I2C, etc.
2020-09-12nintendoswitch: support outputting .nro files directlyAyke van Laethem
By modifying the linker script a bit and adding the NRO0 header directly in the assembly, it's possible to craft an ELF file that can be converted straight to a binary (using objcopy or similar) that is a NRO file. This avoids custom code for NRO files or an extra build step. With another change, .nro files are recognized by TinyGo so that this will create a ready-to-run NRO file: tinygo build -o test.nro -target=nintendoswitch examples/serial
2020-09-12update my name in the contributors listNia Weiss
2020-09-11docs: add ESP32, ESP8266, and Adafruit Feather STM32F405 to list of ↵deadprogram
supported boards Signed-off-by: deadprogram <[email protected]>
2020-09-11change default flash method to DFU (using dfu-util over USB)ardnew
2020-09-11replace flash method with openocd, disable automatic stack sizingardnew
2020-09-11remove UART/SPI vars until peripherals implementedardnew
2020-09-11add pin/bus doc comments, I2C pinsardnew
2020-09-11move clock settings docs comment to respective const definitionsardnew
2020-09-11remove (or stub) UART/SPI/I2C peripheral code from initial feather-stm32f405 ↵ardnew
board support
2020-09-11add feather-stm32f405 smoketest targetardnew
2020-09-11add STM32F405 machine/runtime, and new board/target feather-stm32f405ardnew
2020-09-10Adding support for the Arduino Zero (#1365)jreamy
* machine/arduino-zero: adding support for Arduino Zero Co-authored-by: Ayke Co-authored-by: Jack Reamy
2020-09-09esp8266: add support for this chipAyke van Laethem
Many thanks to cnlohr for the nosdk8266 project: https://github.com/cnlohr/nosdk8266
2020-09-09nintendoswitch: Fix invalid memory read / write in print callsLucas Teske
2020-09-09nrf52840: use higher priority for USB-CDC codeAyke van Laethem
This ensures that stdout (println etc) keeps working in interrupts. Generally you shouldn't print anything in an interrupt. However, printing things for debugging is very useful and printing panic messages can be critical when the code doesn't work for some reason.
2020-09-09main: implement tinygo targets to list usable targetsAyke van Laethem
This patch adds the `tinygo targets` command, which lists usable targets (targets that can be used in the `-target` flag). The assumption here is that usable targets can either be flashed or emulated by TinyGo. There is one exception where it doesn't work yet: the nintendoswitch target. Right now it requires some manual steps to build a .nro file which can then be run by yuzu, hence why it doesn't show up in the list.
2020-09-09avr: configure emulator in board filesAyke van Laethem
Instead of specifying the emulator command in atmega328p.json, specify it in the two boards based on it (arduino and arduino-nano). This makes the configuration consistent with the machine package, which only defines the CPUFrequency function in the board files (and not in machine_atmega328p.json).
2020-09-07main: add cached GOROOT to info subcommandAyke van Laethem
This is necessary for an upcoming VS Code extension to support TinyGo, and may be useful for other people wanting to use proper autocompletion etc in their IDE.
2020-09-06docker: fix the problem with the wasm build (#1357)sago35
* docker: fix the problem with the wasm build
2020-09-05esp32: add libgcc ROM functions to linker scriptAyke van Laethem
They are copied from ESP-IDF. They are always available (burned in the mask ROM) so best to use them.
2020-09-05ci: set git-fetch-depth to 1sago35
2020-09-05esp32: export machine.PortMask* for bitbanging implementationsAyke van Laethem
This is useful for some drivers, in particular for the WS2812 driver.
2020-09-04ci: run `tinygo test` for known-working packagesAyke van Laethem
These packages are known to pass tests with `tinygo test`. It's still a very short list, but hopefully this list can be expanded to eventually cover most or all of the standard library.
2020-09-04all: run test binaries in the correct directoryAyke van Laethem
Test binaries must be run in the source directory of the package to be tested. This wasn't done, leading to a few "file not found" errors. This commit implements this. Unfortunately, it does not allow more packages to be tested as both affected packages (debug/macho and debug/plan9obj) will still fail with this patch even though the "file not found" errors are gone.
2020-09-04Makefile: check whether submodules have been downloaded in some common casesAyke van Laethem
This should help new people making this very common mistake.
2020-09-03loader: rewrite/refactor much of the code to use go list directlyAyke van Laethem
There were a few problems with the go/packages package. While it is more or less designed for our purpose, it didn't work quite well as it didn't provide access to indirectly imported packages (most importantly the runtime package). This led to a workaround that sometimes broke `tinygo test`. This PR contains a number of related changes: * It uses `go list` directly to retrieve the list of packages/files to compile, instead of relying on the go/packages package. * It replaces our custom TestMain replace code with the standard code for running tests (generated by `go list`). * It adds a dummy runtime/pprof package and modifies the testing package, to get tests to run again with the code generated by `go list`.
2020-09-03arduino-mega2560: fix flashing on WindowsAyke van Laethem
Without the extra `:i` at the end, avrdude will misinterpret the colon in Windows paths.
2020-09-01machine/stm32f4: refactor common code and add new build tag stm32f4 (#1332)ardnew
* machine/STM32F4: break out STM32F4 machine with new build tag
2020-08-31flash: call PortReset only on other than openocdsago35
2020-08-31esp32: add support for basic GPIOAyke van Laethem
GPIO is much more advanced on the ESP32, but this is a starting point. It gets examples/blinky1 to work.
2020-08-31Fix arch release jobJohan Brandhorst
Instead of using su, which is blocking, set the user explicitly for each command.
2020-08-31esp32: support flashing directly from tinygoAyke van Laethem
Right now this requires setting the -port parameter, but other than that it totally works (if esptool.py is installed). It works by converting the ELF file to the custom ESP32 image format and flashing that using esptool.py.
2020-08-31compileopts: add support for custom binary formatsAyke van Laethem
Some chips (like the ESP family) have a particular image format that is more complex than simply dumping everything in a raw image.
2020-08-31esp: add support for the Espressif ESP32 chipAyke van Laethem
This is only very minimal support. More support (such as tinygo flash, or peripheral access) should be added in later commits, to keep this one focused. Importantly, this commit changes the LLVM repo from llvm/llvm-project to tinygo-org/llvm-project. This provides a little bit of versioning in case something changes in the Espressif fork. If we want to upgrade to LLVM 11 it's easy to switch back to llvm/llvm-project until Espressif has updated their fork.
2020-08-30cortexm: fix stack size calculation with interruptsAyke van Laethem
Interrupts store 32 bytes on the current stack, which may be a goroutine stack. After that the interrupt switches to the main stack pointer so nothing more is pushed to the current stack. However, these 32 bytes were not included in the stack size calculation. This commit adds those 32 bytes. The code is rather verbose, but that is intentional to make sure it is readable. This is tricky code that's hard to get right, so I'd rather keep it well documented.
2020-08-30nrf52840: add build tags for SoftDevice supportAyke van Laethem
The SoftDevice should already be installed on these chips. Adding the right build tags makes them work with the bluetooth package. I did not change the HasLowFrequencyCrystal property: all these boards use the MDBT50Q which appears to include a low-frequency oscillator. That is, I tested the ItsyBitsy nRF52840 with the property set to true and advertisement worked just fine.
2020-08-30nrf: add SoftDevice support for the Circuit Playground BluefruitAyke van Laethem
This also fixes a bug: the Bluefruit doesn't have a low frequency crystal. Somehow non-SoftDevice code still worked. However, the SoftDevice won't initialize when this flag is set incorrectly.