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.

Cannot boot C6748 RTOS based app from flash



Hi

We are moving out RTOS based app on the C6748 from debug to production boards. The app runs without a problem on the CCS debugger env but when I burn to flash the app does not boot.

Here are questions and back ground for the problem:

1. I use AISgen tool from TI to convert .out to .ais. The AIS is loaded with a .cfg prior to the conversion. I have confirmed that the .cfg works ok as I can use this to boot a non RTOS based project correctly.

2. I use sfh tool from TI to burn it in NAND flash on the C6748_LCDK board.

3. Next move the dip switches to boot from NAND, power cycle and nothing happens.

4. I can do the above steps for a non RTOS bases project and it works without a problem.

5. I have also included a boardInit.c which is called first on entry to main() to do init of clocks, psc etc etc.The boardInit.c is a copy of theC6748_LCDK GEL file converted to C. I tested this in ccs debug and it works.

SO here are the questions:

1. For RTOS based projects does the AISgen tool provide enough initialization for proper booting? That is AISgen loaded with the tested .cfg file that works with a non-rtos project?

2. Are there special compile/link switches required during the build process to make the app standalone bootable outside the debug environment?

3. Are there extra things that need to be done to a RTOS based project compared with a NON RTOS based project to make it bootable?

4. In the debug env CCS uses .GEL to init the board before the app runs. Can the same thing be achieved by calling a boardInit function which is the same as the GEL after entry into main() and called first? Or does the boardInit() function need to be executed prior to entry into main()?

5. at the moment _c_int00 is placed where ever the linker wants it to sit. Does it have to be in a special location for bootable images? 

6. My understanding of the boot process is that the RBL will read from flash, load all sections and then jump to _c_int00. c_int00 will then set up the stack and c environment. Then jump to setting up of the RTOS environment will be carried on automatically from there and jump to main(). Is this correct?

please answer each of my questions one by one. You can point me to other stuff (I have read loads of wikis and docs) but please answer the questions.. I need answers to these questions so that I can create a map and narrow down what is going on through a process of elimination without running around in loops.

This is the second week of trying to sort out this problem...we need a resolution soon as the customer will be here in few days for FAT.

Thanks for your help

  • Hi Manjula,

    1 & 3.Not having used the AISgen tool, I can only refer you to an existing thread that discusses this: https://e2e.ti.com/support/dsp/omap_applications_processors/f/42/t/215698. They made a few changes to get their BIOS project to work.

    2. None that I am aware of

    4. In general, you should study any GEL files you run when connecting to the device in CCS to see if there are settings that need to be set prior to running your application. Some of the GEL functions (e.g. OnReset, OnTargetConnect) may be run even before the code starts running from _c_int00. How early you need to have this 'boardinit' code run depends on your application. For example, if you are already running some user code before main() using some of the BIOS startup hooks, it'd be necessary to initialize what the code needs before it gets executed.

    5. The thread seems to indicate that the location does not need to be fixed, but you can try the approach that  took to fix the location of the.sysinit segment to see if it helps.

    6. This is the behavior I'd expect.

    For more specifics on the AISgen and flasher tools and how to flash apps in general, you should be able to find more help from the device's forum.

    Best regards,

    Vincent

  • Hi Vincent


    Thank you for your feedback. It has thrown more light on the mysterious and arduous process of making RTOS boot-able on C674X devices.

    It seems to me that nobody at TI knows if a correct boot image can be made out of RTOS based projects. I would have thought someone would have tested this use case before for this device. I think that the AISGen tool does Not support RTOS.

    We have spent nearly one year developing our project on RTOS and now we have no choice but to dump RTOS and move to stand alone. At least I know standalone C is boot-able!

    I am going to do a post : "How to make a bootable image for C674x for dummies" This is my third week of trying to solve this problem after being led into and jumping into many rabbit holes :( This turned out to be a full blown research project which chewed up our time and the customer is knocking on our door :((

    TI makes great silicon but the sw/support side seems to be lacking greatly :(

     There are many people complaining on the forum about the poor level of documentation and things being all over the place. I think there is too much reliance on sending people all over the website wikis to find answers without actually having clear concise and up-to date user docs witch will make our life much easier.

    Ti people please do something about this rot as it can get out of hand very quickly!

    Regards

    Manjula

    PS:

    I direct you to this post by Walter Snafu...things haven't changed for the better one bit in four years! :(

    e2e.ti.com/.../413501

  • Hi Manjula,

    I am sorry to hear about your experience. Writing embedded software is not an easy task by any means and browsing endlessly on the web seeking answers can be very frustrating. I had to do much of that myself as a developer, so I understand where you are coming from.

    If you like, you can give me the exact procedure you followed to flash your code, including where to get the tools (e.g. AISgen, sfh) you are using, their version number (please include the version of TI-RTOS), actual dip switch settings, and any code you are willing to share (this way I don't have to spend hours browsing for the details myself!), and I can try to locate a board and reproduce the issue. I'll admit I have never seen or used the C6748 LCDK before, but maybe my experience with TI-RTOS on other platforms could help shed some more light into the matter.

    Best regards,
    Vincent