RS232enum icon indicating copy to clipboard operation
RS232enum copied to clipboard

Building for Teensy 3.6 using Arudino.app on macOS

Open ipatch opened this issue 5 years ago • 2 comments

Hello, first off, thank you for sharing both this and JTAGenum projects, really looking forward to experimenting with both of them. That said, I recently purchased a Teensy 3.6 because

  • it has ~ 38 pins out of the box from what I can tell
  • and works at a 3.3V level

so for my case I have device that operates at 3.3V and has 20 exposed pads on the board, so I soldered a 20 pin zif connector the board that I am experimenting with.

However when I try to compile the default sketch provided in this repo using the Verify button in the Arduino.app on macOS the RS232enum fails to compile and gives me the below error,

'PIN_B7' was not declared in this scope

I have not modified any of the code / logic in the file other than experimenting with different pin name definitions.

I noticed the pinnames array are defined using double quotes whereas the pins array they are defined with no quotations around the names, could this be the reason why the default sketch fails to compile?

ipatch avatar Sep 26 '19 19:09 ipatch

ended up going with,

byte pins[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 };

and using passive parallel mode now. 👍

ipatch avatar Sep 26 '19 19:09 ipatch

Hi I'm very sorry for the late reply :/

each value pins[] should map to a pin number or definition. the value that defines a pin should be the same as can be used for arduino pinMode/digitalRead functions. It just happens that with the Teensy and the Teensduino bindings they define pins as "PIN_B7" and so forth but for normal arduino's they are defined by standard int's.

The values in pinnames[] are for you the user to define whatever string you want. Why the arduino pin or Teensy pin your target pin has been connected to may be named PIN_B7 or just int 13, it may be that you have a different name you would like to use. I often use this to indicate the index of the pin on the target header. As the code runs it will print these pin names. Specifically... it will execute a digitalRead(pin[N]) and the print the string for pinname[N].

Hope this helps. Happy you found a solution. Next time I'm playing with the code I'll try to document it better :(

cyphunk avatar Oct 29 '19 13:10 cyphunk