aboutsummaryrefslogtreecommitdiffhomepage
path: root/Makefile
AgeCommit message (Collapse)Author
2021-09-16esp32c3: add support for this chipAyke van Laethem
This change adds support for the ESP32-C3, a new chip from Espressif. It is a RISC-V core so porting was comparatively easy. Most peripherals are shared with the (original) ESP32 chip, but with subtle differences. Also, the SVD file I've used gives some peripherals/registers a different name which makes sharing code harder. Eventually, when an official SVD file for the ESP32 is released, I expect that a lot of code can be shared between the two chips. More information: https://www.espressif.com/en/products/socs/esp32-c3 TODO: - stack scheduler - interrupts - most peripherals (SPI, I2C, PWM, etc)
2021-09-07Makefile: add smoke test with gc=leaking to test dead asm codeDamian Gryski
2021-08-30machine/arduino_mkrwifi1010: add board definition for Arduino MKR WiFi 1010sago35
2021-08-12testing: test testing package using `tinygo test`Ayke van Laethem
2021-08-10compiler: add aliases for many hashing packagesAyke van Laethem
This commit adds support for the following packages: - crypto/md5 - crypto/sha1 - crypto/sha256 - crypto/sha512 They would normally need assembly implementations, but with these aliases they already work everywhere.
2021-08-06Makefile: add src/testing to FMT_PATHSDan Kegel
2021-08-06src/testing/benchmark.go: add subset implementation of BenchmarkDan Kegel
Partially fixes #1808 Allows the following to succeed: curl "https://golang.org/test/fibo.go?m=text" > fibo.go tinygo build -o fibo fibo.go ./fibo -bench
2021-06-26machine/feather-nrf52840-sense: add board definition for Adafruit Feather ↵sago35
nRF52840 Sense
2021-06-25all: add a flag to the command line to select the serial implementationAyke van Laethem
This can be very useful for some purposes: * It makes it possible to disable the UART in cases where it is not needed or needs to be disabled to conserve power. * It makes it possible to disable the serial output to reduce code size, which may be important for some chips. Sometimes, a few kB can be saved this way. * It makes it possible to override the default, for example you might want to use an actual UART to debug the USB-CDC implementation. It also lowers the dependency on having machine.Serial defined, which is often not defined when targeting a chip. Eventually, we might want to make it possible to write `-target=nrf52` or `-target=atmega328p` for example to target the chip itself with no board specific assumptions. The defaults don't change. I checked this by running `make smoketest` before and after and comparing the results.
2021-06-24smoke&readme: add missing boardsYurii Soldak
2021-06-19rp2040: support Adafruit Feather RP2040Kenneth Bell
2021-06-10runtime: expose memory statsYurii Soldak
2021-05-30qtpy: add pin for neopixelssago35
2021-05-28add rp2040, picoRajiv Kanchan
adds preliminary support (just enough to run blinky1) for the Raspberry Pi Pico board along with the rp2040 mcu.
2021-05-28stm32: add pwm for f4 seriesKenneth Bell
2021-05-19ci: disable building some optional Clang componentsAyke van Laethem
This commit disables the Clang static analyzer and ARCMigrate components of Clang. These aren't used at the moment in TinyGo so don't need to be enabled. This reduces the build by 200 files (2909 -> 2709). The idea comes from here (via LLVM weekly): https://www.cambus.net/speedbuilding-llvm-clang-in-5-minutes/
2021-05-13machine: define Serial as the default outputAyke van Laethem
Previously, the machine.UART0 object had two meanings: - it was the first UART on the chip - it was the default output for println These two meanings conflict, and resulted in workarounds like: - Defining UART0 to refer to the USB-CDC interface (atsamd21, atsamd51, nrf52840), even though that clearly isn't an UART. - Defining NRF_UART0 to avoid a conflict with UART0 (which was redefined as a USB-CDC interface). - Defining aliases like UART0 = UART1, which refer to the same hardware peripheral (stm32). This commit changes this to use a new machine.Serial object for the default serial port. It might refer to the first or second UART depending on the board, or even to the USB-CDC interface. Also, UART0 now really refers to the first UART on the chip, no longer to a USB-CDC interface. The changes in the runtime package are all just search+replace. The changes in the machine package are a mixture of search+replace and manual modifications. This commit does not affect binary size, in fact it doesn't affect the resulting binary at all.
2021-05-10atsame5x: add support for CANsago35
2021-05-06main: match `go test` outputAyke van Laethem
This commit makes the output of `tinygo test` similar to that of `go test`. It changes the following things in the process: * Running multiple tests in a single command is now possible. They aren't paralellized yet. * Packages with no test files won't crash TinyGo, instead it logs it in the same way the Go toolchain does.
2021-04-21atsamd51: fix PWM support in atsamd51p20sago35
This change is related to the following commit 72acda22b0a8d137405e41e9ed54cbfbcce7b26f
2021-04-19ci: improve llvm-source cachesago35
2021-04-16atsame51: add initial support for feather-m4-cansago35
2021-04-16PWM Support for atmega1280developer
Add arduino mega 1280 PWM test
2021-04-15atsame54: add initial support for atsame54-xprosago35
2021-04-14microbit-v2: add support for S113 SoftDeviceAyke van Laethem
This currently doesn't work with `tinygo flash` yet (even with `-programmer=openocd`), you can use pyocd instead. For example, from the Bluetooth package: tinygo build -o test.hex -target=microbit-v2-s113v7 ./examples/advertisement/ pyocd flash --target=nrf52 test.hex I intend to add support for pyocd to work around this issue, so that a simple `tinygo flash` suffices.
2021-04-12Arduino Mega 1280 supportdeveloper
Fix ldflags Update targets/arduino-mega1280.json Co-authored-by: Ayke <[email protected]> Update atmega1280.json Update Makefile
2021-04-07stm32: add nucleo-l031k6 supportKenneth Bell
Adds i2c for all L0 series UART, Blinky (LED) and i2c tested
2021-04-06machine: refactor PWM supportAyke van Laethem
This commit refactors PWM support in the machine package to be more flexible. The new API can be used to produce tones at a specific frequency and control servos in a portable way, by abstracting over counter widths and prescalers.
2021-04-05builder: cache C and assembly file outputsAyke van Laethem
This probably won't speed up the build on multicore systems (the build is still dominated by the whole-program optimization step) but should be useful at a later date for other optimizations. For example, I intend to eventually optimize each package individually including C files, which should enable cross-language optimizations (inlining C functions into Go functions, for example). For that to work, accurate dependency tracking is important.
2021-03-29Group together STM32 smoke tests.Elliott Sales de Andrade
And then allow them to be disabled with one option.
2021-03-28initial support for pca10059Olaf Flebbe
Using the official USB Vendor name even for other boards.
2021-03-23Add support for nucleol432 boardKenneth Bell
LED and UART are working
2021-03-15builder: add support for -opt=0Ayke van Laethem
This optimization level wasn't working before because some passes expect some globals to be cleaned up afterwards. Cleaning these globals is easy, just add the pass necessary for it. This shouldn't reduce the usefulness of the -opt=0 build flag as most optimizations are still skipped.
2021-02-21fix/no-libxml2Olaf Flebbe
2021-02-16nucleol552ze: implementation with CLOCK, LED, and UARTKenneth Bell
2021-02-09ci: only build the necessary LLVM libraries and toolsAyke van Laethem
This should improve rebuild time, but perhaps more importantly massively reduces cache size which then reduces incremental build time.
2021-01-24compiler: remove ir packageAyke van Laethem
This package was long making the design of the compiler more complicated than it needs to be. Previously this package implemented several optimization passes, but those passes have since moved to work directly with LLVM IR instead of Go SSA. The only remaining pass is the SimpleDCE pass. This commit removes the *ir.Function type that permeated the whole compiler and instead switches to use *ssa.Function directly. The SimpleDCE pass is kept but is far less tightly coupled to the rest of the compiler so that it can easily be removed once the switch to building and caching packages individually happens.
2021-01-15compiler: refactor and add testsAyke van Laethem
This commit finally introduces unit tests for the compiler, to check whether input Go code is converted to the expected output IR. To make this necessary, a few refactors were needed. Hopefully these refactors (to compile a program package by package instead of all at once) will eventually become standard, so that packages can all be compiled separate from each other and be cached between compiles.
2021-01-09stm32: use stm32-rs SVDs which are of much higher qualityAyke van Laethem
This commit changes the number of wait states for the stm32f103 chip to 2 instead of 4. This gets it back in line with the datasheet, but it also has the side effect of breaking I2C. Therefore, another (seemingly unrelated) change is needed: the i2cTimeout constant must be increased to a higher value to adjust to the lower flash wait states - presumably because the lower number of wait states allows the chip to run code faster.
2021-01-08Support for STM32L0 MCUs and Dragino LGT92 device (#1561)Fauchon
machine/stm32l0: add support for stm32l0 family and Dragino LGT92 Board
2021-01-06machine/microbit-v2: add initial support based on work done by @alankrantas ↵deadprogram
thank you! Signed-off-by: deadprogram <[email protected]>
2021-01-06machine/p1am-100: rename MISO/MOSIQuentin Smith
This makes p1am-100 work again after commit d1c4ed6.
2020-12-22interp: rewrite entire packageAyke van Laethem
For a full explanation, see interp/README.md. In short, this rewrite is a redesign of the partial evaluator which improves it over the previous partial evaluator. The main functional difference is that when interpreting a function, the interpretation can be rolled back when an unsupported instruction is encountered (for example, an actual unknown instruction or a branch on a value that's only known at runtime). This also means that it is no longer necessary to scan functions to see whether they can be interpreted: instead, this package now just tries to interpret it and reverts when it can't go further. This new design has several benefits: * Most errors coming from the interp package are avoided, as it can simply skip the code it can't handle. This has long been an issue. * The memory model has been improved, which means some packages now pass all tests that previously didn't pass them. * Because of a better design, it is in fact a bit faster than the previous version. This means the following packages now pass tests with `tinygo test`: * hash/adler32: previously it would hang in an infinite loop * math/cmplx: previously it resulted in errors This also means that the math/big package can be imported. It would previously fail with a "interp: branch on a non-constant" error.
2020-12-15Nucleo f722ze (#1526)kenbell
machine/nucleo-f722ze: Add support for ST Micro NUCLEO-F722ZE
2020-12-10all: switch to LLVM 11 for static buildsAyke van Laethem
This commit switches to LLVM 11 for builds with LLVM linked statically (e.g. `make`). It does not yet switch the default for builds dynamically linked to LLVM, that should be done in a later change. This commit also changes to use the default host toolchain (probably GCC) instead of Clang as the default compiler in CI. There were some issues with Clang 3.8 in CI and hopefully this will fix it. Additionally it updates the way LLVM is built on Windows, with -DLLVM_ENABLE_PIC=OFF (which should have been used all along). This change makes it possible to revert a hack to build libclang manually and instead uses the libclang static library like on all other operating systems, simplifying the Makefile.
2020-11-15teensy36: add to smoketestAyke van Laethem
This required some changes to the UART code to get it to compile on Go 1.11.
2020-11-14Makefile: fix issue with Go 1.15.5Ayke van Laethem
For details, see https://github.com/golang/go/issues/42606
2020-11-11teensy40: initial implementationardnew
2020-11-08machine/qtpy: add board definition for Adafruit QTPydeadprogram
Signed-off-by: deadprogram <[email protected]>
2020-11-01add missing return pointer restore for regular coroutine tail callsNia Weiss
This fixes an issue where a normal suspending call followed by a plain tail call would result in the tail return value being written to the return pointer of the normal suspending call. This is fixed by saving the return pointer at the start of the function and restoring it before initiating a plain tail call.