Compare commits

..

34 commits

Author SHA1 Message Date
Tyeth Gundry
c6f2a0cc4c
Update library.properties - bump version to 1.14.2 2025-08-05 13:32:43 +01:00
Ha Thach
b138cd1ba1
Merge pull request #29 from adafruit/brain-240mhz
Support running brain with rp2350 also support both F_CPU 120Mhz or 240Mhz
2025-07-30 21:38:04 +07:00
hathach
5b4034b0f9
add rp2350 to brain ci build 2025-07-30 21:17:17 +07:00
hathach
0332ed1117
support running rp2350 as testbed brain. Correct nop cycle for both rp2040 and rp2350 (higher IPC). Support both running with 120Mhz and 240Mhz 2025-07-30 21:09:27 +07:00
ladyada
6bfd594148 let run on RP2350 2025-07-29 13:44:15 -04:00
hathach
ab3624e73b
error if F_CPU is not 240Mhz due to pio-usb hanndshake timing issue when working with rp2350 bootrom.
support neopixel with 240Mhz
2025-07-29 21:10:15 +07:00
Tyeth Gundry
2b71fa7422
Update library.properties - 1.14.1 2025-06-26 15:03:33 +01:00
ladyada
6d16513e79 add feather m0's built in neopix 2025-06-22 13:40:48 -04:00
Tyeth Gundry
8045dd5c78
Update library.properties - bump to 1.14.0 2025-03-11 21:21:50 +00:00
Ha Thach
0b408468ce
Merge pull request #28 from adafruit/support-program-rp2350
support programming rp2350
2025-03-07 11:15:37 +07:00
hathach
759bdeb282
support programming rp2350, add a new example to program metro rp2350 from firmware.h
rename program_rp2040_uf2.ino to program_rp2_from_sdcard.ino
change include SdFat.h to SdFat_Adafruit_Fork.h
2025-03-05 16:47:56 +07:00
Tyeth Gundry
1130b8c29d
Update library.properties - bump version to 1.13.2 2024-11-27 15:35:24 +00:00
Limor "Ladyada" Fried
45816d8d0a
Merge pull request #27 from mikeysklar/master
qtpy esp32s3 with psram name fix
2024-11-22 19:15:07 -05:00
Mikey Sklar
d75faf6081 qtpy esp32s3 with psram name fix
Incorrect board name being used for Qt Py ESP32-S3 with 2MB PSRAM.

was:
ARDUINO_ADAFRUIT_QTPY_ESP32S3

correct boards.txt name:
ARDUINO_ADAFRUIT_QTPY_ESP32S3_N4R2
2024-11-22 15:18:57 -08:00
Tyeth Gundry
d48670064b
Update library.properties - bump version to 1.13.1 2024-07-23 15:57:58 +01:00
Tyeth Gundry
4125a29235
Merge pull request #26 from adafruit/2024-07-23-formatting
ESP32BootRom.cpp: format ifdefs
2024-07-23 15:57:27 +01:00
Tyeth Gundry
7657c315e3 ESP32BootRom.cpp: format ifdefs 2024-07-23 15:43:57 +01:00
Tyeth Gundry
64fc7e33c9
Update library.properties - bump version to 1.13.0 2024-07-23 15:06:02 +01:00
ladyada
cd2ecc5b76 Merge branch 'master' of github.com:adafruit/Adafruit_TestBed 2024-07-17 17:40:52 -04:00
ladyada
bbc2afadf4 add swj_clock argument, error setting for analog tests, and some ifdefs for ESP32 programming modes 2024-07-17 17:40:04 -04:00
Tyeth Gundry
e0d3b19e47
Update library.properties - bump version to 1.12.2 2024-07-09 11:21:22 +01:00
Ha Thach
4fb2c089bc
Merge pull request #25 from adafruit/support-c6 2024-07-05 16:26:54 +07:00
hathach
1805552376
add test for c6 programmin via cdc but not working yet due to usb host. 2024-07-05 15:21:21 +07:00
hathach
948b602102
add support for c6 programming stub + chip detect. Tested with uart programming 2024-07-05 14:32:14 +07:00
ladyada
00ea80fce2 Merge branch 'master' of github.com:adafruit/Adafruit_TestBed 2024-04-10 11:06:46 -04:00
ladyada
f3f79e1384 reading is slow so give some feedback so they know its working! 2024-04-10 11:06:39 -04:00
Tyeth Gundry
0de33c2804 Clean up old formatting (pre-commit) 2024-04-09 17:47:43 +00:00
ladyada
228169cbe5 add blink 2024-04-06 10:27:00 -04:00
ladyada
d37a36ff29 Merge branch 'master' of github.com:adafruit/Adafruit_TestBed 2024-01-09 15:07:21 -05:00
Tyeth Gundry
d02093a1b1
Update library.properties - bump version to 1.12.0 2024-01-09 15:43:57 +00:00
Ha Thach
f13cdaa159
Merge pull request #24 from adafruit/add-8266-binary
Add 8266 binary
2024-01-09 15:51:13 +07:00
ladyada
991d04d7a6 Merge branch 'master' of github.com:adafruit/Adafruit_TestBed 2024-01-08 14:16:23 -05:00
ladyada
0bd60196b2 Merge branch 'master' of github.com:adafruit/Adafruit_TestBed 2023-10-20 23:39:13 -04:00
ladyada
e47a9febec dont halt on bad ID read 2023-10-20 23:39:07 -04:00
47 changed files with 29749 additions and 145 deletions

View file

@ -1,7 +1,7 @@
// Testing basic peripherals on Brain
// required for Host MSC block device
#include "SdFat.h"
#include "SdFat_Adafruit_Fork.h"
// required for USB host
#include "pio_usb.h"

View file

