nrf52840: generic board support (#4121)
machine/nrf52840: generic board support
Этот коммит содержится в:
родитель
f5e933cd4d
коммит
828b9614c2
5 изменённых файлов: 42 добавлений и 0 удалений
|
@ -684,6 +684,8 @@ endif
|
||||||
@$(MD5SUM) test.hex
|
@$(MD5SUM) test.hex
|
||||||
$(TINYGO) build -size short -o test.hex -target=feather-nrf52840 examples/usb-midi
|
$(TINYGO) build -size short -o test.hex -target=feather-nrf52840 examples/usb-midi
|
||||||
@$(MD5SUM) test.hex
|
@$(MD5SUM) test.hex
|
||||||
|
$(TINYGO) build -size short -o test.hex -target=nrf52840-s140v6-uf2-generic examples/serial
|
||||||
|
@$(MD5SUM) test.hex
|
||||||
ifneq ($(STM32), 0)
|
ifneq ($(STM32), 0)
|
||||||
$(TINYGO) build -size short -o test.hex -target=bluepill examples/blinky1
|
$(TINYGO) build -size short -o test.hex -target=bluepill examples/blinky1
|
||||||
@$(MD5SUM) test.hex
|
@$(MD5SUM) test.hex
|
||||||
|
|
25
src/machine/board_nrf52840_generic.go
Обычный файл
25
src/machine/board_nrf52840_generic.go
Обычный файл
|
@ -0,0 +1,25 @@
|
||||||
|
//go:build nrf52840 && nrf52840_generic
|
||||||
|
|
||||||
|
package machine
|
||||||
|
|
||||||
|
var (
|
||||||
|
LED = NoPin
|
||||||
|
SDA_PIN = NoPin
|
||||||
|
SCL_PIN = NoPin
|
||||||
|
UART_TX_PIN = NoPin
|
||||||
|
UART_RX_PIN = NoPin
|
||||||
|
SPI0_SCK_PIN = NoPin
|
||||||
|
SPI0_SDO_PIN = NoPin
|
||||||
|
SPI0_SDI_PIN = NoPin
|
||||||
|
|
||||||
|
// https://pid.codes/org/TinyGo/
|
||||||
|
usb_VID uint16 = 0x1209
|
||||||
|
usb_PID uint16 = 0x9090
|
||||||
|
|
||||||
|
usb_STRING_MANUFACTURER = "TinyGo"
|
||||||
|
usb_STRING_PRODUCT = "nRF52840 Generic board"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
DefaultUART = UART0
|
||||||
|
)
|
5
src/machine/machine_nrf52840_lfxtal_false.go
Обычный файл
5
src/machine/machine_nrf52840_lfxtal_false.go
Обычный файл
|
@ -0,0 +1,5 @@
|
||||||
|
//go:build nrf52840 && nrf52840_lfxtal_false
|
||||||
|
|
||||||
|
package machine
|
||||||
|
|
||||||
|
const HasLowFrequencyCrystal = false
|
5
src/machine/machine_nrf52840_lfxtal_true.go
Обычный файл
5
src/machine/machine_nrf52840_lfxtal_true.go
Обычный файл
|
@ -0,0 +1,5 @@
|
||||||
|
//go:build nrf52840 && ((nrf52840_generic && !nrf52840_lfxtal_false) || nrf52840_lfxtal_true)
|
||||||
|
|
||||||
|
package machine
|
||||||
|
|
||||||
|
const HasLowFrequencyCrystal = true
|
5
targets/nrf52840-s140v6-uf2-generic.json
Обычный файл
5
targets/nrf52840-s140v6-uf2-generic.json
Обычный файл
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"inherits": ["nrf52840", "nrf52840-s140v6-uf2"],
|
||||||
|
"build-tags": ["nrf52840_generic"],
|
||||||
|
"serial-port": ["1209:9090"]
|
||||||
|
}
|
Загрузка…
Создание таблицы
Сослаться в новой задаче