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.

L138: CCS Debug: cannot edit or load data into 128k "Shared RAM" via PRU_0

Other Parts Discussed in Thread: OMAPL138

Please can someone tell me if I have missed something?

Kind regards

Tony

Code Composer Studio Version: 6.0.1.00040, LOGICPD ZOOM L138 board, XDS560v2 USB emulator:

Launch OMAPL138.ccxml (a very simple configuration)

PRU_0 "Connect Target" -> (C674X_0 and PRU_0 change to "Suspended")

C674X_0: Memory at 0x80000000 editable

PRU_0: Data_Memory at 0x80000000 all zero and not editable

Note: can edit PRU_0 program and data memory at address 0x0

My PRU code with the linker file below fails to load because CCS cannot write to the Shared RAM at 0x80000000.

MEMORY
{
PAGE 0:
P_MEM : org = 0x00000008 len = 0x00000FF8

PAGE 1:
NEAR_MEM : org = 0x00000008 len = 0x000001F8
FAR_MEM : org = 0x80000000 len = 0x00000400
}

/* SPECIFY THE SECTIONS ALLOCATION INTO MEMORY */

SECTIONS
{
.bss : {} > NEAR_MEM, PAGE 1
.data : {} > NEAR_MEM, PAGE 1 palign=2
.rodata : {} > NEAR_MEM, PAGE 1

.farbss : {} > FAR_MEM, PAGE 1
.fardata : {} > FAR_MEM, PAGE 1
.rofardata : {} > FAR_MEM, PAGE 1

.sysmem : {} > NEAR_MEM, PAGE 1
.stack : {} > NEAR_MEM, PAGE 1
.init_array : {} > NEAR_MEM, PAGE 1
.cinit : {} > NEAR_MEM, PAGE 1

.args : {} > NEAR_MEM, PAGE 1

.text : {} > P_MEM, PAGE 0
}

  • Hi Anthony,

    Welcome to the TI E2E forum. I hope you will find many good answers here and in the TI.com documents and in the TI Wiki Pages. Be sure to search those for helpful information and to browse for the questions others may have asked on similar topics.

    The following are the check points for you.

    1. Check whether the approriate gel file is loaded in the CCS settings of *.ccxml file.

    i.e, in CCS, open up the *.ccxml --> connection : "emulator" ; device: "EVMOMAPL138" and save.

    Open the advanced option --> click ARM --> "EVMOMAPL138 gel "

    2. OMAPL138 is a ARM bootable device. After power on reset, ARM will get wake up first and then it will wake up the DSP.  if you want to run the DSP example, DSP core should be wake up first using the GEl file; otherwise it cannot run the DSP program.

    What is the name of the TI package? what is the name of the example? Is it a ARM or DSP example? Please post the screenshot in which the error is popped out.

    Regards,

    Shankari

    -------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.
    --------------------------------------------------------------------------------------------------------

  • Dear Shankari

    When I try to debug the following program in an L138 PRU:

    /*
    * main.c
    */
    __far int x = 1;

    int main(void) {

    return x;
    }

    I get the following error messages:

    PRU_0: File Loader: Data verification failed at address 0x80000020 Please verify target memory and memory map.
    PRU_0: GEL: File: Debug\PRU_Problem.out: a data verification error occurred, file load failed.

    If I remove the __far:

    /*
    * main.c
    */
    int x = 1;

    int main(void) {

    return x;
    }

    The code downloads without an error.

    It seems like the JTAG debugger cannot access the L138 shared RAM to download the value of "x". Please can you tell me if this is a bug or a system limitation?

    kind regards

    Anthony

    Please note that I had previously run an ARM gel file from another project to take the PRU out of reset and start its clock.

    <link.cmd>-----------------------------------------------------------------

    -cr /* LINK USING C CONVENTIONS */
    -stack 0x0010 /* SOFTWARE STACK SIZE */
    -heap 0x0000 /* HEAP AREA SIZE */
    /*--args 0x100 */

    /* SPECIFY THE SYSTEM MEMORY MAP */

    MEMORY
    {
    PAGE 0:
    P_MEM : org = 0x00000008 len = 0x00000FF8

    PAGE 1:
    NEAR_MEM : org = 0x00000008 len = 0x000001F8
    FAR_MEM : org = 0x80000000 len = 0x00000400
    }

    /* SPECIFY THE SECTIONS ALLOCATION INTO MEMORY */

    SECTIONS
    {
    .bss : {} > NEAR_MEM, PAGE 1
    .data : {} > NEAR_MEM, PAGE 1 palign=2
    .rodata : {} > NEAR_MEM, PAGE 1

    .farbss : {} > FAR_MEM, PAGE 1
    .fardata : {} > FAR_MEM, PAGE 1
    .rofardata : {} > FAR_MEM, PAGE 1

    /* far memory for validation purposes */
    .sysmem : {} > NEAR_MEM, PAGE 1
    .stack : {} > NEAR_MEM, PAGE 1
    .init_array : {} > NEAR_MEM, PAGE 1
    .cinit : {} > NEAR_MEM, PAGE 1

    .args : {} > NEAR_MEM, PAGE 1

    .text : {} > P_MEM, PAGE 0
    }

    <Test.ccxml>------------------------------------------------------------

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <configurations XML_version="1.2" id="configurations_0">
    <configuration XML_version="1.2" id="Spectrum Digital XDS560V2 STM USB Emulator_0">
    <instance XML_version="1.2" desc="Spectrum Digital XDS560V2 STM USB Emulator_0" href="connections/SD560V2USB_Connection.xml" id="Spectrum Digital XDS560V2 STM USB Emulator_0" xml="SD560V2USB_Connection.xml" xmlpath="connections"/>
    <connection XML_version="1.2" id="Spectrum Digital XDS560V2 STM USB Emulator_0">
    <instance XML_version="1.2" href="drivers/tixds560icepick_c.xml" id="drivers" xml="tixds560icepick_c.xml" xmlpath="drivers"/>
    <instance XML_version="1.2" href="drivers/tixds560c674x.xml" id="drivers" xml="tixds560c674x.xml" xmlpath="drivers"/>
    <instance XML_version="1.2" href="drivers/tixds560pru.xml" id="drivers" xml="tixds560pru.xml" xmlpath="drivers"/>
    <instance XML_version="1.2" href="drivers/tixds560arm9.xml" id="drivers" xml="tixds560arm9.xml" xmlpath="drivers"/>
    <instance XML_version="1.2" href="drivers/tixds560etb11.xml" id="drivers" xml="tixds560etb11.xml" xmlpath="drivers"/>
    <property Type="choicelist" Value="3" id="JTAG TCLK Frequency (MHz)"/>
    <platform XML_version="1.2" id="platform_0">
    <instance XML_version="1.2" desc="OMAPL138_0" href="devices/OMAPL138.xml" id="OMAPL138_0" xml="OMAPL138.xml" xmlpath="devices"/>
    <instance XML_version="1.2" desc="IcePick_C_0" href="routers/icepick_c.xml" id="IcePick_C_0" xml="icepick_c.xml" xmlpath="routers"/>
    <router HW_revision="1.0" XML_version="1.2" description="ICEPick_C Router" id="IcePick_C_0" isa="ICEPICK_C">
    <property Type="choicelist" Value="1" id="bypass"/>
    </router>
    </platform>
    </connection>
    </configuration>
    </configurations>

  • Hi Anthony,

    Hi Tony,

    The OMAPL138 PRU defines a constant table entry (C30) for easy access to the L3 Shared RAM.  The OMAPL138 PRU constant table is described at http://processors.wiki.ti.com/index.php/Programmable_Realtime_Unit#Constants_Table.  My recommendation would be to update your code to use this resource.

    The AM335x PRU software package has a generic example that shows how to use the constant table:

    https://git.ti.com/pru-software-support-package/pru-software-support-package/trees/master/examples/PRU_access_const_table

    Note that the link.cmd file would need to updated for the OMAPL138 PRU constant table entries (listed at wiki link above). 

    Regards,

    Melissa