Skip to content

Commit 43b8f76

Browse files
committed
add board pin labels
1 parent eda8907 commit 43b8f76

16 files changed

+274
-72
lines changed

Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ BUILD = build
66
IDF = idf.py
77

88
_IGNORE0 := $(shell test -f Makefile.user || cp sample-Makefile.user Makefile.user)
9+
ifeq ($(TARGET),)
910
include Makefile.user
11+
endif
1012

1113
MON_PORT ?= $(SERIAL_PORT)
1214
ESPTOOL ?= esptool.py
@@ -92,7 +94,7 @@ mon:
9294
. $(IDF_PATH)/export.sh ; $(IDF_PATH)/tools/idf_monitor.py --port $(MON_PORT) --baud 115200 $(BUILD)/espjd.elf
9395

9496
monf:
95-
. $(IDF_PATH)/export.sh ; $(IDF_PATH)/tools/idf_monitor.py --port $(SERIAL_PORT) --baud 1500000 $(BUILD)/espjd.elf
97+
. $(IDF_PATH)/export.sh ; $(IDF_PATH)/tools/idf_monitor.py --port $(SERIAL_PORT) --baud 750000 $(BUILD)/espjd.elf
9698

9799
monu:
98100
. $(IDF_PATH)/export.sh ; $(IDF_PATH)/tools/idf_monitor.py --port $(SERIAL_PORT) --baud 115200 $(BUILD)/espjd.elf
@@ -116,7 +118,11 @@ rst:
116118
echo "c" >> $(BUILD)/gdbinit
117119
$(GCC_PREF)-gdb -x $(BUILD)/gdbinit $(BUILD)/espjd.elf
118120

119-
FW_VERSION = $(shell sh $(JDC)/scripts/git-version.sh)
121+
fake-dist:
122+
rm -rf dist/
123+
$(MAKE) TARGET=esp32 patch
124+
$(MAKE) TARGET=esp32c3 patch
125+
$(MAKE) TARGET=esp32s2 patch
120126

121127
bump:
122128
sh ./scripts/bump.sh

boards/esp32/arch.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,17 @@
44
"id": "esp32",
55
"dcfgOffset": "0x9000",
66
"binFlashOffset": "0x1000",
7-
"binGenericFlashOffset": "0x10000"
7+
"binGenericFlashOffset": "0x10000",
8+
"pins": {
9+
"boot": "0,2,5,12,15",
10+
"bootUart": "1,3",
11+
"io": "boot,4,13,14,18,19,21,22,23,25,26,27,32,33",
12+
"input": "io,34,35,36,37,38,39",
13+
"analogIn": "32-39",
14+
"analogOut": "25,26",
15+
"psram": "16,17",
16+
"flash": "6-11",
17+
"touch": "0,2,4,12-15,27,32,33",
18+
"debug": "12-15"
19+
}
820
}

boards/esp32/esp32_bare.board.json

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,22 @@
55
"$description": "Bare ESP32 without any default functions for pins.",
66
"url": "https://www.espressif.com/en/products/socs/esp32",
77
"pins": {
8-
"VP": 36,
9-
"VN": 39,
10-
"BOOT": 0,
11-
"TX0": 1,
12-
"RX0": 3
8+
"P4": 4,
9+
"P13": 13,
10+
"P14": 14,
11+
"P18": 18,
12+
"P19": 19,
13+
"P21": 21,
14+
"P22": 22,
15+
"P23": 23,
16+
"P25": 25,
17+
"P26": 26,
18+
"P27": 27,
19+
"P32": 32,
20+
"P33": 33,
21+
"P34": 34,
22+
"P35": 35,
23+
"P36": 36,
24+
"P39": 39
1325
}
1426
}

boards/esp32/esp32_devkit_c.board.json

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,33 @@
44
"productId": "0x3c507a05",
55
"$description": "ESP32-DevKitC is an entry-level development board. It has all the ESP32 pins exposed and is easy to connect and use.",
66
"url": "https://docs.espressif.com/projects/esp-idf/en/latest/esp32/hw-reference/esp32/get-started-devkitc.html",
7-
"jacdac": {
8-
"$connector": "Header",
9-
"pin": 17
10-
},
117
"led": {
128
"pin": 2
139
},
14-
"#i2c": {
15-
"$connector": "Header",
16-
"pinSCL": 22,
17-
"pinSDA": 21
18-
},
1910
"pins": {
2011
"VP": 36,
2112
"VN": 39,
2213
"P34": 34,
2314
"P35": 35,
24-
"BOOT": 0,
25-
"TX0": 1,
26-
"RX0": 3,
27-
"LED": 2,
28-
"P5": 5,
29-
"P12": 12,
15+
"P32": 32,
16+
"P33": 33,
17+
"P25": 25,
18+
"P26": 26,
19+
"P27": 27,
3020
"P14": 14,
31-
"P15": 15
32-
}
21+
"P13": 13,
22+
"P23": 23,
23+
"P22": 22,
24+
"P21": 21,
25+
"P19": 19,
26+
"P18": 18,
27+
"P4": 4
28+
},
29+
"services": [
30+
{
31+
"service": "button",
32+
"name": "buttonIO0",
33+
"pin": 0
34+
}
35+
]
3336
}

