tinygo/src
Ayke van Laethem b67351babe machine: define Serial as the default output
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-13 16:43:37 +02:00
..
device cortexm: disable FPU on Cortex-M4 2021-04-24 18:41:40 +02:00
examples machine: define Serial as the default output 2021-05-13 16:43:37 +02:00
internal runtime: use the tasks scheduler instead of coroutines 2021-05-09 17:40:13 +02:00
machine machine: define Serial as the default output 2021-05-13 16:43:37 +02:00
os WASI & darwin: support basic file io based on libc 2021-03-28 12:37:15 +02:00
reflect reflect: implement New function 2021-04-12 14:49:26 +02:00
runtime machine: define Serial as the default output 2021-05-13 16:43:37 +02:00
sync extend stdlib to allow import of more packages (#1099) 2020-06-23 11:56:28 +02:00
syscall WASI & darwin: support basic file io based on libc 2021-03-28 12:37:15 +02:00
testing main: match go test output 2021-05-06 20:04:16 +02:00