
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.
21 строка
518 Б
JSON
21 строка
518 Б
JSON
{
|
|
"inherits": ["xtensa"],
|
|
"cpu": "esp32",
|
|
"build-tags": ["esp32", "esp"],
|
|
"scheduler": "tasks",
|
|
"serial": "uart",
|
|
"linker": "xtensa-esp32-elf-ld",
|
|
"default-stack-size": 2048,
|
|
"cflags": [
|
|
"-mcpu=esp32"
|
|
],
|
|
"rtlib": "compiler-rt",
|
|
"libc": "picolibc",
|
|
"linkerscript": "targets/esp32.ld",
|
|
"extra-files": [
|
|
"src/device/esp/esp32.S",
|
|
"src/internal/task/task_stack_esp32.S"
|
|
],
|
|
"binary-format": "esp32",
|
|
"flash-command": "esptool.py --chip=esp32 --port {port} write_flash 0x1000 {bin} -ff 80m -fm dout"
|
|
}
|