-
Notifications
You must be signed in to change notification settings - Fork 0
137 lines (114 loc) · 5.17 KB
/
Copy pathbuild.yml
File metadata and controls
137 lines (114 loc) · 5.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
name: Build MicroWriter Standalone
# Builds *only* the editor (editor/) — no reader, no dual-boot pairing. For
# anyone who just wants the writing firmware on its own device: a plain
# BLE-keyboard note-taking e-paper gadget, nothing else.
#
# workflow_dispatch only, deliberately not tied to a tag-push trigger: this
# repo's release.yml already reacts to `v*` tags (its own build + a
# dual-boot merge against whatever CrossPoint build typeslate.com hosts +
# a push to the typeslate-website repo) — having both fire on the same tag
# push would race two workflows trying to create/attach to the same
# release. Run this one on demand instead.
on:
workflow_dispatch:
inputs:
version_label:
description: 'Rótulo de versão pro nome dos arquivos/release (ex: 0.3, ou deixe em branco pro commit curto)'
required: false
default: ''
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: editor
steps:
- uses: actions/checkout@v4
- name: Resolver rótulo de versão
id: version
run: |
if [ -n "${{ github.event.inputs.version_label }}" ]; then
echo "label=${{ github.event.inputs.version_label }}" >> "$GITHUB_OUTPUT"
else
echo "label=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
fi
- uses: actions/cache@v4
with:
path: |
~/.platformio
editor/.pio/build
key: pio-${{ hashFiles('editor/platformio.ini', 'editor/sdkconfig.defaults') }}
restore-keys: pio-
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install PlatformIO
run: pip install platformio
- name: Build firmware
run: pio run -e xteink_x4
- name: Prepare release files
env:
LABEL: ${{ steps.version.outputs.label }}
run: |
pip install esptool
BOOT_APP0=$(find ~/.platformio -name "boot_app0.bin" | head -1)
# --- Arquivo 1: slot-only ---
# Só o binário do editor, sem bootloader/partições. Grava em
# 0x650000 (app1) se já tiver um leitor dual-boot instalado, ou em
# 0x10000 (app0) se o editor for o único firmware.
cp .pio/build/xteink_x4/firmware.bin \
"microwriter-standalone-slot-only-${LABEL}.bin"
# --- Arquivo 2: merged completo (instalação do zero) ---
# Bootloader + partições + editor, tudo no slot app0 (0x0). O
# editor é o único firmware — não há dual-boot nem leitor
# nenhum neste arquivo.
esptool.py --chip esp32c3 merge_bin \
--flash_mode dio --flash_size 16MB \
-o "microwriter-standalone-full-${LABEL}.bin" \
0x0 .pio/build/xteink_x4/bootloader.bin \
0x8000 .pio/build/xteink_x4/partitions.bin \
0xe000 "$BOOT_APP0" \
0x10000 .pio/build/xteink_x4/firmware.bin
- name: Create release
uses: softprops/action-gh-release@v2
with:
tag_name: microwriter-standalone-${{ steps.version.outputs.label }}
name: "MicroWriter Standalone ${{ steps.version.outputs.label }}"
files: |
editor/microwriter-standalone-slot-only-${{ steps.version.outputs.label }}.bin
editor/microwriter-standalone-full-${{ steps.version.outputs.label }}.bin
body: |
## MicroWriter — standalone (no reader)
Just the writing firmware — BLE keyboard, note management, WiFi
file sync — with no e-reader paired in. For dual-boot pairing
with CrossPoint, CrossInk, or CPR-vCodex instead, see the
`patches/` scripts and the root `README.md`.
### Qual arquivo usar?
| Situação | Arquivo | Endereço |
|---|---|---|
| Instalação do zero — dispositivo só com este firmware | `microwriter-standalone-full-*.bin` | `0x0` |
| Já tem um dual-boot instalado, atualizar só o slot do editor | `microwriter-standalone-slot-only-*.bin` | `0x650000` |
### Como gravar
**Pelo browser** (Chrome/Edge): acesse [esp.huhn.me](https://esp.huhn.me),
conecte o X4, adicione o arquivo e informe o endereço acima.
**Pelo terminal:**
```bash
# Instalação do zero
esptool.py --chip esp32c3 --port COM5 --baud 460800 \
write_flash 0x0 microwriter-standalone-full-*.bin
# Atualizar só o slot do editor (dual-boot já instalado)
esptool.py --chip esp32c3 --port COM5 --baud 460800 \
write_flash 0x650000 microwriter-standalone-slot-only-*.bin
```
### Dead keys implementadas (layout US-International)
| Tecla | Resultado |
|---|---|
| `'` + vogal | á é í ó ú (e maiúsculas) |
| `'` + c | ç / Ç |
| `` ` `` + vogal | à è ì ò ù |
| `~` + a / o | ã / õ |
| `^` + vogal | â ê î ô û |
| `"` + vogal | ä ë ï ö ü |
| dead key + espaço | caractere literal |