Forum Rule: Always post complete source code & details to reproduce any issue!
Page 17 of 18 FirstFirst ... 7 15 16 17 18 LastLast
Results 401 to 425 of 426

Thread: Teensyduino 1.55 Beta #1

  1. #401
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    7,548
    Quote Originally Posted by KurtE View Post
    Paul - follow on to the above posting about not seeing crash report...
    Here is a stupid simple sketch:
    Code:
    #include <LFS_MTP_Callback.h>
    #include <MTP.h>
    #include <SDMTPClass.h>
    #include <Storage.h>
    #include <USB_MSC_MTP.h>
    
    void setup() {
      while (!Serial && millis() < 5000) ;
      Serial.begin(115200); 
      Serial.print(CrashReport);
    
      Serial.println("Enter something to go boom");
      while (Serial.read() == -1);
      uint8_t *ptr = 0;
      *ptr = 99;
    }
    
    void loop() {
      
    }
    Compile it with MTP as USB type.

    Open up Serial Terminal... Nothing will display
    Enter something... It will reboot after the 10 seconds... Again nothing shows up...

    EDIT: Note I am running on Windows 10...
    Have not tried on Ubuntu yet... Note: MTP code can run on Ubuntu... Will talk more about that on appropriate therad.
    @KurtE - trying to catch up on things and since I have pretty much the same library configs as you do I ran your test sketch. Hit the enter and waited - closed the serial monitor and reopened it and
    Code:
    CrashReport:
      A problem occurred at (system time) 19:55:16
      Code was executing from address 0xF0
      CFSR: 82
    	(DACCVIOL) Data Access Violation
    	(MMARVALID) Accessed Address: 0x0 (nullptr)
    	  Check code at 0xF0 - very likely a bug!
    	  Run "addr2line -e mysketch.ino.elf 0xF0" for filename & line number.
      Temperature inside the chip was 47.69 C
      Startup CPU clock speed is 600MHz
      Reboot was caused by auto reboot after fault or bad interrupt detected
    Enter something to go boom
    if I don't do the close/open it just sits showing the OFFLINE at the top of the monitor. This is with a T4.1 using your modified MTP Disk Serial.


    Using MTP Disk I get the same behavior that you describe in your post!!!

  2. #402
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    25,028
    Quote Originally Posted by KurtE View Post
    Paul - I am not sure any of this is something you may want to tackle during this release cycle. Only cases I can potentially see would be if you thought that the USB Descriptor for MTP could be improved...
    Is there any way to reproduce the no response after Serial.begin() using only USB Type "MTP Disk (experimental)" without including any extra libraries other than the ones from the Teensyduino installer?

    I tried uploading a basic CrashReport print with USB Type "MTP Disk (experimental)". At least on Ubuntu 20 it prints properly. Didn't try Widnows or MacOS, but can if needed.

    If the only way to reproduce the problem involves use of libraries not yet integrated & bundled with the installer, then I definitely want look into that during the 1.56 betas, but not have it delay a 1.55 stable release.

  3. #403
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    25,028
    Just to be clear, if the problem can be reproduced without any extra libraries, I want to take a quick look and see if it's something I can address quickly. Any decision whether to fix it for 1.55 will really depend on how complicated the problem looks.

    My goal is for 1.55-beta3 by the end of the weekend, rolling up the many recent fixes and about a dozen more I'm going to do soon. If even more fixes and changes are made, I guess we may have a 4th beta. But I really want to wrap up a stable 1.55 release in about 1 week.

    Diving into a complex problem or attempting any fixes that have substantial changes would not be a good path towards getting 1.55 wrapped up next week.

  4. #404
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    15,068
    Compiling code below as "MTP Disk (exp)' with as shown - no headers included.

    It works "as expected" from IDE and IDE SerMon, but not TyComm. TyCommander still sits in the 2nd while with short off flash - something about it seeing the USB to connect - so not a PJRC issue.

    So ignoring TyComm ... it works with IDE and Teensy SerMon.

    However in getting there I got the DUAL LED Flash once. This was IDE and T_SerMon. Seems I had done a Button Push when it triggered to Restart the sketch. It seems the red may precede the Orange ... ever so slightly ... maybe just a device voltage issue? Seems I reported the opposite before? Last lasts some few seconds of Dual Blink then stops.

    Any how a few more compiles and Button pushes and no repeat.

    Code:
    #if 0
    #include <MTP.h>
    #include <SDMTPClass.h>
    #include <Storage.h>
    #include <USB_MSC_MTP.h>
    #endif
    void setup() {
      pinMode( 13, OUTPUT );
      digitalWrite( 13, 1 );
      while (!Serial && millis() < 5000) {
        delay( 50 );
        digitalWrite( 13, 0 );
        delay( 200 );
        digitalWrite( 13, 1 );
      }
      Serial.begin(115200);
      digitalWrite( 13, 0 );
      while (!Serial ) {
        delay( 250 );
        digitalWrite( 13, 0 );
        delay( 50 );
        digitalWrite( 13, 1 );
        // if ( Serial.available() ) break;
      }
    
      Serial.print(CrashReport);
    
      Serial.println("Enter 'x' to go boom");
      int cc;
      while ( -1 == (cc = Serial.read()));
      if ( 'x' == cc ) {
        digitalWrite( 13, 0 );
        uint8_t *ptr = 0;
        *ptr = 99;
      }
      Serial.println("Enter and see Echo ...");
    }
    
    void loop() {
      if (Serial.available()) {      // If anything comes in Serial (USB),
        Serial.write(Serial.read());
      }
    
    }

  5. #405
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    15,068
    Quote Originally Posted by KurtE View Post
    @defragster @Paul @mjs513...
    ...
    improved...
    My MTP one is slightly modified from the current ones in builds. Mainly the order of the Interfaces...

    I changed it to be closer to that of Audio...
    ...
    @KurtE - is that an added usb_desc.h entry needing an edit to boards.txt menu for selection?

    When using that does the TyComm see the Teensy? Here the current MTP experimental TyComm as noted it fails to connect - it 'sees' it - but won't connect until Host sends..

  6. #406
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    25,028
    Regarding the code from msg #393

    Quote Originally Posted by KurtE View Post
    Try removing all header files except MTP.h...
    I'm running it here on Ubuntu 20.04 with the latest code. Can't reproduce the problem. It always prints the CrashReport info.

    Click image for larger version. 

