Project

General

Profile

M4 hello world patches for use with remoteproc

Add the lines shown in red

modify main.c

    #include "FreeRTOS.h" 
    #include "task.h" 

    /* add a resource table to the project so it can be loaded by Linux RemoteProc driver */
#include "resource_table_no_ipc.h"

#define MAIN_TASK_PRI (configMAX_PRIORITIES-1)

modify linker.cmd

     .sysmem: {} palign(8) > M4F_IRAM     /* This is where the malloc heap goes */
     .stack:  {} palign(8) > M4F_IRAM     /* This is where the main() stack goes */

    GROUP {
// This is the resource table used by linux to know where the IPC "VRINGs" are located
.resource_table: {} palign(4096)
} > DDR_0

/* Sections needed for C++ projects */
.ARM.exidx: {} palign(8) > M4F_IRAM // Needed for C++ exception handling
.init_array: {} palign(8) > M4F_IRAM // Contains function pointers called before main


and
     M4F_IRAM : ORIGIN = 0x00000200 , LENGTH = 0x0002FE00
     M4F_DRAM : ORIGIN = 0x00030000 , LENGTH = 0x00010000

    // when using multi-core application's i.e. more than one R5F/M4F active, make sure
// this memory does not overlap with R5Fs

// Resource table must be placed at the start of DDR_0 when M4 core is early booting with Linux
DDR_0 : ORIGIN = 0x9CC00000 , LENGTH = 0x1000

new header file resource_table_no_ipc.h

Go to top
Add picture from clipboard (Maximum size: 1 GB)