@geastack/targets 0.1.95 → 0.1.99
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/build-config.json +79 -0
- package/package.json +2 -2
- package/targets/esp32/chip_bindings/displays/co5300.cpp +50 -2
- package/targets/esp32/chip_bindings/displays/sh8601.cpp +22 -3
- package/targets/esp32/chip_bindings/touch/cst9217.cpp +19 -1
- package/targets/esp32/display.cpp +4 -0
- package/targets/esp32-s3-epaper-1.54/main/CMakeLists.txt +10 -0
- package/targets/esp32-s3-m5stack-sticks3/main/display.cpp +29 -8
- package/targets/esp32-s3-m5stack-stopwatch/CMakeLists.txt +9 -0
- package/targets/esp32-s3-m5stack-stopwatch/README.md +76 -0
- package/targets/esp32-s3-m5stack-stopwatch/dependencies.lock +35 -0
- package/targets/esp32-s3-m5stack-stopwatch/main/CMakeLists.txt +45 -0
- package/targets/esp32-s3-m5stack-stopwatch/main/Kconfig.projbuild +1 -0
- package/targets/esp32-s3-m5stack-stopwatch/main/idf_component.yml +4 -0
- package/targets/esp32-s3-m5stack-stopwatch/main/include/board.h +33 -0
- package/targets/esp32-s3-m5stack-stopwatch/main/include/panel_power.h +12 -0
- package/targets/esp32-s3-m5stack-stopwatch/main/panel_reset.cpp +199 -0
- package/targets/esp32-s3-m5stack-stopwatch/main/touch.cpp +147 -0
- package/targets/esp32-s3-m5stack-stopwatch/partitions.csv +8 -0
- package/targets/esp32-s3-m5stack-stopwatch/sdkconfig.defaults +33 -0
- package/targets/esp32-s3-touch-amoled-2.06/main/CMakeLists.txt +11 -2
- package/targets/esp32-s3-touch-amoled-2.06/main/idf_component.yml +2 -0
- package/targets/esp32-s3-touch-amoled-2.06-sh8601.json +158 -0
- package/targets/esp32-s3-touch-lcd-1.54/CMakeLists.txt +10 -0
- package/targets/esp32-s3-touch-lcd-1.54/README.md +45 -0
- package/targets/esp32-s3-touch-lcd-1.54/dependencies.lock +87 -0
- package/targets/esp32-s3-touch-lcd-1.54/main/CMakeLists.txt +27 -0
- package/targets/esp32-s3-touch-lcd-1.54/main/Kconfig.projbuild +12 -0
- package/targets/esp32-s3-touch-lcd-1.54/main/app_main.cpp +133 -0
- package/targets/esp32-s3-touch-lcd-1.54/main/buttons.cpp +102 -0
- package/targets/esp32-s3-touch-lcd-1.54/main/display.cpp +2 -0
- package/targets/esp32-s3-touch-lcd-1.54/main/fatfs_ffconf.h +377 -0
- package/targets/esp32-s3-touch-lcd-1.54/main/i2c.cpp +2 -0
- package/targets/esp32-s3-touch-lcd-1.54/main/idf_component.yml +7 -0
- package/targets/esp32-s3-touch-lcd-1.54/main/include/board.h +37 -0
- package/targets/esp32-s3-touch-lcd-1.54/main/include/buttons.h +2 -0
- package/targets/esp32-s3-touch-lcd-1.54/main/launcher_button.cpp +2 -0
- package/targets/esp32-s3-touch-lcd-1.54/main/power.cpp +69 -0
- package/targets/esp32-s3-touch-lcd-1.54/main/sdcard_mount.cpp +2 -0
- package/targets/esp32-s3-touch-lcd-1.54/main/touch.cpp +2 -0
- package/targets/esp32-s3-touch-lcd-1.54/partitions.csv +7 -0
- package/targets/esp32-s3-touch-lcd-1.54/sdkconfig.defaults +272 -0
- package/targets/esp32-s31-espressif-mosaico/main/CMakeLists.txt +2 -0
- package/targets/esp32-s31-espressif-mosaico/main/include/mosaico_peer_uart.h +17 -0
- package/targets/esp32-s31-espressif-mosaico/main/peer_uart.cpp +86 -0
- package/targets/rp2350-tufty-2350/CMakeLists.txt +11 -2
- package/targets/rp2350-waveshare-touch-amoled-2.41/CMakeLists.txt +6 -2
- package/targets/rp2350-waveshare-touch-amoled-2.41/main/app.cpp +5 -1
- package/targets/rp2350-waveshare-touch-amoled-2.41/main/rp2350_gea_platform.cpp +13 -7
- package/targets/rp2350-waveshare-touch-amoled-2.41/main/rp2350_panel.h +4 -0
- package/targets.json +29 -0
package/README.md
CHANGED
|
@@ -111,3 +111,9 @@ GPL applies. In practice:
|
|
|
111
111
|
apply when you distribute, not when you use.
|
|
112
112
|
- **Closed-source firmware shipped through this target:** needs a commercial
|
|
113
113
|
license. Contact [contact@geastack.com](mailto:contact@geastack.com) for commercial terms.
|
|
114
|
+
|
|
115
|
+
## AMOLED 2.06 panel variant
|
|
116
|
+
|
|
117
|
+
`esp32-s3-touch-amoled-2.06-sh8601` shares the existing `esp32-s3-touch-amoled-2.06` build project and pinout. Its composed definition selects the SH8601 software driver with [Waveshare’s startup sequence](https://github.com/waveshareteam/Waveshare-ESP32-components/blob/master/bsp/esp32_s3_touch_amoled_2_06/esp32_s3_touch_amoled_2_06.c), 410×502 resolution, a 22-column gap, 40 MHz QSPI, bitmap transfers, and two-row minimum flush chunks. The software profile was verified on hardware; the driver name does not establish the physical controller.
|
|
118
|
+
|
|
119
|
+
Use this variant when the original AMOLED profile leaves the display black or retains the startup image. The original target retains its defaults. Both use the same peripherals and wiring; no separate native board project is needed. The two-row floor preserves address-window alignment when radio startup reduces staging-buffer RAM.
|
package/build-config.json
CHANGED
|
@@ -548,6 +548,85 @@
|
|
|
548
548
|
}
|
|
549
549
|
},
|
|
550
550
|
"cssDevicePixelRatio": 1.5
|
|
551
|
+
},
|
|
552
|
+
"esp32-s3-m5stack-stopwatch": {
|
|
553
|
+
"supported": [
|
|
554
|
+
"compiler.generatedCodeOptimization",
|
|
555
|
+
"renderer.fuseReplayFlush",
|
|
556
|
+
"renderer.adaptiveCoalescing",
|
|
557
|
+
"renderer.broadDirtyBounds",
|
|
558
|
+
"display.framebufferStream",
|
|
559
|
+
"display.presentStream"
|
|
560
|
+
],
|
|
561
|
+
"defaults": {
|
|
562
|
+
"compiler": {
|
|
563
|
+
"generatedCodeOptimization": "Os",
|
|
564
|
+
"numberPrecision": "float64"
|
|
565
|
+
},
|
|
566
|
+
"renderer": {
|
|
567
|
+
"fuseReplayFlush": false,
|
|
568
|
+
"subtreeRevealChecks": true,
|
|
569
|
+
"recordInlinePositions": true,
|
|
570
|
+
"adaptiveCoalescing": false,
|
|
571
|
+
"broadDirtyBounds": false
|
|
572
|
+
},
|
|
573
|
+
"display": {
|
|
574
|
+
"framebufferStream": "independent",
|
|
575
|
+
"presentStream": "independent"
|
|
576
|
+
},
|
|
577
|
+
"diagnostics": {
|
|
578
|
+
"performanceCounters": true,
|
|
579
|
+
"frameTiming": true
|
|
580
|
+
}
|
|
581
|
+
},
|
|
582
|
+
"cssDevicePixelRatio": 1.5,
|
|
583
|
+
"constraints": {}
|
|
584
|
+
},
|
|
585
|
+
"esp32-s3-touch-lcd-1.54": {
|
|
586
|
+
"cssDevicePixelRatio": 1.5,
|
|
587
|
+
"supported": []
|
|
588
|
+
},
|
|
589
|
+
"esp32-s3-touch-amoled-2.06-sh8601": {
|
|
590
|
+
"supported": [
|
|
591
|
+
"compiler.generatedCodeOptimization",
|
|
592
|
+
"renderer.fuseReplayFlush",
|
|
593
|
+
"renderer.adaptiveCoalescing",
|
|
594
|
+
"renderer.broadDirtyBounds",
|
|
595
|
+
"display.framebufferStream",
|
|
596
|
+
"display.presentStream",
|
|
597
|
+
"display.flushPoolBytes",
|
|
598
|
+
"services.wifi"
|
|
599
|
+
],
|
|
600
|
+
"defaults": {
|
|
601
|
+
"compiler": {
|
|
602
|
+
"generatedCodeOptimization": "O2",
|
|
603
|
+
"numberPrecision": "float32"
|
|
604
|
+
},
|
|
605
|
+
"renderer": {
|
|
606
|
+
"fuseReplayFlush": false,
|
|
607
|
+
"subtreeRevealChecks": true,
|
|
608
|
+
"recordInlinePositions": true,
|
|
609
|
+
"adaptiveCoalescing": true,
|
|
610
|
+
"broadDirtyBounds": true
|
|
611
|
+
},
|
|
612
|
+
"display": {
|
|
613
|
+
"framebufferStream": "independent",
|
|
614
|
+
"presentStream": "independent",
|
|
615
|
+
"flushPoolBytes": 0
|
|
616
|
+
},
|
|
617
|
+
"diagnostics": {
|
|
618
|
+
"performanceCounters": false,
|
|
619
|
+
"frameTiming": false
|
|
620
|
+
},
|
|
621
|
+
"services": {
|
|
622
|
+
"wifi": "auto"
|
|
623
|
+
}
|
|
624
|
+
},
|
|
625
|
+
"cssDevicePixelRatio": 1.5,
|
|
626
|
+
"constraints": {},
|
|
627
|
+
"inference": {
|
|
628
|
+
"canvasOnly": true
|
|
629
|
+
}
|
|
551
630
|
}
|
|
552
631
|
}
|
|
553
632
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geastack/targets",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.99",
|
|
4
4
|
"description": "Native embedded build targets (ESP32-IDF, RP2350) for geastack apps: board sources, target catalog, and CMake glue driven by the gea CLI.",
|
|
5
5
|
"license": "GPL-3.0-only",
|
|
6
6
|
"repository": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"access": "public"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@geastack/chips": "^0.1.
|
|
39
|
+
"@geastack/chips": "^0.1.6",
|
|
40
40
|
"@geastack/compiler": "^1.0.25",
|
|
41
41
|
"@geastack/core": "^0.1.39",
|
|
42
42
|
"@geastack/elements": "^0.1.5",
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
#include "displays/co5300/co5300.h"
|
|
4
4
|
|
|
5
|
+
#if GEA_CUSTOM_QSPI_PANEL_CONFIG
|
|
6
|
+
#include "gea_qspi_panel_config.h"
|
|
7
|
+
#endif
|
|
8
|
+
|
|
5
9
|
#include <cstddef>
|
|
6
10
|
#include <cstdint>
|
|
7
11
|
#include <cstring>
|
|
@@ -36,6 +40,41 @@ namespace gea::platform::esp32::chip_bindings::co5300
|
|
|
36
40
|
{
|
|
37
41
|
|
|
38
42
|
constexpr const char *kTag = "co5300";
|
|
43
|
+
#ifdef GEA_QSPI_PANEL_X_GAP
|
|
44
|
+
constexpr int kPanelXGap = GEA_QSPI_PANEL_X_GAP;
|
|
45
|
+
#else
|
|
46
|
+
constexpr int kPanelXGap = gea::chips::co5300::kPanelXGap;
|
|
47
|
+
#endif
|
|
48
|
+
#ifdef GEA_QSPI_PANEL_Y_GAP
|
|
49
|
+
constexpr int kPanelYGap = GEA_QSPI_PANEL_Y_GAP;
|
|
50
|
+
#else
|
|
51
|
+
constexpr int kPanelYGap = gea::chips::co5300::kPanelYGap;
|
|
52
|
+
#endif
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
#if GEA_EMBEDDED_CO5300_STOPWATCH_INIT
|
|
56
|
+
// M5StopWatch-UserDemo/main/hal/hal_display.cpp uses a different sequence
|
|
57
|
+
// from Waveshare. Its viewport starts six columns into 480x480 GRAM.
|
|
58
|
+
static const std::uint8_t kStopwatchC4[] = {0x80};
|
|
59
|
+
static const std::uint8_t kStopwatch3a[] = {0x55};
|
|
60
|
+
static const std::uint8_t kStopwatch35[] = {0x80};
|
|
61
|
+
static const std::uint8_t kStopwatch44[] = {0x01, 0xD2};
|
|
62
|
+
static const std::uint8_t kStopwatch53[] = {0x20};
|
|
63
|
+
static const std::uint8_t kStopwatch36[] = {0x00};
|
|
64
|
+
static const std::uint8_t kStopwatch51[] = {0xA0};
|
|
65
|
+
static const co5300_lcd_init_cmd_t kStopwatchInitCommands[] = {
|
|
66
|
+
{0x11, nullptr, 0, 150},
|
|
67
|
+
{0xC4, kStopwatchC4, sizeof(kStopwatchC4), 0},
|
|
68
|
+
{0x3A, kStopwatch3a, sizeof(kStopwatch3a), 0},
|
|
69
|
+
{0x35, kStopwatch35, sizeof(kStopwatch35), 0},
|
|
70
|
+
{0x44, kStopwatch44, sizeof(kStopwatch44), 0},
|
|
71
|
+
{0x53, kStopwatch53, sizeof(kStopwatch53), 0},
|
|
72
|
+
{0x20, nullptr, 0, 0},
|
|
73
|
+
{0x36, kStopwatch36, sizeof(kStopwatch36), 0},
|
|
74
|
+
{0x51, kStopwatch51, sizeof(kStopwatch51), 0},
|
|
75
|
+
{0x29, nullptr, 0, 0},
|
|
76
|
+
};
|
|
77
|
+
#endif
|
|
39
78
|
|
|
40
79
|
#if GEA_EMBEDDED_CO5300_WAVESHARE_175_INIT
|
|
41
80
|
static const std::uint8_t kCmdFe20[] = {0x20};
|
|
@@ -279,6 +318,10 @@ namespace gea::platform::esp32::chip_bindings::co5300
|
|
|
279
318
|
}
|
|
280
319
|
|
|
281
320
|
co5300_vendor_config_t vendorConfig = {};
|
|
321
|
+
#if GEA_EMBEDDED_CO5300_STOPWATCH_INIT
|
|
322
|
+
vendorConfig.init_cmds = kStopwatchInitCommands;
|
|
323
|
+
vendorConfig.init_cmds_size = sizeof(kStopwatchInitCommands) / sizeof(kStopwatchInitCommands[0]);
|
|
324
|
+
#endif
|
|
282
325
|
#if GEA_EMBEDDED_CO5300_WAVESHARE_175_INIT
|
|
283
326
|
vendorConfig.init_cmds = kWaveshare175InitCommands;
|
|
284
327
|
vendorConfig.init_cmds_size = sizeof(kWaveshare175InitCommands) / sizeof(kWaveshare175InitCommands[0]);
|
|
@@ -286,6 +329,11 @@ namespace gea::platform::esp32::chip_bindings::co5300
|
|
|
286
329
|
#if GEA_EMBEDDED_CO5300_MOSAICO_INIT
|
|
287
330
|
vendorConfig.init_cmds = kMosaicoInitCommands;
|
|
288
331
|
vendorConfig.init_cmds_size = sizeof(kMosaicoInitCommands) / sizeof(kMosaicoInitCommands[0]);
|
|
332
|
+
#endif
|
|
333
|
+
#if GEA_QSPI_PANEL_HAS_INIT_COMMANDS
|
|
334
|
+
static const auto customInitCommands = gea::platform::custom_panel::initCommands<co5300_lcd_init_cmd_t>();
|
|
335
|
+
vendorConfig.init_cmds = customInitCommands.data();
|
|
336
|
+
vendorConfig.init_cmds_size = customInitCommands.size();
|
|
289
337
|
#endif
|
|
290
338
|
vendorConfig.flags.use_qspi_interface = 1;
|
|
291
339
|
|
|
@@ -301,7 +349,7 @@ namespace gea::platform::esp32::chip_bindings::co5300
|
|
|
301
349
|
|
|
302
350
|
ESP_RETURN_ON_ERROR(esp_lcd_panel_reset(panelHandle(panel_)), kTag, "panel reset failed");
|
|
303
351
|
ESP_RETURN_ON_ERROR(esp_lcd_panel_init(panelHandle(panel_)), kTag, "panel init failed");
|
|
304
|
-
ESP_RETURN_ON_ERROR(esp_lcd_panel_set_gap(panelHandle(panel_),
|
|
352
|
+
ESP_RETURN_ON_ERROR(esp_lcd_panel_set_gap(panelHandle(panel_), kPanelXGap, kPanelYGap),
|
|
305
353
|
kTag,
|
|
306
354
|
"panel gap failed");
|
|
307
355
|
return ESP_OK;
|
|
@@ -354,7 +402,7 @@ namespace gea::platform::esp32::chip_bindings::co5300
|
|
|
354
402
|
|
|
355
403
|
esp_err_t Panel::setWindow(int x0, int y0, int x1, int y1)
|
|
356
404
|
{
|
|
357
|
-
const auto window = gea::chips::co5300::CommandSet::addressWindow(x0, y0, x1, y1);
|
|
405
|
+
const auto window = gea::chips::co5300::CommandSet::addressWindow(x0 + kPanelXGap - gea::chips::co5300::kPanelXGap, y0 + kPanelYGap - gea::chips::co5300::kPanelYGap, x1 + kPanelXGap - gea::chips::co5300::kPanelXGap, y1 + kPanelYGap - gea::chips::co5300::kPanelYGap);
|
|
358
406
|
ESP_RETURN_ON_ERROR(txParam(LCD_CMD_CASET, window.columns.data(), window.columns.size()), kTag, "send CASET failed");
|
|
359
407
|
ESP_RETURN_ON_ERROR(txParam(LCD_CMD_RASET, window.rows.data(), window.rows.size()), kTag, "send RASET failed");
|
|
360
408
|
return ESP_OK;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
#include "chip_bindings/displays/sh8601.h"
|
|
2
2
|
|
|
3
3
|
#include "displays/sh8601/sh8601.h"
|
|
4
|
+
|
|
5
|
+
#if GEA_CUSTOM_QSPI_PANEL_CONFIG
|
|
6
|
+
#include "gea_qspi_panel_config.h"
|
|
7
|
+
#endif
|
|
4
8
|
#if GEA_EMBEDDED_RM690B0_PANEL
|
|
5
9
|
#include "displays/rm690b0/rm690b0.h"
|
|
6
10
|
#endif
|
|
@@ -140,11 +144,21 @@ namespace gea::platform::esp32::chip_bindings::sh8601
|
|
|
140
144
|
|
|
141
145
|
// Each panel carries its own visible-area offset; the RM69080's first
|
|
142
146
|
// column sits 16 pixels in, which is why the vendor's CASET starts at 0x10.
|
|
143
|
-
#
|
|
147
|
+
#ifdef GEA_QSPI_PANEL_X_GAP
|
|
148
|
+
constexpr int kPanelXGap = GEA_QSPI_PANEL_X_GAP;
|
|
149
|
+
#elif GEA_EMBEDDED_RM690B0_PANEL
|
|
144
150
|
constexpr int kPanelXGap = gea::chips::rm690b0::kPanelXGap;
|
|
145
|
-
|
|
151
|
+
|
|
146
152
|
#else
|
|
147
153
|
constexpr int kPanelXGap = gea::chips::sh8601::kPanelXGap;
|
|
154
|
+
|
|
155
|
+
#endif
|
|
156
|
+
|
|
157
|
+
#ifdef GEA_QSPI_PANEL_Y_GAP
|
|
158
|
+
constexpr int kPanelYGap = GEA_QSPI_PANEL_Y_GAP;
|
|
159
|
+
#elif GEA_EMBEDDED_RM690B0_PANEL
|
|
160
|
+
constexpr int kPanelYGap = gea::chips::rm690b0::kPanelYGap;
|
|
161
|
+
#else
|
|
148
162
|
constexpr int kPanelYGap = gea::chips::sh8601::kPanelYGap;
|
|
149
163
|
#endif
|
|
150
164
|
|
|
@@ -324,6 +338,11 @@ namespace gea::platform::esp32::chip_bindings::sh8601
|
|
|
324
338
|
sh8601_vendor_config_t vendorConfig = {};
|
|
325
339
|
vendorConfig.init_cmds = kWaveshareInitCommands;
|
|
326
340
|
vendorConfig.init_cmds_size = sizeof(kWaveshareInitCommands) / sizeof(kWaveshareInitCommands[0]);
|
|
341
|
+
#endif
|
|
342
|
+
#if GEA_QSPI_PANEL_HAS_INIT_COMMANDS
|
|
343
|
+
static const auto customInitCommands = gea::platform::custom_panel::initCommands<sh8601_lcd_init_cmd_t>();
|
|
344
|
+
vendorConfig.init_cmds = customInitCommands.data();
|
|
345
|
+
vendorConfig.init_cmds_size = customInitCommands.size();
|
|
327
346
|
#endif
|
|
328
347
|
vendorConfig.flags.use_qspi_interface = 1;
|
|
329
348
|
|
|
@@ -410,7 +429,7 @@ namespace gea::platform::esp32::chip_bindings::sh8601
|
|
|
410
429
|
|
|
411
430
|
esp_err_t Panel::setWindow(int x0, int y0, int x1, int y1)
|
|
412
431
|
{
|
|
413
|
-
const auto window = gea::chips::sh8601::CommandSet::addressWindow(x0, y0, x1, y1);
|
|
432
|
+
const auto window = gea::chips::sh8601::CommandSet::addressWindow(x0 + kPanelXGap - gea::chips::sh8601::kPanelXGap, y0 + kPanelYGap - gea::chips::sh8601::kPanelYGap, x1 + kPanelXGap - gea::chips::sh8601::kPanelXGap, y1 + kPanelYGap - gea::chips::sh8601::kPanelYGap);
|
|
414
433
|
ESP_RETURN_ON_ERROR(txParam(LCD_CMD_CASET, window.columns.data(), window.columns.size()), kTag, "send CASET failed");
|
|
415
434
|
ESP_RETURN_ON_ERROR(txParam(LCD_CMD_RASET, window.rows.data(), window.rows.size()), kTag, "send RASET failed");
|
|
416
435
|
return ESP_OK;
|
|
@@ -13,7 +13,25 @@
|
|
|
13
13
|
// CST9220 (the ESP-Mosaico) sets GEA_BOARD_TOUCH_CST9220: that part speaks
|
|
14
14
|
// either the legacy report protocol or HYN212, which needs a mode switch
|
|
15
15
|
// before reports arrive, and only Espressif's CST9220 driver handles both.
|
|
16
|
-
#if
|
|
16
|
+
#if GEA_BOARD_TOUCH_CST816
|
|
17
|
+
#include "esp_lcd_touch_cst816s.h"
|
|
18
|
+
#define GEA_CST92XX_NEW esp_lcd_touch_new_i2c_cst816s
|
|
19
|
+
namespace {
|
|
20
|
+
esp_lcd_panel_io_i2c_config_t cst816IoConfig()
|
|
21
|
+
{
|
|
22
|
+
// Vendor macro uses C designator order, which IDF 6 rejects in C++.
|
|
23
|
+
esp_lcd_panel_io_i2c_config_t config = {};
|
|
24
|
+
config.dev_addr = ESP_LCD_TOUCH_IO_I2C_CST816S_ADDRESS;
|
|
25
|
+
config.control_phase_bytes = 1;
|
|
26
|
+
config.lcd_cmd_bits = 8;
|
|
27
|
+
config.lcd_param_bits = 0;
|
|
28
|
+
config.flags.disable_control_phase = 1;
|
|
29
|
+
config.scl_speed_hz = 400000;
|
|
30
|
+
return config;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
#define GEA_CST92XX_IO_CONFIG cst816IoConfig
|
|
34
|
+
#elif GEA_BOARD_TOUCH_CST9220
|
|
17
35
|
#include "esp_lcd_touch_cst9220.h"
|
|
18
36
|
#define GEA_CST92XX_NEW esp_lcd_touch_new_i2c_cst9220
|
|
19
37
|
namespace {
|
|
@@ -2574,6 +2574,10 @@ namespace gea::platform::esp32::display
|
|
|
2574
2574
|
for (int i = 0; i < width * kRows; ++i) row[i] = 0xF800; // red, RGB565
|
|
2575
2575
|
const esp_err_t fill = panel().drawBitmap(0, 0, width, kRows, row);
|
|
2576
2576
|
ESP_LOGW(kTag, "bring-up fill %dx%d -> %s", width, kRows, esp_err_to_name(fill));
|
|
2577
|
+
// Parameter writes drain queued color DMA before freeing its source buffer.
|
|
2578
|
+
const esp_err_t drain = panel().setBrightness(brightness_);
|
|
2579
|
+
ESP_LOGW(kTag, "bring-up fill drain -> %s", esp_err_to_name(drain));
|
|
2580
|
+
|
|
2577
2581
|
heap_caps_free(row);
|
|
2578
2582
|
}
|
|
2579
2583
|
else
|
|
@@ -377,6 +377,15 @@ else()
|
|
|
377
377
|
list(APPEND GEA_EMBEDDED_CAPABILITY_COMPILE_DEFINITIONS GEA_EMBEDDED_BLE_DISABLED=1)
|
|
378
378
|
endif()
|
|
379
379
|
|
|
380
|
+
# HTTP and BLE diagnostics share the transport-independent OTA image writer.
|
|
381
|
+
# Its status symbols are referenced even when no image upload is active.
|
|
382
|
+
set(GEA_EMBEDDED_OTA_IMAGE_SOURCES "")
|
|
383
|
+
if(GEA_EMBEDDED_CAPABILITY_NETWORK OR GEA_EMBEDDED_CAPABILITY_BLE)
|
|
384
|
+
list(APPEND GEA_EMBEDDED_OTA_IMAGE_SOURCES
|
|
385
|
+
"${GEA_EMBEDDED_ROOT}/targets/esp32/services/ota_image.cpp")
|
|
386
|
+
list(APPEND GEA_EMBEDDED_NETWORK_REQUIRES app_update)
|
|
387
|
+
endif()
|
|
388
|
+
|
|
380
389
|
set(GEA_EMBEDDED_AUDIO_SOURCES "")
|
|
381
390
|
set(GEA_EMBEDDED_AUDIO_REQUIRES "")
|
|
382
391
|
if(GEA_EMBEDDED_CAPABILITY_AUDIO)
|
|
@@ -450,6 +459,7 @@ idf_component_register(
|
|
|
450
459
|
${GEA_EMBEDDED_TARGET_EXTRA_SOURCES}
|
|
451
460
|
"${GEA_EMBEDDED_ROOT}/targets/esp32/apps/app_manager.cpp"
|
|
452
461
|
${GEA_EMBEDDED_NETWORK_SOURCES}
|
|
462
|
+
${GEA_EMBEDDED_OTA_IMAGE_SOURCES}
|
|
453
463
|
# @geastack framework C/C++ sources — single source of truth: @geastack/core/gea_sources.sh
|
|
454
464
|
# (resolved via node_modules, shared with the web build).
|
|
455
465
|
${GEA_FW_APP_SENSITIVE_SOURCES}
|
|
@@ -39,7 +39,26 @@ namespace gea::platform::esp32_s3_sticks3::display {
|
|
|
39
39
|
|
|
40
40
|
namespace {
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
#ifndef GEA_ST7789_LOG_TAG
|
|
43
|
+
#define GEA_ST7789_LOG_TAG "sticks3_display"
|
|
44
|
+
#endif
|
|
45
|
+
constexpr const char *kTag = GEA_ST7789_LOG_TAG;
|
|
46
|
+
// Optional board profile; the StickS3 defaults preserve its verified glass window.
|
|
47
|
+
#ifndef GEA_ST7789_PCLK_HZ
|
|
48
|
+
#define GEA_ST7789_PCLK_HZ 80000000
|
|
49
|
+
#endif
|
|
50
|
+
#ifndef GEA_ST7789_SPI_MODE
|
|
51
|
+
#define GEA_ST7789_SPI_MODE 0
|
|
52
|
+
#endif
|
|
53
|
+
#ifndef GEA_ST7789_GAP_X
|
|
54
|
+
#define GEA_ST7789_GAP_X 52
|
|
55
|
+
#define GEA_ST7789_GAP_Y 40
|
|
56
|
+
#define GEA_ST7789_MIRROR_GAP_X 53
|
|
57
|
+
#define GEA_ST7789_MIRROR_GAP_Y 40
|
|
58
|
+
#endif
|
|
59
|
+
#ifndef GEA_ST7789_M5PM1_POWER
|
|
60
|
+
#define GEA_ST7789_M5PM1_POWER 1
|
|
61
|
+
#endif
|
|
43
62
|
constexpr int kNativeWidth = platform_display::kNativeWidth; // 135
|
|
44
63
|
constexpr int kNativeHeight = platform_display::kNativeHeight; // 240
|
|
45
64
|
constexpr int kMaxLogicalWidth = kNativeHeight > kNativeWidth ? kNativeHeight : kNativeWidth;
|
|
@@ -59,7 +78,7 @@ constexpr int kFlushRowsDefault = 64;
|
|
|
59
78
|
// panel's native portrait addressing; esp_lcd_panel_set_gap carries the
|
|
60
79
|
// offset so draw_bitmap coords stay 0-based. Framebuffer is panel-endian, so
|
|
61
80
|
// staging is a straight memcpy.
|
|
62
|
-
constexpr int kSpiPclkHz =
|
|
81
|
+
constexpr int kSpiPclkHz = GEA_ST7789_PCLK_HZ;
|
|
63
82
|
constexpr int kPanelBitsPerPixel = 16;
|
|
64
83
|
constexpr int kSpiTransQueueDepth = 8;
|
|
65
84
|
// Four staging bands cover a whole 240-row frame (4 x 64-row chunks), so a
|
|
@@ -67,12 +86,12 @@ constexpr int kSpiTransQueueDepth = 8;
|
|
|
67
86
|
// time riding under the NEXT frame's rasterization instead of gating the
|
|
68
87
|
// frame loop (the panel-side cap is then the wire rate, ~76 Hz).
|
|
69
88
|
constexpr int kStagingDepth = 4;
|
|
70
|
-
constexpr int kGapPortraitPrimaryX =
|
|
71
|
-
constexpr int kGapPortraitPrimaryY =
|
|
89
|
+
constexpr int kGapPortraitPrimaryX = GEA_ST7789_GAP_X;
|
|
90
|
+
constexpr int kGapPortraitPrimaryY = GEA_ST7789_GAP_Y;
|
|
72
91
|
// MADCTL MX+MY flips addressing across the 240x320 GRAM; the 135-column glass
|
|
73
92
|
// splits the 105 spare columns 52/53, so the mirrored gap is one column over.
|
|
74
|
-
constexpr int kGapPortraitSecondaryX =
|
|
75
|
-
constexpr int kGapPortraitSecondaryY =
|
|
93
|
+
constexpr int kGapPortraitSecondaryX = GEA_ST7789_MIRROR_GAP_X;
|
|
94
|
+
constexpr int kGapPortraitSecondaryY = GEA_ST7789_MIRROR_GAP_Y;
|
|
76
95
|
// Flush rotation modes: landscape logical frames are rotated into the panel's
|
|
77
96
|
// portrait scan order at flush time instead of via MADCTL (which would make
|
|
78
97
|
// GRAM writes perpendicular to the gate scan and shear/tear on motion).
|
|
@@ -817,7 +836,9 @@ private:
|
|
|
817
836
|
if (panel_) return true;
|
|
818
837
|
// LCD + backlight power rail FIRST — the panel is unpowered until this
|
|
819
838
|
// runs, so backlight PWM and SPI writes are no-ops before it.
|
|
820
|
-
|
|
839
|
+
if constexpr (GEA_ST7789_M5PM1_POWER) {
|
|
840
|
+
powerOnLcdRail();
|
|
841
|
+
}
|
|
821
842
|
if (!initBacklight()) return false;
|
|
822
843
|
|
|
823
844
|
// Rotating internal-RAM staging bands, allocated FIRST so the ring depth
|
|
@@ -873,7 +894,7 @@ private:
|
|
|
873
894
|
esp_lcd_panel_io_spi_config_t ioConfig = {};
|
|
874
895
|
ioConfig.cs_gpio_num = gea::platform::board::display.cs;
|
|
875
896
|
ioConfig.dc_gpio_num = gea::platform::board::display.dc;
|
|
876
|
-
ioConfig.spi_mode =
|
|
897
|
+
ioConfig.spi_mode = GEA_ST7789_SPI_MODE;
|
|
877
898
|
ioConfig.pclk_hz = kSpiPclkHz;
|
|
878
899
|
ioConfig.trans_queue_depth = kSpiTransQueueDepth;
|
|
879
900
|
ioConfig.lcd_cmd_bits = 8;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
cmake_minimum_required(VERSION 3.16)
|
|
2
|
+
|
|
3
|
+
set(EXTRA_COMPONENT_DIRS "${CMAKE_CURRENT_LIST_DIR}/../esp32/components")
|
|
4
|
+
include("${CMAKE_CURRENT_LIST_DIR}/../esp32/app_project.cmake")
|
|
5
|
+
set(PROJECT_VER "${GEA_EMBEDDED_APP}" CACHE STRING "Firmware app id" FORCE)
|
|
6
|
+
|
|
7
|
+
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
|
8
|
+
idf_build_set_property(MINIMAL_BUILD ON)
|
|
9
|
+
project(gea_embedded)
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# M5Stack StopWatch
|
|
2
|
+
|
|
3
|
+
Built-in target: `esp32-s3-m5stack-stopwatch` for the M5Stack StopWatch C152.
|
|
4
|
+
The board uses an ESP32-S3R8 with 16 MB QIO flash and 8 MB octal PSRAM.
|
|
5
|
+
|
|
6
|
+
## Supported hardware
|
|
7
|
+
|
|
8
|
+
- 1.75 inch, 466 × 466 round AMOLED with a CO5300 controller on an 80 MHz
|
|
9
|
+
QSPI bus. The application renders a rectangular framebuffer; the physical
|
|
10
|
+
circular panel hides its corners. The default CSS device pixel ratio is 1.5.
|
|
11
|
+
- CST820B capacitive touch on the shared I2C bus, with its interrupt on GPIO13.
|
|
12
|
+
- The blue KEYB button on GPIO1 follows the shared launcher/back/settings
|
|
13
|
+
button policy. The yellow KEYA button on GPIO2 is not mapped yet.
|
|
14
|
+
- Native USB Serial/JTAG for firmware flashing, logs and device control.
|
|
15
|
+
- M5PM1 and M5IOE1 control needed to power and reset the display and touch.
|
|
16
|
+
|
|
17
|
+
Audio, battery telemetry, BMI270 IMU, RX8130CE RTC and vibration are not
|
|
18
|
+
integrated. Their presence on the board does not imply working Gea APIs;
|
|
19
|
+
the target currently uses unsupported audio and sensor facades.
|
|
20
|
+
|
|
21
|
+
## Register and run
|
|
22
|
+
|
|
23
|
+
Run the CLI from an application project with `@geastack/cli` and an
|
|
24
|
+
`@geastack/targets` installation containing this target. For the workspace
|
|
25
|
+
example, use `examples/apps/bouncing-balls-jsx`.
|
|
26
|
+
|
|
27
|
+
For a new machine, connect the board by USB and run guided setup. Choose
|
|
28
|
+
**M5Stack StopWatch (C152)**, keep the alias **stopwatch**, and select its
|
|
29
|
+
detected USB device:
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
npx gea setup
|
|
33
|
+
npx gea boards list
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Setup stores the USB serial identity, which survives changes to the serial
|
|
37
|
+
device path. If the `stopwatch` alias is already registered, reuse it.
|
|
38
|
+
|
|
39
|
+
Build, flash and start the JSX bouncing balls application:
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
npx gea run --board stopwatch --app bouncing-balls-jsx
|
|
43
|
+
npx gea monitor --board stopwatch
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
The target can also be built without a connected board:
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
npx gea build --target esp32-s3-m5stack-stopwatch --app bouncing-balls-jsx
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
If the board needs manual download mode, connect USB, hold its power button
|
|
53
|
+
for about two seconds until the green LED lights, then release and retry.
|
|
54
|
+
|
|
55
|
+
## Device validation
|
|
56
|
+
|
|
57
|
+
On 2026-10-05, `bouncing-balls-jsx` built with ESP-IDF 6.0.2, flashed with
|
|
58
|
+
hash verification, and restarted successfully after a software reboot.
|
|
59
|
+
The device initialized the AMOLED rail/reset, negotiated 80 MHz QSPI, and
|
|
60
|
+
detected CST820 at 0x15. Ten one-second production frame windows averaged
|
|
61
|
+
60.26 FPS (59.2–61.7 FPS). Two CRC-verified 466 × 466 framebuffer captures
|
|
62
|
+
differed at 25,188 pixels, confirming advancing animation. Capture transfers
|
|
63
|
+
pause rendering, so their on-screen FPS labels are not benchmark samples.
|
|
64
|
+
|
|
65
|
+
The firmware used the workspace's shared `compiler/dist`. Rebuilding compiler
|
|
66
|
+
source was blocked by existing architecture violations in `segment-scopes.ts`
|
|
67
|
+
and its test; the compiler source rebuild was not verified. Physical touch and
|
|
68
|
+
button interactions were not exercised during this bring-up.
|
|
69
|
+
|
|
70
|
+
## Hardware references
|
|
71
|
+
|
|
72
|
+
- [Official StopWatch specifications, pin map and schematics](https://docs.m5stack.com/en/core/StopWatch)
|
|
73
|
+
- [M5Stack factory firmware](https://github.com/m5stack/M5StopWatch-UserDemo)
|
|
74
|
+
- [Factory IO expander setup](https://github.com/m5stack/M5StopWatch-UserDemo/blob/main/main/hal/hal_ioe.cpp)
|
|
75
|
+
- [M5IOE1 driver](https://github.com/m5stack/M5IOE1)
|
|
76
|
+
- [M5PM1 driver](https://github.com/m5stack/M5PM1)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
dependencies:
|
|
2
|
+
espressif/cmake_utilities:
|
|
3
|
+
component_hash: 351350613ceafba240b761b4ea991e0f231ac7a9f59a9ee901f751bddc0bb18f
|
|
4
|
+
dependencies:
|
|
5
|
+
- name: idf
|
|
6
|
+
require: private
|
|
7
|
+
version: '>=4.1'
|
|
8
|
+
source:
|
|
9
|
+
registry_url: https://components.espressif.com
|
|
10
|
+
type: service
|
|
11
|
+
version: 0.5.3
|
|
12
|
+
espressif/esp_lcd_co5300:
|
|
13
|
+
component_hash: 1a5cbaa0069c3c72c238e5a1eb32ec9dd390ec1c7c46b24bf44b9037f2fe6c56
|
|
14
|
+
dependencies:
|
|
15
|
+
- name: espressif/cmake_utilities
|
|
16
|
+
registry_url: https://components.espressif.com
|
|
17
|
+
require: private
|
|
18
|
+
version: 0.*
|
|
19
|
+
- name: idf
|
|
20
|
+
require: private
|
|
21
|
+
version: '>=5.4'
|
|
22
|
+
source:
|
|
23
|
+
registry_url: https://components.espressif.com/
|
|
24
|
+
type: service
|
|
25
|
+
version: 2.2.0
|
|
26
|
+
idf:
|
|
27
|
+
source:
|
|
28
|
+
type: idf
|
|
29
|
+
version: 6.0.2
|
|
30
|
+
direct_dependencies:
|
|
31
|
+
- espressif/esp_lcd_co5300
|
|
32
|
+
- idf
|
|
33
|
+
manifest_hash: 61fc406a7f3d060e551f42682aec7f042f7052fb995e5cb53cdf95b2d815b0af
|
|
34
|
+
target: esp32s3
|
|
35
|
+
version: 3.0.0
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
set(GEA_BOARD_COMPONENT_DIR "${CMAKE_CURRENT_LIST_DIR}")
|
|
2
|
+
set(GEA_BOARD_TARGET_DIR "${CMAKE_CURRENT_LIST_DIR}/..")
|
|
3
|
+
set(GEA_EMBEDDED_CPP_BOARD "esp32-s3-m5stack-stopwatch")
|
|
4
|
+
set(GEA_EMBEDDED_CSS_DEVICE_PIXEL_RATIO "1.5")
|
|
5
|
+
set(GEA_EMBEDDED_ROOT "${CMAKE_CURRENT_LIST_DIR}/../../..")
|
|
6
|
+
cmake_path(ABSOLUTE_PATH GEA_EMBEDDED_ROOT NORMALIZE)
|
|
7
|
+
include("${GEA_EMBEDDED_ROOT}/targets/esp32/gea_framework.cmake")
|
|
8
|
+
|
|
9
|
+
set(GEA_BOARD_DISPLAY_WIDTH 466)
|
|
10
|
+
set(GEA_BOARD_DISPLAY_HEIGHT 466)
|
|
11
|
+
set(GEA_BOARD_QSPI_PCLK_HZ 80000000)
|
|
12
|
+
set(GEA_BOARD_FRAMEBUFFER_STREAM_FLUSH 1)
|
|
13
|
+
set(GEA_BOARD_PARTIAL_PAD_X 0)
|
|
14
|
+
set(GEA_BOARD_PARTIAL_PAD_Y 0)
|
|
15
|
+
set(GEA_BOARD_EXTRA_REQUIRES bootloader_support esp_psram)
|
|
16
|
+
set(GEA_BOARD_EXTRA_COMPILE_DEFINITIONS
|
|
17
|
+
GEA_BOARD_PREPARE_DISPLAY_PANEL=1
|
|
18
|
+
GEA_BOARD_LAUNCHER_BUTTON_GPIO=1
|
|
19
|
+
GEA_EMBEDDED_CO5300_STOPWATCH_INIT=1
|
|
20
|
+
GEA_EMBEDDED_CO5300_PANEL_X_GAP=6
|
|
21
|
+
GEA_EMBEDDED_CO5300_PANEL_Y_GAP=0
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
# Keep the application pipeline shared; only the native board wiring differs.
|
|
25
|
+
# Ancillary audio, battery telemetry and IMU APIs retain the explicit unsupported
|
|
26
|
+
# facades until their StopWatch power/control paths are integrated.
|
|
27
|
+
set(GEA_BOARD_PLATFORM_SOURCES
|
|
28
|
+
"${CMAKE_CURRENT_LIST_DIR}/../../esp32-s3-touch-amoled-1.8/main/app_main.cpp"
|
|
29
|
+
"${CMAKE_CURRENT_LIST_DIR}/../../esp32-s3-touch-amoled-1.8/main/i2c.cpp"
|
|
30
|
+
"${CMAKE_CURRENT_LIST_DIR}/../../esp32-s3-touch-amoled-1.8/main/launcher_button.cpp"
|
|
31
|
+
"${CMAKE_CURRENT_LIST_DIR}/touch.cpp"
|
|
32
|
+
"${CMAKE_CURRENT_LIST_DIR}/panel_reset.cpp"
|
|
33
|
+
"${CMAKE_CURRENT_LIST_DIR}/../../esp32-s3-elecrow-rotary-2.1/main/platform_stubs.cpp"
|
|
34
|
+
"${GEA_CHIPS}/displays/co5300/co5300.cpp"
|
|
35
|
+
"${GEA_EMBEDDED_ROOT}/targets/esp32/display.cpp"
|
|
36
|
+
"${GEA_EMBEDDED_ROOT}/targets/esp32/chip_bindings/displays/co5300.cpp"
|
|
37
|
+
)
|
|
38
|
+
include("${CMAKE_CURRENT_LIST_DIR}/../../esp32-s3-touch-amoled-1.8/main/CMakeLists.txt")
|
|
39
|
+
|
|
40
|
+
# Generated app archives can reference the hardware RNG after IDF archives
|
|
41
|
+
# were visited; keep the same extraction rule as other S3 targets.
|
|
42
|
+
if(NOT CMAKE_SCRIPT_MODE_FILE)
|
|
43
|
+
target_link_libraries(${COMPONENT_LIB} INTERFACE
|
|
44
|
+
"-u bootloader_random_enable" "-u bootloader_random_disable")
|
|
45
|
+
endif()
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
rsource "../../esp32-s3-touch-amoled-1.8/main/Kconfig.projbuild"
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include "driver/gpio.h"
|
|
4
|
+
#include "driver/spi_master.h"
|
|
5
|
+
#include "panel_power.h"
|
|
6
|
+
|
|
7
|
+
namespace gea::platform::board {
|
|
8
|
+
|
|
9
|
+
struct I2cBusConfig { gpio_num_t sda; gpio_num_t scl; };
|
|
10
|
+
struct Co5300DisplayConfig {
|
|
11
|
+
spi_host_device_t spiHost;
|
|
12
|
+
gpio_num_t cs;
|
|
13
|
+
gpio_num_t pclk;
|
|
14
|
+
gpio_num_t data0;
|
|
15
|
+
gpio_num_t data1;
|
|
16
|
+
gpio_num_t data2;
|
|
17
|
+
gpio_num_t data3;
|
|
18
|
+
gpio_num_t reset;
|
|
19
|
+
gpio_num_t te;
|
|
20
|
+
};
|
|
21
|
+
struct Cst820TouchConfig { gpio_num_t interrupt; };
|
|
22
|
+
|
|
23
|
+
// https://docs.m5stack.com/en/core/StopWatch
|
|
24
|
+
// OLED and touch resets are M5IOE1 outputs, not ESP32 GPIOs.
|
|
25
|
+
inline constexpr I2cBusConfig i2c{GPIO_NUM_47, GPIO_NUM_48};
|
|
26
|
+
inline constexpr Co5300DisplayConfig display{
|
|
27
|
+
SPI2_HOST, GPIO_NUM_39, GPIO_NUM_40,
|
|
28
|
+
GPIO_NUM_41, GPIO_NUM_42, GPIO_NUM_46, GPIO_NUM_45,
|
|
29
|
+
GPIO_NUM_NC, GPIO_NUM_38
|
|
30
|
+
};
|
|
31
|
+
inline constexpr Cst820TouchConfig touch{GPIO_NUM_13};
|
|
32
|
+
|
|
33
|
+
} // namespace gea::platform::board
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
namespace gea::platform::board {
|
|
4
|
+
|
|
5
|
+
// Initialize the PM1/IOE1, enable the AMOLED rail and reset display and touch.
|
|
6
|
+
// Hardware failures abort initialization instead of leaving a dark display.
|
|
7
|
+
void prepareDisplayPanel();
|
|
8
|
+
|
|
9
|
+
// Reset CST820 through IOE1 while preserving every other expander output.
|
|
10
|
+
void resetTouchPanel();
|
|
11
|
+
|
|
12
|
+
} // namespace gea::platform::board
|