Tool/software: TI-RTOS
I try to get a simplified version of the GateMP example to run but get this output:
Core 0 Trace...
2 Resource entries at 0x810000
*********************************************************
***************** RM Shared Server Test *****************
*********************************************************
Core 0: ProcID 1
Core 0: Wait for IPC attach count = 1
Core 0 : Creating RM startup task...
Core 0 : Starting BIOS...
registering rpmsg-proto:rpmsg-proto service on 61 with HOST
ti.sdo.ipc.GateMP: line 1160: assertion failure: A_noHeap: Region has no heap
xdc.runtime.Error.raise: terminating execution
-----------------------------------------
Any idea? I have attached the cfg and c files
/* * rm_shared_test.c * * Multicore Resource Manager test that uses the RM shared server to * request resources from multiple cores. * * ============================================================================ * * Copyright (c) 2012-2013, Texas Instruments Incorporated * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of Texas Instruments Incorporated nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ /* Standard Includes */ #include <string.h> /* XDC Includes */ #include <xdc/std.h> #include <xdc/runtime/System.h> /* IPC Includes */ #include <ti/ipc/MultiProc.h> #include <ti/ipc/Ipc.h> #include <ti/ipc/GateMP.h> /* BIOS Includes */ #include <ti/sysbios/BIOS.h> #include <ti/sysbios/knl/Task.h> /* CSL Includes */ #include <ti/csl/csl_chip.h> /********************************************************************** ********************** RM Shared Test Symbols ************************ **********************************************************************/ #define SYSINIT 0 #define NUM_CORES 2 /* GateMP names used to synchronize the RM test tasks */ #define RM_SERVER_GATE_NAME "rmServerGate" #define RM_CLIENT_GATE_NAME "rmClientGate" /********************************************************************** ********************** Global Variables ****************************** **********************************************************************/ /* DSP core number according to DNUM */ uint16_t coreNum; /* Task to configure application transport code for RM */ Task_Handle rmStartupTskHandle; /* GateMPs used to synchronize tests between the two RM test tasks */ GateMP_Handle serverGate = NULL; GateMP_Handle clientGate = NULL; /* GateMP keys */ IArg serverKey; IArg clientKey; void rmStartupTsk(UArg arg0, UArg arg1) { Int status; GateMP_Params gateParams; int cnt = 10; if (coreNum == SYSINIT) { GateMP_Params_init(&gateParams); gateParams.name = RM_SERVER_GATE_NAME; /* Disable local protection since only concerned with sync'ing cores */ gateParams.localProtect = GateMP_LocalProtect_NONE; serverGate = GateMP_create(&gateParams); System_printf("Core %d: Gate RM_SERVER_GATE_NAME opened\n", coreNum); serverKey = GateMP_enter(serverGate); do { if (cnt == 10) { System_printf("Core %d: Wait for RM_CLIENT_GATE_NAME\n", coreNum); cnt = 10; } else { cnt++; } status = GateMP_open(RM_CLIENT_GATE_NAME, &clientGate); /* * Sleep for 1 clock tick to avoid inundating remote processor * with interrupts if open failed */ if (status < 0) { Task_sleep(1); } } while (status < 0); System_printf("Core %d: Gate RM_CLIENT_GATE_NAME opened\n", coreNum); } else { Task_sleep(100); GateMP_Params_init(&gateParams); gateParams.name = RM_CLIENT_GATE_NAME; /* Disable local protection since only concerned with sync'ing cores */ gateParams.localProtect = GateMP_LocalProtect_NONE; clientGate = GateMP_create(&gateParams); System_printf("Core %d: Gate RM_CLIENT_GATE_NAME opened\n", coreNum); clientKey = GateMP_enter(clientGate); do { if (cnt == 10) { System_printf("Core %d: Wait for RM_SERVER_GATE_NAME\n", coreNum); cnt = 10; } else { cnt++; } status = GateMP_open(RM_SERVER_GATE_NAME, &serverGate); /* * Sleep for 1 clock tick to avoid inundating remote processor * with interrupts if open failed */ if (status < 0) { Task_sleep(1); } } while (status < 0); System_printf("Core %d: Gate RM_SERVER_GATE_NAME opened\n", coreNum); } } int main(Int argc, Char* argv[]) { Task_Params taskParams; int status; int count = 0; System_printf ("*********************************************************\n"); System_printf ("***************** RM Shared Server Test *****************\n"); System_printf ("*********************************************************\n"); coreNum = CSL_chipReadReg(CSL_CHIP_DNUM); System_printf ("Core %d: ProcID %d\n", coreNum, MultiProc_self()); /* Initialize the heap in shared memory. Using IPC module to do that */ #if 0 System_printf("Core %d: Starting IPC...\n", coreNum); status = Ipc_start(); if (status < 0) { System_abort("Ipc_start failed\n"); } #endif if (coreNum == SYSINIT) { do { count++; status = Ipc_attach(MultiProc_getId("CORE1")); } while (status == Ipc_E_NOTREADY); System_printf ("Core %d: Wait for IPC attach count = %d\n", coreNum, count); } else { do { count++; status = Ipc_attach(MultiProc_getId("CORE0")); } while (status == Ipc_E_NOTREADY); System_printf ("Core %d: Wait for IPC attach count = %d\n", coreNum, count); } /* Create the RM startup task */ System_printf("Core %d : Creating RM startup task...\n", coreNum); Task_Params_init (&taskParams); rmStartupTskHandle = Task_create (rmStartupTsk, &taskParams, NULL); System_printf("Core %d : Starting BIOS...\n", coreNum); BIOS_start(); return (0); }
Thanks
Lawrence