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.

TI RTOS Application Over The Air Updation



I have implemented a tracker device using the SIM Com Module SIM 968 and TI TM4C123G device using simple C code which is most of the time asleep and wakes up when required, executes separate functions for collection of position coordinates,  uploading them to remote server, reading readings off sensors and processing them.  I am able to download any data using GPRS/EDGE using the GSM module.

below is what I intend to do newly,

I want to add functionality to my device in such a way these functions can be improved remotely after deployment. For e.g.


I want to write 4 different processors / threads (I dont know much about which one I should use) for the four main functions in  the C code that the TI ARM chip executes. Should I need to change one function remotely after deployment,  I need to be able to stop the current process and start a new process whose code / or bin file just downloaded from the server to the tracker device. The tracker device will may be check for updates once a day.

Through this method, I wish to implement a method to continuously improve the functionality of my device (through updates) even after deployment. Of course, I understand this is a risky job. I know things can turn bad and system may stop working, but this work is a part of research conducted in a university and I am supervised to implement this method rather than hard-cording all functions into the MCU flash.
I understand it can lead to a failure or a success, however I want to try this.


Is this possible with TI RTOS?

I would so much value all your replies and time.

  • Hello Amalinda,

    I have not done it in a RTOS environment but having a simple boot loader at 0x0 is possible, which can fetch in a new image to a non 0x0 location (at multiple of page boundary) and then jump to it. The key would be to jump to the boot loader when a new image is to be downloaded, and the interface communication for the boot loader with the modem

    Regards
    Amit
  • Dear Amith,

    Thank You for your response and it sounds like a good idea.
    So would the new handlers  (new images ) directed by the new boot loader be stored in an external flash memory? In that case, what happens to the existing image?  What is the least size of an update image provided my code is about 100 times the code of a simple blinky? (okay may be a little more than that)

    However I do not like the idea of updating the whole system (or the whole existing system image) just because I want to update certain modules in it. For example, I wish to keep a process that always keeps checking for any new SMS messages present on the M2M device. If there are any new, it takes some actions. Suppose I only want to provide and update to this process, how do you suppose I use TI RTOS? Does TI RTOS support such updation mechanisms? Or is there a way around this? If there is kindly let me know.

  • Hello Amalinda,

    It is not required to be stored in an external flash. The image is stored in a SRAM buffer and then programmed to the internal flash. Before programming the internal flash the existing image is erased if it is required to be in the same location. You can chose it to be in another region of Flash but would need some mechanism like EEPROM to tell the boot loader which image is a valid image to pick up. The Application Code can then erase the older Image.

    The TI-RTOS AFAIK, does not support device specific boot loaders though one can be coded in it. It would be an overhead for the whole code. to have RTOS as the boot loader. I have done blinky and some other functional code as Application Images, so size can be larger.

    Regards
    Amit
  • Dear Amith,

    Thank You for clarifying my problem. But you seemed to have missed something I really need answered.  I understand that user applications can be run on the TI RTOS.

    I am more focussed on updating / changing user applications that run on top of TI RTOS.

    Where can these applications be stored?


    Once deployed, does TI RTOS allow writing to the internal flash memory so that I can save new user software in the internal flash on the MCU? How do you advice I go about full filling my requirement to update these user software that could run on TI RTOS?


    I am new to TI RTOS and is following a series of tutorials published by TI to make my self acquainted  with the system, so any basic input is more than welcome.

    Thanks.

  • Hello Amalinda,

    I did understand the issue in the first place. You have to know that the TI-RTOS uses interrupts during task scheduling, and the boot loader requires the Interrupts be disabled so that Flash update operations are done. What you can do is to build the boot loader application (on the same lines as a non RTOS boot loader) which can be called by RTOS and used for updating the application.

    Regards
    Amit
  • Hello Harry,

    have you been successfully able to implement this?

    I am trying something similar, and I am not sure where to start.

    Can you help me?

    Regards
    Shashank
  • Harry,
    I might have misunderstood, but are you trying to replace "just a certain task" inside your TI-RTOS compiled code?
    If that is what you meant, that is not impossible but highly difficult and unlikely to be manageable in the long run. You would require lots of compile directives to place each function on a known location - in the end, it will simply fail.
    But if that's not what you are saying - you need to replace the whole program code - and the suggestions Amit described are exactly right on. Take a look at this post for a different description:
    e2e.ti.com/.../2104170
    Regards
    Bruno
  • You may have better success w/poster "Harry" by vectoring here:

    e2e.ti.com/.../572705

    Harry's last appearance - this forum - December, 2014!     Link just provided reveals his presence - yet another of this vendor's forums - w/in past 3 days...