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.

compile sys/bios applications for mcoreloader (linux-c6x)

Other Parts Discussed in Thread: SYSBIOS

Hi there,

I've compiled a number of applications in CCS5 for SYS/BIOS. These execute fine, even with Syslink running on linux core 0 and the other apps running on cores 1-7.

However, when I use mcoreloader to start these cores, it doesn't work.

My question now is; do I need to do something different if I want applications to run by using mcoreloader?

And how do I compile these applications? Without CCS?

Thank you for your help!

  • Jonathan,

    I have moved this thread over to the Linux forum in hopes that it will get a faster response there.

    Dave

  • Hi, Jonathan,

    SYS/BIOS applications should be built according to SYS/BIOS MCSDK User's Guide, http://processors.wiki.ti.com/index.php/BIOS_MCSDK_2.0_User_Guide#Examples. The SYS/BIOS applications can be built without CCS, but it is a bit complicated. You can follow the syslink sample code in linux-c6x. I suggest you take a look at the linux-c6x-project/scripts/Makefile.syslink to see how the components on the DSP side (rtos) get built. Also, the configuration needs to be set up (config.bld), the .xs, .xdc, the package, and each core configuration files, etc. CCS actually set up these files when the project is created.

    Rex

  • Hi Rex,


    Thanks for your reply. I got my applications running now!

  • Jonathan

    Can you help me and let me know the secret of getting your code running.  I am trying to get the exact same thing working and have not had any luck.  Unfortunately, I am not a DSP expert but come from the ARM side of things so I am not up on all of the tricks of XDC, SysBios, etc.

    Thansk

  • so what do you want your application to be doing?

  • I would be happy if I could send a message from Linux to the Sys/Bios program on Core1 that will start/stop a LED blinking.  Anything simple would be nice.

    Thanks! 

  • that sounds simple, but can be pretty complicated.

    What i would like to know is, did you already try out starting and stopping a LED blinking in SYS/BIOS?

    For the communication between linux and sys/bios i would suggest using the Notfiy function.

    Did you already try out the notify example that is available in Code Composer Studio?

    This one is available under File->New->CCS project
    Select C6000 familiy, Generic Devices and Generic C66xx Device.
    Projects -> IPC and I/O Examples ->C6678 Examples -> C6678 Notify (single image for all cores).

    Try this example out under Sys/Bios and when you got that running for just 2 cores (i can tell you how, but it's easy to do this yourself),
    you can check out the syslink examples in the c6x-linux project. Maybe when you got that far, let me know and I'll share some code with you
    that I wrote to make things easier.

  • Jonathan

    Thanks.  I already have the sys/bios examples working, including the multicore ones.  I have no problem following the examples for sys/bios only or even for the linux c6x examples.  My problem is that there are no examples for what I need to do which is develop the main thread on the linux core (e.g core 0) and then start a worker thread on core 1.

    Let me ask you a tiny specific question.  When I build, I am getting an error that says my module cannot start because the address is not on the correct boundary and I don't have a reset vector.  What project settings do you use to set the start address and/or add a reset vector.  There are mentions of this on E2E, but nothing I have found that works.

    Thansk

  • Here is an example of a very simple SYS/BIOS program that works with syslink.
     The only thing it does is, it received events from the server at EVENT_ID = 21 and
     afterwards it calls an event back to the server at EVENT_ID = 10.

     You should compile this using CCS, just make an example hello world application
     and replace the c and cfg code with the code that is attached.
    Don't forget to include the core config in the same directory as the c and cfg code ;)

    david_newman.zip
  • Thanks.  I will try this code right now.  I looked over the code and there are several things that I have not seen before, so (I am hoping) that one of them will be what I have been missing.  I really appreciate the help and will let you know the results shortly.

  • Jonathan

    I think that you have helped me find where I am going wrong.  But I am not quit there yet.  When I build your code I get the following error:

    can't locate the package 'ti.syslink.ipc.rtos' along the path:    (I edited out the rest of the error message path string)

    I am building on the PC, so I thought this may be a PC/Linux thing, so I moved over to my Linux machine to build which took me a little while.  No help there as I got the exact same error.

    I have the C6x build running on my Linux box and it has a syslink folder.  However, it does not contain the expected "packages" folders, etc.  Otherwise I would have tried to use that package to see what would happen.

    So, I am thinking that there is some package somewhere that I need to download/install.  However, I cannot seem to locate it.  So, can you point me to where you got your ti.syslink.ipc.rtos package?  I assume I am looking for something like a "syslink" package.  Perhaps I am searching for the wrong thing.  This is one of those cases where you need to know what to look for before you can find it.

    FYI, I have tried loading the following packages and none helped.

    DSPLIB

    IPC  (Inter-Processor Communication)

    MCSCK

    MCSDK PDK

    NDK

    OpenMP

    SysBIOS

    XDAIS

  • David,

    assuming you already build the c6x-linux environment, you can include the ./Build/syslink_evmc6678.el_hardfp directory. 

    This indeed does not contain a package directory, but it also doesn't have to. It will include the stuff you need to build the application.

    I hope you will succeed building the application!

    Let me know how it went 

  • Jonathan -

    Much progress!  I can now get the program to load and see the message tells me that the program is running.  However, I do not see any of the System_printf statements on the serial port output.  Do you see these prints when you run your setup?   I have insmod'ed syslink.ko so that is not the problem.  Is there something else that I need to do see the printfs?  

    Thank you for all your support.  I am not sure that I could have done it w/o your help.  I NEVER would have thought of adding the syslink folder to the include paths and it turns out that was pretty much the trick that did it.  I can't say it enough.  Thanks!

  • Jonathan

    I should add...if I connect with CCS then I do see the printouts on CCS.  But I thought I should be seeing the printouts on the serial port along with the Linux messages.  Perhaps I am in error here, but I did want to confirm that you were seeing the same.

    Thanks again for everything.

  • This is expected behaviour. I have also no output on the UART, only in CCS.
    There is a way to get output on your UART, but I don't know how. You can maybe search
    through the forum or open a new thread for this, possibly in the BIOS forum.

    Good luck and I'm glad I could help!

  • Jonathan

    Thanks again.  You have been a great help.  TI should be glad that they have you on their staff.  Thanks again.

  • Hi David,

    Thanks for the compliment. However, I do not work for TI :p
    I am experimenting with the board, just as you. I have been going through all
    the steps that you have been going through, and since I have been doing this for the last
    few weeks, it was my idea that I could give you little hints on how to go through them as well ;)

  • Oooh.  In that case, I am especially thankful since this wasn't in your job description.  

    For those that come after us, I hope that the TI guys take your example and  put the instructions into a web page as an example.  As I said earlier the trick of adding the c6x-linux syslink folder to the CCS project path was entirely unexpected.  That hint from you is what got me going.  One example and I would have been up and running a week ago.

    I wish you the best...