This makes it default to not being presented, which makes s51 much happier
Signed-off-by: Keith Packard <keithp@keithp.com>
+
+void
+ccdbg_flush(void)
+{
+ fflush(stdout);
+}
ccdbg_send(dbg, CC_CLOCK|mask|CC_RESET_N, CC_CLOCK|CC_DATA|CC_RESET_N);
read = ccdbg_read(dbg);
ccdbg_send(dbg, CC_CLOCK|mask|CC_RESET_N, CC_CLOCK|CC_DATA|CC_RESET_N);
read = ccdbg_read(dbg);
+ ccdbg_print("#\t%c %c %c\n", CC_DATA, read);
ccdbg_send(dbg, CC_CLOCK| CC_RESET_N, CC_RESET_N);
return (read & CC_DATA) ? 1 : 0;
}
ccdbg_send(dbg, CC_CLOCK| CC_RESET_N, CC_RESET_N);
return (read & CC_DATA) ? 1 : 0;
}
for (i = 0; i < nbytes; i++) {
write8[DATA_BYTE] = *bytes++;
ccdbg_execute(dbg, write8);
for (i = 0; i < nbytes; i++) {
write8[DATA_BYTE] = *bytes++;
ccdbg_execute(dbg, write8);
- if ((i & 0xf) == 0xf) { printf ("."); fflush(stdout); nl = 1; }
- if ((i & 0xff) == 0xff) { printf ("\n"); nl = 0; }
+ if ((i & 0xf) == 0xf) {
+ ccdbg_debug(CC_DEBUG_MEMORY, ".");
+ ccdbg_flush();
+ nl = 1;
+ }
+ if ((i & 0xff) == 0xff) {
+ ccdbg_debug(CC_DEBUG_MEMORY, "\n");
+ nl = 0;
+ }
+ if (nl)
+ ccdbg_debug(CC_DEBUG_MEMORY, "\n");
(void) ccdbg_execute(dbg, memory_init);
for (i = 0; i < nbytes; i++) {
*bytes++ = ccdbg_execute(dbg, read8);
(void) ccdbg_execute(dbg, memory_init);
for (i = 0; i < nbytes; i++) {
*bytes++ = ccdbg_execute(dbg, read8);
- if ((i & 0xf) == 0xf) { printf ("."); fflush(stdout); nl = 1; }
- if ((i & 0xff) == 0xff) { printf ("\n"); nl = 0; }
+ if ((i & 0xf) == 0xf) {
+ ccdbg_debug(CC_DEBUG_MEMORY, ".");
+ ccdbg_flush();
+ nl = 1;
+ }
+ if ((i & 0xff) == 0xff) {
+ ccdbg_debug(CC_DEBUG_MEMORY, "\n");
+ nl = 0;
+ }
+ if (nl)
+ ccdbg_debug(CC_DEBUG_MEMORY, "\n");
#define CC_DEBUG_INSTRUCTIONS 0x00000004
#define CC_DEBUG_EXECUTE 0x00000008
#define CC_DEBUG_FLASH 0x00000010
#define CC_DEBUG_INSTRUCTIONS 0x00000004
#define CC_DEBUG_EXECUTE 0x00000008
#define CC_DEBUG_FLASH 0x00000010
+#define CC_DEBUG_MEMORY 0x00000020
/* ccdbg-command.c */
void
/* ccdbg-command.c */
void
void
ccdbg_clear_debug(int level);
void
ccdbg_clear_debug(int level);
+void
+ccdbg_flush(void);
+
/* ccdbg-flash.c */
uint8_t
ccdbg_flash_hex_image(struct ccdbg *dbg, struct hex_image *image);
/* ccdbg-flash.c */
uint8_t
ccdbg_flash_hex_image(struct ccdbg *dbg, struct hex_image *image);