Name:	screenshot.jpg 
Views:	12 
Size:	102.9 KB 
ID:	25799
    Last edited by PaulStoffregen; 09-11-2021 at 11:35 AM. Reason: typo

  7. #407
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    25,028
    Ok, I've *finally* caught up to this huge thread!

    @Defragster - Is there any more info about problem on msg #330? Maybe this was continued on the 1.55-beta2 thread?

  8. #408
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    7,548
    Quote Originally Posted by PaulStoffregen View Post
    Regarding the code from msg #393



    I'm running it here on Ubuntu 20.04 with the latest code. Can't reproduce the problem. It always prints the CrashReport info.

    Click image for larger version. 

Name:	screenshot.jpg 
Views:	12 
Size:	102.9 KB 
ID:	25799
    Just tried running the sketch with all the headers commented out except for MTP.h and using MTP Disk (Experimentatl) and crash report is not printing on a Win10x64 machine.
    Click image for larger version. 

Name:	Capture.jpg 
Views:	14 
Size:	132.3 KB 
ID:	25800

  9. #409
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    9,559
    @Paul, @mjs513 - I verified that Ubuntu will print out the Crash of that test case.

    Note: MTP I don't believe is installed by default on Ubuntu:
    At least I believe to get any of it to work on it, I believe I needed to do: sudo apt-get install mtp-tools
    Or maybe you might use other installs to install libmtp...

    I have done limited testing with MTP on Ubuntu and more or less none on MAC. More later on this part...

    But related to this issue, I believe that Ubuntu times out the MTP init real short! That is with my earlier testing, if we tried to get the used space of SDCard it would time out and nothing would work... Again more later.

    I just wanted to mention that I tried the same striped down sketch on Ubuntu. only I added one line just before printing the CrashReport:
    Serial.println(millis(), DEC);

    And in my test run after the crash: it printed: 807

  10. #410
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    25,028
    Ok, I'm setting up my Windows 10 test machine now.

    Is including MTP.h really necessary to reproduce the problem?

  11. #411
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    9,559
    Quote Originally Posted by PaulStoffregen View Post
    Ok, I'm setting up my Windows 10 test machine now.

    Is including MTP.h really necessary to reproduce the problem?
    Actually not sure, probably not... Just building with USB type of MTP Disk is probably sufficient.

  12. #412
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    25,028
    Ok, tried it first the lazy way with no MTP.h included.

    Click image for larger version. 

