PDA

View Full Version : Teensyduino 1.42 Beta #3



Paul
03-12-2018, 12:04 AM
Here is a third beta test for Teensyduino 1.42.

The main new feature is a "Teensy" section in the Tools > Ports menu which tries to show Teensy in all modes, not just Serial.

This beta fixes most Ports menu and serial monitor problems that were found in beta2. Some stray debug printing remains, so you'll likely see a few cryptic messages in Arduino's console panel. These will get cleaned up for beta4.

This new beta has work to speed up full recompile, by using lighter C++ headers and precompiling the Arduino.h header.


Old beta download links removed. Please use the latest version:
https://www.pjrc.com/teensy/td_download.html


Changes since Teensyduino 1.42-beta2 (https://forum.pjrc.com/threads/50052-Teensyduino-1-42-Beta-2)

fix teensy_ports and teensy_serialmon on Mac High Sierra
fix serial monitor title bar & online/offline status parsing from teensy_serialmon
fix teensy_serialmon verbose info in serial monitor, now prints to Arduino console
Fix Teensy Loader Help > About stalling verbose info log from other programs
Fix Teensy Loader File error dialog stalling verbose info log from other programs
fix blank lines appears in verbose info log on Windows
teensy_port better handling for large number of devinst on Windows (eg, MIDIx16)
Better messages when retrying serial open on Windows (eg, with USB "Everything")
show teensy_reboot output on Windows as it occurs, fixed wait until teensy_reboot exits
fixed sending reboot request to some com ports
fix teensy_ports incorrect append to devinst list on Windows
fix logging of windows device change events
prevent teensy_serialmon from interfering with HID bootloader access in Teensy Loader
remove #include <algorithm> from wiring.h, allowing faster compile for most C++ code
precompile Arduino.h, allows some speedup of rebuild all
update core library, Wire, Audio, Bounce to use precompile Arduino.h
Reduce startup delay from 400 ms to 300 ms
fix teensy_serialmon asser of DTR on Windows, fixes (bool)Serial
(bool)Serial to use DTR only, fixes Serail remaining true after serial monitor close
fix truncated usbmodem names in Ports menu on Macintosh
Verbose info log now uses high res time on Windows 8 & 10
Verbose info log users 1ms res time on Windows XP & 7 (was 16 ms & 10 ms)
Fix Verbose info random order for same timestamp events - now always chronological
Add numbering of non-loader verbose logging instances
Trim excessive verbose logging of status communication
Updates to audio library documentation
Add Teensy Loader about dialog icon (was generic info icon)

el_supremo
03-12-2018, 12:18 AM
This is the first time I've been able to have a T3.6 and a T3.2 connected with Win 10 and be able to upload code to either. Up to now, when I compile for the T3.6 I get an error message saying the code was compiled for a T3.2 and I have to get rid of one of the two.
Way to go, Paul :)

Pete

el_supremo
03-12-2018, 12:24 AM
And, I have an audio application which I compiled from a cold start this morning and it took 115 seconds. After installing 1_42b3 I tried again and it took only 65 seconds. It's getting better all the time.

Pete

defragster
03-12-2018, 07:17 AM
With TD 1.42b3 I get this that looks good { Upload or USB Plug in } - online in 300 - still sees (!Serial) in sketch until over 400 - though as shown the PC captured the print @300.

Added PIC to show it ONLINE in Title bar! - This one saw (Serial) under 400::
13267
Not Serial ??? @ millis=300
Teensy Serial Online !!! @ millis=484

T:\tCode\_TEENSY_INFO\StartPrint\StartPrint.ino Mar 12 2018 00:15:27
YES Serial !!!
Started Setup at millis() ==300


Minor code change to show Start time in setup():


void setup() {
Serial.begin(115200);
uint32_t Start = millis();
uint32_t foo = millis();
while (!Serial && millis() < 5000 )
{ Serial.print( "Not Serial ??? @ millis=" );
Serial.println( millis() );
while ( !Serial && ( millis() <= (foo + 500) ) );
foo += 500;
}
if ( !Serial )
Serial.print( "Teensy !Serial ??? @ millis=" );
else
Serial.print( "Teensy Serial Online !!! @ millis=" );
Serial.println( millis() );
Serial.println("\n" __FILE__ " " __DATE__ " " __TIME__ " " );
if ( !Serial )
Serial.println( "Not Serial ???" );
else
Serial.println( "YES Serial !!!" );
Serial.print( "Started Setup at millis() ==" );
Serial.println( Start );
}

