Skip to content

Commit 4a98ae1

Browse files
committed
Rewrite doxy.sh in POSIX and update README ESP-IDF settings
1 parent 1e5e2bb commit 4a98ae1

2 files changed

Lines changed: 19 additions & 10 deletions

File tree

README.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,17 +142,27 @@ The product is not yet publicly available.
142142
Some NFC-A examples are shared with [M5Unit-RFID](https://github.com/m5stack/M5Unit-RFID), which is why other unit definitions may exist.
143143

144144
### For ESP-IDF settings
145-
On ESP-IDF native builds (`idf.py`), the unit/board is selected via Kconfig instead of editing the source `#define`. Each example exposes the same choice through `main/Kconfig.projbuild` (which sources `examples/UnitUnified/common/Kconfig.variant`), and `examples/UnitUnified/common/variant.cmake` maps the chosen `CONFIG_EXAMPLE_USING_*` to the source-level `USING_*` macro shared with the Arduino build.
145+
146+
> **NOTE:** The examples target **ESP-IDF 5.x only**.
147+
> They depend on `M5Unified` / `M5GFX`, which do not yet support ESP-IDF 6.x. Use the latest 5.x release of ESP-IDF until upstream support lands.
148+
149+
On ESP-IDF native builds (`idf.py`), the unit/board is selected via Kconfig instead of editing the source `#define`. Each example exposes the same choice through `main/Kconfig.projbuild`, which sources one of the family-specific Kconfig files in `examples/UnitUnified/common/`:
150+
151+
| Kconfig file | Variants offered | Used by |
152+
|---|---|---|
153+
| `Kconfig.variant.full` | UnitNFC / CapCC1101NFC / UnitRFID2 / M5Dial built-in WS1850S | NFC-A Detect / Dump / NDEF / PolicyOverride / ReadWrite / ValueBlock |
154+
| `Kconfig.variant.no_dial` | UnitNFC / CapCC1101NFC / UnitRFID2 | NFC-B Detect / JapanIDCard (M5Dial built-in cannot do NFC-B) |
155+
| `Kconfig.variant.basic` | UnitNFC / CapCC1101NFC | NFC-A Emulation / all NFC-F / all NFC-V (only ST25R3916-based units supported) |
156+
157+
`examples/UnitUnified/common/variant.cmake` then maps the chosen `CONFIG_EXAMPLE_USING_*` to the source-level `USING_*` macro shared with the Arduino build.
146158

147159
Pick the variant with `menuconfig`:
148160

149161
```sh
150162
cd examples/UnitUnified/NFCA/Detect # or any example
151163
idf.py set-target esp32s3 # or esp32 / esp32c6 / esp32p4 / ...
152164
idf.py menuconfig
153-
# -> M5Unit-NFC example -> Target unit / board -> choose ONE:
154-
# UnitNFC (ST25R3916, I2C / GROVE)
155-
# CapCC1101NFC (ST25R3916, SPI)
165+
# -> M5Unit-NFC example -> Target unit / board -> choose ONE of the options offered
156166
idf.py build flash monitor
157167
```
158168

@@ -172,5 +182,4 @@ If you want to output Git commit hashes to html, do it for the git cloned folder
172182

173183
### Required
174184
- [Doxygen](https://www.doxygen.nl/)
175-
- [pcregrep](https://formulae.brew.sh/formula/pcre2)
176185
- [Git](https://git-scm.com/) (Output commit hash to html)

docs/doxy.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
# Please execute on repository root
44

5-
## Get version from library.properties
6-
## Get git rev of HEAD
7-
LIB_VERSION="$(pcregrep -o1 "^\s*version\s*=\s*(\*|\d+(\.\d+){0,3}(\.\*)?)" library.properties)"
8-
#echo ${DOXYGEN_PROJECT_NUMBER}
9-
DOXYGEN_PROJECT_NUMBER="${LIB_VERSION} git rev:$(git rev-parse --short HEAD)" doxygen docs/Doxyfile
5+
## Get version from library.properties (POSIX-only: grep + cut + tr)
6+
LIB_VERSION="$(grep '^version' library.properties | cut -d= -f2 | tr -d ' ')"
107

8+
## Get git rev of HEAD (suppress suffix if not in a git repo)
9+
GIT_REV="$(git rev-parse --short HEAD 2>/dev/null)"
1110

11+
DOXYGEN_PROJECT_NUMBER="${LIB_VERSION}${GIT_REV:+ git rev:$GIT_REV}" doxygen docs/Doxyfile

0 commit comments

Comments
 (0)