Ayke van Laethem
d639e01650
runtime: implement math/rand.fastrand64 to fix linker error
This is needed for Go 1.20 support.
2 years ago
Ayke van Laethem
c43958972c
compiler: add support for new unsafe slice/string functions
This adds support for unsafe.SliceData, unsafe.String, and
unsafe.SringData that were introduced in Go 1.20.
2 years ago
Ayke van Laethem
33489d6344
testing: implement t.Setenv
This method has been added in Go 1.17 and is used in archive/zip
starting with Go 1.20. Therefore, this method is now needed in Go 1.20.
I've left out the parts that disable parallel execution of tests,
because we don't do that in TinyGo.
See:
* https://github.com/golang/go/issues/41260
* https://go-review.googlesource.com/c/go/+/260577
2 years ago
Ayke van Laethem
80077ef276
test: print package name when compilation failed
Before this patch, a compile error would prevent the 'ok' or 'FAIL' line
to be printed. That's unexpected. This patch changes the code in such a
way that it's obvious a test result line is printed in all cases.
To be able to also print the package name, I had to make sure the build
result is passed through everywhere even on all the failure paths. This
results in a bit of churn, but it's all relatively straightforward.
Found while working on Go 1.20.
2 years ago
Ayke van Laethem
911ce3a4bc
compiler: update golang.org/x/tools/ssa
This package needs to be updated to support Go 1.20. There were a few
backwards incompatible changes that required updates to the compiler
package.
2 years ago
joey
776dabb2c8
add a stub for os.Chtimes
2 years ago
Ayke van Laethem
e11df5c212
cgo: add support for bitwise operators
2 years ago
deadprogram
656805d91f
docs: update README with missing boards
Signed-off-by: deadprogram <ron@hybridgroup.com>
2 years ago
Thomas Richner
05ec4e6bd0
Support for Adafruit Feather M0 Express board
2 years ago
Achille Roussel
ae65b37762
add comment about where src/os/file.go came from
Signed-off-by: Achille Roussel <achille.roussel@gmail.com>
2 years ago
John Clark
aa12579864
Add SPI support for for the ESP32-C3 device.
Signed-off-by: John Clark <inindev@gmail.com>
2 years ago
Damian Gryski
715b269f78
src/runtime: add xorshift-based fastrand64
2 years ago
sago35
5f3534fe72
machine/usb: change to not send before endpoint initialization
2 years ago
irieda
a7ff2731b9
Add USB HID joystick support ( #3366 )
machine/usb: add USB HID joystick support
2 years ago
Anuraag Agrawal
0566bbfeb4
Use renamed EXTRA_CFLAGS when building wasi-libc
2 years ago
sago35
70c4e1cf96
machine/usb: improve buffer size definition
2 years ago
Ayke van Laethem
9fd0567fb5
compiler: fix stack overflow when creating recursive pointer types
There were two types that could result in a compiler stack overflow.
This is difficult to fix in LLVM 14, so I won't even bother. However,
this is trivial to fix with opaque pointers in LLVM 15. Therefore, this
fix is for LLVM 15 only.
Fixes: https://github.com/tinygo-org/tinygo/issues/3341
2 years ago
BCG
481aba6536
board: Adafruit KB2040 ( https://www.adafruit.com/product/5302 )
2 years ago
Adrian Cole
a700f58581
wasi: makes wasmtime "run" explicit
wasmtime by default will assume the subcommand is "run" vs one of its
others, but being explicit helps clarify the actual command invoked.
For example, we pass similar looking args to wasmtime and also wasi.
Signed-off-by: Adrian Cole <adrian@tetrate.io>
2 years ago
Jesús Espino
e71e289e8b
Add basic atmega32u support ( #3337 )
machine/atmega32u: add support for arduino leonardo
2 years ago
sago35
6cdc718bfb
rp2040: drop deprecated build tags
2 years ago
sago35
70c94c6d01
rp2040: add version check for RP2040-E5
2 years ago
sago35
762a6f1256
rp2040: fix usb device enumeration (RP2040-E5)
2 years ago
Yurii Soldak
8d4d3c6201
build: drop deprecated build tags
2 years ago
Yurii Soldak
146e2cd376
build: generate files with go:build tags
2 years ago
Jesús Espino
d304e6706b
Adding support for waveshare rp2040-zero ( #3321 )
machine: adding support for waveshare rp2040-zero
2 years ago
deadprogram
c5c6464175
compileopts: replace 'retries' with more correct 'timeout' param
Signed-off-by: deadprogram <ron@hybridgroup.com>
2 years ago
sago35
c90ff1e1cf
rp2040: fix interrupt issue (2)
2 years ago
sago35
0f6dfedcfd
rp2040: fix interrupt issue
2 years ago
Ron Evans
69a284bd36
Revert "Bump CMSIS to 5.9.0"
This reverts commit 92be61534e
.
2 years ago
Anton D. Kachalov
92be61534e
Bump CMSIS to 5.9.0
2 years ago
Damian Gryski
675b8e3f3c
builder: always run wasm-opt for wasm32 binaries
2 years ago
Ayke van Laethem
f3d0195d35
runtime: move KeepAlive/SetFinalizer to common code
We don't support these yet so let's just put them in a central location.
Once these functions are supported we can think about how to structure
the code again.
2 years ago
sago35
398c284480
usbhid: change usage-maximum to 0xFF
2 years ago
Damian Gryski
86f125cf72
reflect: track flags when size changes from fits-in-pointer to not
Fixes #3328
2 years ago
sago35
5293d3e5f0
atsame5x: reduce heap allocation
2 years ago
Ayke van Laethem
7aca814954
windows: update mingw-w64 version
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.
2 years ago
deadprogram
1d52e6be29
machine/nrf51: add ADC implementation
Signed-off-by: deadprogram <ron@hybridgroup.com>
2 years ago
sago35
acb2391439
atsame5x: fix extendedID handling
2 years ago
Ayke van Laethem
49007891c8
all: re-enable AVR tests
I have some confidence they'll work reliably now.
2 years ago
Ayke van Laethem
54aec042b7
avr: add channel test
It is working now, so add it as a test. Not sure why, maybe the ThinLTO
change fixed something here?
2 years ago
sago35
baca8a643e
xiao-rp2040: add pin definitions
2 years ago
Anuraag Agrawal
b731919f97
Fix panic when size 0 passed to malloc
2 years ago
Julia Ogris
c759e6fc2d
reflect: Add Value.IsZero() method
Add Value.IsZero() with tests, largely copied from the Go source code.
The tests were altered to remove the parts calling `Zero()` as that is
still unimplemented in tinygo, and to remove a test that tries to catch
a panic which is not supported on wasi.
A new case for `UnsafePointer` in `Value.IsNil()` was required for
unsafe.Pointer tests to pass.
Link: https://cs.opensource.google/go/go/+/refs/tags/go1.19.3:src/reflect/value.go;l=1568
Link: https://cs.opensource.google/go/go/+/refs/tags/go1.19.3:src/reflect/all_test.go;l=1322
Co-authored-by: Cam Hutchison <camh@xdna.net>
2 years ago
goropikari
a329f56ec2
Fix xiao rp2040 pin variable assignment
According to official infomation(https://wiki.seeedstudio.com/XIAO-RP2040/ ), D9 and D10 are corresponding to GPIO4 and GPIO3, respectively.
2 years ago
deadprogram
6e503f5ab9
build: update docker GH action to use latest docker action versions
2 years ago
deadprogram
217449df07
machine/stm32f1, stm32f4: fix ADC by clearing the correct bit for rank after each read
Signed-off-by: deadprogram <ron@hybridgroup.com>
2 years ago
deadprogram
a7fc65861d
machine/stm32: always set ADC pins to pullups floating
Signed-off-by: deadprogram <ron@hybridgroup.com>
2 years ago
Damian Gryski
f0a271bd21
transform: remove duplicate if in gc transform
2 years ago
Ayke van Laethem
4d14d3cd54
avr: support ThinLTO
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.
2 years ago