fix(bookplayer): use exported device_find_* API for audio stream lookup
Main / Build (AudioTest) (push) Has been cancelled
Main / Build (BibleVerse) (push) Has been cancelled
Main / Build (BookPlayer) (push) Has been cancelled
Main / Build (Brainfuck) (push) Has been cancelled
Main / Build (Breakout) (push) Has been cancelled
Main / Build (Calculator) (push) Has been cancelled
Main / Build (Diceware) (push) Has been cancelled
Main / Build (EpubReader) (push) Has been cancelled
Main / Build (EspNowBridge) (push) Has been cancelled
Main / Build (GPIO) (push) Has been cancelled
Main / Build (GameBoy) (push) Has been cancelled
Main / Build (GraphicsDemo) (push) Has been cancelled
Main / Build (HelloWorld) (push) Has been cancelled
Main / Build (M5UnitTest) (push) Has been cancelled
Main / Build (Magic8Ball) (push) Has been cancelled
Main / Build (McpScreen) (push) Has been cancelled
Main / Build (MediaKeys) (push) Has been cancelled
Main / Build (Mp3Player) (push) Has been cancelled
Main / Build (MystifyDemo) (push) Has been cancelled
Main / Build (PocketDungeon) (push) Has been cancelled
Main / Build (ReynaBot) (push) Has been cancelled
Main / Build (RobotArm) (push) Has been cancelled
Main / Build (SerialConsole) (push) Has been cancelled
Main / Build (Snake) (push) Has been cancelled
Main / Build (TamaTac) (push) Has been cancelled
Main / Build (TodoList) (push) Has been cancelled
Main / Build (TwoEleven) (push) Has been cancelled
Main / Build (VoiceRecorder) (push) Has been cancelled
Main / Bundle (push) Has been cancelled
Main / PublishApps (push) Has been cancelled

The flashed 0.8.0-dev firmware exports the legacy device_find_by_name /
device_find_first_by_type lookup API, not the newer device_get_* out-param
API. Switching to device_get_* (to match newer SDK headers) caused
'ELF: Can't find symbol device_get_by_name' at load on .129/.114. Revert to
the exported legacy functions, declared locally since the newer SDK header
dropped them. Verified on .129 via serial: elf entry resolves, app shows.
This commit is contained in:
Adolfo Reyna
2026-08-19 21:18:14 -04:00
parent ef9d4e8de9
commit f785bd3fb2
+12 -4
View File
@@ -125,14 +125,22 @@ static void play_wav(AppCtx* ctx);
static void scan_books(AppCtx* ctx); static void scan_books(AppCtx* ctx);
/* ─── Audio-stream helpers ─── */ /* ─── Audio-stream helpers ─── */
// The flashed firmware exports the legacy device_find_* lookup API; the newer
// device_get_* (out-param) API is not yet exported on 0.8.0-dev, so calling it
// fails at load with "missing symbol". The newer SDK headers dropped the legacy
// declarations, so declare them here (symbols are resolved at runtime by the ELF
// loader against the flashed firmware).
extern struct Device* device_find_by_name(const char* name);
extern struct Device* device_find_first_by_type(const struct DeviceType* type);
static bool find_audio_stream_device(AppCtx* ctx) { static bool find_audio_stream_device(AppCtx* ctx) {
struct Device* dev = NULL; struct Device* dev = device_find_by_name("audio-stream");
if (device_get_by_name("audio-stream", &dev) == ERROR_NONE && dev) { if (dev) {
ctx->stream_dev = dev; ctx->stream_dev = dev;
return true; return true;
} }
dev = NULL; dev = device_find_first_by_type(&AUDIO_STREAM_TYPE);
if (device_get_first_by_type(&AUDIO_STREAM_TYPE, &dev) == ERROR_NONE && dev) { if (dev) {
ctx->stream_dev = dev; ctx->stream_dev = dev;
return true; return true;
} }