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

Status
Not open for further replies.

amorosik

Member
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?
 
Are other programming environments supported?
Other debuggers?
How to run a step-by-step debug?
How to see the program variables?
 
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.
 
"... 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'
 
"... 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 ...
 
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.
 
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-VisualTeensy-upgraded-to-support-Teensy-4-projects?highlight=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.
 
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/microcon...c-microcontroller-utilities/lpc-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/modifying-the-teensy-3-5-and-3-6-for-arm-swd-debugging/

https://forum.pjrc.com/threads/42728-Debugging-strategies?p=170064#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-Teensy-4-0-how-to-connect-a-jtag-debugger
 
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!
 
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/boards/teensy/teensy40.html#board-teensy-teensy40

My son set me up on platformio with atom. I was amazed at how much more I could get done, vis-a-vis the Arduino IDE, on a Teensy 3.2. When the Teensy 4.0 came out, I redesigned my board for that (lots more rpms under the hood for a few pennies more), but I haven't been able to get the platformio.ini to recognize it.

[env:teensy40]:
platform = teensy
board = teensy40
framework = arduino

It worked fine with:

[env:teensy31]
platform = teensy
board = teensy31
framework = arduino

Scratching my head.
 
Status
Not open for further replies.
Back
Top