Jump to content
43oh

Does Energia support JTAG?


Recommended Posts

Hi Guys,

I am a senior at an university. I am working on my senior design project which requires us to design our own PCB. I have decided to use MSP430FR2311 as our MCU and RC522(RFID) for our project. Does Energia support JTAG instead of microUSB? If we purchase MSP PROGRAMMER AND DEBUGGER, can we use Energia to program codes into the MCU? The main reason I want to use Energia because there are codes available to be used, so it would save me tons of time to design the codes for RFID RC522. Thank you so much!

Link to post
Share on other sites

@NWholycow

I see no one else has answered.  So, I did a quick test with the new FET from TI as well as with one of my older FET430UIF devices.  Enegia 18 was able to connect and upload with the new FET but not the older. I suspect that to use a JTAG connection you will have to follow the new FET route as it presents a serial interface that Energia understands, the older FET is a CDC device, the new,  Debug interface appears to be using a different protocol from the older.  HTH

Bob

Energia Compile & upload output (to an F5529)

Sketch uses 28,006 bytes (21%) of program storage space. Maximum is 131,072 bytes.
Global variables use 534 bytes (6%) of dynamic memory, leaving 7,658 bytes for local variables. Maximum is 8,192 bytes.
DSLite version 6.2.1.1624
Configuring Debugger (may take a few minutes on first launch)...
    Initializing Register Database...
    Initializing: MSP430
    Executing Startup Scripts: MSP430
Connecting...
Loading Program: C:\Users\AppData\Local\Temp\build39e8811ca5a9aa51583fb9a1cdbacf87.tmp/TrTr.ino.elf
    Preparing ...
    .text: 0 of 31150 at 0x4400
    .data: 0 of 6 at 0xbdae: 99%
    .text: 0 of 128 at 0xff80: 99%
    Finished: 99%
    Setting PC to entry point.: 99%
info: MSP430:  There were 31278 (code) and 6 (data) bytes written to FLASH/FRAM. The expected RAM usage is 3678 (uninitialized data + stack) bytes.
Running...
Success

Link to post
Share on other sites
On 19. listopad 2017. at 7:28 AM, NWholycow said:

Hi Guys,

I am a senior at an university. I am working on my senior design project which requires us to design our own PCB. I have decided to use MSP430FR2311 as our MCU and RC522(RFID) for our project. Does Energia support JTAG instead of microUSB? If we purchase MSP PROGRAMMER AND DEBUGGER, can we use Energia to program codes into the MCU? The main reason I want to use Energia because there are codes available to be used, so it would save me tons of time to design the codes for RFID RC522. Thank you so much!

There is low-cost (14$) FR2311 LP with open (software / hardware) source and updatable eZ-FET Lite on board, with FR2311 as target. However, on-board eZ-FET Lite can program / debug also other off-board devices, by SBW, with removed jumpers between LP master and target section.

http://www.ti.com/tool/MSP-EXP430FR2311

If you don't want LP (because of some special reason), and to use a TI FET, that is not supported inside Energia, there is CLI tool MSP430-Flasher that can be called by Energia (on any OS), for downloading firmware. It is up to date and and support all TI tools.

http://www.ti.com/tool/MSP430-Flasher

I done this for my flasher without any problems, and MSP430-Flasher can be integrated on the similar way.

http://forum.43oh.com/topic/9337-where-do-i-find-the-script-that-runs-after-clicking-upload/

However, I don't know if your device (FR2311) is by default supported in Energia. This is not related to downloading firmware, that should work just fine.

 

Link to post
Share on other sites
On 10/20/2017 at 6:46 PM, NurseBob said:

@NWholycow

I see no one else has answered.  So, I did a quick test with the new FET from TI as well as with one of my older FET430UIF devices.  Enegia 18 was able to connect and upload with the new FET but not the older. I suspect that to use a JTAG connection you will have to follow the new FET route as it presents a serial interface that Energia understands, the older FET is a CDC device, the new,  Debug interface appears to be using a different protocol from the older.  HTH

Bob

Energia Compile & upload output (to an F5529)

