@geastack/targets 0.1.79 → 0.1.81
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 +2 -3
- package/package.json +3 -3
- package/targets/esp32/chip_bindings/README.md +15 -0
- package/targets/esp32/chip_bindings/displays/rgb_panel.cpp +1275 -0
- package/targets/esp32/chip_bindings/expanders/ch422g.cpp +141 -0
- package/targets/esp32/chip_bindings/expanders/io_expander.h +29 -0
- package/targets/esp32/chip_bindings/touch/gt911.cpp +355 -0
- package/targets/esp32/chip_bindings/touch/gt911_controller.h +84 -0
- package/targets/esp32/sdk-patches/README.md +11 -13
- package/targets/esp32-p4-m5stack-tab5/main/CMakeLists.txt +10 -0
- package/targets/esp32-p4-m5stack-tab5/main/app_main.cpp +42 -2
- package/targets/esp32-p4-m5stack-tab5/main/touch.cpp +10 -1
- package/targets/esp32-s3-touch-amoled-2.06/dependencies.lock +1 -1
- package/targets/esp32-s3-touch-amoled-2.06/main/CMakeLists.txt +27 -3
- package/targets/esp32-s3-touch-amoled-2.06/main/launcher_button.cpp +8 -1
- package/targets/esp32-s3-waveshare-touch-lcd-7.json +61 -0
- package/targets/rp2350-waveshare-touch-amoled-2.41/README.md +23 -26
- package/targets.json +10 -0
|
@@ -36,6 +36,7 @@ void installSdCardFileCache();
|
|
|
36
36
|
#include "esp_heap_caps.h"
|
|
37
37
|
#endif
|
|
38
38
|
#include "esp_log.h"
|
|
39
|
+
#include "esp_heap_caps.h"
|
|
39
40
|
#include "sdkconfig.h"
|
|
40
41
|
#include "freertos/FreeRTOS.h"
|
|
41
42
|
#include "freertos/task.h"
|
|
@@ -68,6 +69,17 @@ constexpr int kAppMainTaskStack = CONFIG_ESP_MAIN_TASK_STACK_SIZE;
|
|
|
68
69
|
#endif
|
|
69
70
|
constexpr UBaseType_t kRuntimeTaskPriority = GEA_EMBEDDED_RUNTIME_TASK_PRIORITY;
|
|
70
71
|
|
|
72
|
+
// Apps with large real-time SRAM arenas can keep the event-loop stack in
|
|
73
|
+
// PSRAM. Bring-up stays on IDF's internal main stack because storage setup
|
|
74
|
+
// may write flash. Match the S3 target's manifest-controlled contract.
|
|
75
|
+
#ifndef GEA_EMBEDDED_RUNTIME_TASK_STACK_BYTES
|
|
76
|
+
#define GEA_EMBEDDED_RUNTIME_TASK_STACK_BYTES 0
|
|
77
|
+
#endif
|
|
78
|
+
#ifndef GEA_EMBEDDED_RUNTIME_TASK_STACK_EXTERNAL
|
|
79
|
+
#define GEA_EMBEDDED_RUNTIME_TASK_STACK_EXTERNAL 0
|
|
80
|
+
#endif
|
|
81
|
+
|
|
82
|
+
|
|
71
83
|
#if GEA_EMBEDDED_FRAME_SCHEDULER_PERF_LOG
|
|
72
84
|
void logCurrentTaskStack(const char *stage, int stackBytes)
|
|
73
85
|
{
|
|
@@ -82,13 +94,25 @@ void logCurrentTaskStack(const char *stage, int stackBytes)
|
|
|
82
94
|
}
|
|
83
95
|
#endif
|
|
84
96
|
|
|
85
|
-
|
|
97
|
+
gea::framework::RuntimeOptions runtimeOptions()
|
|
86
98
|
{
|
|
87
99
|
gea::framework::RuntimeOptions options{};
|
|
88
100
|
options.width = gea::framework::display::detail::DisplayOrientationState::width();
|
|
89
101
|
options.height = gea::framework::display::detail::DisplayOrientationState::height();
|
|
90
|
-
|
|
102
|
+
return options;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
void runRuntime() { gea::framework::Runtime::run(runtimeOptions()); }
|
|
106
|
+
|
|
107
|
+
#if GEA_EMBEDDED_RUNTIME_TASK_STACK_BYTES
|
|
108
|
+
void runtimeTask(void *)
|
|
109
|
+
{
|
|
110
|
+
ESP_LOGI(kTag, "Runtime stack=%d external=%d", GEA_EMBEDDED_RUNTIME_TASK_STACK_BYTES, GEA_EMBEDDED_RUNTIME_TASK_STACK_EXTERNAL);
|
|
111
|
+
runRuntime();
|
|
112
|
+
ESP_LOGE(kTag, "Runtime returned unexpectedly");
|
|
113
|
+
vTaskDeleteWithCaps(nullptr);
|
|
91
114
|
}
|
|
115
|
+
#endif
|
|
92
116
|
|
|
93
117
|
} // namespace
|
|
94
118
|
|
|
@@ -168,10 +192,26 @@ extern "C" void app_main(void)
|
|
|
168
192
|
#if GEA_EMBEDDED_HEAP_DIAGNOSTICS_LOG
|
|
169
193
|
logHeapProbe("app_main:before_runtime");
|
|
170
194
|
#endif
|
|
195
|
+
#if GEA_EMBEDDED_RUNTIME_TASK_STACK_BYTES
|
|
196
|
+
if (!gea::framework::Runtime::boot(runtimeOptions())) {
|
|
197
|
+
ESP_LOGE(kTag, "UI bring-up failed; native app tasks remain running");
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
if (xTaskCreatePinnedToCoreWithCaps(runtimeTask, "gea_runtime",
|
|
201
|
+
GEA_EMBEDDED_RUNTIME_TASK_STACK_BYTES, nullptr, kRuntimeTaskPriority,
|
|
202
|
+
nullptr, xPortGetCoreID(),
|
|
203
|
+
GEA_EMBEDDED_RUNTIME_TASK_STACK_EXTERNAL ? (MALLOC_CAP_SPIRAM | MALLOC_CAP_8BIT)
|
|
204
|
+
: (MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT)) != pdPASS) {
|
|
205
|
+
ESP_LOGE(kTag, "Could not allocate runtime stack; native app tasks remain running");
|
|
206
|
+
}
|
|
207
|
+
// Return the bootstrap stack to the internal heap.
|
|
208
|
+
return;
|
|
209
|
+
#else
|
|
171
210
|
runRuntime();
|
|
172
211
|
|
|
173
212
|
ESP_LOGE(kTag, "Runtime returned unexpectedly; parking main task");
|
|
174
213
|
while (true) {
|
|
175
214
|
vTaskDelay(pdMS_TO_TICKS(1000));
|
|
176
215
|
}
|
|
216
|
+
#endif
|
|
177
217
|
}
|
|
@@ -84,11 +84,18 @@ public:
|
|
|
84
84
|
|
|
85
85
|
void injectEvent(gea::platform::touch::Phase phase, bool touching, int x, int y)
|
|
86
86
|
{
|
|
87
|
+
// A virtual gesture owns the contact until its Up event. Otherwise a
|
|
88
|
+
// no-finger hardware report terminates each injected move as a tap.
|
|
89
|
+
if (touching) injectedContact_.store(true, std::memory_order_release);
|
|
87
90
|
TouchSample sample{touching, x, y};
|
|
88
91
|
current_ = sample;
|
|
89
92
|
latestMove_ = sample;
|
|
90
|
-
|
|
93
|
+
// Match physical move coalescing: only one marker may be queued.
|
|
94
|
+
// Flooding the queue here can drop Up during a long render.
|
|
95
|
+
if (phase == gea::platform::touch::Phase::Move &&
|
|
96
|
+
latestMoveQueued_.exchange(true, std::memory_order_acq_rel)) return;
|
|
91
97
|
notify(phase, sample);
|
|
98
|
+
if (!touching) injectedContact_.store(false, std::memory_order_release);
|
|
92
99
|
}
|
|
93
100
|
|
|
94
101
|
private:
|
|
@@ -112,6 +119,7 @@ private:
|
|
|
112
119
|
|
|
113
120
|
void handleTouch(const gea::platform::tab5::TouchSample &data)
|
|
114
121
|
{
|
|
122
|
+
if (injectedContact_.load(std::memory_order_acquire)) return;
|
|
115
123
|
TouchSample next = current_;
|
|
116
124
|
next.touching = data.touching && data.points > 0;
|
|
117
125
|
if (next.touching) {
|
|
@@ -159,6 +167,7 @@ private:
|
|
|
159
167
|
TouchSample current_{};
|
|
160
168
|
TouchSample latestMove_{};
|
|
161
169
|
std::atomic<bool> latestMoveQueued_{false};
|
|
170
|
+
std::atomic<bool> injectedContact_{false};
|
|
162
171
|
TaskHandle_t task_ = nullptr;
|
|
163
172
|
bool initialized_ = false;
|
|
164
173
|
};
|
|
@@ -59,6 +59,6 @@ direct_dependencies:
|
|
|
59
59
|
- espressif/esp_lcd_co5300
|
|
60
60
|
- espressif/esp_lcd_panel_io_additions
|
|
61
61
|
- idf
|
|
62
|
-
manifest_hash:
|
|
62
|
+
manifest_hash: 4251b5a6af848c92c5fbc8b9dbb076a8b2a53c265de5eadaa6d4357945f77209
|
|
63
63
|
target: esp32s3
|
|
64
64
|
version: 3.0.0
|
|
@@ -8,6 +8,13 @@ include("${GEA_EMBEDDED_ROOT}/targets/esp32/gea_framework.cmake")
|
|
|
8
8
|
include("${GEA_EMBEDDED_ROOT}/targets/cmake/geatsc_generated_archive.cmake")
|
|
9
9
|
|
|
10
10
|
set(GEA_CUSTOM_TARGET_ACTIVE 0)
|
|
11
|
+
# The gea CLI passes the definition as -DGEA_BOARD_DEFINITION and also in the
|
|
12
|
+
# environment: IDF's requirement-extraction pass (cmake -P) runs before the -D
|
|
13
|
+
# arguments reach the cache, and a composed chip's own REQUIRES (the LEDC
|
|
14
|
+
# driver for an RGB panel's backlight, say) have to be visible in that pass.
|
|
15
|
+
if(NOT GEA_BOARD_DEFINITION AND DEFINED ENV{GEA_BOARD_DEFINITION})
|
|
16
|
+
set(GEA_BOARD_DEFINITION "$ENV{GEA_BOARD_DEFINITION}")
|
|
17
|
+
endif()
|
|
11
18
|
if(GEA_BOARD_DEFINITION)
|
|
12
19
|
# board.h and target.cmake for a custom board are generated by the gea CLI
|
|
13
20
|
# (gea build --board <alias>) into the build directory before configure.
|
|
@@ -513,7 +520,10 @@ if(GEA_CUSTOM_TARGET_ACTIVE)
|
|
|
513
520
|
# A composed board with no `chips.display` has none of that to drive, so
|
|
514
521
|
# GEA_CUSTOM_TARGET_DISPLAY_SOURCES carries display_headless.cpp instead:
|
|
515
522
|
# the same canvas-backed Display, flushing to memory rather than a panel.
|
|
516
|
-
|
|
523
|
+
# A parallel RGB panel is a different layer altogether: the LCD peripheral
|
|
524
|
+
# scans the framebuffer out and the rgb_panel binding IS the Display, so
|
|
525
|
+
# display.cpp (QSPI transport, chunked flush, TE) stays out of that build.
|
|
526
|
+
if(GEA_CUSTOM_TARGET_HAS_DISPLAY AND NOT GEA_CUSTOM_TARGET_DISPLAY_INTERFACE STREQUAL "rgb")
|
|
517
527
|
list(APPEND GEA_EMBEDDED_BOARD_SOURCES "${GEA_EMBEDDED_ROOT}/targets/esp32/display.cpp")
|
|
518
528
|
endif()
|
|
519
529
|
list(APPEND GEA_EMBEDDED_BOARD_SOURCES ${GEA_CUSTOM_TARGET_DISPLAY_SOURCES})
|
|
@@ -586,7 +596,10 @@ else()
|
|
|
586
596
|
# touch.cpp routes Touchscreen to the FT3168 controller. A board with no
|
|
587
597
|
# `chips.touch` gets touch_absent.cpp through the peripheral sources instead,
|
|
588
598
|
# so this only has to stop compiling the FT3168-bound file.
|
|
589
|
-
|
|
599
|
+
# touch.cpp is FT3168 glue specifically. A composed board with another
|
|
600
|
+
# controller (gt911) links a binding that answers Touchscreen itself; an
|
|
601
|
+
# older generated target.cmake names no driver and means FT3168.
|
|
602
|
+
if(NOT GEA_CUSTOM_TARGET_ACTIVE OR (GEA_CUSTOM_TARGET_HAS_TOUCH AND (NOT GEA_CUSTOM_TARGET_TOUCH_DRIVER OR GEA_CUSTOM_TARGET_TOUCH_DRIVER STREQUAL "ft3168")))
|
|
590
603
|
list(APPEND GEA_EMBEDDED_BOARD_SOURCES "touch.cpp")
|
|
591
604
|
endif()
|
|
592
605
|
if(GEA_EMBEDDED_CAPABILITY_NETWORK)
|
|
@@ -609,6 +622,9 @@ else()
|
|
|
609
622
|
endif()
|
|
610
623
|
if(GEA_CUSTOM_TARGET_ACTIVE)
|
|
611
624
|
list(APPEND GEA_EMBEDDED_BOARD_SOURCES ${GEA_CUSTOM_TARGET_PERIPHERAL_SOURCES})
|
|
625
|
+
# Components the composed chips' bindings include from (the catalog's
|
|
626
|
+
# per-adapter `requires`), beyond what this base links for its own.
|
|
627
|
+
list(APPEND GEA_EMBEDDED_TARGET_REQUIRES ${GEA_CUSTOM_TARGET_REQUIRES})
|
|
612
628
|
else()
|
|
613
629
|
list(APPEND GEA_EMBEDDED_BOARD_SOURCES
|
|
614
630
|
"${GEA_CHIPS}/power/axp2101/axp2101.cpp"
|
|
@@ -746,9 +762,17 @@ if(DEFINED ENV{GEA_EMBEDDED_HEAP_DIAGNOSTICS_LOG})
|
|
|
746
762
|
set(GEA_EMBEDDED_HEAP_DIAGNOSTICS_LOG_VALUE "$ENV{GEA_EMBEDDED_HEAP_DIAGNOSTICS_LOG}")
|
|
747
763
|
endif()
|
|
748
764
|
|
|
765
|
+
# The QSPI panels store byte-swapped RGB565 (panel endian); a composed board
|
|
766
|
+
# with a parallel RGB panel scans native order and says so in its own defines,
|
|
767
|
+
# which must not then meet a second definition on the same command line.
|
|
768
|
+
set(GEA_EMBEDDED_PIXEL_PANEL_ENDIAN_DEFINE GEA_EMBEDDED_PIXEL_PANEL_ENDIAN=1)
|
|
769
|
+
if("${GEA_CUSTOM_TARGET_COMPILE_DEFINITIONS}" MATCHES "GEA_EMBEDDED_PIXEL_PANEL_ENDIAN=")
|
|
770
|
+
set(GEA_EMBEDDED_PIXEL_PANEL_ENDIAN_DEFINE "")
|
|
771
|
+
endif()
|
|
772
|
+
|
|
749
773
|
target_compile_definitions(${COMPONENT_LIB} PRIVATE
|
|
750
774
|
${GEA_CUSTOM_TARGET_COMPILE_DEFINITIONS}
|
|
751
|
-
|
|
775
|
+
${GEA_EMBEDDED_PIXEL_PANEL_ENDIAN_DEFINE}
|
|
752
776
|
GEA_CPP_ENABLE_REGEX=0
|
|
753
777
|
GEA_CPP_USE_TO_CHARS_DOUBLE=0
|
|
754
778
|
GEA_EMBEDDED_HEAP_DIAGNOSTICS_LOG=${GEA_EMBEDDED_HEAP_DIAGNOSTICS_LOG_VALUE}
|
|
@@ -22,6 +22,13 @@ namespace {
|
|
|
22
22
|
constexpr const char *kTag = "launcher_button";
|
|
23
23
|
constexpr gpio_num_t kGpio = gea::platform::board::launcherButton.pin;
|
|
24
24
|
constexpr int kActiveLevel = gea::platform::board::launcherButton.activeLevel;
|
|
25
|
+
// A board with no button leaves the pin GPIO_NUM_NC (-1); `1ULL << kGpio` on
|
|
26
|
+
// that constant is a negative shift the compiler rejects even though start()
|
|
27
|
+
// returns before using it, so the mask is formed behind a branch.
|
|
28
|
+
constexpr std::uint64_t pinMask(gpio_num_t pin)
|
|
29
|
+
{
|
|
30
|
+
return pin < 0 ? 0ULL : (1ULL << static_cast<unsigned>(pin));
|
|
31
|
+
}
|
|
25
32
|
constexpr int kDebounceMs = 50;
|
|
26
33
|
constexpr int kPollMs = 25;
|
|
27
34
|
constexpr int kLongPressMs = 800;
|
|
@@ -78,7 +85,7 @@ public:
|
|
|
78
85
|
gpio_reset_pin(kGpio);
|
|
79
86
|
|
|
80
87
|
gpio_config_t config = {
|
|
81
|
-
.pin_bit_mask =
|
|
88
|
+
.pin_bit_mask = pinMask(kGpio),
|
|
82
89
|
.mode = GPIO_MODE_INPUT,
|
|
83
90
|
.pull_up_en = GPIO_PULLUP_ENABLE,
|
|
84
91
|
.pull_down_en = GPIO_PULLDOWN_DISABLE,
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "esp32-s3-waveshare-touch-lcd-7",
|
|
3
|
+
"extends": "esp32-s3",
|
|
4
|
+
"adapter": "esp32-idf",
|
|
5
|
+
"mcu": "esp32s3",
|
|
6
|
+
|
|
7
|
+
"_comment": "Waveshare ESP32-S3-Touch-LCD-7: an ESP32-S3-WROOM-1-N16R8 (16MB quad flash, 8MB octal PSRAM) behind a 7-inch 800x480 parallel RGB panel with a GT911 touch controller. Pins and timings are the vendor's ESP-IDF demo (examples/ESP-IDF/09_lvgl_v9_demo/components/waveshare_rgb_lcd_port.h). Composed from the chip catalog; not yet verified on hardware.",
|
|
8
|
+
|
|
9
|
+
"flashSize": "16MB",
|
|
10
|
+
|
|
11
|
+
"_console": "The board has no USB-UART bridge on its USB-C port: that is the S3's native USB-Serial/JTAG, which is the base target's default. UART0 (TX GPIO43 / RX GPIO44) is also brought out on the header.",
|
|
12
|
+
|
|
13
|
+
"_psram": "N16R8 is 8MB octal PSRAM; the RGB panel's framebuffer (800x480x2 = 768KB, plus a back buffer) lives there.",
|
|
14
|
+
"psram": { "mode": "octal", "speed": 80 },
|
|
15
|
+
|
|
16
|
+
"buses": { "i2c": { "sda": 8, "scl": 9 } },
|
|
17
|
+
|
|
18
|
+
"chips": {
|
|
19
|
+
"display": {
|
|
20
|
+
"driver": "rgb_panel",
|
|
21
|
+
"interface": "rgb",
|
|
22
|
+
"width": 800,
|
|
23
|
+
"height": 480,
|
|
24
|
+
"pclkHz": 16000000,
|
|
25
|
+
"hsyncPulseWidth": 4, "hsyncBackPorch": 8, "hsyncFrontPorch": 8,
|
|
26
|
+
"vsyncPulseWidth": 4, "vsyncBackPorch": 8, "vsyncFrontPorch": 8,
|
|
27
|
+
"pclkActiveNeg": true,
|
|
28
|
+
"_pins": "data0-4 = B3-B7, data5-10 = G2-G7, data11-15 = R3-R7. The backlight is EXIO2 on the CH422G, so no GPIO is named here.",
|
|
29
|
+
"pins": {
|
|
30
|
+
"de": 5, "hsync": 46, "vsync": 3, "pclk": 7,
|
|
31
|
+
"data0": 14, "data1": 38, "data2": 18, "data3": 17, "data4": 10,
|
|
32
|
+
"data5": 39, "data6": 0, "data7": 45, "data8": 48, "data9": 47, "data10": 21,
|
|
33
|
+
"data11": 1, "data12": 2, "data13": 42, "data14": 41, "data15": 40
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"touch": {
|
|
37
|
+
"driver": "gt911",
|
|
38
|
+
"interface": "i2c",
|
|
39
|
+
"_pins": "Reset is EXIO1 on the CH422G; INT is GPIO4, which the binding also drives low across reset to fix the controller's I2C address at 0x5d.",
|
|
40
|
+
"pins": { "interrupt": 4 }
|
|
41
|
+
},
|
|
42
|
+
"expander": {
|
|
43
|
+
"driver": "ch422g",
|
|
44
|
+
"interface": "i2c",
|
|
45
|
+
"_outputs": "EXIO1 touch reset, EXIO2 backlight, EXIO3 panel reset, EXIO4 microSD chip-select, EXIO5 USB/CAN switch. initialOutputs 0x1e matches the vendor demo's steady state: resets released, backlight on, card deselected, USB selected.",
|
|
46
|
+
"initialOutputs": 30,
|
|
47
|
+
"outputs": { "touchReset": 1, "backlight": 2, "displayReset": 3 }
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
"_controls": "The BOOT button is GPIO0, which the RGB bus uses as data6 (G3) on this board, so there is no launcher button.",
|
|
52
|
+
|
|
53
|
+
"partitions": {
|
|
54
|
+
"nvs": { "type": "data", "subtype": "nvs", "offset": "0x9000", "size": "0x6000" },
|
|
55
|
+
"otadata": { "type": "data", "subtype": "ota", "offset": "0xf000", "size": "0x2000" },
|
|
56
|
+
"phy_init": { "type": "data", "subtype": "phy", "offset": "0x11000", "size": "0x1000" },
|
|
57
|
+
"ota_0": { "type": "app", "subtype": "ota_0", "offset": "0x20000", "size": "0x600000" },
|
|
58
|
+
"ota_1": { "type": "app", "subtype": "ota_1", "offset": "0x620000","size": "0x600000" },
|
|
59
|
+
"storage": { "type": "data", "subtype": "spiffs", "offset": "0xC20000","size": "0x3E0000" }
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -12,12 +12,10 @@ Target scaffold for the Waveshare RP2350-Touch-AMOLED-2.41 board.
|
|
|
12
12
|
- Power: ETA6098 power path, GPIO power hold/key, ADC battery sense
|
|
13
13
|
- Memory: 16 MB flash, 8 MB PSRAM (APS6408, KGD `0x5d`, EID `0x53`)
|
|
14
14
|
|
|
15
|
-
Note:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
chip's own EID density decode reports 8 MB and the allocator now uses all of
|
|
20
|
-
it.
|
|
15
|
+
Note: `GEA_RP2350_PSRAM_SIZE_BYTES` in `CMakeLists.txt` sets the PSRAM pool.
|
|
16
|
+
It is set to the full 8 MB that the chip's EID density decode reports. A
|
|
17
|
+
smaller value caps the heap, and memory-heavy apps such as typography then
|
|
18
|
+
panic with `Out of memory` at boot (black screen).
|
|
21
19
|
|
|
22
20
|
## Pin Map
|
|
23
21
|
|
|
@@ -76,25 +74,24 @@ tight or font/size combinations are too numerous to bake.
|
|
|
76
74
|
|
|
77
75
|
## Boot memory constraints (read before porting a new app)
|
|
78
76
|
|
|
79
|
-
Until `main()` runs `memoryInit()`, the
|
|
80
|
-
(~200-260 KB after .data/.bss)
|
|
81
|
-
|
|
82
|
-
|
|
77
|
+
Until `main()` runs `memoryInit()`, the only heap is the newlib SRAM heap
|
|
78
|
+
(~200-260 KB after .data/.bss), and pico_malloc panics on a failed allocation.
|
|
79
|
+
An allocation that fails before or during boot leaves the board dark with no
|
|
80
|
+
USB. Three things allocate at that stage and are handled as follows:
|
|
83
81
|
|
|
84
|
-
1. **CSS/prelude registration
|
|
85
|
-
(before main, SRAM-only). The codegen now emits it as a function via
|
|
82
|
+
1. **CSS/prelude registration.** The codegen emits it as a function via
|
|
86
83
|
`--cpp-prelude-symbol gea_plugin_cpp_register_prelude` (see the
|
|
87
|
-
`add_custom_command`),
|
|
88
|
-
the stylesheet allocates from PSRAM.
|
|
89
|
-
(
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
3. **stb_image
|
|
96
|
-
`
|
|
97
|
-
`
|
|
84
|
+
`add_custom_command`), and `main()` calls it right after `memoryInit()`, so
|
|
85
|
+
the stylesheet allocates from PSRAM. As a file-scope static constructor it
|
|
86
|
+
would run before `main()` in SRAM, where a large stylesheet (weather's)
|
|
87
|
+
runs out of memory.
|
|
88
|
+
2. **geatsc's `gea_cpp_shared_vector`.** Its default constructor is
|
|
89
|
+
constexpr and allocates lazily, so emitted `inline static` members (the
|
|
90
|
+
dynamic-prop sidecars) constant-initialize into .bss instead of allocating
|
|
91
|
+
before `main()`.
|
|
92
|
+
3. **stb_image decode buffers.** `core/packages/engine/image_store.cpp` routes
|
|
93
|
+
`STBI_MALLOC` through `Allocator::allocatePreferSpiram` instead of plain
|
|
94
|
+
`malloc` (SRAM).
|
|
98
95
|
|
|
99
96
|
Boot diagnostics live in `main/app.cpp` and stay compiled in: a HardFault
|
|
100
97
|
handler and a pre-main hang detector report via watchdog-scratch on the next
|
|
@@ -111,7 +108,7 @@ embedded-asset image loading (weather's icons).
|
|
|
111
108
|
|
|
112
109
|
## Scroll performance
|
|
113
110
|
|
|
114
|
-
The RM690B0 on this board does
|
|
111
|
+
The RM690B0 on this board does not implement DCS vertical scrolling
|
|
115
112
|
(`0x33`/`0x37` are ignored — verified 2026-07-02), so the platform fakes a
|
|
116
113
|
scroll register in software (`GEA_RP2350_SOFTWARE_SCROLL_REGISTER`: circular
|
|
117
114
|
framebuffer row remap) and every scroll frame re-streams the full region to
|
|
@@ -130,7 +127,7 @@ Two optimizations carry sustained scroll from 46.8 to ~56 fps on typography
|
|
|
130
127
|
No CPU copies; ~45 MB/s effective. 46.8 → 51.3 fps.
|
|
131
128
|
2. **Translate-only display-list maintenance** (engine,
|
|
132
129
|
`RootScrollOnlyRefresh`): instead of a full clear()+recordNode() every
|
|
133
|
-
scroll frame (~2.1 ms), the
|
|
130
|
+
scroll frame (~2.1 ms), the entire scroll content is pre-recorded once
|
|
134
131
|
(record clip expanded to the content bounds), then each scroll frame just
|
|
135
132
|
translates the scroll subtree's commands in place, un-translates the
|
|
136
133
|
scroll node's own box, and patches the scrollbar thumb
|
|
@@ -145,7 +142,7 @@ Two optimizations carry sustained scroll from 46.8 to ~56 fps on typography
|
|
|
145
142
|
51.3 → ~56 fps, and no periodic coverage-re-record hitch mid-fling.
|
|
146
143
|
|
|
147
144
|
Remaining scroll frame costs: ~12 ms TX-bound flush (the QSPI link is the
|
|
148
|
-
|
|
145
|
+
limit) + ~1.5 ms strip replay + ~0.6 ms scrollbar damage replay. Known dead
|
|
149
146
|
ends: DMA via the cached window thrashes the 16 KB XIP cache (net loss);
|
|
150
147
|
chained/fully-async DMA completion showed intermittent 100 ms+ stalls
|
|
151
148
|
(unexplained — parked; the machinery is still in rp2350_panel.cpp); uncached
|
package/targets.json
CHANGED
|
@@ -19,6 +19,16 @@
|
|
|
19
19
|
"esptoolChip": "esp32s3",
|
|
20
20
|
"ipcTaskStackSize": "4096"
|
|
21
21
|
},
|
|
22
|
+
"esp32-s3-waveshare-touch-lcd-7": {
|
|
23
|
+
"adapter": "esp32-idf",
|
|
24
|
+
"targetPath": "targets/esp32-s3-touch-amoled-2.06",
|
|
25
|
+
"definition": "targets/esp32-s3-waveshare-touch-lcd-7.json",
|
|
26
|
+
"flashSize": "16MB",
|
|
27
|
+
"appPlatform": "esp32",
|
|
28
|
+
"idfTarget": "esp32s3",
|
|
29
|
+
"esptoolChip": "esp32s3",
|
|
30
|
+
"ipcTaskStackSize": "4096"
|
|
31
|
+
},
|
|
22
32
|
"esp32-s3-touch-amoled-2.06": {
|
|
23
33
|
"adapter": "esp32-idf",
|
|
24
34
|
"targetPath": "targets/esp32-s3-touch-amoled-2.06",
|