void loop() {
}

Theremingenieur
03-12-2018, 06:18 PM
What an impressive speedup in compiling and/or building, congratulations!

But the 32bit performance warnings persist on macOS.

mjs513
03-12-2018, 09:44 PM
Just downloaded 1.42b3 and tried it on one of the my sketches, but after the sketches loads and when I open and close the serial monitor I am getting:

errorPipeListener thread exit
errorPipeListener thread exit
errorPipeListener thread exit

Doesn't seem to stop anything, sketch continues to run and serial monitor opens again. For reference I am on a Windows 10 64-bit laptop. Running IDE 1.8.5 with 1.42b3.

PaulStoffregen
03-13-2018, 12:02 AM
But the 32bit performance warnings persist on macOS.

When do you see these warnings?

1: Launching the installer?
2: Launching the Arduino IDE?
3: When Arduino finishes Verify compile?
4: When Teensy Loader appears?
5: Opening the serial monitor?
6: Clicking the Tools menu?
7: Other times?

PaulStoffregen
03-13-2018, 12:04 AM
Opps, "errorPipeListener thread exit" is just some leftover debugging code. So is "timeBeginPeriod = 1" and "getimeofday" on Windows. I'll clean those up on the next beta.

"errorPipeListener thread exit" is supposed to appear when you close the serial monitor. If you only see then, no cause for concern. If it's appearing at other times when you haven't closed the serial monitor, it might be an issue.

mjs513
03-13-2018, 02:09 AM
:) You mentioned that there might be a few of those. The only time I have seen the "errorPipeListener Thread exit" is when I close the serial monitor. Doesn't affect anything but just wanted to let you know.

Thanks
Mike

Theremingenieur
03-13-2018, 12:03 PM
When do you see these warnings?

1: Launching the installer?
2: Launching the Arduino IDE?
3: When Arduino finishes Verify compile?
4: When Teensy Loader appears?
5: Opening the serial monitor?
6: Clicking the Tools menu?
7: Other times?

1 When launching the installer YES,
2 and 3 NO,
4 When the Teensy Loader appears ONLY 1ST TIME
5, 6, and 7 NO

vjmuzik
03-13-2018, 12:54 PM
1 When launching the installer YES,
2 and 3 NO,
4 When the Teensy Loader appears ONLY 1ST TIME
5, 6, and 7 NO

Recent versions of MacOS have starting warning when you install and first open 32 bit programs as they are eventually going to phase out 32 bit programs in future versions and they will no longer be able to run them as far as I understand.

PaulStoffregen
03-13-2018, 01:07 PM
Recent versions of MacOS

Is any officially released version (not beta) of MacOS actually doing this?

vjmuzik
03-13-2018, 02:31 PM
The current beta version is the first to do so, but as far as information I’ve read, that warning will be in the official release and it’s the first of several warnings that they are going to do. On another note, if the programs are indeed 32 bit like it says they are then they will cease to function when they only allow 64 bit programs at some point.

Theremingenieur
03-13-2018, 03:38 PM
For the moment, it's only in the current beta. Everybody will see it with the upcoming release of 10.13.4.

They clearly stated in a note to developers that High Sierra would be the last macOS to run 32bit apps without restrictions and constraints. It seems that the real struggle will only start in September when macOS 10.14 (or however it will be called) will be released. They said that they want to drop 32bit app support for performance and security reasons.

Here is what you can see on the Apple Developer website:
13281

