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.

Designing custom bootloader for an LM4F over the CAN bus to interface with custom Windows service application.

I am working on an LM4F232 using CSS.  I am building what we call a monitor.  It has aspects of what StellarisWare refers to as bootloader, but it also provides FW checks and low-level HW test.  The monitor interacts with a custom Windows application that is used by field technicians.  This custom app support a growing number of internal and third-party hardware platforms.   'LM Flash Programmer' is not an option. 

I have reviewed the bootloader example and pdf.  They do not indicate the Stellaris Bootloader approach will work for me.

What I hope to do was to tell the monitor program that it has FLASH from 0x0000-2FFFF (or 12 KB somewhere) and that the target application has memory 0x3000-end, or the remaining 244KB on the LM4F232.  The monitor would get the flash image over the CAN bus 1K at a time, erasing and flashing the image.

Working with CSS, it would seem I could make changes in my lm4f232h5qd.cmd and make the above happen.  But it looks like the interrupt vectors are a problem.  As both the monitor and target application use interrupts, this is a problem.  Also, just changing the FLASH base in the cmd file seems to get you into the weeds on first interrupt.

Both monitor and target application will be using common source code, but the monitor will be burned at our factory, never to be changed again.  It can be expected that the ISRs will diverge over time.  So I cannot expect to reference the same ISRs.

Would there be an example of doing what I am trying to do?  Or advice?

  • John,
    The solution we use for that is to actually keep three FLASH pages:
    1- The actual firmware
    2- An update candidate
    3- The last good firmware (backup)
    Main application receives updates during their normal operation, and copies it to the candidate page. The bootloader, on it's next call, copies the "old firmware" into the "backup", and the "candidate" into "main". Doing that, all your interrupts and relative memory locations remain working fine.
    Of course this reduces a lot the available flash size. You could also do a two-page scheme, but if the new firmware is bad and bricked, there is no going back without some sort of "recovery access".
    Rgds
    Bruno
  • Let the record show that poster Bruno - once more (twice today)  - harks back to (nearly) 5 year old post.
    It is doubtful that this old post too - arrived front/center - this forum - "magically..."  One suspects that you've implemented a "search" - and that those search results (now) invade & dominate your screen...

    And - I've (now) discovered your mechanism for, "Opening the flood gates to the past!"    Quite clearly - you've ticked the forum selection box seeking, "Unanswered Questions!"   It is normal/customary that, "Most recent questions" is selected instead - which would prevent those (long deceased) posts from "reanimating...

    This selection box appears close to forum top - shown is the "default" post selection.      One Bruno encountered is "not" a default selection...

  • Having f.m. "on my side" today, saying that he as well saw at least one old question... makes me believe I did not unintentionally change the search settings...

    But then again, I can't prove it even to myself.

    What "ticking" do you refer to? My interface looks kind of the image below:

    Cheers

  • Re-read my earlier posting. You've (clearly) ticked "Unanswered questions & discussions." (or nearby ghost was the culprit...)

    While poster f.m. is a great & valued forum friend - such report (which I cannot find) calls into question the suitability of his "lens prescription."

  • I did read.
    I had just interpreted "ticked" for being a selection box, as opposed to a drop-down.
    But none matters - it was definitely the ghost - he escaped from my vacuum cleaner this morning.
    :)
  • For those interested - here is a screen shot - rather clearly - revealing how poster Bruno brought "retired" posts to "new life."

    You'll note that each of those "ancient posts" appear front/center - but ONLY when, "Unanswered Questions & Discussions" has been ticked/selected.     To motive - "harvesting old, unanswered posts" proves one easy means to add to forum totals. ..   

    And - to be complete - we find NO RECORD whatsoever of poster f.m. supporting this, "Reanimation of long dead/buried posts!"    Might you direct us to such f.m. writing?