Граф коммитов

2926 коммитов

Автор SHA1 Сообщение Дата
Damian Gryski
a2704f1435 all: move from os.IsFoo to errors.Is(err, ErrFoo) 2022-08-07 10:32:23 +02:00
Damian Gryski
edbbca5614 all: remove calls to deprecated ioutil package
Fixes produced via semgrep and https://github.com/dgryski/semgrep-go/blob/master/ioutil.yml
2022-08-07 10:32:23 +02:00
Roman Volosatovs
13f21477b1 syscall/darwin: add ENOTCONN
Signed-off-by: Roman Volosatovs <roman@profian.com>
2022-08-07 09:04:57 +02:00
Roman Volosatovs
9d73e6cfe4 os: add SyscallError.Timeout
Signed-off-by: Roman Volosatovs <roman@profian.com>
2022-08-06 12:40:15 +02:00
Roman Volosatovs
9e7667ffae syscall: add WASI {D,R}SYNC, NONBLOCK FD flags
Signed-off-by: Roman Volosatovs <roman@profian.com>
2022-08-06 09:38:00 +02:00
Roman Volosatovs
b86467f9c5 syscall: group WASI consts by purpose
Signed-off-by: Roman Volosatovs <roman@profian.com>
2022-08-06 09:38:00 +02:00
Roman Volosatovs
13a16afc2a net: sync net.go with Go 1.18 stdlib
Signed-off-by: Roman Volosatovs <roman@profian.com>
2022-08-06 08:05:29 +02:00
Roman Volosatovs
a107b4d459 syscall: ensure correct C prototype WASI function signature
Signed-off-by: Roman Volosatovs <roman@profian.com>
2022-08-05 21:05:46 +02:00
Ayke van Laethem
5c176f80d5 ci: add check that TinyGo can be built using Homebrew LLVM
This is supposed to work, but there was no CI check. Add it to make sure
it continues to work.
2022-08-05 16:21:34 +02:00
Ayke van Laethem
c4392d9472 all: rename assembly files to .S extension
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-08-04 15:43:42 +02:00
Ayke van Laethem
b6d6efde07 all: remove support for LLVM 13 2022-08-04 14:31:54 +02:00
sago35
8b67282f91 examples/wasm: improve Makefile 2022-08-04 13:10:41 +02:00
Ayke van Laethem
c7a23183e8 all: format code according to Go 1.19 rules
Go 1.19 started reformatting code in a way that makes it more obvious
how it will be rendered on pkg.go.dev. It gets it almost right, but not
entirely. Therefore, I had to modify some of the comments so that they
are formatted correctly.
2022-08-04 12:18:32 +02:00
Ayke van Laethem
f936125658 main: use tags parser from buildutil
This should add support for things like quotes around tags, if they are
ever needed.

Only making this change now because I happened to stumble across
buildutil.TagsFlag.
2022-08-04 11:17:43 +02:00
sago35
3cfaceeb16 all: update version for next development iteration 2022-08-04 09:11:18 +02:00
Ayke van Laethem
f0391eac25 all: update to version 0.25.0 2022-08-02 18:25:51 +02:00
Phil Kedy
05cdde162c Set internal linkage and keeping default visibility for anonymous functions 2022-08-01 10:53:48 +02:00
sago35
25c8d3ec3a wasm,wasi: stub runtime.buffered, runtime.getchar 2022-07-30 17:41:54 +02:00
Ayke van Laethem
7b1e5f6f99 compiler: implement unsafe.Alignof and unsafe.Sizeof for generic code
For some reason, these aren't lowered when a generic function is
instantiated by the SSA package.

I've left unsafe.Offsetof to be implemented later, it's a bit difficult
to do correctly the way the code is currently structured.
2022-07-28 15:43:51 +02:00
Ayke van Laethem
70c52ef1b4 compiler: fix type names for generic named structs
Without this change, the compiler would probably have worked just fine
but the generated types would look odd.

You can see in the test case that it now doesn't use `main.Point` but
rather the correct `main.Poin[float32]` etc.
2022-07-28 15:43:51 +02:00
Ayke van Laethem
5078ce382d compiler: do not try to build generic functions
There is no reason to: we should only build instantiated generic
functions.
2022-07-28 15:43:51 +02:00
Ayke van Laethem
408855da14 compiler: add generics test case
This test case shows a few bugs, that I will fix in subsequent patches.
2022-07-28 15:43:51 +02:00
Phil Kedy
58072a5167 compiler: fix issue with methods on generic structs 2022-07-28 13:46:07 +02:00
Kenneth Bell
5026047cde rp2040: make picoprobe default openocd interface 2022-07-28 06:48:46 +02:00
deadprogram
67aea275c5 machine/rp2040: turn off pullup/down when not input type not specified
Signed-off-by: deadprogram <ron@hybridgroup.com>
2022-07-27 21:45:45 +02:00
Ayke van Laethem
99bd4d2c7c esp32: optimize SPI transmit
For write-only operations (in SPI displays for example), the transmit
speed is doubled with this relatively small change.