@Paul: If you have an Apple developer account, you might check out this document (https://developer.apple.com/library/content/documentation/Darwin/Conceptual/64bitPorting/intro/intro.html)

PaulStoffregen
03-14-2018, 11:05 AM
Ok, here's a first test building Teensy Loader as a 64 bit Mac application.

https://www.pjrc.com/teensy/beta/teensy_loader_64bit.dmg

Theremingenieur
03-14-2018, 11:11 AM
Great, thank you! When launched manually, there is no more warning, and it shows up as a 64bit app in the system activity monitor. Don't have a Teensy with me at my day job, will do an upload test tonight when back home.

PaulStoffregen
03-14-2018, 12:57 PM
Here's a first attempt at a 64 bit Mac installer with (hopefully) everything built as 64 bits.

https://www.pjrc.com/teensy/beta/TeensyduinoInstall_64bit.dmg

I had to do quite a bit of fiddling with FLTK and other libs to get this to build, so please be on the lookout for any unusual behavior.

Theremingenieur
03-14-2018, 01:34 PM
Installation went without problems and without 32bit warnings. Opening a sketch and clicking verify (still without Teensy connected) triggered a very fast compile and build, then, the Teensy loader opens. The Teensyduino installer, Teensy_ports and the Teensy loader are all reported as 64bit apps. Neither the installation nor the verify test run left any trace in system.log. Everything looks very fine up to now.

Theremingenieur
03-14-2018, 10:20 PM
Now, did some real life tests with that 64bit version. Compiling, building, uploading, flooding the Serial monitor with data, everything went very well (as expected)! And that in both modes, Serial and Teensy, thank you for your great work, Paul!

vladn
03-21-2018, 01:35 AM
On a windows system can it be installed in a different directory ? I'd like to have both the 1.41 and 1.42b3 on the same computer.

KurtE
03-21-2018, 01:43 AM
Yes, you can download two copies of Arduino for windows. Typically for this (and for me most all of the time), you would download the zip file file. You then install it into two different locations on your hard disk. You can then install the two different versions of Teensyduino on the two different copies of arduino

vladn
03-21-2018, 02:02 AM
Thank you.

defragster
03-22-2018, 05:22 AM
Looking forward to TD 1.42 b4 release - this message in the IDE Is frightfully annoying: callback C119
> keeps scrolling verbose window and errors can't be viewed. So I closed the T.sermon's ... then caused trouble ...

I re-started compile and realized I had closed teensy.sermon window, so I opened it during compile - this breaks TeensyLoader as it doesn't try to 'offline' the window again when accessing the device and it cannot open it. Now my system is all deadlocked like confused ... Had to use TaskMan to get the IDE to close.

Question: After compile could the intended USB port status be confirmed/validated again?

BTW: I started up two IDE instances for T_3.6 and then T_3.1 : TD 1.42b3 worked well to program them both in turn again. And the two IDE Teensy.sermon instances picked up over 3.5 million messages each in about a day - and my Win 10 system has been up over 7 days (since last Win Update) so it isn't freshly booted.

PaulStoffregen
03-22-2018, 11:27 AM
... Had to use TaskMan to get the IDE to close.

After you killed off the IDE, were you able to get the Verbose Info log from Teensy Loader?

defragster
03-22-2018, 05:50 PM
No - that time - I killed TLoader first thing - hoping that would free up my system. It did not.

Doing REPRO I have locked up the IDE TWICE since and that is here:
13358

Three LOG files in that ZIP in order saved:
LongRun_log :: all was fine since last night 1.9 MB will show normal function programming and running two active : one T_3.6 MASTER and one T_3.1 SLAVE
ReproAttempt1_log :: IDE required TaskMan END PROCESS after this was saved { the SPI slave runs NVIC PRI #19 so USB not always responsive with MASTER active }
IDE_HUNG_log :: 2.2MB >> restarted IDE, MASTER unplugged - Slave T_3.1 active but idle with no Master. IDE require TaskMan End Task

For IDE_HUNG_log::
-- the IDE was restarted with T_3.6 SPI Master unplugged
-- Compile Started
-- teensy_sermon OPENED - noted as [offline]
>> LOTS AND LOTS of SPEW 2.2 MB in short order
-- IDE went unresponsive - resize did not redraw the bottom status bar, YELLOW on upper COMPILE icon button stayed YELLOW { i.e. active compile never completed }
-- I saved the IDE_HUNG_log.txt file and then used TaskMan to close the IDE - didn't see anything interesting pop into the Verbose TLoader log so not resaved.

For ReproAttempt1_log::
-- I started a compile on both units - not simultaneously but one then the other trying to repro
-- IDE ended up HUNG
-- started compiles with open and close of the T_sermon and it acted a bit different - but same result of IDE hung.

<edit>: Left all closed ( IDE & TeensyLoader ) and started Master&Slave teensy_serialmon.exe is still an active process attached to the T_3.1. Was trying to peek at Serial output using TyCommander and it could not get the USB port - tried unplugging and reset and the port was owned by non-visible T_serialmon.

defragster
03-24-2018, 07:46 AM
Paul: The T_sermon goes offline during compile and the window content is greyed and frozen, fine. Could the IDE SerMon button similarly be deactivated during a compile? That would prevent the hole I have stepped into. Or at least have the TeensySerMon ignore (store) the request to open on that port that would go offline at compile start - until compile completes?

Also - would it be legit/easy to use a unique Arduino/Teensy_sermon icon on the taskbar? I have four identical icons for 'IDE' (usually more with other sketches open) and a unique icon would be easier to click after bringing multiple windows to the top between external edit and compile than a random series of Alt+Tab to jump it back to the front.

Frank B
03-24-2018, 12:09 PM
I do not know if this is already known.

A false positive with Avast Antivirus (teensy_ports.exe):

13376

Frank B
03-24-2018, 12:57 PM
Are there plans to update the compiler?

https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads

PaulStoffregen
03-24-2018, 03:03 PM
Are there plans to update the compiler?

Yes. But like last time, the plan involves waiting for a couple "minor" updates. So that's probably near the end of this year or early in 2019.

tonton81
03-25-2018, 01:32 AM
Paul I tested the new teensyduino its working fine here, I no longer have the !Serial issue fluctuating on and off like previously. I dont have the esp code on me to simulate the esptool thing either, but that was probably something no one would run into as i was detecting ESP packets and differentiating them from normal data

I'm currently using this teensyduino version while working on the new projects

defragster
03-25-2018, 04:13 AM
Paul: I just had IDE being sluggish ( two open ) - found 18 [Eighteen ] copies of teensy_ports.exe <edited to be clear not just one was sluggish>

Multiple Teensy_ports.exe do not show in TaskMan until AFTER the IDE is closed.

Machine was up for 7+(?) days doing really well - rebooted 2 hours ago so this is was fresh. Just a couple builds.

Closed one IDE and edited boards.txt to get 144 MHz T_3.1 - reopened and tried to resume got a build done and all went funny?

Closed IDE's and reloaded and there was no teensy.sermon in ports?

Closed again and killed off Java Remains in TaskMan.

Now the teensy.sermon is there - but the no longer restart nicely on reset or replug.


IDE is sluggish on tools menu. It seems that is the PORTS Query? It can take 5+ seconds to drop down. ( in that time if mouse moves off Tools - the wait starts over )


Here is the TLoader Verbose: 13387

IDE was sluggish and closed - now I see 21 copies of teensy_ports.exe.

No Tools/Ports T_sermon - clicks on the IDE Sermon icon did nothing ( maybe that is the spare copies of teensy_ports )


not :: Seems to be working after cleanup again with a few minute wait
>> REBOOT required. Above behavior is stuck from something ...


<edit>: Rebooted and Brought up T_3.1 then the T-3.6 as used before all is normal now. This was not opening T_sermon during compile. Only thing I can think of is perhaps in opening two IDE's and loading sketch and changing the device - I may have not changed the Teensy Port id? Thus having two IDE's looking for the same port?

defragster
03-25-2018, 07:04 AM
Paul - RE post #31 :: Got a repro based on last EDIT prior post.

Indeed in opening two IDE's first one to T_3.1/Slave - was preset to T_3.1 - compile all good.

Then opened second IDE - opens Slave.ino set to T_3.1. Change to T_3.6/Master - I changed to the right Teensy port. and it worked.

To Repro I set 2nd IDE T_3.6 to the T_3.1's port - while active and connected. It did not go online but was opened as offline.

T_3.1's IDE and T_sermon open and running data. Hit compile on the T_3.1 IDE - after compile - there was a long pause - Programming completed. After Programming to T_3.1 :: the T_3.6 IDE Claimed the T_sermon - leaving the T_3.1 Sermon OFFLINE.

Going to Tools - had a long pause - then looking at Ports showed the 'Teensy' section removed.

In case it shows anything I had Teensy Verbose open before the IDE and through all of the above - here is the Cross Ports log:
13388

TASKMAN - IDE's and TLoader closed:
> (4) copies of teensy_ports.exe
> Java Platform as shown in image
13389

<edit> Just confirmed this behavior using posted StartPrint.ini (https://forum.pjrc.com/threads/50254-Teensyduino-1-42-Beta-3?p=171407&viewfull=1#post171407)

> IDE #1 : T_3.1 load and compile and T_Sermon
> IDE #2 : T_3.6 load, change Teensy and PORT and compile and correct T_Sermon

> IDE #2 : Close T_Sermon to T_3.6, change port to T_3.1 - Open T_sermon ... offline {Should have been Grayed out?}
> IDE #1 : T_3.1 open and running - UPLOAD - ... Pause before Program ...

> IDE #2 : T_3.1 comes online here not in [offline] (Teensy 3.1)

Until the IDE JAVA is closed TaskMan shows the teensy_ports and teensy_serialmon.exe under the IDE's JAVA App entries - when the IDE exits they are Orphaned and then appear under 'Background processes'.
13390

vladn
03-26-2018, 12:40 PM
I've just tried 64bit Arduino+Teensyduino on my Linux laptop - it is surprisingly much faster that the windows version on my main development desktop.
Sorry for OT, but that's another nail in the w coffin. I will likely switch to Linux once the project is stable. 95% of the programs that I use are either native to Linux (LibreOffice) or run clean under Wine (LTSpice, Diptrace, etc). Looking for a quality cross-platform CUA code editor with the itegrated version control and diff/merge support - currently evaluating Sublime Text.

tonton81
03-28-2018, 07:43 PM
hi paul, is it possible to add SPI_MSTransfer and Circular_Buffer to teensyduino
?

PaulStoffregen
03-28-2018, 07:49 PM
are these on github yet?

tonton81
03-28-2018, 07:52 PM
yes sir, they were designed and tested for teensy products, although the circular buffer worked on a mega2560 i tested today, id rather contribute it to pjrc community
the forum links are in the sources as well

https://github.com/tonton81

KurtE
04-07-2018, 07:07 PM
@Paul - Was wondering about current version of ADC that is part of the build? Looks different than @pedvide's...

Was thinking about trying to get a change put in... But not sure which sources...

In particular, had issues with test app, that tries to use ADC0/ADC1 with DMA and PDB...

I think at minimum the function void ADC_Module::stopPDB()
Needs to remove the trigger...


void ADC_Module::stopPDB() {
if (!(SIM_SCGC6 & SIM_SCGC6_PDB)) { // if PDB clock wasn't on, return
setSoftwareTrigger();
return;
}
PDB0_SC = 0;
PDB0_CHnC1 = 0; // Remove the trigger...
setSoftwareTrigger();

//NVIC_DISABLE_IRQ(IRQ_PDB);
}
There may be some other side effects of calling the StartPDB twice for the two channels... As they set or clear same registers...
Trying to figure out clean way to do...

marcmerlin
04-15-2018, 01:14 AM
I tested beta3 as you requested (over 1.41), and it didn't work at all for me, arduino IDE won't even start. Detail here:
https://forum.pjrc.com/threads/50525-problems-with-arduino-1-8-5-teensyduino-1-41-and-serial-on-linux-and-FastLED?p=175269&viewfull=1#post175269

defragster
04-16-2018, 07:16 AM
Paul: Any timeline idea for a Beta 4 update to TD 1.42?

I've been seeing a 'blip' in Teensy timing SerMon goes away ( TyComm or the 1.42:teensy_sermon repros. ) I need to make a simple sketch where I can reproduce it.

also - Teensy Question (T_3.6): Given: initial setup() when Serial exists and runs some time. THEN - normal loop() running: When Serial 'goes offline' and returns with stopping the teensy_sermon connect from IDE and then reconnecting.

>> Is there anything unique or special that would alter timing a 1ms or so? when running Teensy loses and regains Serial - as it generally seems seemless.
- is there a large hit from either the action of reconnecting, or perhaps the pushing of any buffered data?

It is the setup with MPU9250 IMU (@500 HZ) and GPS (@5 Hz) - the IMU gives interrupt on data ready and each 200 ms when GPS completes there are a couple lines to USB Serial - and at the time SPI is used with the SPI_MSTransfer to Teensy Slave. So I'll have to write a test to detect what the IMU sees as an issue - without IMU/GPU attached for it to be a sample to investigate if there isn't a simple answer, and hoping the Beta 4 TD 1.42 will be easier to work with - and I can test beta 4 then too.

AndyCap
04-16-2018, 03:48 PM
Hi There,

A bit of a problem here with the teensyduino 64 bit mac install and a newly installed and never executed Arduino 1.8.5, High Sierra doesn't like the arduino.app after teensyduino has patched it, see attachment.

Installing 1.85, running it once then updating with the teensyduino 64 bit dmg works fine.

I'm guessing this is some HS security issue with the app being modified before being executed.

Cheers

Andy

KurtE
04-16-2018, 04:08 PM
@AndyCap - It is mentioned in the download and install instructions: https://www.pjrc.com/teensy/td_download.html
Step #2 for MAC...

AndyCap
04-16-2018, 06:21 PM
@KurtE - So it is, I really should read these things. Sorry for the false flag :)

AndyCap
04-17-2018, 06:54 AM
Hi Paul,

Would you like to add a couple of new USB types to the next release, basically the Audio/Midi/Serial with RAWHid as well.

They seem to work fine and they are a combination that I think is pretty useful both for control and also for streaming another 64000 bytes/sec:



teensy36.menu.usb.serialmidiAudioHid=Serial + MIDI + Audio + RawHID
teensy36.menu.usb.serialmidiAudioHid.build.usbtype =USB_MIDI_AUDIO_SERIAL_RAWHID

teensy36.menu.usb.serialmidi16audioHid=Serial + MIDIx16 + Audio + RawHID
teensy36.menu.usb.serialmidi16audioHid.build.usbty pe=USB_MIDI16_AUDIO_SERIAL_RAWHID





#elif defined(USB_MIDI_AUDIO_SERIAL_RAWHID)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x048A
#define BCD_DEVICE 0x0212
#define RAWHID_USAGE_PAGE 0xFFAB // recommended: 0xFF00 to 0xFFFF
#define RAWHID_USAGE 0x0200 // recommended: 0x0100 to 0xFFFF
#define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME {'T','e','e','n','s','y',' ','M','I','D','I','/','A','u','d','i','o','/','R','a','w','H','I','D'}
#define PRODUCT_NAME_LEN 24
#define EP0_SIZE 64
#define NUM_ENDPOINTS 9
#define NUM_USB_BUFFERS 30
#define NUM_INTERFACE 6
#define CDC_IAD_DESCRIPTOR 1
#define CDC_STATUS_INTERFACE 0
#define CDC_DATA_INTERFACE 1 // Serial
#define CDC_ACM_ENDPOINT 1
#define CDC_RX_ENDPOINT 2
#define CDC_TX_ENDPOINT 3
#define CDC_ACM_SIZE 16
#define CDC_RX_SIZE 64
#define CDC_TX_SIZE 64
#define MIDI_INTERFACE 2 // MIDI
#define MIDI_NUM_CABLES 1
#define MIDI_TX_ENDPOINT 4
#define MIDI_TX_SIZE 64
#define MIDI_RX_ENDPOINT 5
#define MIDI_RX_SIZE 64
#define AUDIO_INTERFACE 3 // Audio (uses 3 consecutive interfaces)
#define AUDIO_TX_ENDPOINT 6
#define AUDIO_TX_SIZE 180
#define AUDIO_RX_ENDPOINT 7
#define AUDIO_RX_SIZE 180
#define AUDIO_SYNC_ENDPOINT 8

#define RAWHID_INTERFACE 6 // RawHID
#define RAWHID_TX_ENDPOINT 9
#define RAWHID_TX_SIZE 64
#define RAWHID_TX_INTERVAL 1
#define RAWHID_RX_ENDPOINT 9
#define RAWHID_RX_SIZE 64
#define RAWHID_RX_INTERVAL 1

#define ENDPOINT1_CONFIG ENDPOINT_TRANSIMIT_ONLY
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY
#define ENDPOINT3_CONFIG ENDPOINT_TRANSIMIT_ONLY
#define ENDPOINT4_CONFIG ENDPOINT_TRANSIMIT_ONLY
#define ENDPOINT5_CONFIG ENDPOINT_RECEIVE_ONLY
#define ENDPOINT6_CONFIG ENDPOINT_TRANSMIT_ISOCHRONOUS
#define ENDPOINT7_CONFIG ENDPOINT_RECEIVE_ISOCHRONOUS
#define ENDPOINT8_CONFIG ENDPOINT_TRANSMIT_ISOCHRONOUS
#define ENDPOINT9_CONFIG ENDPOINT_TRANSMIT_AND_RECEIVE


#elif defined(USB_MIDI16_AUDIO_SERIAL_RAWHID)
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x048A
#define BCD_DEVICE 0x0212
#define RAWHID_USAGE_PAGE 0xFFAB // recommended: 0xFF00 to 0xFFFF
#define RAWHID_USAGE 0x0200 // recommended: 0x0100 to 0xFFFF
#define MANUFACTURER_NAME {'T','e','e','n','s','y','d','u','i','n','o'}
#define MANUFACTURER_NAME_LEN 11
#define PRODUCT_NAME {'T','e','e','n','s','y',' ','M','I','D','I','x','1','6','/','A','u','d','i','o','/','R','a','w','H','I','D'}
#define PRODUCT_NAME_LEN 27
#define EP0_SIZE 64
#define NUM_ENDPOINTS 9
#define NUM_USB_BUFFERS 30
#define NUM_INTERFACE 6
#define CDC_IAD_DESCRIPTOR 1
#define CDC_STATUS_INTERFACE 0
#define CDC_DATA_INTERFACE 1 // Serial
#define CDC_ACM_ENDPOINT 1
#define CDC_RX_ENDPOINT 2
#define CDC_TX_ENDPOINT 3
#define CDC_ACM_SIZE 16
#define CDC_RX_SIZE 64
#define CDC_TX_SIZE 64
#define MIDI_INTERFACE 2 // MIDI
#define MIDI_NUM_CABLES 16
#define MIDI_TX_ENDPOINT 4
#define MIDI_TX_SIZE 64
#define MIDI_RX_ENDPOINT 5
#define MIDI_RX_SIZE 64
#define AUDIO_INTERFACE 3 // Audio (uses 3 consecutive interfaces)
#define AUDIO_TX_ENDPOINT 6
#define AUDIO_TX_SIZE 180
#define AUDIO_RX_ENDPOINT 7
#define AUDIO_RX_SIZE 180
#define AUDIO_SYNC_ENDPOINT 8

#define RAWHID_INTERFACE 6 // RawHID
#define RAWHID_TX_ENDPOINT 9
#define RAWHID_TX_SIZE 64
#define RAWHID_TX_INTERVAL 1
#define RAWHID_RX_ENDPOINT 9
#define RAWHID_RX_SIZE 64
#define RAWHID_RX_INTERVAL 1

#define ENDPOINT1_CONFIG ENDPOINT_TRANSIMIT_ONLY
#define ENDPOINT2_CONFIG ENDPOINT_RECEIVE_ONLY
#define ENDPOINT3_CONFIG ENDPOINT_TRANSIMIT_ONLY
#define ENDPOINT4_CONFIG ENDPOINT_TRANSIMIT_ONLY
#define ENDPOINT5_CONFIG ENDPOINT_RECEIVE_ONLY
#define ENDPOINT6_CONFIG ENDPOINT_TRANSMIT_ISOCHRONOUS
#define ENDPOINT7_CONFIG ENDPOINT_RECEIVE_ISOCHRONOUS
#define ENDPOINT8_CONFIG ENDPOINT_TRANSMIT_ISOCHRONOUS
#define ENDPOINT9_CONFIG ENDPOINT_TRANSMIT_AND_RECEIVE

tonton81
04-30-2018, 09:32 PM
Paul I found a bug in teensyduino 1.42b3 (this one), the loader is showing a picture of a T3.2, I'm using a T3.6 and a T3.5

:D

PaulStoffregen
05-07-2018, 12:41 PM
@Paul - Was wondering about current version of ADC that is part of the build? Looks different than @pedvide's...


I'd pulled in the latest ADC lib from github.

Yes, I'm *finally* getting around to 1.42-beta4, and hopefully soon a final 1.42 release....

PaulStoffregen
05-07-2018, 12:49 PM
found 18 [Eighteen ] copies of teensy_ports.exe

That's definitely a bug. The teensy_ports.exe program is supposed to check if any prior instance is running.

It's supposed to do this check by looking with WIN32 GetTcpTable() to check if any other copy is listening on 127.0.0.1 ports 28542, 4985, or 18925. If it can't load the GetTcpTable() function, it falls back to trying to actually connect to those ports (which is stupid slow on Windows to tell that no program on your own computer is listening... which is why I put the code in to do it with GetTcpTable). There very well may be a bug in that code. :(

I'm going to package up 1.42-beta4 with this stuff as-is. Please keep an eye out of this multiple teensy_ports.exe running. If it's still happening, I'll try building some copies that print a bunch of info about this checking. I'm not so good at reproducing Windows bugs here, so could really use help tracking this one down...