Dump the content of memory.
This 68HC11 bootstrap program dumps the target memory. It supports the following commands:
- Read the memory and dump it.
This bootstrap program is uploaded by GTAM to dump the content of memory and I/O registers. It is also used to guess the CPU configuration by reading the bootrom mask ID.
- This program must not be linked with a startup file. It implements the startup entry point.
_start function must be at beginning of this file. By doing so, it will be mapped at address 0 by the linker and we avoid to have some jump to call it (since the boot will jump there).
- It must be compiled with -mshort -Os -fomit-frame-pointer to make sure it fits in less than 240 bytes (keep a few bytes at end for the stack).
- It must be compiled with -msoft-reg-count=0 or =1 to reduce the use of soft-registers (since they are mapped in RAM in .page0).
- Before dumping the memory, we switch the bus in the expanded mode. We switch back to single chip before rebooting.
- The soft registers must be located at beginning of the .page0. This will clobber the beginning of the
_start function. We don't care because this clobbers some initialisation part.
- Compile with -DNO_REBOOT to avoid the reboot. In that case, the program loops indefinately checking the memory regions.
- Compile with -DNO_BREAK to avoid detection of break sent by the host. With current implementation of GCC, the code is too big (some bytes) and it should not be compiled.
Source file: dumper.c
- Memory is dumped in binary.