Move build and debug tools to 'cctools' directory. These tools were merged in from the ccdbg package. Signed-off-by: Keith Packard <keithp@keithp.com>
Merge ccdbg and altos sources into one giant repository Keeping these separate isn't making things any easier. Signed-off-by: Keith Packard <keithp@keithp.com>
Add support for a serial-connected custom debug dongle This uses the cc1111 board as a custom debug dongle with faster methods for communicating with the debug target.
Bump debug speed back up
The debug port only works if reset is higher than clock. weird
Flip debug pins around to match telemetrum
Wait for a while when switching the RESET_N line The cc1111 manual suggests placing a 2.7kΩ resister and 1nF capacitor on the RESET_N line to filter out noise. This increases the time necessary to reset the chip to several microseconds which is longer than the interval between two USB packets. Flush the USB packet queue and sleep for a while after changing the value on the RESET_N line to make sure the chip sees the state change. Signed-off-by: Keith Packard <keithp@keithp.com>
Expose ccdbg_set_clock API This allows applications to change the debug port clock rate on the fly. Signed-off-by: Keith Packard <keithp@keithp.com>
Save/restore registers to host during memory operations. Cache ROM data. Because the debug port uses instructions for most operations, the debug code will clobber registers used by the running program. Save and restore these to avoid corrupting application data. If the ROM file is known, use that to return data instead of fetching it from the target to improve performance. Signed-off-by: Keith Packard <keithp@keithp.com>
Save/restore regs when reading/writing memory. Add SFR access. The DPL and ACC registers are used by the memory access code, so they need to be saved and restored. Stuff them up high in ram for now; this should probably be fixed to pull them back to the host instead. Special SFR access is required as not all SFRs are visible in the unified address space. Signed-off-by: Keith Packard <keithp@keithp.com>
Switch to libusb-1.0 and use async interface. The async libusb interface offers substantial performance benefits by not making each command wait for the reply. This makes talking over this interface almost reasonable. Signed-off-by: Keith Packard <keithp@keithp.com>
Make read_memory debug output use ccdbg_debug. This makes it default to not being presented, which makes s51 much happier Signed-off-by: Keith Packard <keithp@keithp.com>
Cleanup work; separating out the cp interface to be more abstract. Signed-off-by: Keith Packard <keithp@keithp.com>
Autotools. Signed-off-by: Keith Packard <keithp@keithp.com>