Name:	capture8.png 
Views:	13 
Size:	350.0 KB 
ID:	25802

  13. #413
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    25,028
    Are you sure you really do have this patch in your core library?

    https://github.com/PaulStoffregen/co...b805ae572db6a0

  14. #414
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    7,548
    Quote Originally Posted by PaulStoffregen View Post
    Are you sure you really do have this patch in your core library?

    https://github.com/PaulStoffregen/co...b805ae572db6a0
    At least for me - no didn't have that patch in the core for beta2. Just added it and re-ran it with MTP.h included. It worked. Seemed to come up faster as well:
    Click image for larger version. 

Name:	Capture.PNG 
Views:	10 
Size:	48.0 KB 
ID:	25803

  15. #415
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    25,028
    Ok, pulled in the latest MTP_t4 library and copied it over to the Windows 10 machine. Uncommented include MTP.h.

    Same thing, still can't reproduce the problem. It prints a non-CrashReport every time I upload. And if I type something and send, it reboots after several seconds and always prints a CrashReport.

    Click image for larger version. 

Name:	capture9.png 
Views:	11 
Size:	304.9 KB 
ID:	25804

  16. #416
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    9,559
    Yes that does appear to help!
    Click image for larger version. 

Name:	screenshot.jpg 
Views:	11 
Size:	66.2 KB 
ID:	25805

  17. #417
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    25,028
    Glad it's working better now!

    I'd much rather be playing with filesystems and MTP right now... but I really do need to keep focusing on fixing the remaining code security GUI lockup bugs and the fuse (re)write bug and hopefully the issue Tim found in msg #330 (which I can't decipher how to recreate from that message) and several other relatively boring bugs.

    Fixing Serial.begin() and any other problems where Serial.print() isn't working to the serial monitor is a high priority for 1.55. I know everyone's excited about MTP. I am too. But this is as close as I can get to MTP until after stable 1.55 is released.

    Maybe it's about time to close this first beta thread and continue any bugs I should try to fix for 1.55 on the second thread?

  18. #418
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    9,559
    Paul - Thanks!
    Note: we still have the issue with adding in the MTP Disk Serial
    USB Type.

    Which is not part of the build:

    With this you need to install his(WMXZ) or my version of the patches:
    That is by adding the stuff to boards.txt or instead put them in local.boards.txt such that you don't have to redo them each time we install.

    Also then needed to add in the patches for Teensy4... usb_desc.h into cores...

    Then when program runs it comes up if you open up the Serial Monitor. If you then enter something it crashes:
    The terminal monitor stays up, but in disabled state.
    If you close the window and reopen it, then the data shows up...
    At least most of it... That is you get the first part, but if there was lots of data output you get the first part and then it skips the rest...

    Click image for larger version. 

Name:	screenshot.jpg 
Views:	12 
Size:	59.7 KB 
ID:	25806

    Click image for larger version. 

