From f657ce9aa4b996cd2042d68b88ddeead8c2ec2df Mon Sep 17 00:00:00 2001 From: Brian Ignacio Date: Thu, 11 Jul 2024 17:24:27 +0800 Subject: [PATCH] update esp32p4 magic value --- src/esploader.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/esploader.ts b/src/esploader.ts index 95195723..d57f84be 100644 --- a/src/esploader.ts +++ b/src/esploader.ts @@ -155,8 +155,7 @@ async function magic2Chip(magic: number): Promise { const { ESP8266ROM } = await import("./targets/esp8266.js"); return new ESP8266ROM(); } - case 0x0addbad0: - case 0x0: { + case 0x7039ad9: { const { ESP32P4ROM } = await import("./targets/esp32p4.js"); return new ESP32P4ROM(); } @@ -677,6 +676,7 @@ export class ESPLoader { if (!detecting) { const chipMagicValue = (await this.readReg(0x40001000)) >>> 0; this.debug("Chip Magic " + chipMagicValue.toString(16)); + this.info("Chip Magic " + chipMagicValue.toString(16)); const chip = await magic2Chip(chipMagicValue); if (this.chip === null) { throw new ESPError(`Unexpected CHIP magic value ${chipMagicValue}. Failed to autodetect chip type.`);