File tree 4 files changed +91
-0
lines changed
4 files changed +91
-0
lines changed Original file line number Diff line number Diff line change @@ -867,6 +867,10 @@ endif
867
867
@$(MD5SUM) test.hex
868
868
$(TINYGO) build -size short -o test.hex -target=elecrow-rp2350 examples/blinky1
869
869
@$(MD5SUM) test.hex
870
+ $(TINYGO) build -size short -o test.hex -target=hw-651 examples/machinetest
871
+ @$(MD5SUM) test.hex
872
+ $(TINYGO) build -size short -o test.hex -target=hw-651-s110v8 examples/machinetest
873
+ @$(MD5SUM) test.hex
870
874
ifneq ($(WASM ) , 0)
871
875
$(TINYGO) build -size short -o wasm.wasm -target=wasm examples/wasm/export
872
876
$(TINYGO) build -size short -o wasm.wasm -target=wasm examples/wasm/main
Original file line number Diff line number Diff line change
1
+ //go:build hw_651
2
+
3
+ package machine
4
+
5
+ // No-name brand board based on the nRF51822 chip with low frequency crystal on board.
6
+ // Pinout (reverse engineered from the board) can be found here:
7
+ // https://aviatorahmet.blogspot.com/2020/12/pinout-of-nrf51822-board.html
8
+ // https://cr0wg4n.medium.com/pinout-nrf51822-board-hw-651-78da2eda8894
9
+
10
+ const HasLowFrequencyCrystal = true
11
+
12
+ var DefaultUART = UART0
13
+
14
+ // GPIO pins on header J1
15
+ const (
16
+ J1_01 = P0_21
17
+ J1_03 = P0_23
18
+ J1_04 = P0_22
19
+ J1_05 = P0_25
20
+ J1_06 = P0_24
21
+ J1_09 = P0_29
22
+ J1_10 = P0_28
23
+ J1_11 = P0_30
24
+ J1_13 = P0_00
25
+ J1_15 = P0_02
26
+ J1_17 = P0_04
27
+ J1_16 = P0_01
28
+ J1_18 = P0_03
29
+ )
30
+
31
+ // GPIO pins on header J2
32
+ const (
33
+ J2_01 = P0_20
34
+ J2_03 = P0_18
35
+ J2_04 = P0_19
36
+ J2_07 = P0_16
37
+ J2_08 = P0_15
38
+ J2_09 = P0_14
39
+ J2_10 = P0_13
40
+ J2_11 = P0_12
41
+ J2_12 = P0_11
42
+ J2_13 = P0_10
43
+ J2_14 = P0_09
44
+ J2_15 = P0_08
45
+ J2_16 = P0_07
46
+ J2_17 = P0_06
47
+ J2_18 = P0_05
48
+ )
49
+
50
+ // UART pins
51
+ const (
52
+ UART_TX_PIN = P0_24 // J1_06 on the board
53
+ UART_RX_PIN = P0_25 // J1_05 on the board
54
+ )
55
+
56
+ // ADC pins
57
+ const (
58
+ ADC0 = P0_03 // J1_18 on the board
59
+ ADC1 = P0_02 // J1_15 on the board
60
+ ADC2 = P0_01 // J1_16 on the board
61
+ ADC3 = P0_04 // J1_17 on the board
62
+ ADC4 = P0_05 // J2_18 on the board
63
+ ADC5 = P0_06 // J2_17 on the board
64
+ )
65
+
66
+ // I2C pins
67
+ const (
68
+ SDA_PIN = P0_30 // J1_11 on the board
69
+ SCL_PIN = P0_00 // J1_13 on the board
70
+ )
71
+
72
+ // SPI pins
73
+ const (
74
+ SPI0_SCK_PIN = P0_23 // J1_03 on the board
75
+ SPI0_SDO_PIN = P0_21 // J1_01 on the board
76
+ SPI0_SDI_PIN = P0_22 // J1_04 on the board
77
+ )
Original file line number Diff line number Diff line change
1
+ {
2
+ "inherits" : [" hw-651" , " nrf51-s110v8" ]
3
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "inherits" : [" nrf51" ],
3
+ "build-tags" : [" hw_651" ],
4
+ "serial" : " uart" ,
5
+ "flash-method" : " openocd" ,
6
+ "openocd-interface" : " cmsis-dap"
7
+ }
You can’t perform that action at this time.
0 commit comments