diff options
author | Ayke van Laethem <[email protected]> | 2021-06-01 13:27:58 +0200 |
---|---|---|
committer | Ron Evans <[email protected]> | 2021-06-25 17:58:39 +0200 |
commit | 96e863f0f37cef0e8f36cb0d5f1c94fe062bc03d (patch) | |
tree | f4044fca721e0d1f58f64e7a312b6fb92215f64f /targets/pca10031.json | |
parent | 75298bb84bcb966998ca00f3cc5506a9757a5038 (diff) | |
download | tinygo-96e863f0f37cef0e8f36cb0d5f1c94fe062bc03d.tar.gz tinygo-96e863f0f37cef0e8f36cb0d5f1c94fe062bc03d.zip |
all: add a flag to the command line to select the serial implementation
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.
Diffstat (limited to 'targets/pca10031.json')
-rw-r--r-- | targets/pca10031.json | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/targets/pca10031.json b/targets/pca10031.json index cccae828a..8af365cc8 100644 --- a/targets/pca10031.json +++ b/targets/pca10031.json @@ -1,6 +1,7 @@ { "inherits": ["nrf51"], "build-tags": ["pca10031"], + "serial": "uart", "flash-command": "nrfjprog -f nrf51 --sectorerase --program {hex} --reset", "openocd-interface": "cmsis-dap" } |