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.

CCS/AM3352: Program spl.bin by CCS

Part Number: AM3352


Tool/software: Code Composer Studio

Hi experts,

I created a project in CCS to program SPI flash in my board, for now I was able to write and read data back.

Is it possible to open the spl.bin file in my project, then program SPI flash with it? I think i should be able to write the spl.bin file to SPI flash, I just want to know whether this is feasible or not? Is there any other things to pay attention to, e.g. little endian or big endian, etc?

Thanks

Chris

  • By feasible, I want to know if this is the right path or not?
  • Chris,

    >>Is it possible to open the spl.bin file in my project, then program SPI flash with it?
    By that you mean having your project automatically import the .bin file directly at compile time? Or you mean using a console prompt to specify the file and send it?

    If the first option, what I have seen (and done) is to convert the .bin directly to a C-syntax .h file and include it in the project. That is somewhat easy to do but it requires a third party utility.

    If the second option, the TI compiler that comes with CCS features a complete Console I/O functionality that allows you to use printf(), scanf(), fopen(), fread(), etc. This way you could load your SPI flash application to the target and then prompt the user to pass the filename to the application running on the target.
    processors.wiki.ti.com/.../Tips_for_using_printf


    If the spl.bin is an executable (and not the data to be flashed), then CCS is able to program target devices using .bin files - in the case of AM335x devices, you should be able to write directly to their RAM by using the Memory Read/Write feature. Details are:
    processors.wiki.ti.com/.../MemoryRawLoadSave

    Hope this helps,
    Rafael
  • Hi Rafael,

    Thanks for helping, my application is the second case.

    The spl.bin was generated by "make u-boot" with the processorSDK, I think it's the data to be flashed, is that right? By the way, how can I generate an executable spl.bin? when will it be needed?

    Thanks
    Chris
  • Chris,

    >> I think it's the data to be flashed, is that right? By the way, how can I generate an executable spl.bin? when will it be needed?
    It's been a while since I built u-boot from the Processor SDK, therefore the experts at the Sitara forum would be able to provide more knowledgeable answers, but I found the document below that talks about how to build and use the SPL binary file:

    processors.wiki.ti.com/.../Linux_Core_U-Boot_User's_Guide

    Hope this helps,
    Rafael