reelboard: support Reel Board (nrf52840 dev board)
Signed-off-by: Ron Evans <ron@hybridgroup.com>
Этот коммит содержится в:
родитель
8f35a4711a
коммит
8325f2a53d
5 изменённых файлов: 54 добавлений и 0 удалений
|
@ -27,5 +27,7 @@ script:
|
||||||
- tinygo build -o blinky1.nrf51d.elf -target=pca10031 examples/blinky1
|
- tinygo build -o blinky1.nrf51d.elf -target=pca10031 examples/blinky1
|
||||||
- tinygo build -o blinky1.stm32.elf -target=bluepill examples/blinky1
|
- tinygo build -o blinky1.stm32.elf -target=bluepill examples/blinky1
|
||||||
- tinygo build -o blinky1.avr.o -target=arduino examples/blinky1 # TODO: avr-as/avr-gcc doesn't work
|
- tinygo build -o blinky1.avr.o -target=arduino examples/blinky1 # TODO: avr-as/avr-gcc doesn't work
|
||||||
|
- tinygo build -o blinky1.reel.elf -target=reelboard examples/blinky1
|
||||||
|
- tinygo build -o blinky2.reel.elf -target=reelboard examples/blinky2
|
||||||
- tinygo build -o blinky1.pca10056.elf -target=pca10056 examples/blinky1
|
- tinygo build -o blinky1.pca10056.elf -target=pca10056 examples/blinky1
|
||||||
- tinygo build -o blinky2.pca10056.elf -target=pca10056 examples/blinky2
|
- tinygo build -o blinky2.pca10056.elf -target=pca10056 examples/blinky2
|
||||||
|
|
8
Makefile
8
Makefile
|
@ -20,6 +20,11 @@ else ifeq ($(TARGET),microbit)
|
||||||
OBJCOPY = arm-none-eabi-objcopy
|
OBJCOPY = arm-none-eabi-objcopy
|
||||||
TGOFLAGS += -target $(TARGET)
|
TGOFLAGS += -target $(TARGET)
|
||||||
|
|
||||||
|
else ifeq ($(TARGET),reelboard)
|
||||||
|
# reel board
|
||||||
|
OBJCOPY = arm-none-eabi-objcopy
|
||||||
|
TGOFLAGS += -target $(TARGET)
|
||||||
|
|
||||||
else ifeq ($(TARGET),bluepill)
|
else ifeq ($(TARGET),bluepill)
|
||||||
# "blue pill" development board
|
# "blue pill" development board
|
||||||
# See: https://wiki.stm32duino.com/index.php?title=Blue_Pill
|
# See: https://wiki.stm32duino.com/index.php?title=Blue_Pill
|
||||||
|
@ -48,6 +53,9 @@ ifeq ($(TARGET),pca10040)
|
||||||
flash-%: build/%.hex
|
flash-%: build/%.hex
|
||||||
nrfjprog -f nrf52 --sectorerase --program $< --reset
|
nrfjprog -f nrf52 --sectorerase --program $< --reset
|
||||||
else ifeq ($(TARGET),microbit)
|
else ifeq ($(TARGET),microbit)
|
||||||
|
flash-%: build/%.hex
|
||||||
|
openocd -f interface/cmsis-dap.cfg -f target/nrf51.cfg -c 'program $< reset exit'
|
||||||
|
else ifeq ($(TARGET),reelboard)
|
||||||
flash-%: build/%.hex
|
flash-%: build/%.hex
|
||||||
openocd -f interface/cmsis-dap.cfg -f target/nrf51.cfg -c 'program $< reset exit'
|
openocd -f interface/cmsis-dap.cfg -f target/nrf51.cfg -c 'program $< reset exit'
|
||||||
else ifeq ($(TARGET),arduino)
|
else ifeq ($(TARGET),arduino)
|
||||||
|
|
|
@ -38,6 +38,8 @@ technology (LLVM) as the proprietary ARM compiler for code generation.
|
||||||
<https://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF52832>`_)
|
<https://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF52832>`_)
|
||||||
* `nRF52840-MDK <https://wiki.makerdiary.com/nrf52840-mdk/>`_ (`nRF52840
|
* `nRF52840-MDK <https://wiki.makerdiary.com/nrf52840-mdk/>`_ (`nRF52840
|
||||||
<https://www.nordicsemi.com/eng/Products/nRF52840>`_)
|
<https://www.nordicsemi.com/eng/Products/nRF52840>`_)
|
||||||
|
* `reel board <https://www.phytec.eu/product-eu/internet-of-things/reelboard/>`_ (`nRF52840
|
||||||
|
<https://www.nordicsemi.com/eng/Products/nRF52840>`_)
|
||||||
* `Nordic PCA10056 <https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52840-DK>`_ (`nRF52840
|
* `Nordic PCA10056 <https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52840-DK>`_ (`nRF52840
|
||||||
<https://www.nordicsemi.com/eng/Products/nRF52840>`_)
|
<https://www.nordicsemi.com/eng/Products/nRF52840>`_)
|
||||||
* `QEMU <https://wiki.qemu.org/Documentation/Platforms/ARM>`_ (`LM3S6965
|
* `QEMU <https://wiki.qemu.org/Documentation/Platforms/ARM>`_ (`LM3S6965
|
||||||
|
|
35
src/machine/board_reelboard.go
Обычный файл
35
src/machine/board_reelboard.go
Обычный файл
|
@ -0,0 +1,35 @@
|
||||||
|
// +build reelboard
|
||||||
|
|
||||||
|
package machine
|
||||||
|
|
||||||
|
const HasLowFrequencyCrystal = true
|
||||||
|
|
||||||
|
// LEDs on the reel board
|
||||||
|
const (
|
||||||
|
LED = LED1
|
||||||
|
LED1 = LED_YELLOW
|
||||||
|
LED2 = LED_RED
|
||||||
|
LED3 = LED_GREEN
|
||||||
|
LED4 = LED_BLUE
|
||||||
|
LED_RED = 11
|
||||||
|
LED_GREEN = 12
|
||||||
|
LED_BLUE = 41
|
||||||
|
LED_YELLOW = 13
|
||||||
|
)
|
||||||
|
|
||||||
|
// User "a" button on the reel board
|
||||||
|
const (
|
||||||
|
BUTTON = 7
|
||||||
|
)
|
||||||
|
|
||||||
|
// UART pins
|
||||||
|
const (
|
||||||
|
UART_TX_PIN = 6
|
||||||
|
UART_RX_PIN = 8
|
||||||
|
)
|
||||||
|
|
||||||
|
// I2C pins
|
||||||
|
const (
|
||||||
|
SDA_PIN = 26
|
||||||
|
SCL_PIN = 27
|
||||||
|
)
|
7
targets/reelboard.json
Обычный файл
7
targets/reelboard.json
Обычный файл
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"inherits": ["nrf52840"],
|
||||||
|
"build-tags": ["reelboard"],
|
||||||
|
"flash": "openocd -f interface/cmsis-dap.cfg -f target/nrf51.cfg -c 'program {hex} reset exit'",
|
||||||
|
"ocd-daemon": ["openocd", "-f", "interface/cmsis-dap.cfg", "-f", "target/nrf51.cfg"],
|
||||||
|
"gdb-initial-cmds": ["target remote :3333", "monitor halt", "load", "monitor reset", "c"]
|
||||||
|
}
|
Загрузка…
Создание таблицы
Сослаться в новой задаче