https://github.com/shadow578/marlin-flash-dump
https://github.com/shadow578/marlin-flash-dump
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/shadow578/marlin-flash-dump
- Owner: shadow578
- License: mit
- Created: 2023-08-01T11:36:56.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-05T15:29:48.000Z (almost 3 years ago)
- Last Synced: 2023-08-05T16:37:53.072Z (almost 3 years ago)
- Language: TypeScript
- Size: 97.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# marlin-flash-dump
small (and kinda bad) utility to dump parts of flash memory from a marlin printer, specifically ones based on the HC32F460 SoC.
Hijacks the `M300` gcode to do the dumping, and comes with nearly no error handling, so good look i guess ;).
## Usage
1. copy the provided [M300.cpp](https://github.com/shadow578/marlin-flash-dump/blob/main/M300.cpp) file to your Marlin source folder, compile Marlin and flash it onto your printer.
- to test everything works, dump a small section of memory using `M300 S0 E15` (dumps the first 16 bytes of flash)
2. connect the printer to your computer using serial (most printers have a usb port that provides serial access)
3. make sure that [node.js](https://nodejs.org) and npm are installed on your system
4. clone (or download) this repository and run `npm install`
5. run `npm start` to start the utility
6. the utility will now allow you to select the serial port the printer is connected to and the baud rate.
- unless you changed the marlin config, the baud rate should be 115200
7. now, the utility will ask you for a few things:
- label: the name used for the file created after reading
- start address: address at which reading the flash starts, in hexadecimal
- end address: address at which reading the flash ends, in hexadecimal
8. after providing the end address, dumping will begin. This may take a few minutes.
9. after dumping is done, you'll see a "done" message and two files are created in `./data/`:
- `./data/.txt`: raw response received from the printer
- `./data/.bin`: binary containing the contents of flash in the dumped range
10. repeat steps 5-9 at least one more time with the same start and end address, and verify both binaries are equal