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

Thread: Teensy 4.0 - is programmable / debuggable with Atmel Studio 7 ?

  1. #1
    Junior Member
    Join Date
    Aug 2019
    Posts
    6

    Teensy 4.0 - is programmable / debuggable with Atmel Studio 7 ?

    Are Teensy 4.0 cards usable, via usb, in connection with the Atmel Studio 7 environment?
    Is there any documentation to configure the development environment?

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,576
    No, Atmel Studio is not supported.

  3. #3
    Junior Member
    Join Date
    Aug 2019
    Posts
    6
    Are other programming environments supported?
    Other debuggers?
    How to run a step-by-step debug?
    How to see the program variables?

  4. #4
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,734
    AFAIK:

    > Only 'supported' development environment is Arduino IDE

    > A valid HEX file created for the MCU and hardware on the Teensy can be uploaded using the TeensyLoader and bootloader chip.

    Paul has indicated in the past when Arduino comes out with a debugging method it will be supported as possible.

    Also - Paul has provisions and ideas for debug support on T_3.6 and 3.5 and perhaps Teensy 4 - but they are not high priority as to date it seems nothing that is Teensy has needed hardware or other debugger support beyond what it can do at present with I/O and .print() feedback.

  5. #5
    Junior Member
    Join Date
    Aug 2019
    Posts
    6
    "... as to date it seems nothing that is Teensy has needed hardware or other debugger support ..."
    Ehhhh ????
    It seems to me that the only thing really missing is support for a jtag / swd programmer / debugger
    If a single operator has created it, I think it would be very simple for PJRC designers to create an interface for the classic Seeger debugger or similar
    And that's the only way to get the flow of the program under control
    I purchased a teensy 3.5 and a 4.0 with the intention of experimenting with the possibilities
    And given the potential of the cards, it seems really incredible that it would be impossible to program and debug at the level of the single line of code
    The Arduino ide does not allow to proceed quickly nor to check what happens during the program flow, it is not an environment to use if the requests are beyond the classic 'hello world'

  6. #6
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,734
    Quote Originally Posted by amorosik View Post
    "... as to date it seems nothing that is Teensy has needed hardware or other debugger support ..."
    Ehhhh ????
    ...
    … meant in its development to date - hardware creation and published library code ...

    Others have gotten access to debug signals and utility as documented around for sure … but supporting it or standardizing it would not be with Arduino support which is the defining core of how Teensy works … until as noted Arduino decides what that would be ...

  7. #7
    You can always get a IMXRT eval board or any number of other Cortex-M boards if you want to play with the more traditional microcontroller dev environments and explore things like JTAG debugging. There are little Cortex-m4 boards with the bare essentials on a small breadboard footprint on Amazon for like $7. The whole point of Teensy and other Arduino boards is that they just work out of the box. The IDE isn't 10GB, and it doesn't take a professional to blink an LED. Thrres good library availability and community support.

    There's only so much Teensy-specific development time available. I'm glad Paul devotes it to keeping Teenayduino simple and functional rather than letting scope creep take away that beginner friendliness.

    I almost get the impression that some Teensy buyers think the chip itself is custom silicon. It's just an off the shelf microcontroller on a breakout board with some excellent software and firmware. If you want to use a Teensy with a custom bootloader and professional IDE I don't really get why you'd buy a Teensy at all.

  8. #8
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    533
    There are a lot of alternative IDEs out there.
    • If you want something running out of the box you can give Platform.io a try.
    • Defragsters/FankBs TSet (search in the forum) works with any decent editor.
    • If you want more control you can have a look at VisualTeensy https://forum.pjrc.com/threads/57245...t=visualteensy. Just for fun (I think HW debugging it is overrated anyway) I recently added debugger support to it, works nicely with a T3.5 / T3.6 but you need to modify the board (see linked thread)
    • Theremingenieur and others use Eclipse which to my kowledge also has debugging support (still needs the HW modification..)

    So, a lot of options available but be aware that you'll be on your own if you leave the well trodden paths.

  9. #9
    Here is why I want to connect an SWD debugger to the Teensy 4.0. I want it for a future product in which the user would be able to install new firmware via the Teensy loader program on their PC, Mac or Linux machine, via a USB cable:

    https://www.pjrc.com/teensy/loader.html

    This Teensy ability is extremely valuable, and I think would be very difficult to create myself.

    I will be using the MCUXpresso with GCC (C++ mainly) and GDB for debugging. I haven't done this yet, and I haven't yet received my Teensy 4.0. I have an inexpensive debug adaptor, the LPC-Link2, which would plug into the PC running MCUXpresso. It has two headers of interest: one for SWD debug and the other for trace, which I only partically understand, but which I would like to use as well.

    https://www.nxp.com/design/microcont...-link2:OM13054

    With the Teensy 3.6, I understand that the pins needed for SWD debug were available as pads, but that it was necessary to either remove the 16 pin MKL02 microcontroller, to free the pins from being driven, or to reset it by grounding its pin 15. Several people did the latter way, as I did with some fancy soldering - but I never tested it.

    https://mcuoneclipse.com/2017/04/29/...swd-debugging/

    https://forum.pjrc.com/threads/42728...064#post170064


    In another thread here the technicalities of SWD debug connection to the Teensy 4.0 are being discussed. It looks more difficult than with the Teensy 3.6.

    https://forum.pjrc.com/threads/57365...-jtag-debugger

  10. #10
    Um - I have been using MS Visual Studio (from v2015 to now v2019) along with VisualMicro) for several years for all my Arduino work.

    Now T4 (as do other Teensies) is working pretty good with VS/VM. I think the secret may be in VisualMicro (a software debug system- http://bit.ly/2ZoTkD8 - QUITE GOOD!) has you enter the micro-controller IDE location info which then gets integrated into VS. I love the Intellisense that VS provides. VS debug system is just a simplified "Serial.print" action, but does make adding and removing breakpoints quite easy. NOT a hardware debugger for sure - but if all it does is open up MS Visual Studio - def worth while!

  11. #11
    Senior Member CorBee's Avatar
    Join Date
    Jun 2018
    Location
    Netherlands
    Posts
    257
    I am using PlatformIO in MS Visual Studio Code for some time to program a Teensy 3.6 and I have seen that support for the teensy 4.0 has been added recently:
    http://docs.platformio.org/en/latest...eensy-teensy40

  12. #12
    Hey - Have not heard of PlatformIO - will def check it out - THANKS!

Posting Permissions

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