Prusa-Firmware/tools
Yuri D'Elia 06eab4ac11 Handle XFLASH (D21) and serial (D23) dumps in elf_mem_map, add dump2bin
- Uniformly parse D2/D21/D23 dump types.
- Add dump2bin to parse/convert a dump into metadata and binary.
- Move the parsing into it's own module in order to be shared.
2021-07-30 06:38:12 +02:00
..
lib Handle XFLASH (D21) and serial (D23) dumps in elf_mem_map, add dump2bin 2021-07-30 06:38:12 +02:00
dump2bin Handle XFLASH (D21) and serial (D23) dumps in elf_mem_map, add dump2bin 2021-07-30 06:38:12 +02:00
dump_eeprom Add several low-level debugging tools 2021-07-30 06:38:12 +02:00
dump_sram Add several low-level debugging tools 2021-07-30 06:38:12 +02:00
elf_mem_map Handle XFLASH (D21) and serial (D23) dumps in elf_mem_map, add dump2bin 2021-07-30 06:38:12 +02:00
noreset Add several low-level debugging tools 2021-07-30 06:38:12 +02:00
README.md tools: update documentation for elf_mem_map 2021-07-30 06:38:12 +02:00
update_eeprom Add several low-level debugging tools 2021-07-30 06:38:12 +02:00

Host debugging tools for Prusa MK3 firmware

Tools

dump_eeprom

Dump the content of the entire EEPROM using the D3 command. Requires printcore from Pronterface.

dump_sram

Dump the content of the entire SRAM using the D2 command. Requires printcore from Pronterface.

elf_mem_map

Generate a symbol table map with decoded information starting directly from an ELF firmware with DWARF debugging information (which is the default using the stock board definition).

When used along with a memory dump obtained from the D2 g-code, show the value of each symbol which is within the address range of the dump.

When used with --map and a single elf file, generate a map consisting of memory location and source location for each statically-addressed variable.

With --qdirstat and a single elf file, generate a qdirstat compatible cache file which can be loaded to inspect memory utilization interactively in a treemap.

This assumes the running firmware generating the dump and the elf file are the same. Requires Python3 and the pyelftools module.

update_eeprom

Given one EEPROM dump, convert the dump to update instructions that can be sent to a printer.

Given two EEPROM dumps, produces only the required instructions needed to update the contents from the first to the second. This is currently quite crude and assumes dumps are aligned (starting from the same address or same stride).

Optionally writes the instructions to the specified port (requires printcore from Pronterface).

noreset

Set the required TTY flags on the specified port to avoid reset-on-connect for subsequent requests (issuing this command might still cause the printer to reset).