aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
AgeCommit message (Collapse)Author
2024-11-22Update cmsis-svd libraryMatt Mets
This updates the version of the cmsis-svd library, to include a version that supports rp2350. This is in support of #4452
2024-11-20runtime: implement race-free signals using futexesAyke van Laethem
This requires an API introduced in MacOS 11. I think that's fine, since the version before that (MacOS 10.15) is EOL since 2022. Though if needed, we could certainly work around it by using an older and slightly less nice API.
2024-09-08submodules: remove separate renesas-svd repo in favor of more recent changes.deadprogram
Signed-off-by: deadprogram <[email protected]>
2024-09-04darwin: replace custom syscall package with Go native syscall packageAyke van Laethem
This required a few compiler and runtime tricks to work, but I ran a bunch of tests and it seems fine. (CI will of course do more exhaustive testing). The main benefit here is that we don't need to maintain the darwin version of the syscall package, and reduce extra risks for bugs (because we reuse the well-tested syscall package). For example, Go 1.23 needed a bunch of new constants in the syscall package. That would have been avoided if we had used the native syscall package on MacOS.
2024-08-15unix: print a message when a fatal signal happensAyke van Laethem
Print a message for SIGBUS, SIGSEGV, and SIGILL when they happen. These signals are always fatal, but it's very useful to know which of them happened. Also, it prints the location in the binary which can then be parsed by `tinygo run` (see https://github.com/tinygo-org/tinygo/pull/4383). While this does add some extra binary size, it's for Linux and MacOS (systems that typically have plenty of RAM/storage) and could be very useful when debugging some low-level crash such as a runtime bug.
2024-07-02wasi preview 2 support (#4027)Damian Gryski
* all: wasip2 support Co-authored-by: Randy Reddig <[email protected]>
2024-02-19device: update SVD filesAyke van Laethem
This updates lib/cmsis-svd, pulling in the updates to the Espressif SVD files here: https://github.com/cmsis-svd/cmsis-svd-data/pull/3 This is needed for wifi/BLE support on the ESP32-C3 (the older SVD files were missing some necessary interrupts).
2023-12-07lib/cmsis-svd: change to new repo location for the SVD filesdeadprogram
Signed-off-by: deadprogram <[email protected]>
2023-11-25lib/cmsis-svd: switch to new location and latest version of shared SVD ↵deadprogram
repository Signed-off-by: deadprogram <[email protected]>
2023-11-04Bump wasi-libc to SDK 20Elliott Sales de Andrade
The version 17 SDK adds `getpagesize`, so use it instead of hardcoding a number (even if their implementation is _also_ a hardcoded number.)
2023-10-16Binaryen116 (#3958)Flavio Castelli
dependencies: update binaryen submodule to version 116 Signed-off-by: Flavio Castelli <[email protected]> Co-authored-by: DarkByteBen <[email protected]>
2023-07-05modules: add submodule for Renesas SVD file mirror repodeadprogram
Signed-off-by: deadprogram <[email protected]>
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-26windows: update mingw-w64 versionAyke van Laethem
This gets rid of the following messages: ld.lld: warning: duplicate /export option: hypot ld.lld: warning: duplicate /export option: nextafter I've wanted to wait for the next release but that may take a long while, so I've simply set the submodule to the commit that fixes this message.
2022-11-06all: update picolibc to v1.7.9Ayke van Laethem
This newer version has some support for AVR.
2022-10-13all: update muslAyke van Laethem
2022-06-21wasm: update wasi-libc versionAyke van Laethem
This is necessary for the next commit. It also results in a nice wasm binary size saving of around 300 bytes.
2022-04-10all: use compiler-rt from LLVMAyke van Laethem
2022-02-28Revert "all: move stm32 files to separate repository"sago35
This reverts commit 644356c220ed88f110d01300f671a170cd36eb04.
2022-02-21Update macos-minimal-sdk to pick up updated dirent.hDan Kegel
2022-02-18all: move stm32 files to separate repositoryAyke van Laethem
2022-02-12builder: add support for cross compiling to DarwinAyke van Laethem
This means that it will be possible to generate a Darwin binary on any platform (Windows, Linux, and MacOS of course), including CGo. Of course, the resulting binaries can only run on MacOS itself. The binary links against libSystem.dylib, which is a shared library. The macos-minimal-sdk repository contains open source header files and generated symbol stubs so we can generate a stub libSystem.dylib without copying any closed source code.
2022-01-04stm32: add more MCUs with h/w RNGKenneth Bell
2021-11-20stm32: add minimal stm32wlex5 / lorae5 targetKenneth Bell
credit to ofauchon
2021-11-16all: add support for windows/amd64Ayke van Laethem
This uses Mingw-w64, which seems to be the de facto standard for porting Unixy programs to Windows.
2021-11-14internal/task: use asyncify on webassemblyNia Waldvogel
This change implements a new "scheduler" for WebAssembly using binaryen's asyncify transform. This is more reliable than the current "coroutines" transform, and works with non-Go code in the call stack. runtime (js/wasm): handle scheduler nesting If WASM calls into JS which calls back into WASM, it is possible for the scheduler to nest. The event from the callback must be handled immediately, so the task cannot simply be deferred to the outer scheduler. This creates a minimal scheduler loop which is used to handle such nesting.
2021-11-04wasm: update wasi-libc dependencyAyke van Laethem
The latest version allows overriding the default CFLAGS. By default, they're `-O2 -DNDEBUG`, thus not including DWARF debug information. This commit changes this to include the `-g` flag. Apart from an improved debug experience, this lets -size=full attribute code to wasi-libc. Before: $ tinygo build -o test.wasm -size=full ./testdata/alias.go code rodata data bss | flash ram | package ------------------------------- | --------------- | ------- 1780 0 188 130733 | 1968 130921 | (unknown) 84 0 0 0 | 84 0 | internal/task 281 0 0 0 | 281 0 | main 2374 0 4 147 | 2378 151 | runtime ------------------------------- | --------------- | ------- 4519 0 192 130880 | 4711 131072 | total After: $ tinygo build -o test.wasm -size=full ./testdata/alias.go code rodata data bss | flash ram | package ------------------------------- | --------------- | ------- 40 0 188 130733 | 228 130921 | (unknown) 1740 0 0 0 | 1740 0 | C wasi-libc 84 0 0 0 | 84 0 | internal/task 281 0 0 0 | 281 0 | main 2374 0 4 147 | 2378 151 | runtime ------------------------------- | --------------- | ------- 4519 0 192 130880 | 4711 131072 | total The main difference here is the `(unknown)` code, which turns out to be mostly wasi-libc in this trivial example.
2021-11-04builder: build static binaries using musl on LinuxAyke van Laethem
This commit adds support for musl-libc and uses it by default on Linux. The main benefit of it is that binaries are always statically linked instead of depending on the host libc, even when using CGo. Advantages: - The resulting binaries are always statically linked. - No need for any tools on the host OS, like a compiler, linker, or libc in a release build of TinyGo. - This also simplifies cross compilation as no cross compiler is needed (it's all built into the TinyGo release build). Disadvantages: - Binary size increases by 5-6 kilobytes if -no-debug is used. Binary size increases by a much larger margin when debugging symbols are included (the default behavior) because musl is built with debugging symbols enabled. - Musl does things a bit differently than glibc, and some CGo code might rely on the glibc behavior. - The first build takes a bit longer because musl needs to be built. As an additional bonus, time is now obtained from the system in a way that fixes the Y2038 problem because musl has been a bit more agressive in switching to 64-bit time_t.
2021-11-04picolibc: add include directory to build artefactAyke van Laethem
This is really just a preparatory commit for musl support. The idea is to store not just the archive file (.a) but also an include directory. This is optional for picolibc but required for musl, so the main purpose of this commit is the refactor needed for this change.
2021-10-26cgo: add support for stdio in picolibc and wasi-libcAyke van Laethem
This adds support for stdio in picolibc and fixes wasm_exec.js so that it can also support C puts. With this, C stdout works on all supported platforms.
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-05-25cmsis-svd: update with latest to sync with upstream repodeadprogram
Signed-off-by: deadprogram <[email protected]>
2021-04-21stm32: support SPI on L4 seriesKenneth Bell
2021-04-14cmsis-svd: add svd file for the atsame5xsago35
2021-02-16stm32: update stm32-svd libKenneth Bell
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-06nrfx: updare submodule to latest commitdeadprogram
Signed-off-by: deadprogram <[email protected]>
2020-09-09esp8266: add support for this chipAyke van Laethem
Many thanks to cnlohr for the nosdk8266 project: https://github.com/cnlohr/nosdk8266
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-25wasm: update wasi-libc dependencyAyke van Laethem
Several updates are necessary for LLVM 11 support, so simply update to the latest commit.
2020-07-08Add new kendryte k210 target definitionYannis Huber
2020-03-22all: include picolibc for bare metal targetsAyke van Laethem
This is necessary for better CGo support on bare metal. Existing libraries expect to be able to include parts of libc and expect to be able to link to those symbols. Because with this all targets have a working libc, it is now possible to add tests to check that a libc in fact works basically. Not all parts of picolibc are included, such as the math or stdio parts. These should be added later, when needed. This commit also avoids the need for the custom memcpy/memset/memcmp symbols that are sometimes emitted by LLVM. The C library will take care of that.
2020-02-19main: update cmsis-svd moduleAyke van Laethem
This reverts back to the upstream repository which has merged all necessary updates.
2020-01-23wasm: include wasi-libcAyke van Laethem
This allows CGo code to call some libc functions. Additionally, by putting memset/memmove/memcpy in an archive they're not included anymore when not necessary, reducing code size for small programs.
2019-11-25Revert "all: use compiler-rt from the llvm-project directory"Ayke van Laethem
This reverts commit acdaaa17d8232989d310292a512e70fccdb288a5. See https://github.com/tinygo-org/tinygo/issues/734 for details.
2019-11-13all: use compiler-rt from the llvm-project directoryAyke van Laethem
We don't need the separate submodule: compiler-rt is already included in the llvm-project repository. This should hopefully make CI slightly faster too.
2019-10-09cmsis: update to latest version of SVD filesRon Evans
Signed-off-by: Ron Evans <[email protected]>
2019-07-07all: add HiFive1 rev B board with RISC-V architectureAyke van Laethem
This page has been a big help in adding support for this new chip: https://wiki.osdev.org/HiFive-1_Bare_Bones
2019-03-22all: switch to LLVM 8Ayke van Laethem