boards/esp32archconfig.schema.json

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,68 @@
5454
],
5555
"type": "string"
5656
},
57+
"pins": {
58+
"additionalProperties": false,
59+
"description": "Defines a mapping from a pin function",
60+
"properties": {
61+
"#": {
62+
"description": "All fields starting with '#' arg ignored",
63+
"type": "string"
64+
},
65+
"analogIn": {
66+
"description": "Pins capable of analog input (ADC).",
67+
"type": "string"
68+
},
69+
"analogOut": {
70+
"description": "Pins capable of true analog output (DAC, not PWM).",
71+
"type": "string"
72+
},
73+
"boot": {
74+
"description": "Pins used in boot process.",
75+
"type": "string"
76+
},
77+
"bootUart": {
78+
"description": "Pins used by hardware UART during boot.",
79+
"type": "string"
80+
},
81+
"debug": {
82+
"description": "Pins used by JTAG or SWD debugger interface.",
83+
"type": "string"
84+
},
85+
"flash": {
86+
"description": "Pins used by the SPI flash interface.",
87+
"type": "string"
88+
},
89+
"input": {
90+
"description": "Pins capable of general purpose input.\n`io` pins are automatically added here.",
91+
"type": "string"
92+
},
93+
"io": {
94+
"description": "Pins with both input and output capability.",
95+
"type": "string"
96+
},
97+
"output": {
98+
"description": "Pins capable of general purpose output.\n`io` pins are automatically added here.",
99+
"type": "string"
100+
},
101+
"psram": {
102+
"description": "Pins used by PSRAM interface.",
103+
"type": "string"
104+
},
105+
"touch": {
106+
"description": "Pins capable of touch input.",
107+
"type": "string"
108+
},
109+
"usb": {
110+
"description": "Pins used by USB interface.",
111+
"type": "string"
112+
}
113+
},
114+
"required": [
115+
"io"
116+
],
117+
"type": "object"
118+
},
57119
"repoUrl": {
58120
"description": "Source repo, boards are assumed to sit in `boards/<arch-id>/<board-id>.board.json`\nAuto-populated.",
59121
"type": "string"

boards/esp32c3/adafruit_qt_py_c3.board.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44
"productId": "0x3693d40b",
55
"$description": "A tiny ESP32-C3 board.",
66
"url": "https://www.adafruit.com/product/5405",
7-
"jacdac": {
8-
"#": "JD is A1",
9-
"$connector": "Header",
10-
"pin": 3
11-
},
127
"led": {
138
"type": 1,
149
"pin": 2
@@ -28,5 +23,12 @@
2823
"MISO": 8,
2924
"MOSI": 7,
3025
"SCK": 10
31-
}
26+
},
27+
"services": [
28+
{
29+
"service": "button",
30+
"name": "buttonBOOT",
31+
"pin": 9
32+
}
33+
]
3234
}

boards/esp32c3/arch.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,14 @@
44
"id": "esp32c3",
55
"dcfgOffset": "0x9000",
66
"binFlashOffset": 0,
7-
"binGenericFlashOffset": "0x10000"
7+
"binGenericFlashOffset": "0x10000",
8+
"pins": {
9+
"analogIn": "0-4",
10+
"bootUart": "20,21",
11+
"io": "0-10,bootUart",
12+
"boot": "2,8,9",
13+
"flash": "11-17",
14+
"usb": "18,19",
15+
"debug": "4-7"
16+
}
817
}

boards/esp32c3/esp32c3_bare.board.json

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,25 @@
44
"productId": "0x3a1d89be",
55
"$description": "A bare ESP32-C3 board without any pin functions.",
66
"url": "https://www.espressif.com/en/products/socs/esp32-c3",
7-
"pins": {}
7+
"pins": {
8+
"P0": 0,
9+
"P1": 1,
10+
"P2": 2,
11+
"P3": 3,
12+
"P4": 4,
13+
"P5": 5,
14+
"P6": 6,
15+
"P7": 7,
16+
"P8": 8,
17+
"P10": 10,
18+
"P20": 20,
19+
"P21": 21
20+
},
21+
"services": [
22+
{
23+
"service": "button",
24+
"name": "buttonBOOT",
25+
"pin": 9
26+
}
27+
]
828
}

boards/esp32c3/esp32c3_rust_devkit.board.json

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@
44
"productId": "0x33f29c59",
55
"$description": "A ESP32-C3 dev-board from Espressif with IMU and Temp/Humidity sensor, originally for ESP32 Rust port.",
66
"url": "https://github.com/esp-rs/esp-rust-board",
7-
"jacdac": {
8-
"$connector": "Header",
9-
"pin": 6
10-
},
117
"led": {
128
"type": 1,
139
"pin": 2
@@ -18,19 +14,20 @@
1814
"pinSDA": 10
1915
},
2016
"pins": {
21-
"TX": 21,
22-
"RX": 20,
23-
"A0": 0,
24-
"A1": 1,
25-
"A3": 3,
26-
"A4": 4,
27-
"A5": 5,
28-
"LED_R": 7
17+
"P0": 0,
18+
"P1": 1,
19+
"P3": 3,
20+
"P4": 4,
21+
"P5": 5,
22+
"P6": 6,
23+
"#LED": 7,
24+
"P21": 21,
25+
"P20": 20
2926
},
30-
"_": [
27+
"services": [
3128
{
3229
"service": "button",
33-
"name": "bootButton",
30+
"name": "buttonBOOT",
3431
"pin": 9
3532
}
3633
]

0 commit comments

Comments
 (0)