Name:	screenshot2.jpg 
Views:	12 
Size:	65.0 KB 
ID:	25807

    But probably not something we need to deal with for this release.

  19. #419
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    25,028
    Definitely not adding another USB type or changing USB descriptors this close to a stable release!

  20. #420
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    9,559
    Quote Originally Posted by PaulStoffregen View Post
    Definitely not adding another USB type or changing USB descriptors this close to a stable release!
    Totally agree! Question is more is it worth investigating why it leaves the Serial Terminal disabled.

  21. #421
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    15,068
    Quote Originally Posted by PaulStoffregen View Post
    Ok, I've *finally* caught up to this huge thread!

    @Defragster - Is there any more info about problem on msg #330? Maybe this was continued on the 1.55-beta2 thread?
    This hasn't happened again - and not noted on Beta 2 thread.

    I have not tried building from TSET again yet and that was the 'cause' for some reason the CmdLine exec that normally works for builder { As FrankB extracted from Console and I've evolved in TSET } was missing something.
    Code:
    Clearing Verbose and building again this is the content from Teensy Loader.
    It seems stuck on THIS file from a failed build under TSET: t:\temp\arduino_build_MakeCode.ino\, MakeCode.ino.hex
    Will see about trying TSET again after reviewing console lines for changes to arduino-builder. Here is the current batch file line (broken to fit screen):
    Code:
    echo Building Sketch: %ino%
    "%arduino%\arduino-builder" -verbose=1 -warnings=more -compile -logger=human -hardware "%arduino%\hardware" -hardware "%LOCALAPPDATA%\Arduino15\packages"
     -tools "%arduino%\tools-builder" -tools "%arduino%\hardware\tools\avr" -tools "%LOCALAPPDATA%\Arduino15\packages" -built-in-libraries "%arduino%\libraries" -libraries "%libs%"
     -fqbn=%fqbn% -build-path %temp1% -build-cache "%temp2%"  %ino%
    
    Not sure if missed a change in any of that? TSet works best and with TyCommander - but @koromix added a -Param to defer to Teensy Loader for Upload when it isn't integrated into the IDE - as is the case now with Secure builds.

    When the first attempt did this I went back to suffering the IDE editor ... and having it crash after rebuilds of large Code4Code. Did a few the other day and it worked, then I did a 'new sketch' for KurtE's tiny "MTP" issue and that crashed it to CLOSED and had to restart.

  22. #422
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    15,068
    Quote Originally Posted by PaulStoffregen View Post
    Are you sure you really do have this patch in your core library?

    https://github.com/PaulStoffregen/co...b805ae572db6a0
    Here I had not pulled the Patch for USB_seremu.h in testing the MTP stalling

    I just did that patch and USB=MTP now Win 11 x64 Pro works with IDE t_SerMon! Same as it worked when building USB=Serial.

    Waiting while(!Serial) Still fails to connect with TyComm on MTP - though removing that in prior code like : while (0 && !Serial ) {
    Does have it work and print. Somehow Serial not going True 'Only with TyComm' - but ignoring that continues and works to print and run.

  23. #423
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    9,559
    Quote Originally Posted by KurtE View Post
    Totally agree! Question is more is it worth investigating why it leaves the Serial Terminal disabled.
    Paul, As mentioned I believe the MTP Disk with Serial Should Wait and if deemed appropriate that it it get its own PID and not take over the Everything one...

    Simple follow on to what I and @mjs513 mentioned about, having to close the Serial Monitor window and Re-open it... And you get the start of the debug output, but not... So slight change of the sketch I showed:
    Code:
    #include <MTP.h>
    
    void setup() {
      while (!Serial && millis() < 5000) ;
      Serial.begin(115200);
      Serial.println(millis(), DEC);
      Serial.print(CrashReport);
    
      Serial.println("Enter something to go boom");
    }
    uint16_t loop_count = 0;
    void loop() {
      if (Serial.read() != -1) {
        uint8_t *ptr = 0;
        *ptr = 99;
      }
      Serial.printf("Loop Count: %u\n", ++loop_count);
      delay(250);
    }
    If you run it with the USB Type of MTP (in build) it now shows the fault and continues to show the data...

    If you do it with the version not in build that uses Serial instead of Serial emulation, it will leave terminal offline ... And when you restart it, it shows the initial stuff, but then stops output ...
    And you see a gap in output:
    Code:
    7001
    CrashReport:
      A problem occurred at (system time) 12:12:13
      Code was executing from address 0x88
      CFSR: 82
    	(DACCVIOL) Data Access Violation
    	(MMARVALID) Accessed Address: 0x0 (nullptr)
    	  Check code at 0x88 - very likely a bug!
    	  Run "addr2line -e mysketch.ino.elf 0x88" for filename & line number.
      Temperature inside the chip was 43.80 C
      Startup CPU clock speed is 600MHz
      Reboot was caused by auto reboot after fault or bad interrupt detected
    Enter something to go boom
    Loop Count: 1
    Loop Count: 2
    Loop Count: 3
    Loop Count: 4
    Loop Count: 8
    Loop Count: 9
    Loop Count: 10
    Loop Count: 11
    Loop Count: 12
    Loop Count: 13
    Loop Count: 14
    Loop Count: 15
    Again something that maybe be looked at when you have free time...

  24. #424
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    15,068
    Quote Originally Posted by KurtE View Post
    Paul, As mentioned I believe the MTP Disk with Serial Should Wait and if deemed appropriate that it it get its own PID and not take over the Everything one...

    Simple follow on to what I and @mjs513 mentioned about, having to close the Serial Monitor window and Re-open it...

    Again something that maybe be looked at when you have free time...
    For MANY uploads I was impressed with IDE SerMon reconnecting - I meant to note that if I didn't when it was in exclusive use.

    The code I've been running hasn't shown a trend I recognized - since often now using TyComm for multiple Teensys, But I have seen some instances as noted where SerMon shows offline when Teensy is running - and it comes back with a Close and Open of IDE SerMon.

  25. #425
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    25,028
    Quote Originally Posted by KurtE View Post
    Question is more is it worth investigating why it leaves the Serial Terminal disabled.
    Only if the problem is reproducible with the USB types and libraries which will be in 1.55.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •