Search

Technical Discussion Group Forum

This forum is provided for user discussion. While Beacon EmbeddedWorks support staff and engineers participate, Beacon EmbeddedWorks does not guarantee the accuracy of all information within in the Technical Discussion Group (TDG).

The "Articles" forums provide brief Articles written by Beacon EmbeddedWorks engineers that address the most frequently asked technical questions.

To receive email notifications when updates are posted for a Beacon EmbeddedWorks product download, please subscribe to the TDG Forum of interest.

TDG Forum

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 12 Mar 2015 02:40 PM by  bradb
BSP 2.2: failed to execute the c6
 2 Replies
Sort:
You are not authorized to post a reply.
Author Messages
jduran@gem-med.com
New Member
New Member
Posts:79


--
26 Oct 2012 11:15 AM
    With the new BSP, it is not possible to run the c6runlib example (/usr/share/ti/c6run-apps/examples/c6runlib/emqbit):

    ./bench_dsp
    [ 97.540863] CMEMK Error: ioctl: failed to allocate heap buffer of size 0x4900000
    CMEM Error: allocHeap: ioctl CMEM_IOCALLOCHEAPCACHED failed: -1
    CMEM_alloc() failed!
    Segmentation fault

    Kernel command line: console=ttyO0,115200n8 display=p1 ignore_loglevel early_printk no_console_suspend mem=55M@0x80000000 mem=128M@0x88000000

    Joaquim Duran
    steven.eckhoff@logicpd.com
    Basic Member
    Basic Member
    Posts:192


    --
    01 Nov 2012 04:08 PM
    Joaquim,

    Thank you for bringing this to our attention; we are looking into this.

    SWE

    //##RB
    bradb
    Basic Member
    Basic Member
    Posts:203


    --
    12 Mar 2015 02:40 PM

    One of our engineers recently provided the following information to another customer asking a similar question. This information was verified by the customer to have fixed their issue.


    It looks like the initial error is a memory allocation failure because cmem doesn't have space to allocate a buffer of size 0x04900000 (76MB). The segmentation fault appears to be a follow-on error in cmem (likely due to an untested code path).

    The default Logic PD BSP reserves space from 0x83700000 to 0x88000000 in the kernel command line, which provides 0x049000000 (76MB) of space for use by the DSP. CMEM is given 0x02200000 (35MB) of this space (as noted in the kernel log), leaving 41MB of space reserved for the DSP codecs (which have hard-coded memory addresses in them). Specifically, the cmemk module is loaded as follows:
    modprobe cmemk phys_start=0x83700000 phys_end=0x85900000 allowOverlap=1 useHeapIfPoolUnavailable=1

    If you want to use C6Run, I think you want to change the CMEM allocation to use the entire 76MB (since you are not using the pre-built DSP codecs). The script that loads the cmemk module can be found in /etc/rc.d/init.d/cmem, which is created by dist/lfs-5.1/ti-linuxutils-mod/ti-linuxutils-mod.spec . I think you want something like the following:
    modprobe cmemk phys_start=0x83700000 phys_end=0x88000000 allowOverlap=1 useHeapIfPoolUnavailable=1
    You are not authorized to post a reply.