Compilation fails on Teensy 3.6 #11
-
I'm using a Teensy 3.6 with the following platformio configuration: [env:teensy36]
platform = teensy
board = teensy36
framework = arduino
# get edrumulus src, e.g:
# $ cd ~/projects
# $ mkdir edrumulus
# $ cd edrumulus
# $ git clone https://github.com/corrados/edrumulus.git
lib_extra_dirs =
~/projects/edrumulus
build_flags =
-D USB_MIDI_SERIAL I think I worked out everything except for the following compile errors with the same code used in
Any idea about these Maybe some more USB macros for Teensy need to be enabled for platformio? See USB Features I will open a pull request that builds |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 57 replies
-
I opened pull request #12 that compiles |
Beta Was this translation helpful? Give feedback.
-
Looks like these constants are defined for teensy 4 in https://github.com/PaulStoffregen/cores/blob/master/teensy4/core_pins.h and missing for the teensy 3.x in https://github.com/PaulStoffregen/cores/blob/master/teensy3/core_pins.h |
Beta Was this translation helpful? Give feedback.
-
Also tried teensy 4.0 board which builds fine.
So looks like teensy 3.6 isn't supported yet. |
Beta Was this translation helpful? Give feedback.
-
The Teensy 3.6 has a complete different CPU on the board. I actually did not expect it to compile/run out of the box. The constants which are missing are for the "keeper" functionality which, I guess, is specific to the CPU on the Teensy 4.0. Do you know if there is a specific define for the Teensy 4.0 and 4.1? I only know of this one: TEENSYDUINO. At least we have to put the "keeper disabling code" in a #ifdef for the Teensy 4.0/4.1. How about the other hardware properties: Is the board LED pin the same pin 13 as on the Teensy 4.0? What is the resolution of the ADC? Is it 12 bits? If not, then ADC_MAX_RANGE has to be adjusted. Also the settings like "setResolution", "setAveraging", "setConversionSpeed" and "setSamplingSpeed". Is it the same? Do we have two ADCs on the Teensy 3.6? A lot of open questions :-). Since I do not have the hardware, I am of little help, unfortunately. |
Beta Was this translation helpful? Give feedback.
-
I found this: #ifndef TEENSY_BOARD_DETECTION_H_INCLUDED
#define TEENSY_BOARD_DETECTION_H_INCLUDED
// Teensy-4.x
#if defined(__IMXRT1062__) || defined (ARDUINO_TEENSY40) || defined (ARDUINO_TEENSY41)
#define TEENSY4
#if defined (ARDUINO_TEENSY40)
#define TEENSY4_0
#elif defined (ARDUINO_TEENSY41)
#define TEENSY4_1
#endif
#endif
// Teensy-3.6
#if defined(__MK66FX1M0__)
# define TEENSY3_6
#endif
// Teensy-3.5
#if defined (__MK64FX512__)
#define TEENSY3_5
#endif
#endif Also see https://github.com/PaulStoffregen/teensy_size/blob/main/minimal_elf.c
Yes, see https://www.pjrc.com/store/teensy36.html
From https://www.pjrc.com/store/teensy36.html:
Not sure, hopefully it's listed on https://www.pjrc.com/store/teensy36.html |
Beta Was this translation helpful? Give feedback.
-
Looks like it's a little bit faster than esp32: https://user-images.githubusercontent.com/305679/141693162-88a18d16-0451-4024-89aa-6b0bf82edaca.png If I can test something, performance wise, please let me know. |
Beta Was this translation helpful? Give feedback.
-
Results for avg 1 on Teensy 3.6 @corrados:
LED dims after 2 sec.
LED dims after 2 sec.
LED dims after 2 sec.
LED dims after 2 sec.
LED dims after 2 sec! |
Beta Was this translation helpful? Give feedback.
-
On that speed testing branch, I only use the very first input. So, you must set the snare input to 38 to pick up the correct input.
That does not look good. The noise is much too high. I guess it is caused by the fact that you are recording from the wrong GPIO input. |
Beta Was this translation helpful? Give feedback.
I found this:
Also see https://github.com/PaulStoffregen/teensy_size/blob/main/minimal_elf.c
Yes, see h…