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.

Automatic section splitting -> C28346 won't boot

Hello,

I have an issue if the  .text section is lager then 0xFFFF. The SPI bootloader can't  copy any size lager than 16 bits( 0xFFFF). So the program fails to boot.

Therefore I need to split the .text section into multiple sections. If I do this manually, everything works ok, but I can't get it to work with the Automatic section splitting.

This Works:

.text : > H01SARAMP0 PAGE = 0, crc_table(_crc_table_allsection, algorithm=CRC16_802_15_4)


.text2 : > H34SARAMP0 PAGE = 0, crc_table(_crc_table_allsection, algorithm=CRC16_802_15_4)
{
  xx_*.obj(.text) //
}

This won't work

.text : >> H01SARAMP0 | H34SARAMP0  PAGE = 0, crc_table(_crc_table_allsection, algorithm=CRC16_802_15_4)

Because the DSP is pretty full I prefer the automatic splitting to utilize all the space.

If the size of the .text is lager than 0xFFFF, the linker won't give any warning and debugging works fine. But the program can't start from SPI flash.

  • I must admit I don't really know anything about the SPI bootloader.  Can you point me to some documentation for it?  You say it can't copy a section larger than 0xfff; I presume it can copy multiple .text sections of size smaller than that?  Must the section be named ".text" exactly?  The linker will rename sections when it splits them, so they might not be exactly ".text".  Do you need to change the configuration of SPI to accept more than one text section?

  • As you can see in the document SPRU722, page 18 (word 12), the block size of an section is only 16 bits.

    http://www.ti.com/lit/ug/spru722c/spru722c.pdf

    (or see this powerpoint http://www.ti.com/ww/cn/uprogram/share/ppt/c2000/Part13.ppt, page 10)

    The naming of the section is not important, because if I split the section manually it works fine (like .text2 or .text.2 both works fine)

    The automatic section spitting does the same, with the difference that it won't boot.

    It's not really an SPI issue, because all the bootmodes can't copy a section lager then 0xFFFF.

  • I found the issue! And now the automatic splitting works fine.

    The cause was the length

    H01SARAMP0 : origin = 0x300000, length = 0x00FFFE /* on-chip RAM block H0 */
    H23SARAMP0 : origin = 0x310000, length = 0x00FFFE /* on-chip RAM block H1 */

    The length must be <= 0x00FFFE , instead of 0x00FFFF.
    I don't know why it has to be 1 shorter, but now it's working.

  • I'm glad you found a workaround.

    Perhaps size 0xffff is a reserved value meaning something like "not present."  That's only a guess.

  • I am facing a similar problem with SPI booting.

    I am using a custom board with C28346 and I am using SPI-A to boot. I am using BIOS v.5.42, CCS v.5.5, compiler v.6.2.

    At first I create a very simple project without any BIOS. The project at the end of its main has an infinite loop that prints out a message and toggles a LED. I burn this project into flash and hard reset the system. Everything works perfect. The LED toggles and when I load the symbols and start the project, the LED starts flashing again and in the console I see the message. In this way I am pretty sure that both the hex2000 and the flash burning sequence have worked as expected. I have also tested the same sequence with a project that has an end and everything works.

    The problem begins when I insert the BIOS into the system.  At first I run the project with JTAG connection. Everything works perfect, with both the project that just ends and with the one with the infinite loop. I insert a periodic function that flashes a LED into the BIOS every 5 sec, and still everything works perfect.

    At the next step I use the hex2000 and the flash burning sequences that I have previously used in order to create the hex file and burn it to the flash. When I hard reset the system, I see the LED flashing in a much faster pace, at around 1 sec. Also, when I load the symbols of the project and debug, I cannot see any logs and the Periodic function at the RTOS Object View in SWI section is characterized as “undefined”. And, the instruction pointer is in an address that is somewhere inside the boot loader functions area (area between 3F F34C to 3F F9EE). In another case, when the periodic does not have a LED flashing function, the LED does not flash.

    In all projects, at the start of the main function I have inserted the InitSysCtrl() function, that also disables the watchdog, the InitPeripheralsClocks() function and the SysCtrlRegs.WDKEY = 0x0055 and SysCtrlRegs.WDKEY = 0x00AA inside EALLOW and EDIS in order to reset watchdog counter, and PRG_unlock() function to make sure the flash is unlocked. Also, I have deleted the .gel file from the initialization script of the .ccxml target configuration file.

     I must say that in every case, before burning the project to the flash, the JTAG executed program works fine.

     

    So, it seems that the insertion of the BIOS into the project somehow destroys the logic connection that was previously there.

    Any suggestions from anyone that has faced a similar problem?

    Thank you.

  • Please follow the other thread you started for this problem.

    Thanks and regards,

    -George