I've found that (for USB), (!Serial) rarely or never evaluates to True, on the Teensy 3's.
Works fine on Mac
I've found that (for USB), (!Serial) rarely or never evaluates to True, on the Teensy 3's.
well, I tried this altered example on the Teensy 3.1I've found that (for USB), (!Serial) rarely or never evaluates to True, on the Teensy 3's.
For now, with Teensy 3 and C/C++, I just put in a 5 second delay before sending debug info out the USB/serial port, and assume that I will open a terminal window in that time.
void setup()
{
Serial.begin(9600); // USB is always 12 Mbit/sec
while (!Serial)
;
}
void loop()
{
Serial.println("Hello World...");
delay(1000); // do not print too fast!
}
:1084F40090FEFF1F90FEFF1F98FEFF1F98FEFF1FB8
:10850400A0FEFF1FA0FEFF1FA8FEFF1FA8FEFF1F67
:10851400B0FEFF1FB0FEFF1FB8FEFF1FB8FEFF1F17
:08852400FFFFFFFF0000020051
:00000001FF
Paul-- there are 3 different ways to indicate an extended address record in Intel hex format. For our stuff we have been using a 02 record, but seems like you are looking for a different one to address beyond 64K. So which one is it.
if (line[0] != ':') return 0;
if (strlen(line) < 11) return 0;
ptr = line+1;
if (!sscanf(ptr, "%02x", &len)) return 0;
ptr += 2;
if ((int)strlen(line) < (11 + (len * 2)) ) return 0;
if (!sscanf(ptr, "%04x", &addr)) return 0;
ptr += 4;
/* printf("Line: length=%d Addr=%d\n", len, addr); */
if (!sscanf(ptr, "%02x", &code)) return 0;
if (addr + extended_addr + len >= MAX_MEMORY_SIZE) return 0;
ptr += 2;
sum = (len & 255) + ((addr >> 8) & 255) + (addr & 255) + (code & 255);
if (code != 0) {
if (code == 1) {
end_record_seen = 1;
return 1;
}
if (code == 2 && len == 2) {
if (!sscanf(ptr, "%04x", &i)) return 1;
ptr += 4;
sum += ((i >> 8) & 255) + (i & 255);
if (!sscanf(ptr, "%02x", &cksum)) return 1;
if (((sum & 255) + (cksum & 255)) & 255) return 1;
extended_addr = i << 4;
//printf("ext addr = %05X\n", extended_addr);
}
if (code == 4 && len == 2) {
if (!sscanf(ptr, "%04x", &i)) return 1;
ptr += 4;
sum += ((i >> 8) & 255) + (i & 255);
if (!sscanf(ptr, "%02x", &cksum)) return 1;
if (((sum & 255) + (cksum & 255)) & 255) return 1;
extended_addr = i << 16;
//printf("ext addr = %08X\n", extended_addr);
}
return 1; // non-data line
}
I suggest not using / disabling the STOP button when in Teensy mode. Instead, the user just corrects the code, compile and start a new download. This works except for the rare case where the amok user program left the CPU in such a state that the Teensy board's button has to be pushed. For me, this is quite rare. And too, if the program was amok, the STOP button wouldn't work either!...
A data point on DTR/RTS. Seems like any time DTR changes the state of both DTR and RTS are reflected in usb_cdc_line_rtsdtr. But if only RTS is changed whatever value was in RTS the last time DTR changed is what is reported. Fine for us for now.
Always something, as I need to use that to impliment load and go, because one of the buttons on our IDE is STOP, and we need to load and not go in that case.
plugging away...
05, Start Linear Address Record. The address field is 0000, the byte count is 04. The 4 data bytes represent the 32-bit value loaded into the EIP register of the 80386 and higher CPU.
for i=1 to 20
io(13) = 1
wait(1)
io(13) = 0
wait(500)
next i
as if there's supposed to be more info displayed.Analyzing C:/Users/steve/Desktop/Coridium T3/Coridium/test.bas
Programming Flash 0031...