@geastack/targets 0.1.90 → 0.1.91
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 +7 -0
- package/build-config.json +0 -32
- package/package.json +1 -1
- package/targets/cmake/geatsc_generated_archive.cmake +2 -18
- package/targets/esp32/chip_bindings/audio/es8311.cpp +10 -11
- package/targets/esp32/chip_bindings/displays/co5300.cpp +0 -40
- package/targets/esp32/chip_bindings/imu/bmi270.cpp +1 -6
- package/targets/esp32/display.cpp +0 -15
- package/targets/esp32-s3-touch-amoled-1.8/main/CMakeLists.txt +1 -5
- package/targets/esp32-s3-touch-amoled-1.8/main/launcher_button.cpp +1 -6
- package/targets.json +0 -12
- package/targets/esp32-s31-espressif-mosaico/CMakeLists.txt +0 -10
- package/targets/esp32-s31-espressif-mosaico/README.md +0 -56
- package/targets/esp32-s31-espressif-mosaico/dependencies.lock +0 -137
- package/targets/esp32-s31-espressif-mosaico/main/CMakeLists.txt +0 -63
- package/targets/esp32-s31-espressif-mosaico/main/Kconfig.projbuild +0 -12
- package/targets/esp32-s31-espressif-mosaico/main/board_power.cpp +0 -386
- package/targets/esp32-s31-espressif-mosaico/main/idf_component.yml +0 -36
- package/targets/esp32-s31-espressif-mosaico/main/include/board.h +0 -147
- package/targets/esp32-s31-espressif-mosaico/main/include/wifi_config.h.example +0 -5
- package/targets/esp32-s31-espressif-mosaico/main/touch.cpp +0 -45
- package/targets/esp32-s31-espressif-mosaico/partitions.csv +0 -10
- package/targets/esp32-s31-espressif-mosaico/sdkconfig.defaults +0 -194
package/README.md
CHANGED
|
@@ -92,6 +92,13 @@ open/capture methods in both modes, checks clock conflicts, and verifies that
|
|
|
92
92
|
a blocked RX read permits TX progress only in the opted-in mode. Its executable
|
|
93
93
|
uses the board's existing ignored `build/` directory.
|
|
94
94
|
|
|
95
|
+
With `GEA_AUDIO_ECHO_CANCELLATION=1`, applications can scale the board's calibrated
|
|
96
|
+
post-AEC gain with `GEA_AUDIO_AEC_OUTPUT_GAIN_SCALE`. Its default is `1.0f`;
|
|
97
|
+
`0.501187234f` reduces gain by 6 dB. Scaling happens before int16 clipping,
|
|
98
|
+
without changing ADC gain or the echo reference. Valid scales are 0 through 64.
|
|
99
|
+
`node targets/esp32/test/audio-aec-output-gain.test.mjs` verifies both AMOLED
|
|
100
|
+
calibrations and rejects invalid scales without creating build artifacts.
|
|
101
|
+
|
|
95
102
|
## License
|
|
96
103
|
|
|
97
104
|
This repo is the GeaStack **embedded board support** (ESP32, RP2350) and is
|
package/build-config.json
CHANGED
|
@@ -516,38 +516,6 @@
|
|
|
516
516
|
false
|
|
517
517
|
]
|
|
518
518
|
}
|
|
519
|
-
},
|
|
520
|
-
"esp32-s31-espressif-mosaico": {
|
|
521
|
-
"supported": [
|
|
522
|
-
"compiler.generatedCodeOptimization",
|
|
523
|
-
"renderer.fuseReplayFlush",
|
|
524
|
-
"renderer.adaptiveCoalescing",
|
|
525
|
-
"renderer.broadDirtyBounds",
|
|
526
|
-
"display.framebufferStream",
|
|
527
|
-
"display.presentStream"
|
|
528
|
-
],
|
|
529
|
-
"defaults": {
|
|
530
|
-
"compiler": {
|
|
531
|
-
"generatedCodeOptimization": "O2",
|
|
532
|
-
"numberPrecision": "float32"
|
|
533
|
-
},
|
|
534
|
-
"renderer": {
|
|
535
|
-
"fuseReplayFlush": false,
|
|
536
|
-
"subtreeRevealChecks": true,
|
|
537
|
-
"recordInlinePositions": true,
|
|
538
|
-
"adaptiveCoalescing": true,
|
|
539
|
-
"broadDirtyBounds": true
|
|
540
|
-
},
|
|
541
|
-
"display": {
|
|
542
|
-
"framebufferStream": "continuous",
|
|
543
|
-
"presentStream": "continuous"
|
|
544
|
-
},
|
|
545
|
-
"diagnostics": {
|
|
546
|
-
"performanceCounters": false,
|
|
547
|
-
"frameTiming": false
|
|
548
|
-
}
|
|
549
|
-
},
|
|
550
|
-
"cssDevicePixelRatio": 1.5
|
|
551
519
|
}
|
|
552
520
|
}
|
|
553
521
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geastack/targets",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.91",
|
|
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": {
|
|
@@ -88,22 +88,6 @@ function(gea_geatsc_add_generated_archive)
|
|
|
88
88
|
# forward the launcher explicitly to retain clean-build cache hits.
|
|
89
89
|
get_property(_compiler_launcher GLOBAL PROPERTY RULE_LAUNCH_COMPILE)
|
|
90
90
|
|
|
91
|
-
# The archive builder runs outside CMake's rules, so a tool CMake knows only
|
|
92
|
-
# by name would be looked up relative to the build directory. IDF 6.2's
|
|
93
|
-
# RISC-V toolchain file sets CMAKE_AR/CMAKE_RANLIB to bare names
|
|
94
|
-
# (riscv32-esp-elf-gcc-ar); resolve them beside the compiler, then on PATH.
|
|
95
|
-
get_filename_component(_compiler_dir "${CMAKE_CXX_COMPILER}" DIRECTORY)
|
|
96
|
-
foreach(_tool IN ITEMS AR RANLIB)
|
|
97
|
-
set(_tool_path "${CMAKE_${_tool}}")
|
|
98
|
-
if(_tool_path AND NOT IS_ABSOLUTE "${_tool_path}")
|
|
99
|
-
find_program(_resolved_${_tool} NAMES "${_tool_path}" HINTS "${_compiler_dir}" NO_CACHE)
|
|
100
|
-
if(_resolved_${_tool})
|
|
101
|
-
set(_tool_path "${_resolved_${_tool}}")
|
|
102
|
-
endif()
|
|
103
|
-
endif()
|
|
104
|
-
set(_geatsc_${_tool} "${_tool_path}")
|
|
105
|
-
endforeach()
|
|
106
|
-
|
|
107
91
|
add_custom_command(
|
|
108
92
|
OUTPUT "${GEA_GEATSC_OUTPUT}"
|
|
109
93
|
COMMAND "${CMAKE_COMMAND}"
|
|
@@ -114,8 +98,8 @@ function(gea_geatsc_add_generated_archive)
|
|
|
114
98
|
"-DGEA_GEATSC_FLAGS_FILE=${_flags_file}"
|
|
115
99
|
"-DGEA_GEATSC_CXX_COMPILER=${CMAKE_CXX_COMPILER}"
|
|
116
100
|
"-DGEA_GEATSC_COMPILER_LAUNCHER=${_compiler_launcher}"
|
|
117
|
-
"-DGEA_GEATSC_AR=${
|
|
118
|
-
"-DGEA_GEATSC_RANLIB=${
|
|
101
|
+
"-DGEA_GEATSC_AR=${CMAKE_AR}"
|
|
102
|
+
"-DGEA_GEATSC_RANLIB=${CMAKE_RANLIB}"
|
|
119
103
|
-P "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/geatsc_generated_archive_build.cmake"
|
|
120
104
|
DEPENDS
|
|
121
105
|
${GEA_GEATSC_DEPENDS}
|
|
@@ -86,15 +86,6 @@ esp_err_t setAmplifierEnabled(bool enabled) {
|
|
|
86
86
|
|
|
87
87
|
constexpr int kCodecDataPort = 0;
|
|
88
88
|
|
|
89
|
-
// esp_codec_dev takes the 8-bit address. CE low answers at 7-bit 0x18, the
|
|
90
|
-
// component default; a board that straps CE high (the ESP-Mosaico, 0x19)
|
|
91
|
-
// names its 7-bit address with GEA_BOARD_ES8311_I2C_ADDRESS.
|
|
92
|
-
#ifdef GEA_BOARD_ES8311_I2C_ADDRESS
|
|
93
|
-
constexpr std::uint8_t kCodecI2cAddress = static_cast<std::uint8_t>(GEA_BOARD_ES8311_I2C_ADDRESS << 1);
|
|
94
|
-
#else
|
|
95
|
-
constexpr std::uint8_t kCodecI2cAddress = ES8311_CODEC_DEFAULT_ADDR;
|
|
96
|
-
#endif
|
|
97
|
-
|
|
98
89
|
// Boards whose microphones sit on an ES7210 ADC sharing this I2S bus (Waveshare AMOLED 2.06) name its
|
|
99
90
|
// 7-bit I2C address as `audio.es7210Address`; everywhere else the ES8311's own ADC records.
|
|
100
91
|
template <typename AudioConfig>
|
|
@@ -125,7 +116,15 @@ constexpr float aecOutputGainOf(const AudioConfig &audio) {
|
|
|
125
116
|
return 1.0f;
|
|
126
117
|
}
|
|
127
118
|
constexpr float kAecMicGain = aecMicGainOf(gea::platform::board::audio);
|
|
128
|
-
|
|
119
|
+
#ifndef GEA_AUDIO_AEC_OUTPUT_GAIN_SCALE
|
|
120
|
+
#define GEA_AUDIO_AEC_OUTPUT_GAIN_SCALE 1.0f
|
|
121
|
+
#endif
|
|
122
|
+
static_assert(GEA_AUDIO_AEC_OUTPUT_GAIN_SCALE >= 0.0f && GEA_AUDIO_AEC_OUTPUT_GAIN_SCALE <= 64.0f,
|
|
123
|
+
"AEC output gain scale must be between 0 and 64");
|
|
124
|
+
// Apply before the AEC output is clamped to int16. Scaling the published
|
|
125
|
+
// microphone packets afterward cannot recover samples already clipped here.
|
|
126
|
+
constexpr float kAecOutputGain = aecOutputGainOf(gea::platform::board::audio) *
|
|
127
|
+
GEA_AUDIO_AEC_OUTPUT_GAIN_SCALE;
|
|
129
128
|
template <typename AudioConfig>
|
|
130
129
|
constexpr bool aecAggressiveNlpOf(const AudioConfig &audio) {
|
|
131
130
|
if constexpr (requires { audio.aecAggressiveNlp; }) return audio.aecAggressiveNlp;
|
|
@@ -656,7 +655,7 @@ private:
|
|
|
656
655
|
}
|
|
657
656
|
|
|
658
657
|
audio_codec_i2c_cfg_t i2cConfig = {};
|
|
659
|
-
i2cConfig.addr =
|
|
658
|
+
i2cConfig.addr = ES8311_CODEC_DEFAULT_ADDR;
|
|
660
659
|
i2cConfig.bus_handle = static_cast<i2c_master_bus_handle_t>(i2cBus.nativeHandle());
|
|
661
660
|
i2cCtrlIf_ = audio_codec_new_i2c_ctrl(&i2cConfig);
|
|
662
661
|
if (!i2cCtrlIf_) return ESP_ERR_NO_MEM;
|
|
@@ -69,42 +69,6 @@ namespace gea::platform::esp32::chip_bindings::co5300
|
|
|
69
69
|
};
|
|
70
70
|
#endif
|
|
71
71
|
|
|
72
|
-
#if GEA_EMBEDDED_CO5300_MOSAICO_INIT
|
|
73
|
-
// ESP-Mosaico 480x480 panel, transcribed from the board's own BSP
|
|
74
|
-
// (esp-mosaico-bsp components/esp-mosaico-bsp/onboard/display.c,
|
|
75
|
-
// s_vendor_init). Sleep Out comes first here, unlike the Waveshare 1.75
|
|
76
|
-
// sequence, and the window spans the full 480 columns with no gap.
|
|
77
|
-
static const std::uint8_t kMosaicoFe20[] = {0x20};
|
|
78
|
-
static const std::uint8_t kMosaico19[] = {0x10};
|
|
79
|
-
static const std::uint8_t kMosaico1c[] = {0xA0};
|
|
80
|
-
static const std::uint8_t kMosaicoFe00[] = {0x00};
|
|
81
|
-
static const std::uint8_t kMosaicoC4[] = {0x80};
|
|
82
|
-
static const std::uint8_t kMosaico3a[] = {0x55};
|
|
83
|
-
static const std::uint8_t kMosaico35[] = {0x00};
|
|
84
|
-
static const std::uint8_t kMosaico53[] = {0x20};
|
|
85
|
-
static const std::uint8_t kMosaico51[] = {0xFF};
|
|
86
|
-
static const std::uint8_t kMosaico63[] = {0xFF};
|
|
87
|
-
static const std::uint8_t kMosaico2a[] = {0x00, 0x00, 0x01, 0xDF};
|
|
88
|
-
static const std::uint8_t kMosaico2b[] = {0x00, 0x00, 0x01, 0xDF};
|
|
89
|
-
|
|
90
|
-
static const co5300_lcd_init_cmd_t kMosaicoInitCommands[] = {
|
|
91
|
-
{0x11, nullptr, 0, 600},
|
|
92
|
-
{0xFE, kMosaicoFe20, sizeof(kMosaicoFe20), 0},
|
|
93
|
-
{0x19, kMosaico19, sizeof(kMosaico19), 0},
|
|
94
|
-
{0x1C, kMosaico1c, sizeof(kMosaico1c), 0},
|
|
95
|
-
{0xFE, kMosaicoFe00, sizeof(kMosaicoFe00), 0},
|
|
96
|
-
{0xC4, kMosaicoC4, sizeof(kMosaicoC4), 0},
|
|
97
|
-
{0x3A, kMosaico3a, sizeof(kMosaico3a), 0},
|
|
98
|
-
{0x35, kMosaico35, sizeof(kMosaico35), 0},
|
|
99
|
-
{0x53, kMosaico53, sizeof(kMosaico53), 0},
|
|
100
|
-
{0x51, kMosaico51, sizeof(kMosaico51), 0},
|
|
101
|
-
{0x63, kMosaico63, sizeof(kMosaico63), 0},
|
|
102
|
-
{0x2A, kMosaico2a, sizeof(kMosaico2a), 0},
|
|
103
|
-
{0x2B, kMosaico2b, sizeof(kMosaico2b), 0},
|
|
104
|
-
{0x29, nullptr, 0, 600},
|
|
105
|
-
};
|
|
106
|
-
#endif
|
|
107
|
-
|
|
108
72
|
esp_lcd_panel_handle_t panelHandle(void *panel)
|
|
109
73
|
{
|
|
110
74
|
return static_cast<esp_lcd_panel_handle_t>(panel);
|
|
@@ -282,10 +246,6 @@ namespace gea::platform::esp32::chip_bindings::co5300
|
|
|
282
246
|
#if GEA_EMBEDDED_CO5300_WAVESHARE_175_INIT
|
|
283
247
|
vendorConfig.init_cmds = kWaveshare175InitCommands;
|
|
284
248
|
vendorConfig.init_cmds_size = sizeof(kWaveshare175InitCommands) / sizeof(kWaveshare175InitCommands[0]);
|
|
285
|
-
#endif
|
|
286
|
-
#if GEA_EMBEDDED_CO5300_MOSAICO_INIT
|
|
287
|
-
vendorConfig.init_cmds = kMosaicoInitCommands;
|
|
288
|
-
vendorConfig.init_cmds_size = sizeof(kMosaicoInitCommands) / sizeof(kMosaicoInitCommands[0]);
|
|
289
249
|
#endif
|
|
290
250
|
vendorConfig.flags.use_qspi_interface = 1;
|
|
291
251
|
|
|
@@ -30,12 +30,7 @@ namespace {
|
|
|
30
30
|
#include "bmi270_config.inl" // static constexpr const uint8_t bmi270_config_file[8192]
|
|
31
31
|
|
|
32
32
|
constexpr char kTag[] = "bmi270";
|
|
33
|
-
|
|
34
|
-
// ESP-Mosaico) answer at 0x69 and say so with GEA_BOARD_BMI270_I2C_ADDRESS.
|
|
35
|
-
#ifndef GEA_BOARD_BMI270_I2C_ADDRESS
|
|
36
|
-
#define GEA_BOARD_BMI270_I2C_ADDRESS 0x68
|
|
37
|
-
#endif
|
|
38
|
-
constexpr std::uint8_t kI2cAddress = GEA_BOARD_BMI270_I2C_ADDRESS;
|
|
33
|
+
constexpr std::uint8_t kI2cAddress = 0x68;
|
|
39
34
|
constexpr std::uint32_t kI2cFrequencyHz = 400000;
|
|
40
35
|
constexpr int kI2cTimeoutMs = 100;
|
|
41
36
|
constexpr int64_t kRetryIntervalUs = 5000000;
|
|
@@ -27,8 +27,6 @@
|
|
|
27
27
|
#endif
|
|
28
28
|
#include "esp_err.h"
|
|
29
29
|
#include "esp_heap_caps.h"
|
|
30
|
-
// esp_ptr_external_ram/esp_ptr_dma_capable; reached transitively on Xtensa only.
|
|
31
|
-
#include "esp_memory_utils.h"
|
|
32
30
|
#if GEA_EMBEDDED_HEAP_DIAGNOSTICS_LOG && CONFIG_HEAP_TRACING_STANDALONE
|
|
33
31
|
#include "esp_attr.h"
|
|
34
32
|
#include "esp_heap_trace.h"
|
|
@@ -5263,16 +5261,6 @@ extern "C" std::uint16_t *gea_bg_cache(int *cap_px)
|
|
|
5263
5261
|
return buffer;
|
|
5264
5262
|
}
|
|
5265
5263
|
|
|
5266
|
-
// The S3's PIE vector unit is Xtensa-only. On every other chip these kernels
|
|
5267
|
-
// are absent and render.cpp's weak fallbacks report them unavailable, so the
|
|
5268
|
-
// renderer takes its scalar paths.
|
|
5269
|
-
#if CONFIG_IDF_TARGET_ESP32S3
|
|
5270
|
-
#define GEA_DISPLAY_HAS_PIE 1
|
|
5271
|
-
#else
|
|
5272
|
-
#define GEA_DISPLAY_HAS_PIE 0
|
|
5273
|
-
#endif
|
|
5274
|
-
|
|
5275
|
-
#if GEA_DISPLAY_HAS_PIE
|
|
5276
5264
|
// ── PIE/SIMD throughput probe ──────────────────────────────────────────────
|
|
5277
5265
|
// Decisive question before investing in a full RGB565 blend kernel: does the S3
|
|
5278
5266
|
// PIE actually deliver multiply-add throughput over a PSRAM buffer (the per-pixel
|
|
@@ -5406,7 +5394,6 @@ static void pieBlendSpan8(std::uint16_t *dst, const std::uint16_t *fgN, const st
|
|
|
5406
5394
|
: [cb] "r"(cb2)
|
|
5407
5395
|
: "memory");
|
|
5408
5396
|
}
|
|
5409
|
-
#endif // GEA_DISPLAY_HAS_PIE
|
|
5410
5397
|
|
|
5411
5398
|
// ── face-drawer hooks (consumed by render.cpp via weak symbols) ──────────────
|
|
5412
5399
|
// The PIE vector regs aren't preserved across FreeRTOS context switches, so a
|
|
@@ -5443,7 +5430,6 @@ extern "C" void *gea_render_fast_scratch(int bytes, int align)
|
|
|
5443
5430
|
return p;
|
|
5444
5431
|
}
|
|
5445
5432
|
|
|
5446
|
-
#if GEA_DISPLAY_HAS_PIE
|
|
5447
5433
|
extern "C" bool gea_pie_blend_available() { return true; }
|
|
5448
5434
|
extern "C" void gea_pie_blend_span8(std::uint16_t *dst, const std::uint16_t *fgN, const std::int16_t *a5, int count8)
|
|
5449
5435
|
{
|
|
@@ -5849,7 +5835,6 @@ extern "C" void gea_pie_bench()
|
|
|
5849
5835
|
heap_caps_free(b);
|
|
5850
5836
|
heap_caps_free(ref);
|
|
5851
5837
|
}
|
|
5852
|
-
#endif // GEA_DISPLAY_HAS_PIE
|
|
5853
5838
|
|
|
5854
5839
|
// Full-screen PSRAM scratch for the static-backdrop cache (bg gradient + stage +
|
|
5855
5840
|
// dithered floor baked once). Separate from gea_bg_cache so the Phase-1 gradient
|
|
@@ -307,9 +307,7 @@ set(GEATSC_COMPILE_OPTIONS
|
|
|
307
307
|
-Wno-dangling-reference
|
|
308
308
|
-Wno-dangling-pointer
|
|
309
309
|
-${GEA_BUILD_COMPILER_GENERATED_CODE_OPTIMIZATION}
|
|
310
|
-
|
|
311
|
-
# ESP32-S31 Mosaico) has no such option and gcc refuses the whole archive.
|
|
312
|
-
${GEA_XTENSA_LITERALS}
|
|
310
|
+
-mtext-section-literals
|
|
313
311
|
)
|
|
314
312
|
set(GEATSC_COMPILE_DEFINITIONS "")
|
|
315
313
|
if(NOT CMAKE_SCRIPT_MODE_FILE)
|
|
@@ -501,8 +499,6 @@ idf_component_register(
|
|
|
501
499
|
esp_netif
|
|
502
500
|
esp_event
|
|
503
501
|
nvs_flash
|
|
504
|
-
# storage_service.cpp mounts the storage partition (esp_spiffs.h).
|
|
505
|
-
spiffs
|
|
506
502
|
esp_lcd
|
|
507
503
|
driver
|
|
508
504
|
esp_driver_i2c
|
|
@@ -19,12 +19,7 @@ namespace gea::platform::esp32::apps {
|
|
|
19
19
|
namespace {
|
|
20
20
|
|
|
21
21
|
constexpr const char *kTag = "launcher_button";
|
|
22
|
-
|
|
23
|
-
// ESP-Mosaico it is the expansion I2C bus) names its button pin instead.
|
|
24
|
-
#ifndef GEA_BOARD_LAUNCHER_BUTTON_GPIO
|
|
25
|
-
#define GEA_BOARD_LAUNCHER_BUTTON_GPIO 0
|
|
26
|
-
#endif
|
|
27
|
-
constexpr gpio_num_t kGpio = static_cast<gpio_num_t>(GEA_BOARD_LAUNCHER_BUTTON_GPIO);
|
|
22
|
+
constexpr gpio_num_t kGpio = GPIO_NUM_0;
|
|
28
23
|
constexpr int kActiveLevel = 0;
|
|
29
24
|
constexpr int kDebounceMs = 50;
|
|
30
25
|
constexpr int kPollMs = 25;
|
package/targets.json
CHANGED
|
@@ -179,17 +179,5 @@
|
|
|
179
179
|
"appPlatform": "esp32",
|
|
180
180
|
"idfTarget": "esp32s3",
|
|
181
181
|
"esptoolChip": "esp32s3"
|
|
182
|
-
},
|
|
183
|
-
"esp32-s31-espressif-mosaico": {
|
|
184
|
-
"adapter": "esp32-idf",
|
|
185
|
-
"targetPath": "targets/esp32-s31-espressif-mosaico",
|
|
186
|
-
"flashSize": "16MB",
|
|
187
|
-
"appPlatform": "esp32",
|
|
188
|
-
"idfTarget": "esp32s31",
|
|
189
|
-
"esptoolChip": "esp32s31",
|
|
190
|
-
"idfVersion": "6.2",
|
|
191
|
-
"ipcTaskStackSize": "4096",
|
|
192
|
-
"forceDownloadRegister": "0x20700008:0x4",
|
|
193
|
-
"manualBoot": true
|
|
194
182
|
}
|
|
195
183
|
}
|
|
@@ -1,10 +0,0 @@
|
|
|
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(GEA_EMBEDDED_APP "tic-tac-toe" CACHE STRING "Example app to build (must match a package.json gea.id)")
|
|
6
|
-
set(PROJECT_VER "${GEA_EMBEDDED_APP}" CACHE STRING "Firmware app id" FORCE)
|
|
7
|
-
|
|
8
|
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
|
9
|
-
idf_build_set_property(MINIMAL_BUILD ON)
|
|
10
|
-
project(gea_embedded)
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
# Espressif ESP-Mosaico
|
|
2
|
-
|
|
3
|
-
Target ID: `esp32-s31-espressif-mosaico`. Select **Espressif ESP-Mosaico
|
|
4
|
-
(V1.2)** in `gea setup`; the suggested board alias is `mosaico`.
|
|
5
|
-
|
|
6
|
-
This target supports hardware **V1.2** (V1.1 shares the pin mapping). The board
|
|
7
|
-
is an ESP32-S31 (dual-core RISC-V at 320 MHz) with 16 MB in-package octal
|
|
8
|
-
PSRAM, 16 MB quad NOR flash, a 480x480 CO5300 QSPI AMOLED with CST92xx touch,
|
|
9
|
-
an ES8311 codec with NS4150B amplifier, a BMI270 IMU, two BMM150
|
|
10
|
-
magnetometers, a BQ27220 fuel gauge and 128 MB SPI NAND. V1.0 swaps the LCD
|
|
11
|
-
clock and reset lines and moves the onboard I2C bus, so it is not supported.
|
|
12
|
-
|
|
13
|
-
Pins come from Espressif's board support package
|
|
14
|
-
([esp-mosaico-bsp](https://github.com/esp-mosaico/esp-mosaico-bsp)) and the
|
|
15
|
-
V1.2 user guide; see `main/include/board.h`.
|
|
16
|
-
|
|
17
|
-
## Toolchain
|
|
18
|
-
|
|
19
|
-
The ESP32-S31 exists only in ESP-IDF master (6.2-dev, a preview target).
|
|
20
|
-
`targets.json` pins this target to `idfVersion: "6.2"`, so the CLI selects an
|
|
21
|
-
installed ESP-IDF 6.2 checkout for it, and keeps the newest stable install for
|
|
22
|
-
every other board. Install one next to your other IDF versions, for example
|
|
23
|
-
`~/esp32/esp-idf-v6.2-dev`, with `./install.sh esp32s31`.
|
|
24
|
-
|
|
25
|
-
## Flashing
|
|
26
|
-
|
|
27
|
-
From an application directory:
|
|
28
|
-
|
|
29
|
-
```sh
|
|
30
|
-
gea build --board mosaico
|
|
31
|
-
gea flash --board mosaico
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
The USB-C port is the S31's high-speed USB OTG controller. It has no
|
|
35
|
-
DTR/RTS reset circuit, and V1.2 ships with automatic download mode disabled,
|
|
36
|
-
so the target flashes in manual boot mode (`manualBoot: true`): **hold BOOT
|
|
37
|
-
while power-cycling the board** (or pressing reset) to enter the ROM loader,
|
|
38
|
-
then run `gea flash`.
|
|
39
|
-
|
|
40
|
-
## Console
|
|
41
|
-
|
|
42
|
-
There is no ROM console on the USB-C port. The firmware brings up a TinyUSB
|
|
43
|
-
CDC-ACM interface and routes the console through it. Its USB serial number is
|
|
44
|
-
the chip MAC in the `AA:BB:CC:DD:EE:FF` form the S3 boards report, so register
|
|
45
|
-
the board by that serial and `--board mosaico` resolves the port the usual way.
|
|
46
|
-
UART0 keeps early boot output.
|
|
47
|
-
|
|
48
|
-
## Board bring-up
|
|
49
|
-
|
|
50
|
-
Everything on the panel side is behind VCC_3V3, a high-side switch enabled by
|
|
51
|
-
GPIO60 (active low). `main/board_power.cpp` soft-starts it through an LEDC
|
|
52
|
-
fade, as the BSP does, and releases the PWR_SW power-off request on GPIO57
|
|
53
|
-
before display init touches the panel.
|
|
54
|
-
|
|
55
|
-
Not yet wired: the BQ27220 fuel gauge (the board reports no battery reading),
|
|
56
|
-
the panel's TE line on GPIO43, the magnetometers and the SPI NAND.
|
|
@@ -1,137 +0,0 @@
|
|
|
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_codec_dev:
|
|
13
|
-
component_hash: 4779f31a3ba3f9b38aee1afe6ccb9ba8f6108dc3a6e77d39d7d714e9a215371b
|
|
14
|
-
dependencies:
|
|
15
|
-
- name: idf
|
|
16
|
-
require: private
|
|
17
|
-
version: '>=4.0'
|
|
18
|
-
source:
|
|
19
|
-
registry_url: https://components.espressif.com/
|
|
20
|
-
type: service
|
|
21
|
-
version: 1.6.2
|
|
22
|
-
espressif/esp_io_expander:
|
|
23
|
-
component_hash: 7b7f91270172e46ca4597e3874f48d8412e280e8c295559f5922ec38656e3e5f
|
|
24
|
-
dependencies:
|
|
25
|
-
- name: idf
|
|
26
|
-
require: private
|
|
27
|
-
version: '>=4.4.2'
|
|
28
|
-
source:
|
|
29
|
-
registry_url: https://components.espressif.com
|
|
30
|
-
type: service
|
|
31
|
-
version: 1.2.1
|
|
32
|
-
espressif/esp_lcd_co5300:
|
|
33
|
-
component_hash: 1a5cbaa0069c3c72c238e5a1eb32ec9dd390ec1c7c46b24bf44b9037f2fe6c56
|
|
34
|
-
dependencies:
|
|
35
|
-
- name: espressif/cmake_utilities
|
|
36
|
-
registry_url: https://components.espressif.com
|
|
37
|
-
require: private
|
|
38
|
-
version: 0.*
|
|
39
|
-
- name: idf
|
|
40
|
-
require: private
|
|
41
|
-
version: '>=5.4'
|
|
42
|
-
source:
|
|
43
|
-
registry_url: https://components.espressif.com/
|
|
44
|
-
type: service
|
|
45
|
-
version: 2.2.0
|
|
46
|
-
espressif/esp_lcd_panel_io_additions:
|
|
47
|
-
component_hash: 1856c8b2c11aaa8a9fd67481582162bcad25f7064661a995f35c2ee8dd10ebcc
|
|
48
|
-
dependencies:
|
|
49
|
-
- name: espressif/cmake_utilities
|
|
50
|
-
registry_url: https://components.espressif.com
|
|
51
|
-
require: private
|
|
52
|
-
version: 0.*
|
|
53
|
-
- name: espressif/esp_io_expander
|
|
54
|
-
registry_url: https://components.espressif.com
|
|
55
|
-
require: public
|
|
56
|
-
version: ^1
|
|
57
|
-
- name: idf
|
|
58
|
-
require: private
|
|
59
|
-
version: '>=4.4.2'
|
|
60
|
-
source:
|
|
61
|
-
registry_url: https://components.espressif.com/
|
|
62
|
-
type: service
|
|
63
|
-
version: 1.0.1~1
|
|
64
|
-
espressif/esp_lcd_touch:
|
|
65
|
-
component_hash: 3f85a7d95af876f1a6ecca8eb90a81614890d0f03a038390804e5a77e2caf862
|
|
66
|
-
dependencies:
|
|
67
|
-
- name: idf
|
|
68
|
-
require: private
|
|
69
|
-
version: '>=4.4.2'
|
|
70
|
-
source:
|
|
71
|
-
registry_url: https://components.espressif.com
|
|
72
|
-
type: service
|
|
73
|
-
version: 1.2.1
|
|
74
|
-
espressif/esp_tinyusb:
|
|
75
|
-
component_hash: 0fab24246e07bdf919c6489d17a590cffbffbbf6a9c44d6235641645c8b946b7
|
|
76
|
-
dependencies:
|
|
77
|
-
- name: idf
|
|
78
|
-
require: private
|
|
79
|
-
version: '>=5.0'
|
|
80
|
-
- name: espressif/tinyusb
|
|
81
|
-
registry_url: https://components.espressif.com
|
|
82
|
-
require: public
|
|
83
|
-
version: '>=0.17.0~2'
|
|
84
|
-
source:
|
|
85
|
-
registry_url: https://components.espressif.com/
|
|
86
|
-
type: service
|
|
87
|
-
targets:
|
|
88
|
-
- esp32s2
|
|
89
|
-
- esp32s3
|
|
90
|
-
- esp32p4
|
|
91
|
-
- esp32h4
|
|
92
|
-
- esp32s31
|
|
93
|
-
version: 2.3.0
|
|
94
|
-
espressif/tinyusb:
|
|
95
|
-
component_hash: 16c8d774dab1f484d3e0c0f61105624d2424bbae864efd19818baf7b451b41e7
|
|
96
|
-
dependencies:
|
|
97
|
-
- name: idf
|
|
98
|
-
require: private
|
|
99
|
-
version: '>=5.0'
|
|
100
|
-
source:
|
|
101
|
-
registry_url: https://components.espressif.com
|
|
102
|
-
type: service
|
|
103
|
-
targets:
|
|
104
|
-
- esp32s2
|
|
105
|
-
- esp32s3
|
|
106
|
-
- esp32p4
|
|
107
|
-
- esp32h4
|
|
108
|
-
- esp32s31
|
|
109
|
-
version: 0.21.0~2
|
|
110
|
-
idf:
|
|
111
|
-
source:
|
|
112
|
-
type: idf
|
|
113
|
-
version: 6.2.0
|
|
114
|
-
waveshare/esp_lcd_touch_cst9217:
|
|
115
|
-
component_hash: 27a00845832b7987cacf4c4125cbed5415d940987583065b01870ac080930856
|
|
116
|
-
dependencies:
|
|
117
|
-
- name: espressif/esp_lcd_touch
|
|
118
|
-
registry_url: https://components.espressif.com
|
|
119
|
-
require: public
|
|
120
|
-
version: ^1.1.0
|
|
121
|
-
- name: idf
|
|
122
|
-
require: private
|
|
123
|
-
version: '>=4.4.2'
|
|
124
|
-
source:
|
|
125
|
-
registry_url: https://components.espressif.com/
|
|
126
|
-
type: service
|
|
127
|
-
version: 1.0.4
|
|
128
|
-
direct_dependencies:
|
|
129
|
-
- espressif/esp_codec_dev
|
|
130
|
-
- espressif/esp_lcd_co5300
|
|
131
|
-
- espressif/esp_lcd_panel_io_additions
|
|
132
|
-
- espressif/esp_tinyusb
|
|
133
|
-
- idf
|
|
134
|
-
- waveshare/esp_lcd_touch_cst9217
|
|
135
|
-
manifest_hash: d00ef0d696c011ff4e97bae2f217371293df338c57deca4f5e143663d8e1a2fe
|
|
136
|
-
target: esp32s31
|
|
137
|
-
version: 3.0.0
|
|
@@ -1,63 +0,0 @@
|
|
|
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-s31-espressif-mosaico")
|
|
4
|
-
set(GEA_EMBEDDED_CSS_DEVICE_PIXEL_RATIO "1.5" CACHE STRING "Logical CSS px to physical pixel scale for this board")
|
|
5
|
-
|
|
6
|
-
# The shared base resolves the npm packages (and with them GEA_CHIPS) only
|
|
7
|
-
# after this file has run, so resolve them here too: the source list below
|
|
8
|
-
# names chip drivers by that path and would otherwise expand to `/displays/...`.
|
|
9
|
-
set(GEA_EMBEDDED_ROOT "${CMAKE_CURRENT_LIST_DIR}/../../..")
|
|
10
|
-
cmake_path(ABSOLUTE_PATH GEA_EMBEDDED_ROOT NORMALIZE)
|
|
11
|
-
include("${GEA_EMBEDDED_ROOT}/targets/esp32/gea_framework.cmake")
|
|
12
|
-
|
|
13
|
-
# 480x480 square CO5300 AMOLED, no column gap.
|
|
14
|
-
set(GEA_BOARD_DISPLAY_WIDTH 480)
|
|
15
|
-
set(GEA_BOARD_DISPLAY_HEIGHT 480)
|
|
16
|
-
|
|
17
|
-
# The board's own BSP drives the panel at 40 MHz. The panel latches at 80 MHz,
|
|
18
|
-
# as on the 1.75 and 2.06 CO5300 boards: bouncing-balls went from 36.5 to
|
|
19
|
-
# 61.6 fps, the full-width flush from 23 ms to 11.8 ms per frame.
|
|
20
|
-
set(GEA_BOARD_QSPI_PCLK_HZ 80000000)
|
|
21
|
-
set(GEA_BOARD_PARTIAL_PAD_X 0)
|
|
22
|
-
set(GEA_BOARD_PARTIAL_PAD_Y 0)
|
|
23
|
-
|
|
24
|
-
# No AXP2101, no ESP-Mosaico BSP: the VCC_3V3 rail and the USB console are
|
|
25
|
-
# board_power.cpp's, and it gives display init its prepareDisplayPanel().
|
|
26
|
-
set(GEA_BOARD_EXTRA_REQUIRES
|
|
27
|
-
esp_codec_dev
|
|
28
|
-
esp_driver_ledc
|
|
29
|
-
espressif__esp_tinyusb
|
|
30
|
-
# The RTC watchdog reset behind the USB downloader request (board_power.cpp).
|
|
31
|
-
esp_hal_wdt
|
|
32
|
-
)
|
|
33
|
-
|
|
34
|
-
set(GEA_BOARD_EXTRA_COMPILE_DEFINITIONS
|
|
35
|
-
GEA_BOARD_PREPARE_DISPLAY_PANEL=1
|
|
36
|
-
GEA_BOARD_USB_CONSOLE=1
|
|
37
|
-
GEA_EMBEDDED_CO5300_MOSAICO_INIT=1
|
|
38
|
-
GEA_EMBEDDED_CO5300_PANEL_X_GAP=0
|
|
39
|
-
GEA_EMBEDDED_CO5300_PANEL_Y_GAP=0
|
|
40
|
-
GEA_BOARD_BMI270_I2C_ADDRESS=0x69
|
|
41
|
-
GEA_BOARD_ES8311_I2C_ADDRESS=0x19
|
|
42
|
-
# The side "AI" button; GPIO0 is the expansion I2C bus on this board.
|
|
43
|
-
GEA_BOARD_LAUNCHER_BUTTON_GPIO=7
|
|
44
|
-
)
|
|
45
|
-
|
|
46
|
-
set(GEA_BOARD_PLATFORM_SOURCES
|
|
47
|
-
"${CMAKE_CURRENT_LIST_DIR}/../../esp32-s3-touch-amoled-1.8/main/app_main.cpp"
|
|
48
|
-
"${CMAKE_CURRENT_LIST_DIR}/../../esp32-s3-touch-amoled-1.8/main/i2c.cpp"
|
|
49
|
-
"${CMAKE_CURRENT_LIST_DIR}/../../esp32-s3-touch-amoled-1.8/main/launcher_button.cpp"
|
|
50
|
-
"${CMAKE_CURRENT_LIST_DIR}/touch.cpp"
|
|
51
|
-
"${CMAKE_CURRENT_LIST_DIR}/board_power.cpp"
|
|
52
|
-
"${GEA_CHIPS}/displays/co5300/co5300.cpp"
|
|
53
|
-
"${CMAKE_CURRENT_LIST_DIR}/../../esp32/display.cpp"
|
|
54
|
-
"${CMAKE_CURRENT_LIST_DIR}/../../esp32/chip_bindings/displays/co5300.cpp"
|
|
55
|
-
"${CMAKE_CURRENT_LIST_DIR}/../../esp32/chip_bindings/touch/cst9217.cpp"
|
|
56
|
-
"${CMAKE_CURRENT_LIST_DIR}/../../esp32/chip_bindings/audio/es8311.cpp"
|
|
57
|
-
"${CMAKE_CURRENT_LIST_DIR}/../../esp32/chip_bindings/imu/bmi270.cpp"
|
|
58
|
-
# The BQ27220 fuel gauge has no binding yet; report "no battery reading"
|
|
59
|
-
# rather than a number nobody measured.
|
|
60
|
-
"${CMAKE_CURRENT_LIST_DIR}/../../esp32/power_absent.cpp"
|
|
61
|
-
)
|
|
62
|
-
|
|
63
|
-
include("${CMAKE_CURRENT_LIST_DIR}/../../esp32-s3-touch-amoled-1.8/main/CMakeLists.txt")
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
menu "Gea Embedded"
|
|
2
|
-
|
|
3
|
-
config GEA_EMBEDDED_PRODUCTION_LOCKDOWN
|
|
4
|
-
bool "Production lockdown"
|
|
5
|
-
default n
|
|
6
|
-
help
|
|
7
|
-
Compile out Gea frame/perf logs, heap diagnostics, and the
|
|
8
|
-
diagnostics server for production firmware. Local development builds
|
|
9
|
-
should leave this disabled so serial monitor and VS Code launch
|
|
10
|
-
tasks show fps and diagnostic logs.
|
|
11
|
-
|
|
12
|
-
endmenu
|