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.

Trouble compiling SYS/BIOS on F28335 w/ "enable boot from flash

Other Parts Discussed in Thread: CONTROLSUITE, TMS320F28335, SYSBIOS

I was following instructions from Mr Eric Wilbur's 2 day SYS/BIOS workshop and migrating the C28x codes provided to my own F28335 development board. It worked well when debugging with my emulator(XDS100v2) plugged.

But then I tried to mod the project, hoping it to boot from flash with the emulator unplugged. Came across the post

http://e2e.ti.com/support/embedded/tirtos/f/355/p/216140/764024.aspx#764024. So I follow the instruction, checked the box "Enable boot from FLASH", and things just went wrong when compiling. Error message poped up:

#10099-D program will not fit into available memory. placement with alignment/blocking fails for section "codestart" size 0x2 page 0. Available memory ranges: (there's nothing here)

I've referred to the advice and learned that there's something related to the lack of physical memory. Indeed, in Wilber's example, he set up a quite huge stack and heap, so I disabled the UIA and the Loggers and things alike and reduced the size of the stack and heap, but it didn't work, same problem still existed.

In fact, the example is just a very simply programme to blink a LED, it didn't make sense that the F28335 lacked the physical memory for such a simple programme, with its 34K-RAM. That very chip has been proven by  a quite complicated non-bios programme, so I'm 100% sure that the chip is OK.

I am using CCS v5.5.0.00077 w/Bios ver 6.37.3.30 & XDC Tools ver 3.25.5.94

DSP_2833x_BIOS.cmd and lib  files are imported from F28335 headerfiles v133 packed with controlSUITE 3.28

I remain the TMS320F28335 file what it is when it was automatically created with the project

In the CMD file:

MEMORY
{
PAGE 0: /* Program Memory */

FLASH : origin = 0x300000, length = 0x03FF80 /* on-chip FLASH */
CSM_RSVD : origin = 0x33FF80, length = 0x000076 /* Program with all 0x0000 when CSM is in use. */
BEGIN : origin = 0x33FFF6, length = 0x000002 /* Used for "boot to Flash" bootloader mode. */
CSM_PWL : origin = 0x33FFF8, length = 0x000008 /* CSM password locations in FLASH */
OTP : origin = 0x380400, length = 0x000400 /* on-chip OTP */
ADC_CAL : origin = 0x380080, length = 0x000009 /* ADC_cal function in Reserved memory */

.....

SECTIONS
{
/* Allocate program areas: */
.cinit : > FLASH PAGE = 0
.pinit : > FLASH PAGE = 0
.text : > FLASH PAGE = 0
codestart : > BEGIN PAGE = 0
ramfuncs : LOAD = FLASH PAGE = 0,
RUN = L07SARAM PAGE = 1,
LOAD_START(_RamfuncsLoadStart),
LOAD_SIZE(_RamfuncsLoadSize),
LOAD_END(_RamfuncsLoadEnd),
RUN_START(_RamfuncsRunStart)

Many thanks to anyone who read this post and I'm really looking for your help!

                                                                                                                    Best Regards

                                                                                                                                     He

  • I read the wiki page: SYS/BIOS for C28x and notice that:

    "If you configure your application to boot from Flash, a long branch (LB) to the c_int00 entry point will be placed at the BEGIN section address defined in the linker command file."

     

    Some articles mentioned that  C code entry point for most of the C28x devices are marked as "c_int00" in CMD file but their counterparts for  F2833xs are somehow changed to "codestart" in the CMD file and that's why some error messages about" 0x33FFF6" would pop up when debugging F2833xs and we can just ignore it.

    So I modded the cmd file, replace "codestart" with”c_int00" and the project was successfully compiled!

    When debugging with emulator plugged, the programme runs well; however, when I unplugged the emulator and reset the device, nothing happened, the programme failed to boot from flash.

  • C'mon guys, really need some help here. This problem haunts me

  • Hi He,

    The following application note may be useful to you:

    http://www.ti.com/lit/an/spra958l/spra958l.pdf

    Steve

  • First of all, Steven thank you very much for replying, it's been so kind of u

    Spra958L....to be honest that's an artical I read so many times that I don't even need to click the link to know what it is :-)

    I usually follow the instruction of this artical when building non-bios projects, and I would have follow its instruction if I didn't come across the wiki page "Sys/bios for the C28x" , whose word indicates that all I need  is to check the "boot from flash" box and the system will do all the magic (refer to 'booting S/B apps on C28x' section, I always have FAITH in TI products LoL). That's why I quit reading this artical, and just check if I had set sth wrong.

    In the lab I work with CCS5 w/ S/B v6.37, reading Mr Wilbur's workshop student guide v1.7 and play with solution codes v1.7. In that guide, nothing is ever mentioned about booting from flash and there's no codes about "memcpy" stuff like that in the solution projects, so I thought all I need to boot from flash is to check that box.

    But now I turn to the newly released student guide v2.10 and solution code v2.1( I installed the brand new CCS v6 w/ TI-RTOS v2.0.2.36 on my computer at home ), and I discovered that the author has added the classic memcpy() function in his codes (but without further comments), so I'm now wondering, it is still necessary to do the process mentioned in SPRA958L before checking that "boot from flash" box? That's why u ask me to refer to 958L?

    The attachment of SPRA958L(the example codes), along with the artical itself, is so outdated that those code are programmed using DSP/BIOS and the instructions are for DSP/BIOS.I think Ti should really have that artical revised. Maybe the "boot from flash" box in lately version of TI-RTOS Kernel is just like the "call user init function" box in DSP/BIOS? That I still need to copy codes from flash to ram manually by calling memcpy() or memcopy()?

    Again thank you for replying and I do long for your further advise.

                                                                                                                                                                     Regards, He 

  • Hi He,

    ZuWei He said:
    it is still necessary to do the process mentioned in SPRA958L before checking that "boot from flash" box? That's why u ask me to refer to 958L?

    I only pointed you to that document because it appeared that it might be useful/pertinent to your problem.  I did not realize it was so outdated.

    It looks like Eric has already helped you get past your issue in your other thread.  I would heed his advice as he is very up to date on the C28x and booting from flash.

    Steve

  • Still, thank you very much for your patience. In fact both you and eric led me to the same way, the classic memcpy way that mentioned in 958L. Think I'll stick to your advice later on.

    Seems like you guys prefer that memcpy way, so what's that "Enable boot from flash" checkbox is all about? The Sysbios for C28x is so misleading that I thought checking that box would do all the magic for me.

    As of 958L, don't think it's your fault not knowing 958L is so outdated, as that's the newest version I can get, too. A ti employee claim there's newer version 958M though I can't get the link. 958L is a classic that its methods can still be easily appiled to non-bios projects. However, when things come to bios project, the context, the tools, the kernel ,etc, have changed so drastically that one can't follow the instructions unless he's a Bios veteran.

    Again, thank you very much