Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 5 of 5

Thread: troubleshooting code which crashes before setup()

  1. #1

    troubleshooting code which crashes before setup()

    I have code here: https://github.com/quarterturn/teens...ne/tree/master which compiles with no errors on Arduino 1.8.8 yet apparently crashes on my Teensy 3.6. I can't get a Serial.println() or even an LED blink out of it.

    I'm using the audio library and have an 'ambitious' amount of waveforms and envelopes - 16 each. I've tried a number of different audio memory settings without success. Other programs using the hardware (Blackaddr audio adapter) and my library "AudioEffectEnsemble" work fine.

    Is there anything else other than commenting out stuff until it works again? I have a J-Link Segger EDU (which I'm a novice at using) - could it be used with the Teensy 3.6?

  2. #2
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,961
    Not seen any external debug support. The closest thing is enabling the FAULT handler - I did that and started a library debug_t3 that I dropped a zip on forum in the past - more than once. Then I started mods for T4 so current stuff is possibly wacked and so few faults and early USB issues I didn't ever finish it.

    One of the ZIP's if a search finds it as a library might break in - but so early USB will be offline and I forget what support it had for UART output. When I do that I put a second Teensy on that UART and then using TyCommander for SerMon use that Teensy with an ECHO sketch to get stuff to USB SerMon.

    If that sounds interesting and you find a posted zip and link me to the post I can see if it can be configured to work to spit out some info that helps.

    Dying that early may be a CPP class constructor if there is anything odd like that doing stuff on startup? Maybe a DEBUG or other compile option sometimes re-orders stuff and that works IIRC - but don't recall what option is best for that

  3. #3
    Quote Originally Posted by defragster View Post
    Not seen any external debug support. The closest thing is enabling the FAULT handler - I did that and started a library debug_t3 that I dropped a zip on forum in the past - more than once. Then I started mods for T4 so current stuff is possibly wacked and so few faults and early USB issues I didn't ever finish it.

    One of the ZIP's if a search finds it as a library might break in - but so early USB will be offline and I forget what support it had for UART output. When I do that I put a second Teensy on that UART and then using TyCommander for SerMon use that Teensy with an ECHO sketch to get stuff to USB SerMon.

    If that sounds interesting and you find a posted zip and link me to the post I can see if it can be configured to work to spit out some info that helps.

    Dying that early may be a CPP class constructor if there is anything odd like that doing stuff on startup? Maybe a DEBUG or other compile option sometimes re-orders stuff and that works IIRC - but don't recall what option is best for that
    I went around commenting-out and bypassing things and couldn't make it work so I went back to my 4-voice synth (which I know works, added in the balibrary.h, swapped in the WM8731, added my ensemble effect - aaaaand it works.

    So only thing left is my using an array of pointers to audio objects so I don't need huge case statements. I'll go back to case statements I guess and see if that works. the 4-voice synth uses case statements.

  4. #4
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,961
    Good luck. Arrays of pointers can easily cause trouble. Hopefully rebuilding it will get it working.

  5. #5
    Quote Originally Posted by defragster View Post
    Good luck. Arrays of pointers can easily cause trouble. Hopefully rebuilding it will get it working.
    Sigh. Nope it was not the array of pointers. I re-wrote it with case statements and it still doesn't work. OK I will see if my 4-voice code works with 8 voices. I'd be satisfied with that.

Posting Permissions

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