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.

TM4C1294NCPDT: SD Bootloader with Petit file system

Part Number: TM4C1294NCPDT

Trying to get SD bootloader working with Petit file system on TM4C1294 part. The bootloader is working in raw form when just exiting Updater(). However, if I link the Petit function pf_mount() in my code, with all code in the function pf_mount() commented out, my program jumps to the wrong place during reset and does not go to ResetISR().

Even more strange, I can call disk_initialize(), outside pf_mount(), from Updater() and the bootloader works up to this point. Something must be trashing the interrupt vector table, but not sure where/how.  I've tried increasing the stack size, etc, but no change and can't seem to get past this. Wonder if anyone has been able to get a SD bootloader working with the TM4C1294 parts? Any help or advice would be greatly appreciated.

Best Regards,

Bob Starr

  • Update, further progress. It appears the bootloader does not reset properly after flashing or in the debugger. If I exit the debug session and manually reset the processor, it now seems to be executing the code in Updater(). Still don't have a successful firmware update, but more progress at least. Just have to resort to blinking LED's as the debugger not much help with boot loaders and relocating code. Will post more updates when I'm able to get a successful firmware update from SD.

    Regards,

    Bob Starr

  • Hello Bob,

    Robert Starr said:
    Update, further progress. It appears the bootloader does not reset properly after flashing or in the debugger. If I exit the debug session and manually reset the processor, it now seems to be executing the code in Updater().

    That behavior may depend a bit on how the boot loader is setup and what is triggering the boot loader.

    Did you start from any TivaWare projects? Or want to post any code you think could be the problem so I can have a look?

    I'm not too familiar with SD card operations so based on the information here I don't have a lot of insight to offer based on your latest progress.

  • Hi Ralph,

    Thanks for the reply. I'm not able to get the debugger to work up to the point before the code relocates as the ResetISR() jumps somewhere crazy when running in the debugger. But, if I flash the code and reboot I'm able to toggle some LED's and see how far things are getting along now at least. It appears I'm finally making some progress for the moment. I'm trying to get the SPI configured properly now and fighting this. I'll report back soon one way or the other. I'll be glad to post all the code if I can get it working to help others. Seems like flashing from SD would be highly desirable for a lot of people wanting to do updates in the field. Wish TI would have included this as a build option in the boot loader code. Will report back soon, thanks again for the reply.

    Best Regards,

    Bob Starr

  • Hi Bob,

    Honestly this is only the second time in a few years I've heard this request come up... not sure if that is just because we aren't offering though.

    Though speaking of that, there was a TI design that was recommended regarding SD cards as well, Amit (former Guru) talked about that here for another customer who was looking into that functionality: https://e2e.ti.com/support/microcontrollers/other/f/908/p/354781/1974707#1974707

    Boot loaders definitely can be tricky to debug. If you are doing a ResetISR it is probably breaking the connection to the debug chain. Have you tried reconnecting to the target after that point? Maybe if you have a button you can have boot loader spin until you hit the button and then try and reconnect to the target, press the button to break from the loop, and execute boot loader code with the debugger working that way?