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.

Are there any sample code of secondary bootloader for C674x DSP?

Other Parts Discussed in Thread: TMS320C6747, OMAPL138

Here is the text in sprabb1c.pdf: "Using the TMS320C6747/45/43 Bootloader":

With a total of 15 address lines (EMA_A[12:0] and EMA_BA[1:0]) of EMIFA, only 32 KB of NOR Flash can
be accessed by the bootloader. If boot image is longer than this, a secondary bootloader is required that
can access more data from NOR Flash by managing higher address lines of NOR Flash using generalpurpose
input/output (GPIO) pins or some other mechanism.

So it seems that I need to create two AIS files, one for the secondary bootloader, one for my application. The bootloader in ROM load the secondary bootloader and run it. The secondary bootloader needs to read the AIS bytes of my application in flash memory with GPIO pins and do the samething as the bootloader in ROM.

It's difficult to implement all the detail of AIS command, I want to know are there any library  for this, that I can just define the GPIO pins, and the let the library to deal with AIS format?

  • Hi Ruoyo,

    Ruoyo says said:
    Are there any sample code of secondary bootloader for C674x DSP?

    Yes, for C6748, sample secondary bootloader is available as a part of C6748 starterware package.

    Once you install this package, "C6748_StarterWare_1_20_04_01" you will find the source code of the secondary bootloader at path :"..\ti\C6748_StarterWare_1_20_04_01\bootloader "

    For C6747, Please refer to the below WIKI pages which discusses in detail about the bootloading process of C6747. There is a sample LED example given.

    Regards,

    Shankari

    -------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.

    --------------------------------------------------------------------------------------------------------

  • I installed C6748_StartWare and read the source code of bootloader. But I can' t find the source code of the function: BlPlatformNANDImageCopy().

    Here is the call chain:

    bl_main.c:main() -> bl_copy.c:ImageCopy() -> NANDBootCopy() -> BlPlatformNANDImageCopy()

    I searched the whole install path but can only find that it's declare in bl_platform.h and called in bl_copy.c.
  • Hi Ruoyu,

    The function, BlPlatformNANDImageCopy(), may be from any of the already built libraries...that's why you are not able to find the source of it.

    By the way why you are looking for the source of the function?? Any specific reason?


    ---------------------------
  • I need to create a secondary bootloader for NOR flash but I don't know how to implement it. I downloaded the OMAPL138_StarterWare as a reference, but  it seems that the source code is not available.

    I read the document "Using the TMS320C6747/45/43 Bootloader". Because the boot image is larger than 32kB, I need a secondary bootloader, I think this secondary bootloader need to:

    1. access flash memory with GPIO pings.

    2. parse AIS boot image and execute it.

    By the way, I searched all the files include *.out, *.lib, .... If BlPlatformNANDImageCopy is linked with some of this files, I think the function name should appear.

  • I need to create a secondary bootloader for NOR flash but I don't know how to implement it. I downloaded the OMAPL138_StarterWare as a reference, but it seems that the source code is not available.

    I read the document "Using the TMS320C6747/45/43 Bootloader". Because the boot image is larger than 32kB, I need a secondary bootloader, I think this secondary bootloader need to:

    1. access flash memory with GPIO pings.

    2. parse AIS boot image and execute it.

    By the way, I searched all the files include *.out, *.lib, .... If BlPlatformNANDImageCopy is linked with some of this files, I think the function name should appear.
  • Hi Ruoyu,

    I looked into the  source code of NAND writer, in which the function, BlPlatformNANDImageCopy is not used and the file, bl_copy.c is  not used.

    Here is the flow:

    bl_main.c:main() ->  ImageCopy() --> bl_copy_rprc.c:ImageCopy() -> NANDBootCopy() -- That's it.

    Hope this clarifies.

    By the way you mentioned that you are going to use the NOR flash but you are referring to NAND writer.

    If you use NOR, please refer to NOR writer.

    -------------

  • Thank you very much for the answer. I read the NANDBootCopy() code, it seems that it's not for AIS boot image. What I looked for  is a sample code that parse AIS image.

    Anyway, NANDBootCopy() looks very simple, I think it maybe much easier to make a RPRC image bootloader than AIS image bootloader. I will try the following step:

    1. make a RPRC image bootloader for NOR flash

    2. convert the out file of RPRC image bootloader to a AIS image, and write it to 0x60000004

    3. convert the out file of the application to RPRC image by out2rprc.exe, and write it to 0x60004000

    4. the RPRC image bootloader load image from 0x60004000