Sketch uses 28,006 bytes (21%) of program storage space. Maximum is 131,072 bytes.
Global variables use 534 bytes (6%) of dynamic memory, leaving 7,658 bytes for local variables. Maximum is 8,192 bytes.
DSLite version 6.2.1.1624
Configuring Debugger (may take a few minutes on first launch)...
    Initializing Register Database...
    Initializing: MSP430
    Executing Startup Scripts: MSP430
Connecting...
Loading Program: C:\Users\AppData\Local\Temp\build39e8811ca5a9aa51583fb9a1cdbacf87.tmp/TrTr.ino.elf
    Preparing ...
    .text: 0 of 31150 at 0x4400
    .data: 0 of 6 at 0xbdae: 99%
    .text: 0 of 128 at 0xff80: 99%
    Finished: 99%
    Setting PC to entry point.: 99%
info: MSP430:  There were 31278 (code) and 6 (data) bytes written to FLASH/FRAM. The expected RAM usage is 3678 (uninitialized data + stack) bytes.
Running...
Success

Bob, 

Thanks for replying. Unfortunately, I just found out that Energia does not support FR2311 Luanch pad yet, so I think I will still need to stick with CCS. Or, is there any other ways I can get around with it? Thanks.

Link to post
Share on other sites

NWholyCow,

> I just found out that Energia does not support FR2311 Luanch pad yet
I was wondering about that...

> I think I will still need to stick with CCS. Or, is there any other ways I can get around with it?
If you mean to get Energia to work with a JTAG connection, I would have to guess not.  To use JTAG without the modern FET is not going to provide the virtual comm port that I suspect Energia expects.  Given that the FET creates a virtual comm connection for JTAG, it's clear it can be done, but the documentation from TI on how to connect and program via JTAG with a DIY FET is pretty complex.

Bob

Link to post
Share on other sites
17 hours ago, NurseBob said:

If you mean to get Energia to work with a JTAG connection, I would have to guess not.  To use JTAG without the modern FET is not going to provide the virtual comm port that I suspect Energia expects.  Given that the FET creates a virtual comm connection for JTAG, it's clear it can be done, but the documentation from TI on how to connect and program via JTAG with a DIY FET is pretty complex.

Bob

AFAIK, any LP is with virtual com port, that is not needed by Energia. I didn't noticed any Energia popup with something like "missing virtual com port", when there was no virtual com port available. As I allready noted, I don't see any problems related to downloading code by SBW with MSP430-Flasher by any LP. Problem is in missing Energia header / library files for unsupported devices.

Link to post
Share on other sites

> AFAIK, any LP is with virtual com port
Agreed.  The problem I found when experimenting was that the older FET-UIF is identified in Windows Device Manager's Ports entry as a CDC device (MSP-FET430UIF - CDC), where the LP devices have a pair of virtual comm ports - MSP Application UARTx  and MSP Debug Interface.  When I attempted to load a program via Energia to a FET-UIF, it was unsuccessful.  Are there ways around this? Well given your assembler experience, I would assume yes.  Would it be a simple interface? Likely not.

However, I do remember this article, which might provide an alternative route for the OP, assuming he/she can figure out how to add the board to Energia.

http://43oh.com/2011/11/tutorial-to-use-your-launchpad-as-a-programmer/

Link to post
Share on other sites
12 hours ago, NurseBob said:

Agreed.  The problem I found when experimenting was that the older FET-UIF is identified in Windows Device Manager's Ports entry as a CDC device (MSP-FET430UIF - CDC), where the LP devices have a pair of virtual comm ports - MSP Application UARTx  and MSP Debug Interface.  When I attempted to load a program via Energia to a FET-UIF, it was unsuccessful.  Are there ways around this? Well given your assembler experience, I would assume yes.  Would it be a simple interface? Likely not.

You just need to edit configuration (text) files, and then Energia will call external CLI application (MSP430-Flasher) for downloading code. Interface between TI FET an target device will be handled by MSP430-Flasher that will automatically detect connected FET, not by Energia anymore. Downloading code will be done by upload button on original / unmodified Interface, simple as it is. It is all explained here, but instead my flasher, command line parameters for MSP430-Flasher should be used.

 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...