@ -26,15 +26,14 @@
#define ESP_BINARIES_H_
// Configuration: select which bins to flash
#define BIN_FILES BIN_FEATHER_8266_BLINKY
#define BIN_FILES BIN_C6_BLINK_IO8
//--------------------------------------------------------------------+
// LIST OF BINARIES
//--------------------------------------------------------------------+
#define BIN_ESP32_NINA_1_7_4 0 // nina 1.7.4
#define BIN_ESP32_WIFI_AP_SKETCH \
1 // esp32 wifi accesspoint sketch with ssdi "YourAP"
#define BIN_ESP32_NINA_1_7_4 0 // nina 1.7.4
#define BIN_ESP32_WIFI_AP_SKETCH 1 // esp32 AP with ssdi "YourAP"
#define BIN_FEATHER_ESP32_V2_BLINKY 2 // Feather esp32 v2 blinky sketch
#define BIN_FEATHER_S2 10 // Feather esp32s2 factory firmware
@ -46,6 +45,8 @@
#define BIN_FEATHER_8266_BLINKY 30 // Feather esp8266 blinky sketch
#define BIN_C6_BLINK_IO8 40 // Blink sketch for C6 with LED on IO8
//--------------------------------------------------------------------+
// Binaries include
//--------------------------------------------------------------------+
@ -77,6 +78,12 @@
#elif BIN_FILES == BIN_FEATHER_8266_BLINKY
#include "esp_binaries/feather_esp8266_blinky.h"
#elif BIN_FILES == BIN_C6_BLINK_IO8
#include "esp_binaries/c6_blink_io8.h"
#else
#error "Please select BIN_FILES in esp_binaries.h"
#endif
struct {
@ -128,8 +135,14 @@ struct {
#elif BIN_FILES == BIN_FEATHER_8266_BLINKY
{0x0000, &Blink_ino},
#elif BIN_FILES == BIN_C6_BLINK_IO8
{0x00000, &c6_blink_io8_bootloader},
{0x8000, &c6_blink_io8_partitions},
{0xe000, &boot_app0},
{0x10000, &c6_blink_io8},
#else
#error bin_files[] not defined
#error "Please select BIN_FILES in esp_binaries.h"
#endif
};

File diff suppressed because it is too large Load diff

View file

@ -9,7 +9,7 @@
// - There is no need to connect IO0/Reset since we will use DTR/RTS to reset ESP32
// required for Host MSC block device
#include "SdFat.h"
#include "SdFat_Adafruit_Fork.h"
// required for USB host
#include "pio_usb.h"

View file

@ -26,13 +26,14 @@
#define ESP_BINARIES_H_
// Configuration: select which bins to flash
#define BIN_FILES BIN_METRO_S2
#define BIN_FILES BIN_C6_BLINK_IO8
//------------- Binaries Define -------------//
//--------------------------------------------------------------------+
// LIST OF BINARIES
//--------------------------------------------------------------------+
#define BIN_ESP32_NINA_1_7_4 0 // nina 1.7.4
#define BIN_ESP32_WIFI_AP_SKETCH \
1 // esp32 wifi accesspoint sketch with ssdi "YourAP"
#define BIN_ESP32_NINA_1_7_4 0 // nina 1.7.4
#define BIN_ESP32_WIFI_AP_SKETCH 1 // esp32 AP with ssdi "YourAP"
#define BIN_FEATHER_S2 10 // Feather esp32s2 factory firmware
#define BIN_FEATHER_S3 11 // Feather esp32s3 factory firmware
@ -43,7 +44,11 @@
#define BIN_ESP8266 30 // Espressif esp8266
//------------- Binaries include -------------//
#define BIN_C6_BLINK_IO8 40 // Blink sketch for C6 with LED on IO8
//--------------------------------------------------------------------+
// Binaries include
//--------------------------------------------------------------------+
#if BIN_FILES == BIN_ESP32_WIFI_AP_SKETCH
#include "esp_binaries/wifi_ap_binaries.h"
@ -69,6 +74,9 @@
#elif BIN_FILES == BIN_ESP8266
#include "esp_binaries/esp8266_binaries.h"
#elif BIN_FILES == BIN_C6_BLINK_IO8
#include "esp_binaries/c6_blink_io8.h"
#else
#error "Please select BIN_FILES in esp_binaries.h"
@ -116,6 +124,13 @@ struct {
#elif BIN_FILES == BIN_ESP8266
{0x00000, &esp8266_blink_io0},
#elif BIN_FILES == BIN_C6_BLINK_IO8
{0x00000, &c6_blink_io8_bootloader},
{0x8000, &c6_blink_io8_partitions},
{0xe000, &boot_app0},
{0x10000, &c6_blink_io8},
#else
#error "Please select BIN_FILES in esp_binaries.h"
#endif

File diff suppressed because it is too large Load diff

View file

@ -6,7 +6,7 @@
// - Brain TX/RX <-> ESP32 RX/TX
// required for Host MSC block device
#include "SdFat.h"
#include "SdFat_Adafruit_Fork.h"
// required for USB host
#include "pio_usb.h"

View file

@ -6,7 +6,7 @@
// - Brain's USB host to Target USB
// required for Host MSC block device
#include "SdFat.h"
#include "SdFat_Adafruit_Fork.h"
// required for USB host
#include "pio_usb.h"

View file

@ -6,7 +6,7 @@
// - Brain's USB host to Target USB
// required for Host MSC block device
#include "SdFat.h"
#include "SdFat_Adafruit_Fork.h"
// required for USB host
#include "pio_usb.h"

Binary file not shown.

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,135 @@
// This sketch program rp2040 by copying UF2 file from SDCard to
// rp2040 bootrom
// Hardware wiring:
// - Brain's Target GPIO28 to RP2 bootsel
// - Brain's Target Reset to RP2 Reset
// - Brain's USB host to RP2040 USB interface
// required for Host MSC block device
#include "SdFat_Adafruit_Fork.h"
// required for USB host
#include "pio_usb.h"
#include "Adafruit_TinyUSB.h"
#include "Adafruit_TestBed_Brains.h"
// firmware.h is converted using tools/file2carray.py e.g
// python tools/file2carray.py cdc_msc.uf2
// above command will generate cdc_msc.uf2.h with bindata, bindata_len
#include "metro_rp2350_cdc_msc.uf2.h"
// RP2040 Boot VID/PID
#define BOOT_VID 0x2e8a
#define BOOT_PID_RP2040 0x0003
#define BOOT_PID_RP2350 0x000f
// If USB filesystem is mounted
volatile bool is_usbfs_mounted = false;
//--------------------------------------------------------------------+
// Setup and Loop on Core0
//--------------------------------------------------------------------+
void print_speed(size_t count, uint32_t ms) {
Brain.LCD_printf(0, "%.01fKB %.01fs", count/1000.0F, ms / 1000.0F);
Serial.printf("Completed %u bytes in %.02f seconds.\r\n", count, ms / 1000.0F);
Serial.printf("Speed : %.02f KB/s\r\n", (count / 1000.0F) / (ms / 1000.0F));
}
void setup() {
Serial.begin(115200);
while (!Serial) delay(10);
Serial.println("Program RP2 by copy UF2 from Internal Flash to Bootloader!");
// sync: wait for Brain.begin() called in core1 before accessing SD or other peripherals
while (!Brain.inited()) delay(10);
// wait for USB filesystem is mounted. USB host bit-banging and task is
// processed on core1
while (!is_usbfs_mounted) delay(10);
// Copy UF2 file
Brain.LCD_printf(0, "Copying firmware");
Serial.println("Copying UF2 from Flash to USBHFS");
uint32_t ms = millis();
size_t copied_bytes = Brain.rp2_programUF2(bindata, bindata_len);
print_speed(copied_bytes, millis() - ms);
// wait for rp2040 boot rom to reset
// while (is_usbfs_mounted) delay(10);
}
void loop() {
Serial.flush();
}
//--------------------------------------------------------------------+
// Setup and Loop on Core1
//--------------------------------------------------------------------+
// call usbh_begin() here to make pio usb background task run on core1
// NOTE: Brain.begin() should be called here as well to prevent race condition
void setup1() {
Brain.begin();
Brain.usbh_begin();
Brain.LCD_printf(1, "No USB Device");
// reset rp2040 target into Boot Rom, default bootsel = 28, reset duration = 10 ms
Brain.rp2_targetResetBootRom();
}
// core1's loop: process usb host task on core1
void loop1() {
Brain.USBHost.task();
}
//--------------------------------------------------------------------+
// TinyUSB Host callbacks
// Note: running in the same core where Brain.USBHost.task() is called
//--------------------------------------------------------------------+
bool is_rp2_bootloader(uint16_t vid, uint16_t pid) {
return (vid == BOOT_VID && (pid == BOOT_PID_RP2040 || pid == BOOT_PID_RP2350));
}
extern "C" {
// Invoked when device is mounted (configured)
void tuh_mount_cb(uint8_t dev_addr) {
uint16_t vid, pid;
tuh_vid_pid_get(dev_addr, &vid, &pid);
if (!is_rp2_bootloader(vid, pid)) {
Brain.LCD_printf(1, "UnkDev %04x:%04x", vid, pid);
}
}
/// Invoked when device is unmounted (bus reset/unplugged)
void tuh_umount_cb(uint8_t dev_addr) {
(void)dev_addr;
Brain.LCD_printf(1, "No USB Device");
}
// Invoked when a device with MassStorage interface is mounted
void tuh_msc_mount_cb(uint8_t dev_addr) {
uint16_t vid, pid;
tuh_vid_pid_get(dev_addr, &vid, &pid);
if (is_rp2_bootloader(vid, pid)) {
is_usbfs_mounted = Brain.usbh_mountFS(dev_addr);
if (is_usbfs_mounted) {
uint16_t rp2variant = (pid == BOOT_PID_RP2040 ? 2040 : 2350);
Brain.LCD_printf(1, "RP%u Bootldr", rp2variant);
}
}
}
// Invoked when a device with MassStorage interface is unmounted
void tuh_msc_umount_cb(uint8_t dev_addr) {
is_usbfs_mounted = false;
Brain.usbh_umountFS(dev_addr);
}
}

View file

@ -6,7 +6,7 @@
// - Brain's USB host to RP2040 USB interface
// required for Host MSC block device
#include "SdFat.h"
#include "SdFat_Adafruit_Fork.h"
// required for USB host
#include "pio_usb.h"
@ -79,7 +79,7 @@ void setup() {
Serial.println("Copying from SD to USBHFS: " UF2_FILE_PATH);
uint32_t ms = millis();
size_t copied_bytes = Brain.rp2040_programUF2(UF2_FILE_PATH);
size_t copied_bytes = Brain.rp2_programUF2(UF2_FILE_PATH);
print_speed(copied_bytes, millis() - ms);
@ -104,7 +104,7 @@ void setup1() {
Brain.LCD_printf(1, "No USB Device");
// reset rp2040 target into Boot Rom, default bootsel = 28, reset duration = 10 ms
Brain.rp2040_targetResetBootRom();
Brain.rp2_targetResetBootRom();
}
// core1's loop: process usb host task on core1

View file

@ -6,7 +6,7 @@
// - Brain's USB host to Target USB
// required for Host MSC block device
#include "SdFat.h"
#include "SdFat_Adafruit_Fork.h"
// required for USB host
#include "pio_usb.h"

View file

@ -6,7 +6,7 @@
// - Brain's USB host to Target USB
// required for Host MSC block device
#include "SdFat.h"
#include "SdFat_Adafruit_Fork.h"
// required for USB host
#include "pio_usb.h"

View file

@ -6,7 +6,7 @@
// - Brain's USB host to Target USB
// required for Host MSC block device
#include "SdFat.h"
#include "SdFat_Adafruit_Fork.h"
// required for USB host
#include "pio_usb.h"

View file

@ -6,7 +6,7 @@
// - Brain's USB host to Target USB
// required for Host MSC block device
#include "SdFat.h"
#include "SdFat_Adafruit_Fork.h"
// required for USB host
#include "pio_usb.h"

View file

@ -2,7 +2,7 @@
// to LCD. Also determine if device support MSC or HID
// required for Host MSC block device
#include "SdFat.h"
#include "SdFat_Adafruit_Fork.h"
// required for USB host
#include "pio_usb.h"

View file

@ -2,7 +2,7 @@
// to LCD. Also determine if device support MSC or HID
// required for Host MSC block device
#include "SdFat.h"
#include "SdFat_Adafruit_Fork.h"
// required for USB host
#include "pio_usb.h"

View file

@ -7,7 +7,7 @@ extern Adafruit_TestBed TB;
#if defined(ARDUINO_ARCH_RP2040) \
|| defined(ARDUINO_ADAFRUIT_QTPY_ESP32S2) \
|| defined(ARDUINO_ADAFRUIT_QTPY_ESP32S3_NOPSRAM) \
|| defined(ARDUINO_ADAFRUIT_QTPY_ESP32S3) \
|| defined(ARDUINO_ADAFRUIT_QTPY_ESP32S3_N4R2) \
|| defined(ARDUINO_ADAFRUIT_QTPY_ESP32_PICO) \
|| defined(ARDUINO_SAM_DUE) \
|| defined(ARDUINO_ARCH_RENESAS_UNO)
@ -26,7 +26,7 @@ void setup() {
#if defined(ARDUINO_ADAFRUIT_QTPY_ESP32S2) || \
defined(ARDUINO_ADAFRUIT_QTPY_ESP32S3_NOPSRAM) || \
defined(ARDUINO_ADAFRUIT_QTPY_ESP32S3) || \
defined(ARDUINO_ADAFRUIT_QTPY_ESP32S3_N4R2) || \
defined(ARDUINO_ADAFRUIT_QTPY_ESP32_PICO)
// ESP32 is kinda odd in that secondary ports must be manually
// assigned their pins with setPins()!

View file

@ -20,7 +20,7 @@
* from https://github.com/adafruit/nina-fw/releases/tag/1.7.5 in this example directory.
*/
#include "SdFat.h"
#include "SdFat_Adafruit_Fork.h"
// #include "Adafruit_TinyUSB.h"
#include "Adafruit_TestBed.h"

View file

@ -1,5 +1,5 @@
name=Adafruit TestBed
version=1.11.0
version=1.14.2
author=Adafruit
maintainer=Adafruit <info@adafruit.com>
sentence=Adafruit's internal test bed code library

View file

@ -1,5 +1,8 @@
#include "Adafruit_TestBed.h"
// change to 1 to skip pre-flash md5 check for testing
#define SKIP_PRE_FLASH_MD5_CHECK 0
static inline uint32_t div_ceil(uint32_t v, uint32_t d) {
return (v + d - 1) / d;
}
@ -8,6 +11,9 @@ Adafruit_TestBed::Adafruit_TestBed(void) {
#if defined(ADAFRUIT_METRO_M0_EXPRESS)
neopixelPin = 40;
neopixelNum = 1;
#elif defined(ADAFRUIT_FEATHER_M0_EXPRESS)
neopixelPin = 8;
neopixelNum = 1;
#endif
esp32boot = NULL;
@ -215,11 +221,13 @@ float Adafruit_TestBed::readAnalogVoltage(uint16_t pin, float multiplier) {
@param name Human readable name for the pin
@param multiplier If there's a resistor divider, put the inverse here
@param value What voltage the pin should be
@param error Percent of error permitted (10 is 10%)
@return True if the pin voltage is within 10% of target
*/
/**************************************************************************/
bool Adafruit_TestBed::testAnalogVoltage(uint16_t pin, const char *name,
float multiplier, float value) {
float multiplier, float value,
uint8_t error) {
float voltage = readAnalogVoltage(pin, multiplier);
theSerial->print(name);
theSerial->print(F(" output voltage: "));
@ -227,11 +235,13 @@ bool Adafruit_TestBed::testAnalogVoltage(uint16_t pin, const char *name,
theSerial->print(F(" V (should be "));
theSerial->print(value);
theSerial->print(" V)...");
if (abs(voltage - value) > (value / 10.0)) {
if (abs(voltage - value) > (value * error / 100.0)) {
theSerial->println("Failed");
return false;
}
theSerial->println(F("OK within 10%"));
theSerial->print(F("OK within "));
theSerial->print(error);
theSerial->println("%");
return true;
}
@ -445,6 +455,24 @@ void Adafruit_TestBed::beepNblink(void) {
#endif
}
/**************************************************************************/
/*!
@brief light the LED for 500ms, if defined
*/
/**************************************************************************/
void Adafruit_TestBed::blink(void) {
if (ledPin >= 0) {
pinMode(ledPin, OUTPUT);
digitalWrite(ledPin, HIGH);
}
delay(500);
if (ledPin >= 0) {
digitalWrite(ledPin, LOW);
}
}
//--------------------------------------------------------------------+
// ESP32 Target
//--------------------------------------------------------------------+
@ -503,7 +531,7 @@ Adafruit_TestBed::_esp32_programFlashDefl_impl(const esp32_zipfile_t *zfile,
// Check if MD5 matches to skip this file
uint8_t esp_md5[16];
#if 1 // change to 0 to skip pre-flash md5 check for testing
#if !SKIP_PRE_FLASH_MD5_CHECK
esp32boot->md5Flash(addr, zfile->uncompressed_len, esp_md5);
Serial.print("Flash MD5: ");
print_buf(esp_md5, 16);

View file

@ -6,7 +6,7 @@
#include "Wire.h"
#include "ESP32BootROM.h"
#include "SdFat.h"
#include "SdFat_Adafruit_Fork.h"
#define RED 0xFF0000
#define YELLOW 0xFFFF00
@ -48,7 +48,7 @@ public:
float readAnalogVoltage(uint16_t pin, float multiplier = 1);
bool testAnalogVoltage(uint16_t pin, const char *name, float multiplier,
float value);
float value, uint8_t error = 10);
bool testpins(uint8_t a, uint8_t b, uint8_t *allpins, uint8_t num_allpins);
@ -59,6 +59,7 @@ public:
void beep(uint32_t freq, uint32_t duration);
void beepNblink(void);
void blink(void);
uint32_t timestamp(void);
void printTimeTaken(bool restamp = false);

View file

@ -22,9 +22,9 @@
* THE SOFTWARE.
*/
#ifdef ARDUINO_RASPBERRY_PI_PICO
#ifdef ARDUINO_ARCH_RP2040
#include "SdFat.h"
#include "SdFat_Adafruit_Fork.h"
#include "pio_usb.h"
#include "Adafruit_DAP.h"
@ -34,6 +34,12 @@
#define USBHOST_RHPORT 1
// Workaround force F_CPU to 240MHz for programming RP2350 due to handshake
// timeout
#if F_CPU != 120000000L && F_CPU != 240000000L
#error "F_CPU must be set to either 120Mhz or 240Mhz for pio-usb host"
#endif
Adafruit_TestBed_Brains Brain;
volatile bool LCD_semaphore = false;
@ -133,8 +139,8 @@ bool Adafruit_TestBed_Brains::inited(void) { return _inited; }
// RP2040 Target
//--------------------------------------------------------------------+
void Adafruit_TestBed_Brains::rp2040_targetResetBootRom(int bootsel_pin,
uint32_t reset_ms) {
void Adafruit_TestBed_Brains::rp2_targetResetBootRom(int bootsel_pin,
uint32_t reset_ms) {
pinMode(bootsel_pin, OUTPUT);
digitalWrite(bootsel_pin, LOW);
@ -146,7 +152,41 @@ void Adafruit_TestBed_Brains::rp2040_targetResetBootRom(int bootsel_pin,
pinMode(bootsel_pin, INPUT);
}
size_t Adafruit_TestBed_Brains::rp2040_programUF2(const char *fpath) {
size_t Adafruit_TestBed_Brains::rp2_programUF2(const uint8_t *buffer,
size_t bufsize) {
size_t copied_bytes = 0;
const char *dst_name = "FIRMWARE.UF2";
File32 fdst = USBH_FS.open(dst_name, O_WRONLY | O_CREAT);
if (!fdst) {
Serial.printf("USBH_FS: cannot create file: %s\r\n", dst_name);
} else {
while (copied_bytes < bufsize) {
size_t count = bufsize - copied_bytes;
if (count > 4096) {
count = 4096; // write 1 sector each
}
setLED(HIGH);
size_t wr_count = fdst.write(buffer, count);
setLED(LOW);
buffer += wr_count;
copied_bytes += wr_count;
if (wr_count != count) {
Serial.println("USBH_FS: Failed to write file");
break;
}
}
}
fdst.close();
return copied_bytes;
}
size_t Adafruit_TestBed_Brains::rp2_programUF2(const char *fpath) {
File32 fsrc = SD.open(fpath);
if (!fsrc) {
Serial.printf("SD: cannot open file: %s\r\n", fpath);
@ -154,7 +194,6 @@ size_t Adafruit_TestBed_Brains::rp2040_programUF2(const char *fpath) {
}
size_t copied_bytes = 0;
const char *dst_name = "FIRMWARE.UF2";
File32 fdst = USBH_FS.open(dst_name, O_WRONLY | O_CREAT);
@ -217,13 +256,13 @@ bool Adafruit_TestBed_Brains::dap_begin(Adafruit_DAP *dp) {
dap_err_hanlder);
}
bool Adafruit_TestBed_Brains::dap_connect(void) {
bool Adafruit_TestBed_Brains::dap_connect(uint32_t swj_clock) {
if (!dap) {
return false;
}
LCD_printf("Connecting...");
if (!dap->targetConnect()) {
if (!dap->targetConnect(swj_clock)) {
return false;
}
@ -233,10 +272,6 @@ bool Adafruit_TestBed_Brains::dap_connect(void) {
LCD_printf(0, "Unknown MCU");
LCD_printf(1, "ID = %08X", dsu_did);
while (1) {
delay(1);
}
return false;
}
@ -438,7 +473,7 @@ size_t Adafruit_TestBed_Brains::dap_readFlash(const char *fpath, uint32_t addr,
setLED(LOW);
fsrc.write(buf, count);
LCD_printf("%d remaining", remain);
addr += count;
remain -= count;
}
@ -479,6 +514,209 @@ bool Adafruit_TestBed_Brains::SD_begin(uint32_t max_clock) {
//--------------------------------------------------------------------+
// LCD
//--------------------------------------------------------------------+
#define NOP1 __asm volatile("nop");
#define NOP2 NOP1 NOP1
#define NOP3 NOP2 NOP1
#define NOP4 NOP2 NOP2
#define NOP5 NOP4 NOP1
#define NOP6 NOP4 NOP2
#define NOP7 NOP4 NOP3
#define NOP8 NOP4 NOP4
#define NOP9 NOP8 NOP1
#define NOP10 NOP8 NOP2
#define NOP11 NOP8 NOP3
#define NOP12 NOP8 NOP4
#define NOP13 NOP8 NOP5
#define NOP14 NOP8 NOP6
#define NOP15 NOP8 NOP7
#define NOP16 NOP8 NOP8
#define NOP17 NOP16 NOP1
#define NOP18 NOP16 NOP2
#define NOP19 NOP16 NOP3
#define NOP20 NOP16 NOP4
#define NOP21 NOP16 NOP5
#define NOP22 NOP16 NOP6
#define NOP23 NOP16 NOP7
#define NOP24 NOP16 NOP8
#define NOP25 NOP16 NOP9
#define NOP26 NOP16 NOP10
#define NOP27 NOP16 NOP11
#define NOP28 NOP16 NOP12
#define NOP29 NOP16 NOP13
#define NOP30 NOP16 NOP14
#define NOP31 NOP16 NOP15
#define NOP32 NOP16 NOP16
#define NOP33 NOP32 NOP1
#define NOP34 NOP32 NOP2
#define NOP35 NOP32 NOP3
#define NOP36 NOP32 NOP4
#define NOP37 NOP32 NOP5
#define NOP38 NOP32 NOP6
#define NOP39 NOP32 NOP7
#define NOP40 NOP32 NOP8
#define NOP41 NOP32 NOP9
#define NOP42 NOP32 NOP10
#define NOP43 NOP32 NOP11
#define NOP44 NOP32 NOP12
#define NOP45 NOP32 NOP13
#define NOP46 NOP32 NOP14
#define NOP47 NOP32 NOP15
#define NOP48 NOP32 NOP16
#define NOP49 NOP48 NOP1
#define NOP50 NOP48 NOP2
#define NOP51 NOP48 NOP3
#define NOP52 NOP48 NOP4
#define NOP53 NOP48 NOP5
#define NOP54 NOP48 NOP6
#define NOP55 NOP48 NOP7
#define NOP56 NOP48 NOP8
#define NOP57 NOP48 NOP9
#define NOP58 NOP48 NOP10
#define NOP59 NOP48 NOP11
#define NOP60 NOP48 NOP12
#define NOP61 NOP48 NOP13
#define NOP62 NOP48 NOP14
#define NOP63 NOP48 NOP15
#define NOP64 NOP48 NOP16
#define NOP65 NOP64 NOP1
#define NOP66 NOP64 NOP2
#define NOP67 NOP64 NOP3
#define NOP68 NOP64 NOP4
#define NOP69 NOP64 NOP5
#define NOP70 NOP64 NOP6
#define NOP71 NOP64 NOP7
#define NOP72 NOP64 NOP8
#define NOP73 NOP64 NOP9
#define NOP74 NOP64 NOP10
#define NOP75 NOP64 NOP11
#define NOP76 NOP64 NOP12
#define NOP77 NOP64 NOP13
#define NOP78 NOP64 NOP14
#define NOP79 NOP64 NOP15
#define NOP80 NOP64 NOP16
#define NOP81 NOP80 NOP1
#define NOP82 NOP80 NOP2
#define NOP83 NOP80 NOP3
#define NOP84 NOP80 NOP4
#define NOP85 NOP80 NOP5
#define NOP86 NOP80 NOP6
#define NOP87 NOP80 NOP7
#define NOP88 NOP80 NOP8
#define NOP89 NOP80 NOP9
#define NOP90 NOP80 NOP10
#define NOP91 NOP80 NOP11
#define NOP92 NOP80 NOP12
#define NOP93 NOP80 NOP13
#define NOP94 NOP80 NOP14
#define NOP95 NOP80 NOP15
#define NOP96 NOP80 NOP16
#define NOP97 NOP96 NOP1
#define NOP98 NOP96 NOP2
#define NOP99 NOP96 NOP3
#define NOP100 NOP96 NOP4
#define NOP101 NOP100 NOP1
#define NOP102 NOP100 NOP2
#define NOP103 NOP100 NOP3
#define NOP104 NOP100 NOP4
#define NOP105 NOP100 NOP5
#define NOP106 NOP100 NOP6
#define NOP107 NOP100 NOP7
#define NOP108 NOP100 NOP8
#define NOP109 NOP100 NOP9
#define NOP110 NOP100 NOP10
#define NOP111 NOP100 NOP11
#define NOP112 NOP100 NOP12
#define NOP113 NOP100 NOP13
#define NOP114 NOP100 NOP14
#define NOP115 NOP100 NOP15
#define NOP116 NOP100 NOP16
#define NOP117 NOP116 NOP1
#define NOP118 NOP116 NOP2
#define NOP119 NOP116 NOP3
#define NOP120 NOP116 NOP4
#define NOP121 NOP116 NOP5
#define NOP122 NOP116 NOP6
#define NOP123 NOP116 NOP7
#define NOP124 NOP116 NOP8
#define NOP125 NOP116 NOP9
#define NOP126 NOP116 NOP10
#define NOP127 NOP116 NOP11
#define NOP128 NOP116 NOP12
#define NOP129 NOP128 NOP1
#define NOP130 NOP128 NOP2
#define NOP131 NOP128 NOP3
#define NOP132 NOP128 NOP4
#define NOP133 NOP128 NOP5
#define NOP134 NOP128 NOP6
#define NOP135 NOP128 NOP7
#define NOP136 NOP128 NOP8
#define NOP137 NOP128 NOP9
#define NOP138 NOP128 NOP10
#define NOP139 NOP128 NOP11
#define NOP140 NOP128 NOP12
#define NOP141 NOP128 NOP13
#define NOP142 NOP128 NOP14
#define NOP143 NOP128 NOP15
#define NOP144 NOP128 NOP16
#define NOP145 NOP144 NOP1
#define NOP146 NOP144 NOP2
#define NOP147 NOP144 NOP3
#define NOP148 NOP144 NOP4
#define NOP149 NOP144 NOP5
#define NOP150 NOP144 NOP6
#define NOP151 NOP144 NOP7
#define NOP152 NOP144 NOP8
#define NOP153 NOP144 NOP9
#define NOP154 NOP144 NOP10
#define NOP155 NOP144 NOP11
#define NOP156 NOP144 NOP12
#define NOP157 NOP144 NOP13
#define NOP158 NOP144 NOP14
#define NOP159 NOP144 NOP15
#define NOP160 NOP144 NOP16
#define NOP161 NOP160 NOP1
#define NOP162 NOP160 NOP2
#define NOP163 NOP160 NOP3
#define NOP164 NOP160 NOP4
#define NOP165 NOP160 NOP5
#define NOP166 NOP160 NOP6
#define NOP167 NOP160 NOP7
#define NOP168 NOP160 NOP8
#define NOP169 NOP160 NOP9
#define NOP170 NOP160 NOP10
#define NOP171 NOP160 NOP11
#define NOP172 NOP160 NOP12
#define NOP173 NOP160 NOP13
#define NOP174 NOP160 NOP14
#define NOP175 NOP160 NOP15
#define NOP176 NOP160 NOP16
#define NOP177 NOP176 NOP1
#define NOP178 NOP176 NOP2
#define NOP179 NOP176 NOP3
#define NOP180 NOP176 NOP4
#define NOP181 NOP176 NOP5
#define NOP182 NOP176 NOP6
#define NOP183 NOP176 NOP7
#define NOP184 NOP176 NOP8
#define NOP185 NOP176 NOP9
#define NOP186 NOP176 NOP10
#define NOP187 NOP176 NOP11
#define NOP188 NOP176 NOP12
#define NOP189 NOP176 NOP13
#define NOP190 NOP176 NOP14
#define NOP191 NOP176 NOP15
#define NOP192 NOP176 NOP16
#define NOP193 NOP192 NOP1
#define NOP194 NOP192 NOP2
#define NOP195 NOP192 NOP3
#define NOP196 NOP192 NOP4
#define NOP197 NOP192 NOP5
#define NOP198 NOP192 NOP6
#define NOP199 NOP192 NOP7
#define NOP200 NOP192 NOP8
#define _NOP_COUNT(n) NOP##n
#define NOP_COUNT(n) _NOP_COUNT(n)
void __no_inline_not_in_flash_func(Adafruit_TestBed_Brains::setColor)(
uint32_t color) {
@ -519,53 +757,69 @@ void __no_inline_not_in_flash_func(Adafruit_TestBed_Brains::setColor)(
uint32_t const isr_context = save_and_disable_interrupts();
// RP2040 is 120 MHz, 120 cycle = 1us = 1000 ns
// Neopixel is 800 KHz, 1T = 1.25 us = 150 nop
/* Neopixel is 800 KHz, 1T = 1.25 us = 150 nop (120Mhz), 300 nop (240Mhz)
- T1H = 0.8 us, T1L = 0.45 us
- T0H = 0.4 us, T0L = 0.85 us
If F_CPU is 120 MHz: 120 nop = 1us -> 1 nop = 8.33 ns
- T1H = 0.8 us = 96 nop, T1L = 0.45 us = 54 nop
- T0H = 0.4 us = 48 nop, T0L = 0.85 us = 102 nop
If F_CPU is 240 MHz: 240 nop = 1us -> 1 nop = 4.17 ns
- T1H = 0.8 us = 192 nop, T1L = 0.45 us = 108 nop
- T0H = 0.4 us = 96 nop, T0L = 0.85 us = 204 nop
Due to overhead the number of NOP is actually smaller, also M33 run faster
(higher IPC) therefore these are hand tuned,
*/
#if defined(ARDUINO_RASPBERRY_PI_PICO)
// value for rp2040 at 120MHz
#define T1H_CYCLE 90
#define T1L_CYCLE 39
#define T0H_CYCLE 42
#define T0L_CYCLE 84
#define LOOP_OVERHEAD_CYCLE 10 // overhead for if/else and loop
#elif defined(ARDUINO_RASPBERRY_PI_PICO_2)
// value for rp2350 at 120MHz
#define T1H_CYCLE 190
#define T1L_CYCLE 90
#define T0H_CYCLE 88
#define T0L_CYCLE 180
#define LOOP_OVERHEAD_CYCLE 5
#endif
while (1) {
if (p & bitMask) {
// T1H 0,8 us = 96 - 1 = 95 nop
// T1H 0.8 us = 96 nop (without overhead)
sio_hw->gpio_set = pinMask;
__asm volatile("nop; nop; nop; nop; nop; nop; nop; nop; nop; nop;"
"nop; nop; nop; nop; nop; nop; nop; nop; nop; nop;"
"nop; nop; nop; nop; nop; nop; nop; nop; nop; nop;"
"nop; nop; nop; nop; nop; nop; nop; nop; nop; nop;"
"nop; nop; nop; nop; nop; nop; nop; nop; nop; nop;"
"nop; nop; nop; nop; nop; nop; nop; nop; nop; nop;"
"nop; nop; nop; nop; nop; nop; nop; nop; nop; nop;"
"nop; nop; nop; nop; nop; nop; nop; nop; nop; nop;"
"nop; nop; nop; nop; nop; nop; nop; nop; nop; nop;");
NOP_COUNT(T1H_CYCLE);
#if F_CPU == 240000000L
NOP_COUNT(T1H_CYCLE);
#endif
// T1L 0,45 = 54 - 10 (ifelse) - 5 (overhead) = 44 nop
// T1L 0.45 = 54 - 10 (ifelse) - 5 (overhead) = 44 nop
sio_hw->gpio_clr = pinMask;
__asm volatile("nop; nop; nop; nop; nop; nop; nop; nop; nop; nop;"
"nop; nop; nop; nop; nop; nop; nop; nop; nop; nop;"
"nop; nop; nop; nop; nop; nop; nop; nop; nop; nop;"
"nop; nop; nop; nop; nop; nop; nop; nop; nop;");
NOP_COUNT(T1L_CYCLE);
#if F_CPU == 240000000L
NOP_COUNT(T1L_CYCLE);
#endif
} else {
// T0H 0,4 us = 48 - 1 = 47 nop
// T0H 0.4 us = 48 cycles
sio_hw->gpio_set = pinMask;
__asm volatile("nop; nop; nop; nop; nop; nop; nop; nop; nop; nop;"
"nop; nop; nop; nop; nop; nop; nop; nop; nop; nop;"
"nop; nop; nop; nop; nop; nop; nop; nop; nop; nop;"
"nop; nop; nop; nop; nop; nop; nop; nop; nop; nop;"
"nop; nop;");
NOP_COUNT(T0H_CYCLE);
#if F_CPU == 240000000L
NOP_COUNT(T0H_CYCLE);
#endif
// T0L 0.85 us = 102 - 10 (ifelse) - 5 (overhead) = 87 nop
sio_hw->gpio_clr = pinMask;
__asm volatile("nop; nop; nop; nop; nop; nop; nop; nop; nop; nop;"
"nop; nop; nop; nop; nop; nop; nop; nop; nop; nop;"
"nop; nop; nop; nop; nop; nop; nop; nop; nop; nop;"
"nop; nop; nop; nop; nop; nop; nop; nop; nop; nop;"
"nop; nop; nop; nop; nop; nop; nop; nop; nop; nop;"
"nop; nop; nop; nop; nop; nop; nop; nop; nop; nop;"
"nop; nop; nop; nop; nop; nop; nop; nop; nop; nop;"
"nop; nop; nop; nop; nop; nop; nop; nop; nop; nop;"
"nop; nop; nop; nop;");
NOP_COUNT(T0L_CYCLE);
#if F_CPU == 240000000L
NOP_COUNT(T0L_CYCLE);
#endif
}
if (bitMask >>= 1) {
// not full byte, shift to next bit
__asm volatile("nop; nop; nop; nop; nop; nop; nop; nop; nop; nop;");
NOP_COUNT(LOOP_OVERHEAD_CYCLE);
} else {
// probably take 10 nops
// if a full byte is sent, next to another byte
@ -575,6 +829,9 @@ void __no_inline_not_in_flash_func(Adafruit_TestBed_Brains::setColor)(
p = *ptr++;
bitMask = 0x80;
}
#if F_CPU == 240000000L
NOP_COUNT(LOOP_OVERHEAD_CYCLE);
#endif
}
restore_interrupts(isr_context);
@ -656,15 +913,14 @@ void Adafruit_TestBed_Brains::usbh_setVBus(bool en) {
bool Adafruit_TestBed_Brains::usbh_begin(void) {
// Check for CPU frequency, must be multiple of 120Mhz for bit-banging USB
uint32_t cpu_hz = clock_get_hz(clk_sys);
if (cpu_hz != 120000000UL && cpu_hz != 240000000UL) {
if (cpu_hz % 12000000UL) {
while (!Serial) {
delay(10); // wait for native usb
}
Serial.printf("Error: CPU Clock = %lu, PIO USB require CPU clock must be "
"multiple of 120 Mhz\r\n",
"multiple of 12 Mhz\r\n",
cpu_hz);
Serial.printf("Change your CPU Clock to either 120 or 240 Mhz in Menu->CPU "
"Speed \r\n");
Serial.println("Change your CPU Clock to 12*n Mhz in Menu->CPU Speed");
while (1) {
delay(1);
}

View file

@ -1,9 +1,9 @@
#ifndef ADAFRUIT_TESTBED_BRAINS_H
#define ADAFRUIT_TESTBED_BRAINS_H
#ifdef ARDUINO_RASPBERRY_PI_PICO
#ifdef ARDUINO_ARCH_RP2040
#include "SdFat.h"
#include "SdFat_Adafruit_Fork.h"
#include "Adafruit_TestBed.h"
#include <LiquidCrystal.h>
@ -49,21 +49,31 @@ public:
bool usbh_mountFS(uint8_t dev_addr);
bool usbh_umountFS(uint8_t dev_addr);
//--------------------------------------------------------------------+1
// RP2 (rp2040 and rp2350) Target
//--------------------------------------------------------------------+
// RP2040 Target
//--------------------------------------------------------------------+
// reset rp2040 target to Boot ROM
void rp2040_targetResetBootRom(int bootsel_pin = 28, uint32_t reset_ms = 20);
// reset rp2 target to Boot ROM
void rp2_targetResetBootRom(int bootsel_pin = 28, uint32_t reset_ms = 20);
// program rp2040 target by copying UF2 file from SDCard
// program rp2 target by copying UF2 file stored in flash
size_t rp2_programUF2(const uint8_t *buffer, size_t bufsize);
// program rp2 target by copying UF2 file from SDCard
// return number of copied bytes (typically uf2 file size)
size_t rp2040_programUF2(const char *fpath);
size_t rp2_programUF2(const char *fpath);
// backward compatibility
void rp2040_targetResetBootRom(int bootsel_pin = 28, uint32_t reset_ms = 20) {
rp2_targetResetBootRom(bootsel_pin, reset_ms);
}
size_t rp2040_programUF2(const char *fpath) { return rp2_programUF2(fpath); }
//--------------------------------------------------------------------+
// DAP (samd21/51, nrf5x, stm32f4 etc..) Target
//--------------------------------------------------------------------+
bool dap_begin(Adafruit_DAP *dp);
bool dap_connect(void);
bool dap_connect(uint32_t swj_clock = 50);
void dap_disconnect(void);
bool dap_unprotectBoot(void);

View file

@ -19,11 +19,14 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#if defined(ARDUINO_RASPBERRY_PI_PICO) || defined(__SAMD51__) || \
// https://docs.espressif.com/projects/esptool/en/latest/esp32/advanced-topics/serial-protocol.html
#if defined(ARDUINO_ARCH_RP2040) || defined(__SAMD51__) || \
defined(TARGET_RP2040) || defined(ARDUINO_ARCH_ESP32) || \
(defined(ARDUINO_ARCH_SAMD) && defined(ARM_MATH_CM0PLUS))
#include "ESP32BootROM.h"
#include "stub_esp32.h"
#include "stub_esp.h"
#ifdef USE_TINYUSB
#include "Adafruit_TinyUSB.h"
@ -196,7 +199,7 @@ void ESP32BootROMClass::resetBootloader(void) {
// IO0 high: done
digitalWrite(_gpio0Pin, HIGH);
}
#ifdef USE_TINYUSB
#if defined(USE_TINYUSB) && defined(ARDUINO_ARCH_RP2040)
else {
// Serial Host using setDtrRts()
// - DTR -> IO0
@ -252,36 +255,19 @@ uint32_t ESP32BootROMClass::begin(unsigned long baudrate) {
Serial.printf("Chip Detect: 0x%08lX\r\n", _chip_detect);
const esp32_stub_loader_t *stub = NULL;
switch (_chip_detect) {
case CHIP_DETECT_MAGIC_ESP32:
// only ESP32 have SUPPORTS_ENCRYPTED_FLASH = false
Serial.println("Found ESP32");
stub = &stub_esp32;
_supports_encrypted_flash = false;
break;
case CHIP_DETECT_MAGIC_ESP32S2:
Serial.println("Found ESP32-S2");
stub = &stub_esp32s2;
break;
case CHIP_DETECT_MAGIC_ESP32S3:
Serial.println("Found ESP32-S3");
stub = &stub_esp32s3;
break;
case CHIP_DETECT_MAGIC_ESP8266:
Serial.println("Found ESP8266");
stub = &stub_esp8266;
break;
default:
Serial.println("Found unknown ESP");
break;
for (uint32_t i = 0; i < ESP_STUB_COUNT; i++) {
if (stub_esp_arr[i]->chip_detect == _chip_detect) {
stub = stub_esp_arr[i];
break;
}
}
if (stub) {
Serial.printf("Found %s\r\n", stub->chip_name);
VERIFY(uploadStub(stub));
VERIFY(syncStub(3000));
} else {
Serial.println("Found unknown ESP chip");
}
if (baudrate != ESP_ROM_BAUD) {

View file

@ -30,9 +30,11 @@ enum {
CHIP_DETECT_MAGIC_ESP32S2 = 0x000007C6,
CHIP_DETECT_MAGIC_ESP32S3 = 0x9,
CHIP_DETECT_MAGIC_ESP8266 = 0xFFF0C101,
CHIP_DETECT_MAGIC_ESP32C6 = 0x2CE0806F,
};
typedef struct {
uint32_t chip_detect;
uint32_t entry;
uint32_t text_start;
uint32_t text_length;
@ -40,6 +42,7 @@ typedef struct {
uint32_t data_start;
uint32_t data_length;
const uint8_t *data;
const char *chip_name;
} esp32_stub_loader_t;
class ESP32BootROMClass {

View file

@ -1,7 +1,11 @@
// Generated by tools/esp_stub.py
#define ESP_STUB_COUNT (5)
// const esp32_stub_loader_t stub_esp32
// const esp32_stub_loader_t stub_esp32s2
// const esp32_stub_loader_t stub_esp32s3
// const esp32_stub_loader_t stub_esp8266
// const esp32_stub_loader_t stub_esp32c6
//------------- esp32 -------------//
const uint8_t _stub_esp32_data[4] = {
@ -301,6 +305,7 @@ const uint8_t _stub_esp32_text[3432] = {
};
const esp32_stub_loader_t stub_esp32 = {
.chip_detect = 0x00f01d83,
.entry = 0x400be5ac,
.text_start = 0x400be000,
.text_length = 3432,
@ -308,6 +313,7 @@ const esp32_stub_loader_t stub_esp32 = {
.data_start = 0x3ffdeba8,
.data_length = 4,
.data = _stub_esp32_data,
.chip_name = "ESP32",
};
//------------- esp32s2 -------------//
@ -667,6 +673,7 @@ const uint8_t _stub_esp32s2_text[4136] = {
};
const esp32_stub_loader_t stub_esp32s2 = {
.chip_detect = 0x000007c6,
.entry = 0x40028760,
.text_start = 0x40028000,
.text_length = 4136,
@ -674,6 +681,7 @@ const esp32_stub_loader_t stub_esp32s2 = {
.data_start = 0x3ffe2bf4,
.data_length = 4,
.data = _stub_esp32s2_data,
.chip_name = "ESP32S2",
};
//------------- esp32s3 -------------//
@ -1091,6 +1099,7 @@ const uint8_t _stub_esp32s3_text[4836] = {
};
const esp32_stub_loader_t stub_esp32s3 = {
.chip_detect = 0x00000009,
.entry = 0x40378988,
.text_start = 0x40378000,
.text_length = 4836,
@ -1098,6 +1107,7 @@ const esp32_stub_loader_t stub_esp32s3 = {
.data_start = 0x3fcb2bf4,
.data_length = 4,
.data = _stub_esp32s3_data,
.chip_name = "ESP32S3",
};
//------------- esp8266 -------------//
@ -1859,6 +1869,7 @@ const uint8_t _stub_esp8266_text[8240] = {
};
const esp32_stub_loader_t stub_esp8266 = {
.chip_detect = 0xfff0c101,
.entry = 0x4010d004,
.text_start = 0x4010d000,
.text_length = 8240,
@ -1866,4 +1877,358 @@ const esp32_stub_loader_t stub_esp8266 = {
.data_start = 0x3fffaca8,
.data_length = 768,
.data = _stub_esp8266_data,
.chip_name = "ESP8266",
};
//------------- esp32c6 -------------//
const uint8_t _stub_esp32c6_data[160] = {
0x14, 0x00, 0x84, 0x40, 0x72, 0x0a, 0x80, 0x40, 0xc2, 0x0a, 0x80, 0x40,
0x1a, 0x0b, 0x80, 0x40, 0xe8, 0x0b, 0x80, 0x40, 0x54, 0x0c, 0x80, 0x40,
0x02, 0x0c, 0x80, 0x40, 0x3e, 0x09, 0x80, 0x40, 0xa4, 0x0b, 0x80, 0x40,
0xe4, 0x0b, 0x80, 0x40, 0x2e, 0x0b, 0x80, 0x40, 0xee, 0x08, 0x80, 0x40,
0x62, 0x0b, 0x80, 0x40, 0xee, 0x08, 0x80, 0x40, 0x4c, 0x0a, 0x80, 0x40,
0x92, 0x0a, 0x80, 0x40, 0xc2, 0x0a, 0x80, 0x40, 0x1a, 0x0b, 0x80, 0x40,
0x5e, 0x0a, 0x80, 0x40, 0xa2, 0x09, 0x80, 0x40, 0xd2, 0x09, 0x80, 0x40,
0x5a, 0x0a, 0x80, 0x40, 0xac, 0x0e, 0x80, 0x40, 0xc2, 0x0a, 0x80, 0x40,
0x6c, 0x0d, 0x80, 0x40, 0x64, 0x0e, 0x80, 0x40, 0x2e, 0x08, 0x80, 0x40,
0x8c, 0x0e, 0x80, 0x40, 0x2e, 0x08, 0x80, 0x40, 0x2e, 0x08, 0x80, 0x40,
0x2e, 0x08, 0x80, 0x40, 0x2e, 0x08, 0x80, 0x40, 0x2e, 0x08, 0x80, 0x40,
0x2e, 0x08, 0x80, 0x40, 0x2e, 0x08, 0x80, 0x40, 0x2e, 0x08, 0x80, 0x40,
0x08, 0x0d, 0x80, 0x40, 0x2e, 0x08, 0x80, 0x40, 0x8a, 0x0d, 0x80, 0x40,
0x64, 0x0e, 0x80, 0x40,
};
const uint8_t _stub_esp32c6_text[3792] = {
0x41, 0x11, 0x22, 0xc4, 0x26, 0xc2, 0x06, 0xc6, 0xb7, 0xf7, 0x00, 0x60,
0x11, 0x47, 0x37, 0x04, 0x84, 0x40, 0xd8, 0xcb, 0xb7, 0xf4, 0x00, 0x60,
0x13, 0x04, 0x04, 0x00, 0xdc, 0x40, 0x91, 0x8b, 0x91, 0xe7, 0xb2, 0x40,
0x22, 0x44, 0x92, 0x44, 0x41, 0x01, 0x82, 0x80, 0x88, 0x40, 0x1c, 0x40,
0x13, 0x75, 0xf5, 0x0f, 0x82, 0x97, 0xdd, 0xb7, 0x01, 0x11, 0xb7, 0x07,
0x00, 0x60, 0x4e, 0xc6, 0x83, 0xa9, 0x87, 0x00, 0x4a, 0xc8, 0x37, 0x09,
0x84, 0x40, 0x26, 0xca, 0x52, 0xc4, 0x06, 0xce, 0x22, 0xcc, 0xb7, 0x04,
0x00, 0x60, 0x7d, 0x5a, 0x13, 0x09, 0x09, 0x00, 0xc0, 0x4c, 0x13, 0x74,
0xf4, 0x0f, 0x0d, 0xe0, 0xf2, 0x40, 0x62, 0x44, 0x23, 0xa8, 0x34, 0x01,
0x42, 0x49, 0xd2, 0x44, 0xb2, 0x49, 0x22, 0x4a, 0x05, 0x61, 0x82, 0x80,
0x88, 0x40, 0x83, 0x27, 0x09, 0x00, 0x13, 0x75, 0xf5, 0x0f, 0x82, 0x97,
0x7d, 0x14, 0xe3, 0x19, 0x44, 0xff, 0xc9, 0xbf, 0x13, 0x07, 0x00, 0x0c,
0x94, 0x41, 0xaa, 0x87, 0x63, 0x18, 0xe5, 0x00, 0x85, 0x47, 0x85, 0xc6,
0x23, 0xa0, 0x05, 0x00, 0x79, 0x55, 0x82, 0x80, 0x05, 0x47, 0x63, 0x87,
0xe6, 0x00, 0x09, 0x46, 0x63, 0x8d, 0xc6, 0x00, 0x7d, 0x55, 0x82, 0x80,
0x42, 0x05, 0x13, 0x07, 0xb0, 0x0d, 0x41, 0x85, 0x63, 0x95, 0xe7, 0x02,
0x89, 0x47, 0x9c, 0xc1, 0xf5, 0xb7, 0x93, 0x06, 0xc0, 0x0d, 0x63, 0x16,
0xd5, 0x00, 0x98, 0xc1, 0x13, 0x05, 0x00, 0x0c, 0x82, 0x80, 0x93, 0x06,
0xd0, 0x0d, 0x7d, 0x55, 0x63, 0x95, 0xd7, 0x00, 0x98, 0xc1, 0x13, 0x05,
0xb0, 0x0d, 0x82, 0x80, 0xb7, 0x35, 0x85, 0x40, 0x41, 0x11, 0x93, 0x85,
0x85, 0xba, 0x06, 0xc6, 0x61, 0x3f, 0x63, 0x45, 0x05, 0x06, 0xb7, 0x37,
0x85, 0x40, 0x93, 0x87, 0x07, 0xb2, 0x03, 0xa7, 0x07, 0x08, 0x03, 0xd6,
0x47, 0x08, 0x13, 0x75, 0xf5, 0x0f, 0x93, 0x06, 0x16, 0x00, 0xc2, 0x06,
0xc1, 0x82, 0x23, 0x92, 0xd7, 0x08, 0x32, 0x97, 0x23, 0x00, 0xa7, 0x00,
0x03, 0xd7, 0x47, 0x08, 0x91, 0x67, 0x93, 0x87, 0x07, 0x04, 0x63, 0x1e,
0xf7, 0x02, 0x37, 0xb7, 0x84, 0x40, 0x13, 0x07, 0x07, 0xb2, 0xa1, 0x67,
0xba, 0x97, 0x03, 0xa6, 0x07, 0x08, 0xb7, 0xf6, 0x84, 0x40, 0xb7, 0x37,
0x85, 0x40, 0x93, 0x87, 0x07, 0xb2, 0x93, 0x86, 0x06, 0xb6, 0x63, 0x1f,
0xe6, 0x00, 0x23, 0xa6, 0xc7, 0x08, 0x23, 0xa0, 0xd7, 0x08, 0x23, 0x92,
0x07, 0x08, 0x21, 0xa0, 0xf9, 0x57, 0xe3, 0x06, 0xf5, 0xfc, 0xb2, 0x40,
0x41, 0x01, 0x82, 0x80, 0x23, 0xa6, 0xd7, 0x08, 0x23, 0xa0, 0xe7, 0x08,
0xdd, 0xb7, 0x37, 0x37, 0x00, 0x60, 0x7c, 0x4b, 0x9d, 0x8b, 0xf5, 0xff,
0x37, 0x27, 0x00, 0x60, 0x7c, 0x4b, 0x9d, 0x8b, 0xf5, 0xff, 0x82, 0x80,
0x41, 0x11, 0x06, 0xc6, 0xdd, 0x37, 0xb7, 0x37, 0x00, 0x60, 0x23, 0xa6,
0x07, 0x02, 0x37, 0x07, 0x00, 0x08, 0x98, 0xc3, 0x98, 0x43, 0x7d, 0xff,
0xc8, 0x57, 0xb2, 0x40, 0x13, 0x45, 0xf5, 0xff, 0x05, 0x89, 0x41, 0x01,
0x82, 0x80, 0x41, 0x11, 0x06, 0xc6, 0xd9, 0x3f, 0x7d, 0xdd, 0x37, 0x07,
0x00, 0x40, 0xb7, 0x37, 0x00, 0x60, 0x98, 0xc3, 0x37, 0x37, 0x00, 0x60,
0x1c, 0x43, 0xfd, 0xff, 0xb2, 0x40, 0x41, 0x01, 0x82, 0x80, 0x41, 0x11,
0x22, 0xc4, 0x37, 0x84, 0x84, 0x40, 0x93, 0x07, 0x44, 0x01, 0x4a, 0xc0,
0x03, 0xa9, 0x07, 0x01, 0x06, 0xc6, 0x26, 0xc2, 0x63, 0x0a, 0x09, 0x04,
0x45, 0x37, 0x39, 0xc5, 0xbd, 0x47, 0x13, 0x04, 0x44, 0x01, 0x81, 0x44,
0x63, 0xd6, 0x27, 0x01, 0x04, 0x44, 0xbd, 0x88, 0x93, 0xb4, 0x14, 0x00,
0x7d, 0x37, 0x85, 0x3f, 0x1c, 0x44, 0x37, 0x06, 0x80, 0x00, 0x13, 0x97,
0xc7, 0x00, 0x99, 0xe0, 0x37, 0x06, 0x00, 0x01, 0xb7, 0xf6, 0xff, 0x00,
0x75, 0x8f, 0xb7, 0x36, 0x00, 0x60, 0xd8, 0xc2, 0x90, 0xc2, 0x98, 0x42,
0x7d, 0xff, 0x41, 0x47, 0x91, 0xe0, 0x05, 0x47, 0x33, 0x09, 0xe9, 0x40,
0xba, 0x97, 0x23, 0x28, 0x24, 0x01, 0x1c, 0xc4, 0xb2, 0x40, 0x22, 0x44,
0x92, 0x44, 0x02, 0x49, 0x41, 0x01, 0x82, 0x80, 0x01, 0x11, 0x06, 0xce,
0x22, 0xcc, 0x25, 0x37, 0x37, 0x04, 0xce, 0x3f, 0x6c, 0x00, 0x13, 0x05,
0x44, 0xff, 0x97, 0x00, 0x80, 0xff, 0xe7, 0x80, 0xa0, 0xf2, 0xaa, 0x87,
0x05, 0x45, 0x95, 0xe7, 0xb2, 0x47, 0x93, 0xf7, 0x07, 0x20, 0x3e, 0xc6,
0x89, 0x37, 0x37, 0x37, 0x00, 0x60, 0x1c, 0x47, 0xb7, 0x06, 0x40, 0x00,
0x13, 0x05, 0x44, 0xff, 0xd5, 0x8f, 0x1c, 0xc7, 0xb2, 0x45, 0x97, 0x00,
0x80, 0xff, 0xe7, 0x80, 0x20, 0xf0, 0x33, 0x35, 0xa0, 0x00, 0xf2, 0x40,
0x62, 0x44, 0x05, 0x61, 0x82, 0x80, 0x41, 0x11, 0xb7, 0x87, 0x84, 0x40,
0x06, 0xc6, 0x93, 0x87, 0x47, 0x01, 0x05, 0x47, 0x23, 0x80, 0xe7, 0x00,
0x13, 0xd7, 0xc5, 0x00, 0x98, 0xc7, 0x05, 0x67, 0x7d, 0x17, 0xcc, 0xc3,
0xc8, 0xc7, 0xf9, 0x8d, 0x3a, 0x95, 0xaa, 0x95, 0xb1, 0x81, 0x8c, 0xcb,
0x23, 0xaa, 0x07, 0x00, 0x41, 0x37, 0x19, 0xc1, 0x13, 0x05, 0x50, 0x0c,
0xb2, 0x40, 0x41, 0x01, 0x82, 0x80, 0x01, 0x11, 0x22, 0xcc, 0x37, 0x84,
0x84, 0x40, 0x93, 0x07, 0x44, 0x01, 0x26, 0xca, 0xc4, 0x47, 0x4e, 0xc6,
0x06, 0xce, 0x4a, 0xc8, 0xaa, 0x89, 0x13, 0x04, 0x44, 0x01, 0x63, 0xf3,
0x95, 0x00, 0xae, 0x84, 0xa9, 0xc0, 0x03, 0x29, 0x44, 0x00, 0x26, 0x99,
0x13, 0x59, 0xc9, 0x00, 0x1c, 0x48, 0x63, 0x55, 0xf0, 0x00, 0x1c, 0x44,
0x63, 0x5e, 0xf9, 0x02, 0xb5, 0x3d, 0x7d, 0xdd, 0x48, 0x40, 0x26, 0x86,
0xce, 0x85, 0x97, 0x00, 0x80, 0xff, 0xe7, 0x80, 0x20, 0xe3, 0x13, 0x75,
0xf5, 0x0f, 0x01, 0xc5, 0x93, 0x07, 0x40, 0x0c, 0x5c, 0xc8, 0x5c, 0x40,
0xa6, 0x97, 0x5c, 0xc0, 0x5c, 0x44, 0x85, 0x8f, 0x5c, 0xc4, 0xf2, 0x40,
0x62, 0x44, 0xd2, 0x44, 0x42, 0x49, 0xb2, 0x49, 0x05, 0x61, 0x82, 0x80,
0x69, 0x35, 0x6d, 0xbf, 0x41, 0x11, 0x06, 0xc6, 0x97, 0x00, 0x80, 0xff,
0xe7, 0x80, 0x40, 0xd6, 0x03, 0x45, 0x85, 0x01, 0xb2, 0x40, 0x75, 0x15,
0x13, 0x35, 0x15, 0x00, 0x41, 0x01, 0x82, 0x80, 0x41, 0x11, 0x06, 0xc6,
0xc5, 0x37, 0x0d, 0xc5, 0xb7, 0x07, 0x84, 0x40, 0x93, 0x87, 0x07, 0x00,
0xd4, 0x43, 0x99, 0xce, 0x37, 0x67, 0x09, 0x60, 0x13, 0x07, 0x07, 0x11,
0x1c, 0x43, 0x37, 0x06, 0xfd, 0xff, 0x7d, 0x16, 0xf1, 0x8f, 0x37, 0x06,
0x03, 0x00, 0xf1, 0x8e, 0xd5, 0x8f, 0x1c, 0xc3, 0xb2, 0x40, 0x41, 0x01,
0x82, 0x80, 0x41, 0x11, 0x06, 0xc6, 0x6d, 0x37, 0x11, 0xc1, 0x0d, 0x45,
0xb2, 0x40, 0x41, 0x01, 0x17, 0x03, 0x80, 0xff, 0x67, 0x00, 0x83, 0xcc,
0x41, 0x11, 0x06, 0xc6, 0x26, 0xc2, 0x22, 0xc4, 0xaa, 0x84, 0x97, 0x00,
0x80, 0xff, 0xe7, 0x80, 0xe0, 0xc9, 0x59, 0x37, 0x0d, 0xc9, 0x37, 0x07,
0x84, 0x40, 0x93, 0x06, 0x07, 0x00, 0x83, 0xd7, 0x86, 0x00, 0x13, 0x04,
0x07, 0x00, 0x85, 0x07, 0xc2, 0x07, 0xc1, 0x83, 0x23, 0x94, 0xf6, 0x00,
0x93, 0x06, 0x00, 0x0c, 0x63, 0x86, 0xd4, 0x00, 0x13, 0x07, 0xe0, 0x03,
0x63, 0x75, 0xf7, 0x00, 0x6d, 0x37, 0x23, 0x14, 0x04, 0x00, 0xb2, 0x40,
0x22, 0x44, 0x92, 0x44, 0x41, 0x01, 0x82, 0x80, 0x41, 0x11, 0x06, 0xc6,
0x13, 0x07, 0x00, 0x0c, 0x63, 0x1a, 0xe5, 0x00, 0x13, 0x05, 0xb0, 0x0d,
0x45, 0x37, 0x13, 0x05, 0xc0, 0x0d, 0xb2, 0x40, 0x41, 0x01, 0x59, 0xbf,
0x13, 0x07, 0xb0, 0x0d, 0xe3, 0x1b, 0xe5, 0xfe, 0x71, 0x37, 0x13, 0x05,
0xd0, 0x0d, 0xf5, 0xb7, 0x41, 0x11, 0x22, 0xc4, 0x26, 0xc2, 0x06, 0xc6,
0x2a, 0x84, 0xb3, 0x04, 0xb5, 0x00, 0x63, 0x17, 0x94, 0x00, 0xb2, 0x40,
0x22, 0x44, 0x92, 0x44, 0x41, 0x01, 0x82, 0x80, 0x03, 0x45, 0x04, 0x00,
0x05, 0x04, 0x4d, 0x3f, 0xed, 0xb7, 0x35, 0x71, 0x26, 0xcb, 0x4e, 0xc7,
0xfd, 0x72, 0x85, 0x69, 0xfd, 0x74, 0x22, 0xcd, 0x4a, 0xc9, 0x52, 0xc5,
0x56, 0xc3, 0x06, 0xcf, 0x93, 0x84, 0x84, 0xfa, 0x16, 0x91, 0x93, 0x87,
0x09, 0x07, 0xa6, 0x97, 0x18, 0x08, 0xb3, 0x84, 0xe7, 0x00, 0x2a, 0x89,
0x26, 0x85, 0x2e, 0x84, 0x97, 0x00, 0x80, 0xff, 0xe7, 0x80, 0x80, 0x2c,
0x93, 0x87, 0x09, 0x07, 0x18, 0x08, 0x05, 0x6a, 0xba, 0x97, 0xb3, 0x8a,
0x47, 0x41, 0x31, 0xe4, 0x05, 0x67, 0x7d, 0x75, 0x93, 0x05, 0x85, 0xfa,
0x93, 0x07, 0x07, 0x07, 0x13, 0x05, 0x85, 0xf9, 0x14, 0x08, 0xaa, 0x97,
0x33, 0x85, 0xd7, 0x00, 0x93, 0x07, 0x07, 0x07, 0xae, 0x97, 0xb3, 0x85,
0xd7, 0x00, 0x2a, 0xc6, 0x97, 0x00, 0x80, 0xff, 0xe7, 0x80, 0x40, 0x29,
0x32, 0x45, 0xc1, 0x45, 0x95, 0x37, 0x01, 0x45, 0x85, 0x62, 0x16, 0x91,
0xfa, 0x40, 0x6a, 0x44, 0xda, 0x44, 0x4a, 0x49, 0xba, 0x49, 0x2a, 0x4a,
0x9a, 0x4a, 0x0d, 0x61, 0x82, 0x80, 0xa2, 0x89, 0x63, 0x73, 0x8a, 0x00,
0x85, 0x69, 0x4e, 0x86, 0xd6, 0x85, 0x4a, 0x85, 0x97, 0x00, 0x80, 0xff,
0xe7, 0x80, 0xc0, 0xc5, 0x13, 0x75, 0xf5, 0x0f, 0x01, 0xed, 0x4e, 0x86,
0xd6, 0x85, 0x26, 0x85, 0x97, 0x00, 0x80, 0xff, 0xe7, 0x80, 0x80, 0x24,
0x4e, 0x99, 0x33, 0x04, 0x34, 0x41, 0x51, 0xb7, 0x13, 0x05, 0x30, 0x06,
0x55, 0xbf, 0x13, 0x05, 0x00, 0x0c, 0x49, 0xbd, 0x31, 0x71, 0xfd, 0x72,
0x05, 0x67, 0x4e, 0xd7, 0x52, 0xd5, 0x56, 0xd3, 0x5e, 0xcf, 0x06, 0xdf,
0x22, 0xdd, 0x26, 0xdb, 0x4a, 0xd9, 0x5a, 0xd1, 0x62, 0xcd, 0x66, 0xcb,
0x6a, 0xc9, 0x6e, 0xc7, 0xfd, 0x77, 0x16, 0x91, 0x13, 0x07, 0x07, 0x07,
0x3e, 0x97, 0x1c, 0x08, 0xba, 0x97, 0x3e, 0xc6, 0x23, 0xaa, 0x07, 0xf8,
0xaa, 0x89, 0x2e, 0x8a, 0xb2, 0x8a, 0xb6, 0x8b, 0xf5, 0x33, 0x93, 0x07,
0x00, 0x02, 0x19, 0xc1, 0xb7, 0x07, 0x02, 0x00, 0x3e, 0x85, 0x97, 0x00,
0x80, 0xff, 0xe7, 0x80, 0x20, 0x1d, 0x85, 0x67, 0x63, 0xe5, 0x57, 0x13,
0x05, 0x64, 0x7d, 0x79, 0x13, 0x09, 0x89, 0xfa, 0x93, 0x07, 0x04, 0x07,
0xca, 0x97, 0x18, 0x08, 0x33, 0x89, 0xe7, 0x00, 0x4a, 0x85, 0x97, 0x00,
0x80, 0xff, 0xe7, 0x80, 0xa0, 0x1b, 0x7d, 0x7b, 0x13, 0x0c, 0x3b, 0xf9,
0x93, 0x0c, 0x8b, 0xf9, 0x13, 0x07, 0x04, 0x07, 0x93, 0x07, 0x04, 0x07,
0x14, 0x08, 0x62, 0x97, 0xe6, 0x97, 0x81, 0x44, 0x33, 0x0c, 0xd7, 0x00,
0xb3, 0x8c, 0xd7, 0x00, 0x52, 0x4d, 0x63, 0x7c, 0x4d, 0x09, 0x63, 0xf1,
0xa4, 0x03, 0x41, 0xa8, 0x99, 0x3f, 0xa2, 0x85, 0x08, 0x01, 0x8d, 0x35,
0xb9, 0x37, 0x22, 0x86, 0x0c, 0x01, 0x4a, 0x85, 0x97, 0x00, 0x80, 0xff,
0xe7, 0x80, 0x80, 0x17, 0xa2, 0x99, 0xa2, 0x94, 0x63, 0xf5, 0x44, 0x03,
0xb3, 0x87, 0xa4, 0x41, 0x63, 0xf1, 0x77, 0x03, 0x33, 0x04, 0x9a, 0x40,
0x63, 0xf3, 0x8a, 0x00, 0x56, 0x84, 0x22, 0x86, 0x0c, 0x01, 0x4e, 0x85,
0x97, 0x00, 0x80, 0xff, 0xe7, 0x80, 0x00, 0xb5, 0x13, 0x75, 0xf5, 0x0f,
0x55, 0xdd, 0x02, 0xcc, 0x01, 0x44, 0x79, 0x5d, 0x8d, 0x4d, 0xa3, 0x09,
0x01, 0x00, 0x62, 0x85, 0x97, 0x00, 0x80, 0xff, 0xe7, 0x80, 0x40, 0xa4,
0x7d, 0xf9, 0x03, 0x45, 0x31, 0x01, 0xe6, 0x85, 0x85, 0x34, 0x63, 0x4f,
0x05, 0x00, 0xe3, 0xe2, 0x8d, 0xfe, 0x85, 0x67, 0x93, 0x87, 0x07, 0x07,
0xa2, 0x97, 0x18, 0x08, 0xba, 0x97, 0xda, 0x97, 0x23, 0x8a, 0xa7, 0xf8,
0x05, 0x04, 0xf1, 0xb7, 0xe3, 0x15, 0xa5, 0xfd, 0x91, 0x47, 0xe3, 0x05,
0xf4, 0xf6, 0x05, 0x67, 0x7d, 0x75, 0x93, 0x07, 0x07, 0x07, 0x93, 0x05,
0x85, 0xfa, 0x13, 0x05, 0x85, 0xf9, 0x14, 0x08, 0xaa, 0x97, 0x33, 0x85,
0xd7, 0x00, 0x93, 0x07, 0x07, 0x07, 0xae, 0x97, 0xb3, 0x85, 0xd7, 0x00,
0x2a, 0xc6, 0x97, 0x00, 0x80, 0xff, 0xe7, 0x80, 0xa0, 0x0d, 0x71, 0x3d,
0x32, 0x45, 0xc1, 0x45, 0x65, 0x33, 0x51, 0x3d, 0xc1, 0x31, 0xb7, 0x07,
0x02, 0x00, 0x19, 0xe1, 0x93, 0x07, 0x00, 0x02, 0x3e, 0x85, 0x97, 0x00,
0x80, 0xff, 0xe7, 0x80, 0xa0, 0x0a, 0x85, 0x62, 0x16, 0x91, 0xfa, 0x50,
0x6a, 0x54, 0xda, 0x54, 0x4a, 0x59, 0xba, 0x59, 0x2a, 0x5a, 0x9a, 0x5a,
0x0a, 0x5b, 0xfa, 0x4b, 0x6a, 0x4c, 0xda, 0x4c, 0x4a, 0x4d, 0xba, 0x4d,
0x29, 0x61, 0x82, 0x80, 0xb7, 0x57, 0x41, 0x49, 0x19, 0x71, 0x93, 0x87,
0xf7, 0x84, 0x01, 0x45, 0x86, 0xde, 0xa2, 0xdc, 0xa6, 0xda, 0xca, 0xd8,
0xce, 0xd6, 0xd2, 0xd4, 0xd6, 0xd2, 0xda, 0xd0, 0xde, 0xce, 0xe2, 0xcc,
0xe6, 0xca, 0xea, 0xc8, 0xee, 0xc6, 0x3e, 0xce, 0x97, 0x00, 0x80, 0xff,
0xe7, 0x80, 0x80, 0x9d, 0xa1, 0x39, 0x0d, 0xc1, 0x37, 0x67, 0x09, 0x60,
0x13, 0x07, 0x07, 0x11, 0x1c, 0x43, 0xb7, 0x06, 0x84, 0x40, 0x23, 0xa2,
0xf6, 0x00, 0xb7, 0x06, 0xfd, 0xff, 0xfd, 0x16, 0xf5, 0x8f, 0xc1, 0x66,
0xd5, 0x8f, 0x1c, 0xc3, 0x15, 0x39, 0x05, 0xcd, 0xb7, 0x27, 0x0b, 0x60,
0x37, 0x47, 0xd8, 0x50, 0x93, 0x86, 0x87, 0xc1, 0x13, 0x07, 0x17, 0xaa,
0x98, 0xc2, 0x13, 0x86, 0x07, 0xc0, 0x23, 0x20, 0x06, 0x00, 0x23, 0xa0,
0x06, 0x00, 0x93, 0x86, 0x07, 0xc2, 0x98, 0xc2, 0x93, 0x87, 0xc7, 0xc1,
0x98, 0x43, 0x37, 0x06, 0x04, 0x00, 0x51, 0x8f, 0x98, 0xc3, 0x23, 0xa0,
0x06, 0x00, 0xb7, 0x07, 0x84, 0x40, 0x37, 0x37, 0x85, 0x40, 0x93, 0x87,
0x07, 0x00, 0x13, 0x07, 0x07, 0xbb, 0x21, 0xa0, 0x23, 0xa0, 0x07, 0x00,
0x91, 0x07, 0xe3, 0xed, 0xe7, 0xfe, 0x45, 0x3b, 0x91, 0x45, 0x68, 0x08,
0x75, 0x39, 0x65, 0x33, 0xb7, 0xb7, 0x84, 0x40, 0x93, 0x87, 0x07, 0xb2,
0x21, 0x67, 0x3e, 0x97, 0x23, 0x20, 0xf7, 0x08, 0xb7, 0x07, 0x80, 0x40,
0x37, 0x09, 0x84, 0x40, 0x93, 0x87, 0x87, 0x0e, 0x23, 0x20, 0xf9, 0x00,
0xb7, 0x39, 0x85, 0x40, 0x45, 0x3e, 0x13, 0x09, 0x09, 0x00, 0x93, 0x89,
0x09, 0xb2, 0x63, 0x05, 0x05, 0x10, 0xb7, 0x07, 0x01, 0x60, 0x45, 0x47,
0x23, 0xa0, 0xe7, 0x0c, 0x85, 0x45, 0x45, 0x45, 0x97, 0x00, 0x80, 0xff,
0xe7, 0x80, 0x00, 0xf6, 0xb7, 0x05, 0x80, 0x40, 0x01, 0x46, 0x93, 0x85,
0x05, 0x00, 0x45, 0x45, 0x97, 0x00, 0x80, 0xff, 0xe7, 0x80, 0x00, 0xf7,
0xb7, 0xf7, 0x00, 0x60, 0x11, 0x47, 0x98, 0xcb, 0x37, 0x05, 0x02, 0x00,
0x97, 0x00, 0x80, 0xff, 0xe7, 0x80, 0x40, 0xf6, 0xb7, 0x17, 0x09, 0x60,
0x88, 0x5f, 0x81, 0x45, 0xb7, 0x84, 0x84, 0x40, 0x71, 0x89, 0x61, 0x15,
0x13, 0x35, 0x15, 0x00, 0x97, 0x00, 0x80, 0xff, 0xe7, 0x80, 0x00, 0x9e,
0xc1, 0x67, 0xfd, 0x17, 0x13, 0x07, 0x00, 0x10, 0x85, 0x66, 0x41, 0x66,
0xb7, 0x05, 0x00, 0x01, 0x01, 0x45, 0x93, 0x84, 0x44, 0x01, 0xb7, 0x0a,
0x84, 0x40, 0x0d, 0x6a, 0x97, 0x00, 0x80, 0xff, 0xe7, 0x80, 0x00, 0x94,
0x13, 0x8b, 0x4a, 0x01, 0x26, 0x9a, 0x83, 0xa7, 0xc9, 0x08, 0xf5, 0xdf,
0x83, 0xab, 0xc9, 0x08, 0x85, 0x47, 0x23, 0xa6, 0x09, 0x08, 0x23, 0x02,
0xf1, 0x02, 0x83, 0xc7, 0x1b, 0x00, 0x09, 0x47, 0x23, 0x13, 0xe1, 0x02,
0xa3, 0x02, 0xf1, 0x02, 0x02, 0xd4, 0x4d, 0x47, 0x63, 0x81, 0xe7, 0x08,
0x51, 0x47, 0x63, 0x8f, 0xe7, 0x06, 0x29, 0x47, 0x63, 0x9f, 0xe7, 0x00,
0x83, 0xc7, 0x3b, 0x00, 0x03, 0xc7, 0x2b, 0x00, 0xa2, 0x07, 0xd9, 0x8f,
0x11, 0x47, 0x63, 0x96, 0xe7, 0x00, 0x83, 0xa7, 0x8b, 0x00, 0x9c, 0x43,
0x3e, 0xd4, 0x45, 0x31, 0xa1, 0x45, 0x48, 0x10, 0x75, 0x36, 0x83, 0xc7,
0x3b, 0x00, 0x03, 0xc7, 0x2b, 0x00, 0xa2, 0x07, 0xd9, 0x8f, 0x11, 0x67,
0x41, 0x07, 0x63, 0x74, 0xf7, 0x04, 0x13, 0x05, 0xb0, 0x0d, 0x19, 0x3e,
0x13, 0x05, 0xc0, 0x0d, 0x01, 0x3e, 0x13, 0x05, 0xe0, 0x0e, 0x29, 0x36,
0x8d, 0x39, 0x41, 0xb7, 0xb7, 0x05, 0x80, 0x40, 0x01, 0x46, 0x93, 0x85,
0x85, 0x03, 0x15, 0x45, 0x97, 0x00, 0x80, 0xff, 0xe7, 0x80, 0x00, 0xe8,
0x37, 0x07, 0x00, 0x60, 0x5c, 0x47, 0x13, 0x05, 0x00, 0x02, 0x93, 0xe7,
0x17, 0x10, 0x5c, 0xc7, 0x31, 0xb7, 0xc9, 0x47, 0x23, 0x13, 0xf1, 0x02,
0x4d, 0xb7, 0x03, 0xc7, 0x1b, 0x00, 0xd1, 0x46, 0x63, 0xe7, 0xe6, 0x02,
0x85, 0x46, 0x63, 0xe6, 0xe6, 0x00, 0x01, 0x4c, 0x13, 0x04, 0xf0, 0x0f,
0x85, 0xa8, 0x79, 0x17, 0x13, 0x77, 0xf7, 0x0f, 0xc9, 0x46, 0xe3, 0xe8,
0xe6, 0xfe, 0xb7, 0x36, 0x85, 0x40, 0x0a, 0x07, 0x93, 0x86, 0x46, 0xbb,
0x36, 0x97, 0x18, 0x43, 0x02, 0x87, 0x93, 0x06, 0x07, 0x03, 0x93, 0xf6,
0xf6, 0x0f, 0x11, 0x46, 0xe3, 0x69, 0xd6, 0xfc, 0x13, 0x07, 0xf7, 0x02,
0x13, 0x77, 0xf7, 0x0f, 0x8d, 0x46, 0x63, 0xeb, 0xe6, 0x08, 0xb7, 0x36,
0x85, 0x40, 0x0a, 0x07, 0x93, 0x86, 0x06, 0xc0, 0x36, 0x97, 0x18, 0x43,
0x02, 0x87, 0x13, 0x07, 0x40, 0x02, 0x63, 0x98, 0xe7, 0x10, 0x02, 0xd4,
0x1d, 0x44, 0x01, 0x45, 0xa5, 0x34, 0x01, 0x45, 0x55, 0x3c, 0xf1, 0x36,
0xe9, 0x36, 0xa1, 0x45, 0x48, 0x10, 0x7d, 0x14, 0xd1, 0x3c, 0x75, 0xf4,
0x01, 0x4c, 0x01, 0x44, 0x13, 0x75, 0xf4, 0x0f, 0x71, 0x3c, 0x13, 0x75,
0xfc, 0x0f, 0x59, 0x3c, 0x7d, 0x36, 0xe3, 0x1e, 0x04, 0xea, 0x83, 0xc7,
0x1b, 0x00, 0x49, 0x47, 0x63, 0x68, 0xf7, 0x30, 0x09, 0x47, 0xe3, 0x76,
0xf7, 0xea, 0xf5, 0x17, 0x93, 0xf7, 0xf7, 0x0f, 0x3d, 0x47, 0xe3, 0x60,
0xf7, 0xea, 0x37, 0x37, 0x85, 0x40, 0x8a, 0x07, 0x13, 0x07, 0x07, 0xc1,
0xba, 0x97, 0x9c, 0x43, 0x82, 0x87, 0x05, 0x44, 0x9d, 0xeb, 0x70, 0x10,
0x81, 0x45, 0x01, 0x45, 0x97, 0xf0, 0x7f, 0xff, 0xe7, 0x80, 0x00, 0x71,
0x1d, 0xe1, 0xd1, 0x45, 0x68, 0x10, 0x9d, 0x3c, 0x01, 0x44, 0x31, 0xa8,
0x05, 0x44, 0x81, 0xef, 0x97, 0xf0, 0x7f, 0xff, 0xe7, 0x80, 0x00, 0x76,
0x33, 0x34, 0xa0, 0x00, 0x29, 0xa0, 0x21, 0x47, 0x63, 0x85, 0xe7, 0x00,
0x05, 0x44, 0x01, 0x4c, 0x61, 0xb7, 0x03, 0xac, 0x8b, 0x00, 0x03, 0xa4,
0xcb, 0x00, 0xb3, 0x67, 0x8c, 0x00, 0xd2, 0x07, 0xf5, 0xf7, 0xef, 0xf0,
0xbf, 0x85, 0x7d, 0xf1, 0xc1, 0x6c, 0x22, 0x9c, 0xfd, 0x1c, 0x7d, 0x7d,
0x33, 0x05, 0x8c, 0x40, 0x55, 0xdc, 0xb3, 0x77, 0x95, 0x01, 0x95, 0xe3,
0xc1, 0x6c, 0x33, 0x05, 0x8c, 0x40, 0x63, 0xe6, 0x8c, 0x02, 0xfd, 0x7c,
0x33, 0x05, 0x8c, 0x40, 0x55, 0xd0, 0x31, 0x81, 0x97, 0xf0, 0x7f, 0xff,
0xe7, 0x80, 0x80, 0x72, 0x55, 0xf9, 0x66, 0x94, 0xf5, 0xb7, 0x31, 0x81,
0x97, 0xf0, 0x7f, 0xff, 0xe7, 0x80, 0x80, 0x71, 0x55, 0xf1, 0x6a, 0x94,
0xd1, 0xb7, 0x41, 0x81, 0x97, 0xf0, 0x7f, 0xff, 0xe7, 0x80, 0xc0, 0x70,
0x51, 0xf9, 0x33, 0x04, 0x94, 0x41, 0xc1, 0xb7, 0x21, 0x47, 0xe3, 0x89,
0xe7, 0xf0, 0x01, 0x4c, 0x13, 0x04, 0x00, 0x0c, 0x31, 0xb7, 0x41, 0x47,
0xcd, 0xbf, 0x41, 0x47, 0x05, 0x44, 0xe3, 0x9c, 0xe7, 0xf6, 0x83, 0xa5,
0xcb, 0x00, 0x03, 0xa5, 0x8b, 0x00, 0xe5, 0x32, 0xb1, 0xbf, 0x41, 0x47,
0x05, 0x44, 0xe3, 0x92, 0xe7, 0xf6, 0x03, 0xa7, 0x0b, 0x01, 0x91, 0x67,
0x63, 0xea, 0xe7, 0x1e, 0x83, 0xa5, 0x4b, 0x01, 0x03, 0xa5, 0x8b, 0x00,
0xef, 0xf0, 0xff, 0x80, 0x35, 0xbf, 0x41, 0x47, 0x05, 0x44, 0xe3, 0x92,
0xe7, 0xf4, 0x83, 0xa7, 0x0b, 0x01, 0x11, 0x67, 0x63, 0x6a, 0xf7, 0x1c,
0x03, 0xa7, 0xcb, 0x00, 0x83, 0xa5, 0x4b, 0x01, 0x03, 0xa5, 0x8b, 0x00,
0x33, 0x84, 0xe7, 0x02, 0xef, 0xf0, 0x6f, 0xfe, 0x23, 0xac, 0x04, 0x00,
0x23, 0x24, 0x8a, 0xb0, 0x31, 0xb7, 0x03, 0xc7, 0x04, 0x00, 0x63, 0x03,
0x07, 0x14, 0x03, 0xa7, 0x8b, 0x00, 0xc1, 0x17, 0x13, 0x04, 0x00, 0x0c,
0x63, 0x13, 0xf7, 0x00, 0xc0, 0x48, 0x01, 0x47, 0x93, 0x06, 0xf0, 0x0e,
0x63, 0x46, 0xf7, 0x02, 0x83, 0xc7, 0x5b, 0x00, 0x03, 0xc7, 0x4b, 0x00,
0x01, 0x4c, 0xa2, 0x07, 0xd9, 0x8f, 0x03, 0xc7, 0x6b, 0x00, 0x42, 0x07,
0x5d, 0x8f, 0x83, 0xc7, 0x7b, 0x00, 0xe2, 0x07, 0xd9, 0x8f, 0xe3, 0x81,
0xf6, 0xe6, 0x13, 0x04, 0x10, 0x0c, 0xa9, 0xbd, 0x33, 0x86, 0xeb, 0x00,
0x03, 0x46, 0x86, 0x01, 0x05, 0x07, 0xb1, 0x8e, 0xe1, 0xb7, 0x83, 0xc7,
0x04, 0x00, 0xfd, 0xc7, 0xdc, 0x44, 0x63, 0x9d, 0x07, 0x14, 0xc0, 0x48,
0x23, 0x80, 0x04, 0x00, 0x7d, 0xb5, 0x61, 0x47, 0x63, 0x96, 0xe7, 0x02,
0x83, 0xa7, 0xcb, 0x01, 0x03, 0xa7, 0x8b, 0x01, 0x83, 0xa6, 0x4b, 0x01,
0x03, 0xa6, 0x0b, 0x01, 0x83, 0xa5, 0xcb, 0x00, 0x03, 0xa5, 0x8b, 0x00,
0x97, 0xf0, 0x7f, 0xff, 0xe7, 0x80, 0x40, 0x61, 0x2a, 0x8c, 0x33, 0x34,
0xa0, 0x00, 0x29, 0xb5, 0x01, 0x4c, 0x05, 0x44, 0x11, 0xb5, 0x11, 0x47,
0x05, 0x44, 0xe3, 0x9a, 0xe7, 0xe6, 0xb7, 0x97, 0x00, 0x60, 0xb4, 0x5f,
0x65, 0x77, 0x7d, 0x17, 0x05, 0x66, 0xf9, 0x8e, 0xd1, 0x8e, 0x03, 0xa5,
0x8b, 0x00, 0xb4, 0xdf, 0xb4, 0x57, 0x81, 0x45, 0xf9, 0x8e, 0xd1, 0x8e,
0xb4, 0xd7, 0xf4, 0x5f, 0xf9, 0x8e, 0xd1, 0x8e, 0xf4, 0xdf, 0xf4, 0x53,
0x75, 0x8f, 0x51, 0x8f, 0xf8, 0xd3, 0x97, 0xf0, 0x7f, 0xff, 0xe7, 0x80,
0x20, 0x64, 0x29, 0xbd, 0x13, 0xf7, 0xf7, 0x00, 0xe3, 0x15, 0x07, 0xea,
0x93, 0xdc, 0x47, 0x00, 0x13, 0x84, 0x8b, 0x00, 0x01, 0x4c, 0x7d, 0x5d,
0xe3, 0x74, 0x9c, 0xdb, 0x48, 0x44, 0x97, 0xf0, 0x7f, 0xff, 0xe7, 0x80,
0x20, 0x48, 0x18, 0x44, 0x54, 0x40, 0x10, 0x40, 0xf9, 0x8e, 0x63, 0x07,
0xa7, 0x01, 0x1c, 0x42, 0x13, 0x47, 0xf7, 0xff, 0x7d, 0x8f, 0xd9, 0x8e,
0x14, 0xc2, 0x05, 0x0c, 0x41, 0x04, 0xd9, 0xbf, 0x11, 0x47, 0xa5, 0xb5,
0x41, 0x47, 0x05, 0x44, 0xe3, 0x97, 0xe7, 0xde, 0x83, 0xa7, 0x8b, 0x00,
0x03, 0xa7, 0x4b, 0x01, 0x23, 0x28, 0xf9, 0x00, 0x23, 0x26, 0xe9, 0x00,
0x75, 0xbb, 0x83, 0x25, 0xc9, 0x00, 0xc1, 0x17, 0x91, 0xe5, 0x89, 0xcf,
0x01, 0x4c, 0x13, 0x04, 0x60, 0x0c, 0x89, 0xbb, 0x03, 0x27, 0x09, 0x01,
0x63, 0x66, 0xf7, 0x06, 0x13, 0xf7, 0x37, 0x00, 0xe3, 0x19, 0x07, 0xe2,
0x03, 0x28, 0x09, 0x01, 0x01, 0x46, 0x01, 0x47, 0x33, 0x05, 0xe8, 0x40,
0xb3, 0x86, 0xe5, 0x00, 0x63, 0x69, 0xf7, 0x00, 0xe3, 0x04, 0x06, 0xd2,
0x23, 0x28, 0xa9, 0x00, 0x23, 0x26, 0xd9, 0x00, 0x31, 0xbb, 0x33, 0x86,
0xeb, 0x00, 0x10, 0x4e, 0x11, 0x07, 0x90, 0xc2, 0x05, 0x46, 0xe9, 0xbf,
0x21, 0x47, 0x05, 0x44, 0xe3, 0x91, 0xe7, 0xd8, 0x03, 0x24, 0x09, 0x01,
0x19, 0xc0, 0x13, 0x04, 0x80, 0x0c, 0x23, 0x28, 0x09, 0x00, 0x23, 0x26,
0x09, 0x00, 0x33, 0x34, 0x80, 0x00, 0xa5, 0xb3, 0x01, 0x4c, 0x13, 0x04,
0x20, 0x0c, 0xed, 0xb1, 0x01, 0x4c, 0x13, 0x04, 0x80, 0x0c, 0xcd, 0xb1,
0x01, 0x4c, 0x13, 0x04, 0x90, 0x0c, 0xe9, 0xb9, 0x13, 0x07, 0x20, 0x0d,
0x63, 0x83, 0xe7, 0x0c, 0x13, 0x07, 0x40, 0x0d, 0xe3, 0x9b, 0xe7, 0xb8,
0x03, 0xc4, 0x3b, 0x00, 0x83, 0xc7, 0x2b, 0x00, 0x22, 0x04, 0x5d, 0x8c,
0x97, 0xf0, 0x7f, 0xff, 0xe7, 0x80, 0x40, 0x47, 0x03, 0xac, 0xc4, 0x00,
0x41, 0x14, 0x63, 0x73, 0x84, 0x01, 0x22, 0x8c, 0xe3, 0x09, 0x0c, 0xb6,
0xc0, 0x40, 0x62, 0x94, 0x31, 0x80, 0x9c, 0x48, 0x63, 0x55, 0xf0, 0x00,
0x9c, 0x44, 0x63, 0x5b, 0xf4, 0x0a, 0xef, 0xf0, 0xaf, 0xcb, 0x75, 0xdd,
0xc8, 0x40, 0x62, 0x86, 0x93, 0x85, 0x8b, 0x01, 0x97, 0xf0, 0x7f, 0xff,
0xe7, 0x80, 0x40, 0x43, 0x01, 0xc5, 0x93, 0x07, 0x40, 0x0c, 0xdc, 0xc8,
0xdc, 0x40, 0xe2, 0x97, 0xdc, 0xc0, 0xdc, 0x44, 0xb3, 0x87, 0x87, 0x41,
0xdc, 0xc4, 0x97, 0xf0, 0x7f, 0xff, 0xe7, 0x80, 0x20, 0x42, 0x25, 0xb6,
0x09, 0x65, 0x13, 0x05, 0x05, 0x71, 0x03, 0xac, 0xcb, 0x00, 0x03, 0xa4,
0x8b, 0x00, 0x97, 0xf0, 0x7f, 0xff, 0xe7, 0x80, 0xa0, 0x32, 0xb7, 0x07,
0x00, 0x60, 0xd8, 0x4b, 0xb7, 0x06, 0x00, 0x01, 0xc1, 0x16, 0x93, 0x57,
0x47, 0x01, 0x12, 0x07, 0x75, 0x8f, 0xbd, 0x8b, 0xd9, 0x8f, 0xb3, 0x87,
0x87, 0x03, 0x01, 0x45, 0xb3, 0xd5, 0x87, 0x02, 0x97, 0xf0, 0x7f, 0xff,
0xe7, 0x80, 0xc0, 0x33, 0x13, 0x05, 0x80, 0x3e, 0x97, 0xf0, 0x7f, 0xff,
0xe7, 0x80, 0x40, 0x2f, 0xe9, 0xbc, 0x83, 0xa6, 0x4b, 0x01, 0x03, 0xa6,
0x0b, 0x01, 0x83, 0xa5, 0xcb, 0x00, 0x03, 0xa5, 0x8b, 0x00, 0xef, 0xf0,
0xef, 0xfb, 0xd1, 0xb4, 0x83, 0xc5, 0x3b, 0x00, 0x83, 0xc7, 0x2b, 0x00,
0x13, 0x85, 0x8b, 0x01, 0xa2, 0x05, 0xdd, 0x8d, 0xc1, 0x15, 0xef, 0xf0,
0x8f, 0xd5, 0x75, 0xb4, 0xef, 0xf0, 0xef, 0xc4, 0x3d, 0xbf, 0x03, 0xc4,
0x3b, 0x00, 0x83, 0xc7, 0x2b, 0x00, 0x13, 0x8c, 0x8b, 0x01, 0x22, 0x04,
0x5d, 0x8c, 0xdc, 0x44, 0x41, 0x14, 0xcd, 0xe3, 0x91, 0x47, 0x85, 0x4b,
0x63, 0xff, 0x87, 0x08, 0x93, 0x07, 0x90, 0x0c, 0xdc, 0xc8, 0x41, 0xb4,
0x03, 0xa7, 0x0d, 0x00, 0x22, 0xd0, 0x05, 0x48, 0xb3, 0x87, 0xec, 0x40,
0x3e, 0xd6, 0x83, 0x27, 0x8a, 0xb0, 0x63, 0x73, 0xf4, 0x00, 0x0d, 0x48,
0x42, 0xc6, 0x3a, 0xc4, 0xef, 0xf0, 0x6f, 0xc0, 0x22, 0x47, 0x32, 0x48,
0x37, 0x85, 0x84, 0x40, 0xe2, 0x85, 0x7c, 0x10, 0x93, 0x86, 0x4a, 0x01,
0x10, 0x10, 0x13, 0x05, 0xc5, 0x02, 0x97, 0xf0, 0x7f, 0xff, 0xe7, 0x80,
0x20, 0x31, 0x37, 0xb7, 0x84, 0x40, 0x93, 0x08, 0x47, 0x01, 0x82, 0x57,
0x03, 0xa7, 0x88, 0xb0, 0x83, 0xa5, 0x0d, 0x00, 0x1d, 0x8c, 0x1d, 0x8f,
0x3e, 0x9c, 0xb2, 0x57, 0x23, 0xa4, 0xe8, 0xb0, 0xaa, 0x8b, 0xbe, 0x95,
0x23, 0xa0, 0xbd, 0x00, 0x93, 0x87, 0x4a, 0x01, 0x9d, 0x8d, 0x01, 0xc5,
0xa1, 0x67, 0x63, 0x97, 0xf5, 0x00, 0x5a, 0x85, 0xef, 0xf0, 0x2f, 0xcb,
0x23, 0xa0, 0x6d, 0x01, 0x09, 0xc4, 0xdc, 0x44, 0x99, 0xc3, 0xe3, 0x4f,
0x70, 0xf7, 0x63, 0xdf, 0x0b, 0x00, 0x93, 0x07, 0x70, 0x0c, 0xbd, 0xb7,
0x85, 0x4b, 0xb7, 0x3d, 0x85, 0x40, 0xb7, 0x8c, 0x84, 0x40, 0x93, 0x8d,
0x0d, 0xbb, 0x93, 0x8c, 0x4c, 0x01, 0xe9, 0xbf, 0xe3, 0x9d, 0x0b, 0x9c,
0xdc, 0x44, 0xe3, 0x8a, 0x07, 0x9c, 0x93, 0x07, 0x80, 0x0c, 0xa9, 0xb7,
0x83, 0xa7, 0x8b, 0x00, 0xe3, 0x93, 0x07, 0x9c, 0xef, 0xf0, 0x2f, 0xd3,
0x09, 0x65, 0x13, 0x05, 0x05, 0x71, 0x97, 0xf0, 0x7f, 0xff, 0xe7, 0x80,
0xa0, 0x1c, 0xef, 0xf0, 0xaf, 0xce, 0x97, 0xf0, 0x7f, 0xff, 0xe7, 0x80,
0xe0, 0x20, 0x55, 0xb2, 0x03, 0xa4, 0xcb, 0x00, 0xe3, 0x0f, 0x04, 0x98,
0xef, 0xf0, 0xaf, 0xd0, 0x13, 0x05, 0x80, 0x3e, 0x97, 0xf0, 0x7f, 0xff,
0xe7, 0x80, 0x40, 0x1a, 0xef, 0xf0, 0x4f, 0xcc, 0x02, 0x94, 0x51, 0xb2,
0xef, 0xf0, 0xcf, 0xcb, 0xf6, 0x50, 0x66, 0x54, 0xd6, 0x54, 0x46, 0x59,
0xb6, 0x59, 0x26, 0x5a, 0x96, 0x5a, 0x06, 0x5b, 0xf6, 0x4b, 0x66, 0x4c,
0xd6, 0x4c, 0x46, 0x4d, 0xb6, 0x4d, 0x09, 0x61, 0x82, 0x80, 0x00, 0x00,
};
const esp32_stub_loader_t stub_esp32c6 = {
.chip_detect = 0x2ce0806f,
.entry = 0x408006c4,
.text_start = 0x40800000,
.text_length = 3792,
.text = _stub_esp32c6_text,
.data_start = 0x40852bb0,
.data_length = 160,
.data = _stub_esp32c6_data,
.chip_name = "ESP32C6",
};
const esp32_stub_loader_t *stub_esp_arr[] = {
&stub_esp32, &stub_esp32s2, &stub_esp32s3, &stub_esp8266, &stub_esp32c6,
};

File diff suppressed because one or more lines are too long

45
tools/file2carray.py Normal file
View file

@ -0,0 +1,45 @@
#!/usr/bin/env python3
import argparse
import random
import os
import sys
import time
import subprocess
from pathlib import Path
from multiprocessing import Pool
from weakref import finalize
def print_carray(f, payload):
while len(payload) > 0:
f.write('\n ')
f.write(', '.join('0x{:02x}'.format(x) for x in payload[0:16]))
f.write(',')
payload = payload[16:]
f.write('\n')
def main():
parser = argparse.ArgumentParser(description='Convert binary files to C array format')
parser.add_argument('files', nargs='+', help='Binary files to convert')
args = parser.parse_args()
files = args.files
for fin_name in files:
if not os.path.isfile(fin_name):
print(f"File {fin_name} does not exist")
continue
with open(fin_name, 'rb') as fin:
contents = fin.read()
fout_name = fin_name + '.h'
with open(fout_name, 'w') as fout:
print(f"Converting {fin_name} to {fout_name}")
fout.write(f'const size_t bindata_len = {len(contents)};\n')
fout.write(f'const uint8_t bindata[] __attribute__((aligned(16))) = {{')
print_carray(fout, contents)
fout.write('};\n')
if __name__ == '__main__':
sys.exit(main())