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.

How to boot from SPI FLASH on a custom board

There have been a number of discussions on this forum on how to get the SPI FLASH loaded correctly for the EVM boards.  These have helped, but I still have questions on how to make it work on a custom PCB.  I'll describe what we are doing today, and see if there is an easier way.

Intro:  Using CCSV4.2 with DSPBIOS 5.41.  DSP = C6748 rev 2.0 silicon.  Boot mode = SPI1 Master FLASH

 

Step #1:  Make an .out file.

Step #2:  Use the AISgen utility.  This allows you to setup the PLL's, PSC, DDR2, etc.  It is important that these setting match your GEL file.  The DSP Application File is obviously the .out file from Step #1.  We set the AIS output file to "C Header file", and call it aisout.h.

Step #3.  Save the AISgen configuration so it is easier to load next time we need to change anything.  We call it ais.cfg.

Step #4:  Press the "Generate AIS" button to generate the aisout.h file.

Step #5:  Invoke the c6000 compiler from the command line:  "cl6x -fc=aisout.h".  This generates a .obj file called aisout.obj.

Step #6:  Invoke the c6000 hex converter from the command line:  "hex6x" -o flash.hex -m2 -romwidth 8 -datawidth 8 -memwidth 8 -map eprom.map aisout.obj"

Step #7:  Using an EPROM programmer(with flash.hex), program our SPI FLASH part.  Actually we have this outsourced to another company does the programming.  But the bottom line is they need something to load into their programmer that is "industry standard".  Motorola-S Format is understood by many chip programming machines.

 

Question #1:  When using the AISgen utility, most of the forum discussions have the output set to "AIS binary".  Is there an easier way to generate an AIS binary file, and then program that into SPI FLASH?  Basically, do you know of programming devices that can accept your AIS binary as an input?

Question #2:  One of the forum discussions about AISgen, noted that setting up the PSC may not work correctly.  If you attempt to enable 8(SATA) under PSC1, it won't work because this needs to be "forced".  Does the current AISgen tool correctly enable 8(SATA) on PSC1?

Question #3:  If the AISgen tool doesn't configure 8(SATA) correctly, can we simply leave it not enabled?  We don't use the SATA.

Question #4:  One of the command line options used for hex6x is datawidth.  I can't find datawidth mentioned in any documention, nor does it show up under the DOS help for hex6x.  I think this may be left over from a previous DSP we used (C6421 or C5416).  If datawidth is a valid option, can you please describe what it does?

Thanks, Dean

  • Dean Hofstetter said:
    Step #2:  Use the AISgen utility.  This allows you to setup the PLL's, PSC, DDR2, etc.  It is important that these setting match your GEL file.  The DSP Application File is obviously the .out file from Step #1.  We set the AIS output file to "C Header file", and call it aisout.h.

    Generally speaking the reason to use the header file output is if you have some other processor in your system that will be loading the 6748, e.g. through HPI.  I do not recommend using this output mode for SPI boot.

     

    Dean Hofstetter said:

    Step #6:  Invoke the c6000 hex converter from the command line:  "hex6x" -o flash.hex -m2 -romwidth 8 -datawidth 8 -memwidth 8 -map eprom.map aisout.obj"

    Step #7:  Using an EPROM programmer(with flash.hex), program our SPI FLASH part.  Actually we have this outsourced to another company does the programming.  But the bottom line is they need something to load into their programmer that is "industry standard".  Motorola-S Format is understood by many chip programming machines.

    Whoa -- you took a wrong turn there.  Don't do that as it will never work.

     

    Dean Hofstetter said:
    Question #1:  When using the AISgen utility, most of the forum discussions have the output set to "AIS binary".  Is there an easier way to generate an AIS binary file, and then program that into SPI FLASH?  Basically, do you know of programming devices that can accept your AIS binary as an input?

    Use the "AIS binary" mode.  It's just a straight up binary output.  I would expect many programmers to be able to support such a format.  It's not really even a format -- just a straight binary image of what should be written to flash byte by byte.

     

    Dean Hofstetter said:
    Question #2:  One of the forum discussions about AISgen, noted that setting up the PSC may not work correctly.  If you attempt to enable 8(SATA) under PSC1, it won't work because this needs to be "forced".  Does the current AISgen tool correctly enable 8(SATA) on PSC1?

    No, it won't work in the AISgen tools. This ultimately is a limitation in the ROM code so it will likely not be fixed.  It's generally no big deal though.

     

    Dean Hofstetter said:
    Question #3:  If the AISgen tool doesn't configure 8(SATA) correctly, can we simply leave it not enabled?  We don't use the SATA.

    You should not enable any peripherals that you don't use.  It's a waste of power.

     

    Dean Hofstetter said:
    Question #4:  One of the command line options used for hex6x is datawidth.  I can't find datawidth mentioned in any documention, nor does it show up under the DOS help for hex6x.  I think this may be left over from a previous DSP we used (C6421 or C5416).  If datawidth is a valid option, can you please describe what it does?

    Don't use hex6x -- it shouldn't come into the equation for this scenario.  If you really need S record format just Google "binary to S record converter" and there's plenty of utilities that can do the deed.

  • Brad,

    Thanks for all the feedback.  Boy did we ever make this process more complicated than necessary.  The steps(1-7) I have list above, does indeed work.  The FLASH programmer reads the Motorola S-format HEX file, and pulls out the binary info to program.  So only the binary image is programmed, not all the S-format stuff.

    However, I agree with you "binary" output from AISgen is the way to go.  We are verifying with the programming house they can handle straight binaries.

    As far as the C6748 ROM not handling PSC enable for SATA, I would note that in future versions of AISgen.  Don't allow users to populate 8 into PSC1 enable.  I would also tell them that if they need the SATA, they'll need to PSC enable it from their application.

    Thanks, Dean

  • Dean Hofstetter said:
    The steps(1-7) I have list above, does indeed work.

    Wow, I can't believe you were able to make that work!!!  You could probably win a Rube Goldberg contest with that procedure! ;)

     

    Dean Hofstetter said:
    As far as the C6748 ROM not handling PSC enable for SATA, I would note that in future versions of AISgen.  Don't allow users to populate 8 into PSC1 enable. 

    I had already initiated conversations on that topic with the team that maintains the tool.  I believe that's exactly what they have planned.