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.

TM4C: FW-Update and File-/Data Exchange via USB

Other Parts Discussed in Thread: SW-TM4C, SEGGER

Hello

I'd like to connect my device (a TM4C or MSP432 with external Memory such as SD-Card or serial EEPROM) to a PC for two reasons:

Some portion of the external memory of my device shall be accessible from a PC file manager as a drive and

1. the FW-Update shall be possible by copy/paste the new application (e.g. hex-file) onto this drive, 

    subsequently a (boot-)loader checks and installs this new application from the external memory to uC-internal Flash area.

2. one/some file(s) of simple format (e.g. csv, txt) can be read, written and deleted using the file manager, 

    these files are readable by the uC and are used to define some of its behavior.

The external Memory is not accessible, e.g. SD-Card cannot be removed.

My device will have a graphic LCD with GUI, so some guidance to the end user is possible to properly conduct a FW update (if needed). 

The idea is similar to the mbed-approach, but I do not know which extra HW and FW is involved.

Is any of the LaunchPads (e.g.EK-TM4C123G) suitable (after adding an EEPROM) to test implementation of my concept?

Which sample projects may I use to begin with?

  • Hello Thomas,

    Thanks for the detailed post, I understand your requirements well.

    Based on your description, especially as you mention the LCD and SD Card, I would actually suggest something beyond the LaunchPad for your evaluation: www.ti.com/.../DK-TM4C129X

    That board has built in support for an LCD and SD Card already, and you will have plenty of open pins to add in the EEPROM as well.

    In comparison, neither of our LaunchPad's have SD Card support built-in.

    From a pure LPad perspective if the DK is a bit too much for you, then I would recommend the www.ti.com/.../EK-TM4C1294XL as that device series is much closer to the TM4C129X family which has a LCD controller peripheral. Furthermore that LaunchPad has twice as many pins broken out so you can add in all the different features you are looking at.

    From a sample project side, you should start by downloading TivaWare from our SW-TM4C page and then work through relevant examples. Like the DK-TM4C129X board has a project 'sd_card', as well as boot loader examples, and multiple USB examples.

  • Hello Ralph

    Thanks for your answer.

    After some more research I discovered some helpful keywords to the subject.
    Now I see two approaches to the FW-update idea:

    A) extra HW (already existing for selected uControllers)
    OpenSDA (v2) with virtual MSD (mass storage device, e.g. an EEPROM) and Bootloader. Programming of new FW through drag&drop.
    Pro: low risk if update fails
    Con: no solution at hand for the TM4C. Any match in the internet points to Segger & mbed and target devices of NXP/Freescale or ST.
    (probably) target device cannot access the same EEPROM (?)


    B) no extra HW (nothing yet found)
    The target devices provides itself the MSD function and the Bootloader. The Bootloader must assure that the new FW file is not corrupt.
    Con: high risk, since a failing update will screw operation and future backups entirely.
    Bootloader with extra functionality must probably be designed from scratch.
    Pro: lower cost and some SW components possibly off-the-shelf available (TivaWare, ..?)

    So far, I do not know what to do. There is absolutely no need for debugging/JTAG, the question is all about comfortable easy-to-do FW update.

    Regards, Thomas
  • Hello Thomas,

    It probably won't come as a surprise to you as you already commented that there is no solution at hand for TM4C, but I had not heard of the OpenSDA option before.

    What you describe in B) is a fair encapsulation of the pros and cons of the Flash and ROM Boot Loaders offered with TivaWare. Software availability depends on how many features you want to add into your boot loader, if you are fine using what is provided in TivaWare then it is very much off-the-shelf.

    As noted, the risk is what happens if the firmware download fails, and the severity of the risk depends on what will be updated. As long as the boot loader is not overwritten, then the risk is that multiple updates are needed, while if the boot loader is overwritten then the risk is that the device would need to be JTAG accessed to restore operation. So long as the boot loader is untouched, then the risk is much lower. For example, there can be means to verify the download is intact such as chucksums (which as you identified, would need to be designed to fit your system).

    I would say though that I don't feel TivaWare boot loader's are high risk. We don't suffer from repeated complaints of boot loader interruptions plaguing devices/systems. Also I am not sure where the backup idea comes into play, so hard to comment about the risk on that.

    At the end of the day, boot loader requirements are system specific, and you will need to assess what works best for you. I am not in a position to say what you should do. For the TI side with TM4C devices, TivaWare provides a free resource for an affordable MCU to support basic boot loader functionality and allows for more advanced functionality to be crafted via software improvements.

    I hope this commentary helps with your discovery of the right solution for your application. If you were looking for any specific details I didn't offer up, please feel free to follow-up.
  • Hello Ralph

    After more research I found a good summary of what I asked for on the page https://github.com/ARMmbed/DAPLink. An increasing number of controllers are supported by now, unfortunately none of TI, and at last "open" appears to get open which seemed not to be the case with OpenSDA. Quote "DAPLink runs on a secondary MCU that is attached to the SWD or JTAG port of the application MCU". I haven't got the required knowledge to include a new controllers (my choice would be the TM4C...).

    Remark:

    In chapter 9.5 "TivaWare Boot Loader User's Guide" references a file named "bl_fs.c". I could not locate this file anywhere, nor is a description included in chapter 9.5. This file, if it existed, might contain what I need? Is its development pending? Anyone interested in offering this neat feature?

    We can close this dialog. Thanks again!

    Thomas

  • Firm/I found this poster's objectives & analysis (mostly) 'well-thought.'      But for the (most always FATAL) ... 'There is absolutely no need for debugging/JTAG.'

    Poster then further notes  ... ' the question is all about comfortable easy-to-do FW update.'     And that, 'Comfort - Convenience - Robustness - Predictability - and Universality'  -  proves (very much) -  JTAG/SWD's,  "Raison d'être."

    During development - the regular use of 'JTAG/SWD' is guaranteed - and even beyond (after the board's are sold/released) - the ability of  the JTAG Port to provide 'vital insight' into MCU (even board) functionality - makes its use 'uber valuable'  -  and (in the eyes of  SO MANY) ABSOLUTELY  MANDATORY!

    It should be noted that poster's 'Find & Reporting' of  'Open SDA'  IS  (both) thanked & appreciated -  yet might it be 'TOO SOON'  ...  to ' FORCE JTAG/SWD - TO WALK THE PLANK!?'       (i.e.  Has enough time - and focused  study/effort  elapsed - to enable 'experts' - to uncover any/all 'Ticking Time-Bombs' - which so often - accompany such 'Novel & Advanced' Developments?     Has ALL 'Errata' been 'uncovered, analyzed & corrected' - and  none 'NEW to arrive' guaranteed?)    Really?

    [edit] ...  From poster's language,  'recent research' - it was assumed that  'Open SDA'  was  (fairly)  'New to the scene.'     Yet - that's not true -  it was reviewed in 2012 - and to the best of my (and others') knowledge - has NOT gained a major following nor foothold!    (now - 6 years later...)    His expanded search then located 'DAPLink' - he noted, 'An increasing number of controllers are supported by now' - yet that number (although <slightly> increasing) is STILL 'minuscule'  - and the continuation of this project has received 'less' (even uncertain) support from ARM.    (post the acquisition by  Softbank - as reported w/in the electronic press...)    It would appear that poster has invited  'Much Additional Time/Effort/Cost'  -  in exchange for (pardon) a ' far from certain' - and  ' known/justifying' return...

    Working fairly regularly w/Venture Capitalist (VC) firms - I would (surely) ask,  'Has this expert  (money where their mouth is) group - ' Bought into - and Welcomed - either of these new, approaches?     And like our poster - Forced 'JTAG/SWD - OVER THE SIDE!?'   (such provides a  ' most necessary - very well qualified - AND 'highly weighted'  yet essentially  (neutral) * input'  (always critical) - does it not?)

    The claim of 'No need' ... pardon 'Absolutely NO need' - seems very much 'High Risk' - while offering NO REWARD!       'KOOL-AID' - no matter how 'tasty' - should be (well) probed/examined  (maybe 'aged') - prior to 'over-consumption!'

    *   assumes the VC firm has not 'acquired'  (nor is in-process) of investing w/such firms.     (U.S. Federal Regulations exist (i.e. 'quiet periods') to quell such fears...)

  • There is indeed some more precious information and insight to this topic and about UF2 bootloaders available

    from MakeCode in https://makecode.com/blog/one-chip-to-flash-them-all and 

    from Adafruit in https://learn.adafruit.com/adafruit-feather-m0-express-designed-for-circuit-python-circuitpython/uf2-bootloader-details and once more for reason of completeness

    from ARM in https://github.com/ARMmbed/DAPLink

    Anyone talented enough to develop such UF2 bootloader for the TM4C ?

    Thomas

  • Hi Thomas,

    Thomas Gay said:
    In chapter 9.5 "TivaWare Boot Loader User's Guide" references a file named "bl_fs.c". I could not locate this file anywhere, nor is a description included in chapter 9.5. This file, if it existed, might contain what I need? Is its development pending? Anyone interested in offering this neat feature?

    I am honestly not sure where that comment comes from. I went back into prior TivaWare and even StellarisWare releases and couldn't find such a bl_fs.c file.

    It is not being developed, I will note down that it should be removed from the User's Guide.

  • Hello Ralph,

    Dare it be asked - does (even) 'precious information' and/or solicitation for 'talent' - (somehow) constitute, 'This RESOLVED my ISSUE?'
    Has the forum 'given up' - trying to properly describe - what  'Issue Resolution' actually  is/involves?