In the future, we should try to use DMA instead for larger buffers. But
this is already a significant improvement and will always be an
improvement for small buffer sizes.
2022-07-27 17:22:34 +02:00
sago35
a4b22bd125 usb/midi: add definition of MIDI note number 2022-07-27 16:19:13 +02:00
deadprogram
2ed7523001 build/linux/arm: pin dotenv Ruby gem to version 2.7.6
Signed-off-by: deadprogram <ron@hybridgroup.com>
2022-07-27 14:25:23 +02:00
Ayke van Laethem
4aec3d04f9 esp32: fix WDT reset on the MCH2022 badge 2022-07-26 10:47:28 +02:00
Ayke van Laethem
4f729c323d darwin: don't clobber X18 and FP registers
These are reserved registers on MacOS so don't need to be clobbered, and
result in a compiler waring:

    ld.lld-14: warning: inline asm clobber list contains reserved registers: X18, FP
    Reserved registers on the clobber list may not be preserved across the asm statement, and clobbering them may lead to undefined behaviour.
2022-07-26 09:02:06 +02:00
deadprogram
1f43f32aae target: add gopherbot and gopherbot2 aliases to simplify for newer users
Signed-off-by: deadprogram <ron@hybridgroup.com>
2022-07-26 08:06:24 +02:00
Kenneth Bell
6d1cbe6fb9 rp2040: usb: reset device address on bus reset 2022-07-26 06:47:16 +02:00
sago35
7cd2890434 rp2040: add resetBlock for USBCTRL 2022-07-25 17:01:14 +02:00
sago35
13311da7e9 main: change to ignore PortReset failures 2022-07-25 14:04:14 +02:00
sago35
3047d8f321 samd51: improve TRNG 2022-07-22 09:27:43 +02:00
deadprogram
13ed58950f machine/usb/midi: add NoteOn, NoteOff, and SendCC methods for more complete API
Signed-off-by: deadprogram <ron@hybridgroup.com>
2022-07-21 11:05:53 +02:00
sago35
5271bd8cfa xiao-ble: add support for flash-1200-bps-reset 2022-07-21 08:31:28 +02:00
sago35
72137d663b usb: adjust buffer alignment (samd21, samd51, nrf52840) 2022-07-20 08:05:52 +02:00
sago35
740134197e samd51: add support for DAC1 2022-07-18 12:10:06 +02:00
Ayke van Laethem
610e7fd16a boards: Add MCH2022 badge
I haven't fully tested this badge because I don't have the physical
hardware but I have followed the pinout from the website.
2022-07-16 08:31:22 +02:00
Dan Kegel
69a6718b38 archFamily(): arm64 is aarch64, not arm; fixes #2985 2022-07-15 17:41:39 +02:00
Ayke van Laethem
7d31d98f0f runtime: rename printuint to printuintptr
This is arguably the correct name, and is consistent with other print
functions.
2022-07-15 15:44:40 +02:00
Ayke van Laethem
0a93347e1c machine: reorder pin definitions to improve pin list on tinygo.org 2022-07-15 14:46:33 +02:00
Ayke van Laethem
411333327e esp32c3: provide hardware pin constants 2022-07-15 14:46:33 +02:00
Ayke van Laethem
159f7ebbc3 esp32: provide hardware pin constants 2022-07-15 14:46:33 +02:00
Ayke van Laethem
153ff09cc5 esp8266: provide hardware pin constants like GPIO2 2022-07-15 14:46:33 +02:00
Ayke van Laethem
57cddf5657 clue: remove pins D21..D28
These pins do not appear in the pinout:
https://learn.adafruit.com/adafruit-clue/pinouts
2022-07-15 14:46:33 +02:00
Ayke van Laethem
6a35719594 avr: fix some apparent mistake in atmega1280/atmega2560 pin constants 2022-07-15 14:46:33 +02:00
Ayke van Laethem
20a46e1b28 nrf51: define and use P0_xx constants
This makes nrf51 consistent with nrf52 and other chips, which do provide
constants for hardware pin numbers.
I've also added the microbit to the smoketest because it is used on
play.tinygo.org. And removed PCA10040 and PCA10056 because they aren't
provided on play.tinygo.org anymore.
2022-07-15 14:46:33 +02:00
sago35
926c02b6ff rp2040: reduced allocations 2022-07-15 09:41:32 +02:00