This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Universal boot loader

Other Parts Discussed in Thread: ENERGIA, SEGGER

I have been using the JTAG with a small header on my boars to program my Tivas. This method is far from optimum so I started to look at the boot loader.

I discovered there are many types of boot loaders for the Tiva depending on the development system being used.  My goal is to have  a  hardware and software solution that I can drop into my projects to implement the boot loader in various flavors. In my opinion the simplest way to do this is to use the Tx0 and RX0 for the loader and interface on the Tiva side and  a USB to serial adaptor or a Bluetooth to serial interface or a ethernet to serial interface. All these interfaces can reside on a small adaptor board I am going to design. On the software side I want to be able to use LM Flash Programmer and Energia to download the software to my boards. 

This brings me to my first question: does LM Flash Programmer and Energia expect the same boot loader on the Tiva? 

If not, where can I find the Energia boot loader code. I found Andruino boot loader for the AtMega chips but I cannot find the Energia one.

I will be adding details to this post as I complete   the design. I have already defined a 14 pin header with all the JTAG signals, reset, ground, +3.3V, Tx0 and Rx0. Pins 3,5,9 and 13 will be ground.

thanks

  • Hello Claude,

    I am not sure about Energia, but the boot loader guide for TM4C12x devices are clear in terms of expectations of the boot loader that comes wrapped in the TivaWare release. Normally the JTAG debuggers do not have a provision for UART COM pins. It would be good if you can move it out of this header and onto another header.

    Regards
    Amit
  • Bravo Amit - our small tech group fully supports your directive. (and noted same - but hoped that you'd provide "official" alert.)

    Poster's attempt at "Universal" may not be wise. That's a very high hurdle - desire must (sometimes) match experience, investment, capability...
  • Hello Amit, I agree with you, I am mixing a few things, JTAG and serial boot loader.  I did break just the serial to a seperate header.

    Over the weekend I completed the layout of my boot loader interface board, it has a wifi access point/client to serial interface, a USB to serial interface with a FTDI chip and a Bluetooth to serial interface, all selected by dip switches. The JTAG pins are sent to a separate connector. I will be able to use JTAG for development and the boot loader for production. I also did some initial testing and Energia (on my Mac) sees the FDTI serial port, LM Flash Programmer on my Windows PC sees the Bluetooth serial interface. I noticed that LM Flash can use the ICDI interface found on the LaunchPad or a serial UART, I am hopping Energia will also be able to use the UART. I think Energia offers a significant time advantage in simple applications as compared to programming with a C compiler.

  • Hello Claude

    I am not a real expert at Energia. May be Luis Afonso can be great help here

    Regards
    Amit
  • What do you suggest to replace the unwise attempt at "Universal"?
    What is the "official" alert?
    Regards
    Claude
  • Simply avoid the use of "universal" - it's certain someone, somewhere will delight in finding an "exclusion." (and from the legal standpoint - the "gratuity" of "universal" proves unwise - too often expands your liability...)

    Some would note that the (so) limited "Energia" seems (so) miscast/improper - when combined with, "Universal."

    Amit's writing noted the improper signal inclusion - which you've (now) rectified...

  • I do not mind changing the Post name to Multi interface boot loader.

    So far on the Tiva side I am using ROM_UpdateUART(), very simple to implement. The USB to serial interface work well with LM Flash Programmer but the Bluetooth dongle is giving me trouble (as expected) not a Tiva issue. I have to find a better dongle.
    The limited but fast and simple Energia is expecting an ICDI interface, I does work with my expanded header JTAG pins.
    My question now is the source code for the ICDI interface available from TI ?
  • ClaudeArpin said:
    is the source code for the ICDI interface available from TI ?

    NO!   As reported (1000 times) here, unfortunately not...

    Good progress otherwise - and thank you for "accepting" not "attacking" my gentle suggestion...    (note that you can - perhaps should - edit thread's title)

  • Hello Claude,

    No, the source code is not available for ICDI.

    Regards
    Amit
  • ICDI counter ++;     // holding ICDI code "secret" counter - now reaches 1,001     (PF0/PD7 (unwanted NMI default) counter - currently unavailable...)

  • cb1_mobile said:

    ICDI counter ++;     // holding ICDI code "secret" counter - now reaches 1,001     (PF0/PD7 (unwanted NMI default) counter - currently unavailable...)

    Near to overflow....and counting!!

  • Thank you, Sir - for so noting... (crack staff - perhaps (now) roused from "REM sleep" - promise to find - then present requested, 2nd forum counter...)
  • I would suggest a standard JTAG adapter is

    • a) cheaper per board (no additional micro required for ICDI)
    • b) more capable and flexible

    Really, stay away from vendor specific interfaces and extensions, they are a honey trap

    Robert

  • Robert Adsett said:
    I would suggest a standard JTAG adapter...

     

    But then we come back to the "UNIVERSAL" problem...there is no way to unlock the Tiva device with any JTAG.

  • It's not something, I've had an issue with (maybe because I dedicate the JTAG?). What does it take to lock/unlock?

    I was under the impression the unlock was through the SWD which is available on the standard JTAG lines and on the standard adapters (at least the adapters I use).

    Robert
  • Looks like my memory is correct, from the manual for my adapter

    "Unlocking LM3Sxxx devices

    If your device has been "locked" accidentially (e.g. by bad application code in flash which mis-configures the PLL) and J-Link can not identify it anymore, there is a special unlock sequence which erases the flash memory of the device, even if it can not be identified. This unlock sequence can be send to the target, by using the "unlock" comnmand in..."

    Robert

  • Robert Adsett said:
    I was under the impression the unlock was through the SWD which is available on the standard JTAG lines

    Raise that to "two" under such impression.

    Note that - to my best (and current) knowledge - this vendor has not (yet) fully incorporated SWD into its operations.

    Our small tech firm has often "unlocked" via use of a, "Segger" (black) J-Link in concert w/Segger's (free) program.   (there are many)

    As we work w/multiple ARM MCUs - remaining "vendor agnostic" is of great importance.    Gaining added - and more precise control - so much the better!

  • Some way/how I cannot "edit" the above.

    If the "ICDI" - via FTDI or this vendor - is "imposed" between the target MCU and the external SWD signal source - you are (almost surely) stuck!

    The method we (always) employ exposes the 2 SWD pins directly to the J-Link - we avoid (like the plague) those (lesser) ICDI handicaps...