diff --git a/README.md b/README.md new file mode 100644 index 0000000..88bb8ae --- /dev/null +++ b/README.md @@ -0,0 +1,16 @@ +# Yunsi Toolbox + +A collection of web-based tools for hardware development and debugging. + +## Components + +### [ESP Flasher](./esp-flasher/) +A browser-based firmware flasher for ESP32 microcontrollers using Web Serial. + +## Installation + +This is intended to be used as a git submodule in Vue 3 projects (specifically optimized for VitePress). + +```bash +git submodule add src/components/yunsi-toolbox +``` diff --git a/esp-flasher/README.md b/esp-flasher/README.md new file mode 100644 index 0000000..2b3cffa --- /dev/null +++ b/esp-flasher/README.md @@ -0,0 +1,65 @@ +# ESP Flasher Component + +A Vue 3 component for flashing ESP32 series microcontrollers directly from the browser using the Web Serial API. This component is based on `esptools-js`. + +## Features + +- Supports ESP32, ESP32-C3, ESP32-S3, and more. +- Built-in Xterm.js terminal for progress and logging. +- Support for multiple firmware image options. +- Dark mode support (compatible with VitePress). + +## Usage + +### Props + +| Prop | Type | Description | +| :--- | :--- | :--- | +| `imageOptions` | `ImageOption[]` | An array of firmware images available for flashing. | + +#### ImageOption Object + +```typescript +type ImageOption = { + value: string; // Display name of the firmware + link: string; // Path/URL to the .bin file + target: string; // Target chip (e.g., 'ESP32-C3', 'ESP32', 'ESP32-S3') +}; +``` + +### Example + +```vue + + + +``` + +## Dependencies + +- `vue` +- `xterm` +- `xterm-addon-fit` +- `crypto-js` +- `vitepress` (for `useData` dark mode toggle) + +## Credits + +This tool uses a modified version of [esptools-js](https://github.com/espressif/esptools-js). diff --git a/esp-flasher/assets/screenshot.png b/esp-flasher/assets/screenshot.png new file mode 100644 index 0000000..4948295 Binary files /dev/null and b/esp-flasher/assets/screenshot.png differ