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.

DK-TM4C129X: TIVA TM4C129X fimrware upgrade using SD card

Part Number: DK-TM4C129X

Hello,

Is it possible to do firmware upgrade on TM4C129X using SD card? I programmed the TM4C129 to be an embedded web server. I am able to transfer files using the browser from my PC to the TM4C129X and store these files in an SD card. My idea is to transfer the bin image and store in the sd card. And then from there, upgrade the firmware of the TM4c129. I did some digging and found a user's guide on boot loader but I did not see anything that pertains to SD card. Has anyone done something like this? Any ideas or place where I could start? 

Thanks

AJ 

  • Hello AJ,

    We don't have an exact example for that, but this question has been raised before. This post has a concise summary of what resources you can look into leveraging for this application: e2e.ti.com/.../1974707

    I would recommend starting there, and as you go through the materials in the TI design that is mentioned in that post, let us know if you have any questions.
  • Hi Ralph,

    Thank you for the response. I looked at the linked you provided and it gave me some insights. However, I prefer not to use and external SDRAM.  I have already successfully transferred my bin file from my PC to the sd card in the DK-TM4C129X using an http browser. Now all I got to do is get the contents of the bin file and write it to flash. Could you provide me with any "write to flash" examples I could start from? The example does not need to have any SD card implementation.  I am able to open any file in the sd card and get contents. I just need to know how to program flash directly.

    Thanks. 

    Regards,

    AJ 

  • Hello AJ,

    I would say look into the boot_demo_flash example in TivaWare for the DK-TM4C129X. That one is written for Ethernet, UART, or USB, but you can replace that with the SD card interface and leverage the rest of the example.
  • Hi Ralph,

    Thanks, I started looking at some of the demo examples. I just have a few questions. How is the bin file different from a hex file? I mean I understand the difference between bin and hex but inside a bin file whenever I do a read using FATfs, only a 1 and 0 is returned? Could you please enlighten me on how this binary file works. Does TI have any documentation on how to use a binary file, the format inside etc? 

    Thanks

    Regards,

    AJ 

  • Hello AJ,

    I think those formats are not specific to TI, so I am not so sure we would have specific documentation. In any case, those questions are best directed to our Code Composer forums as this forum is for TM4C device questions and not really general compiler/programming questions which fall outside of our expertise.
  • Hi Ralph,

    Thanks for the input. I ahve another question. I might be going about this the wrong way but let me tell you my idea so far based on what I have read. I looked at the application with the SDRAM and the usb_stick_update demo and the boot flash examples. It looks like for me make this happen, I'll have 2 separate projects. One project is the boot loader which will have the FATfs and SD card implementation which will read the sd card and the routines to write to flash. And then I have a second project which would be the actual application with an offset starting flash address as indicated in the linker cmd file. The usb stick update gives me the perfect boot loader template.

    A bit of a background on the application. I programmed the TM4C129X to be an embedded web server. It's using TI RTOS, NDK, and the FATfs drivers included in the TI RTOS package. I am able to transfer files from my PC using a web browser to the sd card. I am able to do this transfer with the bin file. So that's the application.

    Now the question is, can I implement the boot loader program with TI RTOS? And the reason is that I already have the file read, write implementations that I have done in the application project. I also notice that without TI RTOS, working with FATfs seems more difficult. Using TI RTOS is so straightforward. I have already got all the FATfs set up. Furthermore, I plan to implement a terminal menu just like how it's done in the SDRAM project that you suggested. This means that I'll be using Hwi and Swi for UART but this is just for testing. The final project won't have this terminal access. I figured doing it this way shouldn't matter because I have the boot loader running on a separate memory spaces. Anyway, I am not sure how this would work or if this makes any sense. It's like I have SYS_BIOS running on the boot loader program and then there will be a jump to the application once the upgrade is finished and the application also has SYS_BIOS running. What are issues that may arise from this? Any thoughts? Has anyone done this?


    Thanks.
    AJ
  • Hello AJ,

    From what I can see, there has been multiple users who implemented a boot loader with TI RTOS successfully. You can do some E2E searches to see some info along those lines.

    If after some searching you have specific questions you'd like an RTOS expert to answer, please make a new thread and we can pull in the TI-RTOS team as needed to assist.
  • Hi Ralph,

    Once again, thank you for your response. My team just decided a change in direction. We've decided to do away with the SD card boot loader but instead use ethernet based. I saw a bunch of flash based examples. But is there a ROM based example for the DK-TM4C129X? I suppose I'll just open a new post for this and mark your suggestions answered 

    Regards,

    Albert