moreapps?=apps/i2c/i2c.o apps/chipcon/chipcon.o apps/glitch/glitch.o apps/jtag/sbw.o apps/smartcard/smartcard.o
apps= $(moreapps) apps/monitor/monitor.o apps/spi/spi.o apps/jtag/jtag.o apps/jtag/jtag430.o apps/jtag/jtag430x2.o apps/avr/avr.o apps/jtag/ejtag.o
-libs= lib/$(mcu).o lib/command.o apps/jtag/jtag430asm.o
+libs= lib/$(mcu).o lib/command.o apps/jtag/jtag430asm.o apps/chipcon/chipconasm.o
app= goodfet
all: $(app).hex
//P5REN=0xFF;
}
+
+/* 33 cycle critical region
+0000000e <ccdebuginit>:
+ e: f2 d0 0d 00 bis.b #13, &0x0031 ;5 cycles
+ 12: 31 00
+ 14: f2 c2 31 00 bic.b #8, &0x0031 ;4 cycles
+ 18: d2 c3 31 00 bic.b #1, &0x0031 ;4
+ 1c: f2 e2 31 00 xor.b #8, &0x0031 ;4
+ 20: f2 e2 31 00 xor.b #8, &0x0031 ;4
+ 24: f2 e2 31 00 xor.b #8, &0x0031 ;4
+ 28: f2 e2 31 00 xor.b #8, &0x0031 ;4
+ 2c: d2 d3 31 00 bis.b #1, &0x0031 ;4
+ 30: 30 41 ret
+*/
+
+/*
//! Initialize the debugger
void ccdebuginit(){
//Port output BUT NOT DIRECTION is set at start.
//Raise !RST.
P5OUT|=RST;
}
+*/
+
+//! Initialize the debugger.
+void ccdebuginit();
//! Read and write a CC bit.
unsigned char cctrans8(unsigned char byte){
--- /dev/null
+.globl ccdebuginit
+.type ccdebuginit,@function //for linking
+
+#define _GNU_ASSEMBLER_
+#include "gfports.h"
+
+
+//In assembly for cycle-counting, not for efficiency.
+//
+ccdebuginit:
+ nop ;1 cycle
+ nop ;1 cycle
+ nop ;1 cycle
+ nop ;1 cycle
+ nop ;1 cycle
+ nop ;1 cycle
+ nop ;1 cycle
+ nop ;1 cycle
+ nop ;1 cycle
+ nop ;1 cycle
+ nop ;1 cycle
+ nop ;1 cycle
+
+ bis.b #13, &0x0031 ;5 cycles
+ bic.b #8, &0x0031 ;4 cycles
+ bic.b #1, &0x0031 ;4
+ xor.b #8, &0x0031 ;4
+ xor.b #8, &0x0031 ;4
+ xor.b #8, &0x0031 ;4
+;; xor.b #8, &0x0031 ;4
+ bis.b #1, &0x0031 ;4
+ ret