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.

Boot Rom example 2806x

Other Parts Discussed in Thread: TMS320F28069, CONTROLSUITE

Hi,

I am currently implementing a code in order to boot ROM from SPI with TMS320F28069.

I have take the code from the TI controlSuite folder into library/utilities/BootRom , but I am not sure of the flash library I need to use.

In the linker file, there is a reference to Flash2806x_API_V100.lib, as shown here:

 FlashAPI        : load = FLASH_API  	PAGE = 0
{
-lFlash2806x_API_V100.lib(.text)
-lFlash2806x_API_V100.lib(.econst)
}
but I can't find this library.
So I replace it by BootROM_API libraries :

FlashAPI : load = FLASH_API PAGE = 0
{
-l2806x_BootROM_API_TABLE_Symbols_fpu32.lib(.text)
-l2806x_BootROM_API_TABLE_Symbols_fpu32.lib(.econst)
}
The fact is that when I program, I have this message:
C28xx: Loader: One or more sections of your program falls into a memory region that is not writable.  These regions will not actually be written to the target.  Check your linker configuration and/or memory map.
C28xx: File Loader: Data verification failed at address 0x003FF7A5 Please verify target memory and memory map.
Error found during data verification.
Ensure the linker command file matches the memory map.
And the adress 0x3FF7A5 refers to my initBoot function, which is full of FFFF when I look at the memory. The code runs, but not at the right place.

Thank you,

Éric


  • Hello Éric,

    According to Section 2.1.3 of the TMS320x2806x Piccolo Technical Reference Manual the 2806x devices contain the Flash API in boot ROM.  This means that the libraries should not need to be placed in program flash and copied to RAM to execute, but rather the library itself included in the project for use.  The error you are seeing appears to be the linker attempting to place the Flash API in to the On-Chip ROM which the user is not allowed to write.  Section 2 of the Technical Reference Manual has more details on the boot ROM.

    The steps to use the Flash API are discussed in the TMS320F2806x Piccolo A Flash API document found in the F2806x Flash API folder under Libraries -> Utilities - Flash API in controlSUITE.  The project you are discussing above is the source for the boot ROM contents of the TMS320x2806x RevA devices and not the Flash API library itself.  Note that the boot ROM cannot be changed for a given device since this section of memory is read-only.  For more information please reference both the Flash API document and the Technical Reference Manual linked to above.

    Hope this information helps,

    Mark-

  • Hello Mark,

    Thanks for this answer. After posting this answer, I just re-read all documents in order to see that, and your answer comforts my understanding of this problem. I can now run my code, by loading symbols defined in ROM.

    So, if I understand, all boot functions, such as InitBoot and SelectBootMode are already in ROM memory, and if I want to select a boot from SPI, in order to proceed to upgrades, I just need to set the variables OTP_BMODE and OTP_KEY in otp memory?

    Can I set them directly in my program, defining a const variable at theses addresses ( respectively 0x3D7BFB & 0x3D7BFE), or is there an other way to do this?

    Thank you,

    Éric 

  • Hello Éric,

    You are correct regarding the Flash API functions residing in boot ROM and that selecting the SPI boot mode requires the OTP_BMODE and OTP_KEY values to be set accordingly. Also, as discussed in the Technical Reference Manual Section 2.2.9 Bootloader Modes, GPIO37, GPIO34 and ~TRST pins must be set for Mode 3 which will call GetMode() and check the values for which boot mode should be selected.

    Please check the Flash Common Issues/FAQs page in the processors wiki for more information regarding Flash/OTP memory.  Also, do a quick search of the C2000 forums for posts that describe the OTP program process such as these two.

    Hope this information helps,

    Mark-

  • Perfect, that answer to my questions...

    Thank you have a nice day.

    Éric