mirror of
https://github.com/cesanta/mongoose.git
synced 2026-12-04 21:58:22 +00:00
ESP32: Add support for the 3/4 key encoding scheme
* Add calculated redundancy values when writing eFuse blocks 1-3 * Perform 192 -> 256 bit key extension when encrypting images for flashing Fixes https://github.com/cesanta/mos-tool/issues/37 CL: mos: ESP32: Add support for the 3/4 key encoding scheme PUBLISHED_FROM=16639fb25d5200550ad2097929239d896e188b5b
This commit is contained in:
1 parent
1e9fabe1ca
commit
d0213ee90a
2 files changed
+39
No files matched your search
@@ -470,6 +470,27 @@ uint8_t cmd_loop(void) {
|
|||||||
resp = 0;
|
resp = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case CMD_READ_REG: {
|
||||||
|
len = SLIP_recv(args, sizeof(args));
|
||||||
|
if (len == 4) {
|
||||||
|
uint32_t value = READ_PERI_REG((uint32_t *) args[0]);
|
||||||
|
SLIP_send(&value, sizeof(value));
|
||||||
|
resp = 0;
|
||||||
|
} else {
|
||||||
|
resp = 0x91;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case CMD_WRITE_REG: {
|
||||||
|
len = SLIP_recv(args, sizeof(args));
|
||||||
|
if (len == 8) {
|
||||||
|
WRITE_PERI_REG((uint32_t *) args[0], args[1]);
|
||||||
|
resp = 0;
|
||||||
|
} else {
|
||||||
|
resp = 0xa1;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
SLIP_send(&resp, 1);
|
SLIP_send(&resp, 1);
|
||||||
} while (cmd != CMD_BOOT_FW && cmd != CMD_REBOOT);
|
} while (cmd != CMD_BOOT_FW && cmd != CMD_REBOOT);
|
||||||
|
|||||||
@@ -91,6 +91,24 @@ enum stub_cmd {
|
|||||||
* Output: arguments.
|
* Output: arguments.
|
||||||
*/
|
*/
|
||||||
CMD_ECHO = 8,
|
CMD_ECHO = 8,
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Read register value.
|
||||||
|
*
|
||||||
|
* Args: register address.
|
||||||
|
* Input: None.
|
||||||
|
* Output: register value.
|
||||||
|
*/
|
||||||
|
CMD_READ_REG = 9,
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Write register value.
|
||||||
|
*
|
||||||
|
* Args: register address, value.
|
||||||
|
* Input: None.
|
||||||
|
* Output: None.
|
||||||
|
*/
|
||||||
|
CMD_WRITE_REG = 10,
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* CS_COMMON_PLATFORMS_ESP8266_STUBS_STUB_FLASHER_H_ */
|
#endif /* CS_COMMON_PLATFORMS_ESP8266_STUBS_STUB_FLASHER_H_ */
|
||||||
Reference in new issue
Block a user