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.

TI RTOS c2000 cannot fit into memory with UIA, lab 4

Other Parts Discussed in Thread: TMS320F28027, TMDSCNCD28069, TMS320F28335, CONTROLSUITE

Hi there.

I am doing lab 4 TI RTOS course. The problem occurs on 24th step (Add UIA to your app.cfg file).

After adding LoggingSetup a error appears:

program will not fit into available memory. run placement with alignment/blocking fails for section ".ebss" size 0x112d page 1. Available memory ranges: TMS320F28027.cmd /blink_C28_BIOS line 109 C/C++ Problem

Decreasing stack did not help.

Core - TMS320F28027

CCS - 6.0.1.00040

TI RTOS C2000 - 2.0.2.36

UIA - 2.0.0.28

XDAIS - 7.24.0.04

XDCtools - 3.30.3.47

  • Resolved. I halved all values  in Logger Buffer size configuration. 

  • I realize you have this solved - cutting the buffers in half is ok, but this is the reason we don't use the '027 in the workshop - it just doesn't have enough internal memory to run BIOS and UIA. This is why we use the '069 control stick which has larger internal RAM. 

    just FYI...  when you get to lab 8 and using Tasks, you may run into this issue again because a task requires a 1-2k stack...and then lab 10 probably won't work at all due to the heap required.

  • Hi, Eric

    Many thanks for such great job.  The TI-RTOS workshop is really helpful and comprehensive. 

    In terms of MCU, unfortunately I have only that core right now but I am going to buy TMDSCNCD28069 to learn TI-RTOS and use it in future applications.

    In addition, could you please share the MCU minimum requirements to use TI-RTOS with its all features?

  • THAT is the million dollar question, eh? Well, I have done my best to answer that question in the workshop - Chapter 8, slide 29. It is in the videos as well. The key thing most MCU users share with me in class is the RAM footprint. Makes sense to me. Here is a jpg screen shot of that slide - FYI. And I do my best to cover all of the assumptions I made as I looked through the map files of each project. If you download the TI-RTOS folder (labs/sols), you will have these projects in that folder tree.

    This also follows the lab flow in the workshop as shown in the table. As always - your mileage may vary, but this is a good point of reference.

  • Thank you for answering. I agree, the question is crucial in understanding of minimal MCU which is appropriate to start designing new application. Now it has become more clear.

    I have just finished lab 6, so chapter 8 is within near future. :)

    Thank you again for the workshop.

  • No worries. Glad to help. This is why we have videos posted and all the materials here:

    http://processors.wiki.ti.com/index.php/TI-RTOS_Workshop

    Not everyone can attend a live workshop - but we want everyone to take full advantage of the course the Technical Training Organization produces. All of our classes are posted on wiki sites. So - glad we could help and thanks for the kind comments.

  • Hi Mr Wilbur, first of all I wanna say thank you for your excellent SYS/BIOS 2-day online workshop. I am enjoying your video, really wonderful work.

    And secondly, would you mind reading my somehow quite long&boring post?

    http://e2e.ti.com/support/embedded/tirtos/f/355/t/365734.aspx

    The problem is to some extent the same with this one. I modified your Lab4 code for TMS320F28335 and when debugging it runs well but after checking the box of "Enable boot from Flash", error message poped up when compiling and the message is like this post, "program will not fit into available memory. placement with alignment/blocking fails for section "codestart" size 0x2 page 0"

    Could you plz help me out?

  • Dear Sidorov

              Have you ever try to boot your SYS/BIOS programme from flash by checking the "Enable boot from flash" box in .cfg→boot? I did so, and the compilation failed, with the same error msg poped up indicating the lack of physical memory. I have tried reducing stack and heap size but that didn't worked. Could you plz help me out or share some experience with me?

  • I have never tried using "enable boot from flash". Lab 2 runs 100% from internal RAM - both code and data. In lab 4, I use the function provided by ControlSuite - InitFlash() to initialize the wait states. This code, because it configures the flash, must be run from RAM (program). This requires you to copy that function into RAM and run it there. ControlSuite has those hooks built into it. You can pull up any lab from 4 on in the workshop and study how this works. So, labs 4 onward all boot and run from flash - other than the code that sets the flash waitstates.

    The key pragma used in F2806x_SysCtrl.c is:

    #pragma CODE_SECTION(InitFlash, "ramfuncs");

    This places the function InitFlash into a section called ramfuncs. Via the linker, this section is copied into RAM. So when it is called, it configures the flash but runs from RAM. In the std command file, you will see ramfuncs listed as follows under the Sections directive:

    ramfuncs : LOAD = FLASH PAGE = 0,
    RUN = L03SARAM PAGE = 0,
    LOAD_START(_RamfuncsLoadStart),
    LOAD_SIZE(_RamfuncsLoadSize),
    LOAD_END(_RamfuncsLoadEnd),
    RUN_START(_RamfuncsRunStart)

    I realize this may not be the exact question you were asking - it was more "what does the checkbox do" when you check "Enable boot from flash". I have never used that check box - maybe someone on this forum can answer that question more fully.

  • Yes that finally works! Thank you very much.

    In lab sol V1.70(I'm now using SYS/BIOS v6.37 alone, not TI-RTOS kit, so I didnt't turn to the newest version) the memcpy() and initflash() is not added, so I thought all I need is to check that box. But when I checked the lab sol v2.10 and found these fxns are added, I understand what you're saying.

    And I made a mistake-totally my fault-turns out subvendor had set the DIP switch wrong, pulling all boot-mode selecting pins to 0; to correct it I have to remove a thin layer adhered on the switch and thus lost my bloody warranty. Never happen before, bad QC hah?

    I wanted to ask both questions- "what does the checkbox do" and "how to use that checkbox". Turns out the traditional way is the one to step on, and I'll just stick to it. Plz refer to wiki page: SYS/BIOS for C28x, and the section about booting just mentioned that if you wanna boot your S/B apps from flash, check that box(nothing about memcpy or memcopy fxn), so I thought that's checkbox so wonderful that it'll do all the magic works. So, in TI, some groups really don't communicate well :-)

    If that checkbox way works, I would raise one more question: how to allocate memory space accurately by just checking one box?But now, I'll just skip this question.

    Anyway, thank you very much for replying, it's been so kind of you.

  • Hi Eric,

    Do you have a cmd file for RAM build of the RTOS labs on F28069 controlStick? From the table above, I saw that the maximum requirement of memory is 9595 prog + 5706 data = 15301 words, while F28069 has 48k words RAM. The labs should be able to run out of RAM, as programming flash everytime is not preferable.

    Thanks,

    Louis

  • I could certainly find one. And yes, that would work. Many users will program the FLASH anyway because their systems are much larger than what I use in the workshop (just blinking an LED). So, I try to follow what most users will end up doing in their actual application. This also allows me to show how the flash wait states are programmed. The other thing I try to avoid is any unnecessary edits to the projects. When I have one change, I have to change 24 projects - 12 solutions and 12 labs. So one change dominoes into 24 projects that have to be edited, validated, etc. So for now, I just plan to leave it as is unless there is truly a compelling reason to change over to using internal RAM.

    The upside about using RAM is that it will take a LOT less time to load the program for these devices in the labs - a time savings. I have noted this before and spoken to users in the workshop - for the most part they said "we are using flash so learning about how long it takes to build and erase/program the flash is valuable". We have small programs so it is likely not a huge deal.