Teensyduino 1.42 Beta #3

Status
Not open for further replies.
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.
 
I do not know if this is already known.

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

2018-03-24 13_07_00-Start.png
 
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
 
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: View attachment Beta3_lostTports.zip

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?
 
Last edited:
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:

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

<edit> Just confirmed this behavior using posted StartPrint.ini

> 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'.
Jave_TportsExe_SPrt.PNG
 
Last edited:
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.
 
@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...
Code:
void ADC_Module::stopPDB() {
    if (!(SIM_SCGC6 & SIM_SCGC6_PDB)) { // if PDB clock wasn't on, return
        setSoftwareTrigger();
        return;
    }
    PDB0_SC = 0;
    [COLOR="#FF0000"]PDB0_CHnC1 = 0; // Remove the trigger...[/COLOR]
    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...
 
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.
 
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
 

Attachments

  • screenshot_494.png
    screenshot_494.png
    71.6 KB · Views: 158
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:

Code:
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.usbtype=USB_MIDI16_AUDIO_SERIAL_RAWHID


Code:
#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
 
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
 
@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....
 
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...
 
Status
Not open for further replies.
Back
Top