Skip to content

Commit

Permalink
update esp32p4 magic value
Browse files Browse the repository at this point in the history
  • Loading branch information
brianignacio5 committed Jul 11, 2024
1 parent 8c17228 commit f657ce9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/esploader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,7 @@ async function magic2Chip(magic: number): Promise<ROM | null> {
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();
}
Expand Down Expand Up @@ -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.`);
Expand Down

0 comments on commit f657ce9

Please sign in to comment.