pca10056: support this nrf52840-based board
Signed-off-by: Ron Evans <ron@hybridgroup.com>
Этот коммит содержится в:
родитель
70830cd9da
коммит
8f35a4711a
4 изменённых файлов: 46 добавлений и 0 удалений
|
@ -27,3 +27,5 @@ 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.pca10056.elf -target=pca10056 examples/blinky1
|
||||||
|
- tinygo build -o blinky2.pca10056.elf -target=pca10056 examples/blinky2
|
||||||
|
|
|
@ -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>`_)
|
||||||
|
* `Nordic PCA10056 <https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52840-DK>`_ (`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
|
||||||
<http://www.ti.com/product/LM3S6965>`_) |br|
|
<http://www.ti.com/product/LM3S6965>`_) |br|
|
||||||
This target is supported only for testing purposes. It has not been tested
|
This target is supported only for testing purposes. It has not been tested
|
||||||
|
|
35
src/machine/board_pca10056.go
Обычный файл
35
src/machine/board_pca10056.go
Обычный файл
|
@ -0,0 +1,35 @@
|
||||||
|
// +build pca10056
|
||||||
|
|
||||||
|
package machine
|
||||||
|
|
||||||
|
const HasLowFrequencyCrystal = true
|
||||||
|
|
||||||
|
// LEDs on the pca10056
|
||||||
|
const (
|
||||||
|
LED = LED1
|
||||||
|
LED1 = 13
|
||||||
|
LED2 = 14
|
||||||
|
LED3 = 15
|
||||||
|
LED4 = 16
|
||||||
|
)
|
||||||
|
|
||||||
|
// Buttons on the pca10056
|
||||||
|
const (
|
||||||
|
BUTTON = BUTTON1
|
||||||
|
BUTTON1 = 11
|
||||||
|
BUTTON2 = 12
|
||||||
|
BUTTON3 = 24
|
||||||
|
BUTTON4 = 25
|
||||||
|
)
|
||||||
|
|
||||||
|
// UART pins
|
||||||
|
const (
|
||||||
|
UART_TX_PIN = 6
|
||||||
|
UART_RX_PIN = 8
|
||||||
|
)
|
||||||
|
|
||||||
|
// I2C pins
|
||||||
|
const (
|
||||||
|
SDA_PIN = 26
|
||||||
|
SCL_PIN = 27
|
||||||
|
)
|
7
targets/pca10056.json
Обычный файл
7
targets/pca10056.json
Обычный файл
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"inherits": ["nrf52840"],
|
||||||
|
"build-tags": ["pca10056"],
|
||||||
|
"flash": "nrfjprog -f nrf52 --sectorerase --program {hex} --reset",
|
||||||
|
"ocd-daemon": ["openocd", "-f", "interface/cmsis-dap.cfg", "-f", "target/nrf51.cfg"],
|
||||||
|
"gdb-initial-cmds": ["target remote :3333", "monitor halt", "load", "monitor reset", "c"]
|
||||||
|
}
|
Загрузка…
Создание таблицы
Сослаться в новой задаче