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.

[FAQ] MCU+ SDK build "error: expected expression rpmsgParams.vringTxTaseAddr"

Part Number: PROCESSOR-SDK-AM64X
Other Parts Discussed in Thread: SYSCONFIG

I am using MCU+ SDK 9.1 or later. When I build a project for a specific core, I see this error output below. How do I fix the error?

CCS output 

C:/ti/ti-cgt-armllvm_3.2.1.LTS/bin/tiarmclang.exe" -c -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mlittle-endian -mthumb -I"C:/ti/ti-cgt-armllvm_3.2.1.LTS/include/c" -I"C:/ti/mcu_plus_sdk_am64x_09_01_00_41/source" -DSOC_AM64X -D_DEBUG_=1 -g -Wall
-Wno-gnu-variable-sized-type-not-at-end -Wno-unused-function -MMD -MP -MF"syscfg/ti_drivers_config.d_raw" -MT"syscfg/ti_drivers_config.o"
-I"D:/Test/gpio_led_blink_am64x-sk_r5fss0-0_nortos_ti-arm-clang/Debug/syscfg" -o"syscfg/ti_drivers_config.o" "syscfg/ti_drivers_config.c"
subdir_rules.mk:39: recipe for target 'syscfg/ti_drivers_config.o' failed
syscfg/ti_drivers_config.c:217:88: error: expected expression
rpmsgParams.vringTxBaseAddr[CSL_CORE_ID_R5FSS0_1] = (uintptr_t)(&gIpcSharedMem[]);
^
syscfg/ti_drivers_config.c:218:88: error: expected expression
rpmsgParams.vringTxBaseAddr[CSL_CORE_ID_R5FSS1_0] = (uintptr_t)(&gIpcSharedMem[]);
^
syscfg/ti_drivers_config.c:219:88: error: expected expression
rpmsgParams.vringTxBaseAddr[CSL_CORE_ID_R5FSS1_1] = (uintptr_t)(&gIpcSharedMem[]);
^
syscfg/ti_drivers_config.c:220:88: error: expected expression
rpmsgParams.vringTxBaseAddr[CSL_CORE_ID_M4FSS0_0] = (uintptr_t)(&gIpcSharedMem[]);
^
4 errors generated.
gmake: *** [syscfg/ti_drivers_config.o] Error 1

Makefile build output on Linux 

mcu_plus_sdk_am64x_09_01_00_41$ make -s -C examples/drivers/ipc/ipc_rpmsg_echo_linux/am64x-evm/r5fss0-0_freertos/ti-arm-clang/
Generating SysConfig files ...                                                                                                                                               Running script...
...
Compiling: am64x:r5fss0-0:freertos:ti-arm-clang ipc_rpmsg_echo_linux.release.out: ../../../ipc_rpmsg_echo.c
Compiling: am64x:r5fss0-0:freertos:ti-arm-clang ipc_rpmsg_echo_linux.release.out: ../main.c
Compiling: am64x:r5fss0-0:freertos:ti-arm-clang ipc_rpmsg_echo_linux.release.out: generated/ti_drivers_config.c
generated/ti_drivers_config.c:193:88: error: expected expression
        rpmsgParams.vringTxBaseAddr[CSL_CORE_ID_R5FSS0_1] = (uintptr_t)(&gIpcSharedMem[]);
                                                                                       ^
generated/ti_drivers_config.c:194:88: error: expected expression
        rpmsgParams.vringTxBaseAddr[CSL_CORE_ID_R5FSS1_0] = (uintptr_t)(&gIpcSharedMem[]);
                                                                                       ^
generated/ti_drivers_config.c:195:88: error: expected expression
        rpmsgParams.vringTxBaseAddr[CSL_CORE_ID_R5FSS1_1] = (uintptr_t)(&gIpcSharedMem[]);
                                                                                       ^
generated/ti_drivers_config.c:196:88: error: expected expression
        rpmsgParams.vringTxBaseAddr[CSL_CORE_ID_M4FSS0_0] = (uintptr_t)(&gIpcSharedMem[]);                                                                                                                                                                          ^
4 errors generated.
make: *** [makefile:159: ti_drivers_config.obj] Error 1   

This FAQ applies to: 

AM64x

AM24x

  • Several things changed between MCU+ SDK 9.0 and MCU+ SDK 9.1. Specifically,
    The MCU+ project MUST be built as a system project if the project defines any memory that is shared between multiple MCU+ cores.
    IPC is one common usecase with shared memory, but there are other usecases as well.

    .

    Why does this happen?

    The new memory configurator tool uses the example.sysconfig file for each core in a multicore project to generate the linker.cmd output files during a build command. A shared memory region will only be defined in one core's example.sysconfig file, but referenced in the example.sysconfig file of the other cores. All of the other cores have a dependency on the one example.sysconfig file with the shared memory information.

    Let's say you have enabled IPC_Notify and IPC_RPMsg between R5F0_0 and R5F0_1. If you try to JUST build the R5F0_0 example on its own, you will get build errors.

    .

    There are 2 things to keep in mind in order to avoid these build errors:

    1) If you DO have shared memory enabled between MCU+ cores, build the project as a system. Do not build it one core at a time. 

    Let's use AM64x MCU+ SDK 9.1, project ipc_rpmsg_echo_linux, as an example. In this project, IPC is enabled between every MCU+ core.

    If I wanted to build the ipc_rpmsg_echo example from the Linux terminal, I would build the project as a system like this:

     

    $ make -s -C examples/drivers/ipc/ipc_rpmsg_echo_linux/am64x-evm/system_freertos

    Even though we are building the entire project with one command, each MCU+ core still gets its own separate binary output file.

    In a similar way, if we want to modify the SysConfig settings for the entire system project, we can open it up the SysConfig settings like this:

    $ make -s -C examples/drivers/ipc/ipc_rpmsg_echo_linux/am64x-evm/system_freertos/ syscfg-gui

    .

    2) Disable shared memory with a core if the shared memory is not being used. For example, disable IPC with a core if you are not using IPC with that core 

    Let's continue the example. Now, instead of enabling IPC with every MCU+ core, let's say we only want to do IPC between R5F0_0 and Linux.

    In that case, we need to open the sysconfig settings for ONLY the R5F0_0 core.

    $ make -s -C examples/drivers/ipc/ipc_rpmsg_echo_linux/am64x-evm/r5fss0-0_freertos/ti-arm-clang/ syscfg-gui

    Under TI DRIVERS > IPC, set every entry in the RED box to be "ALL IPC DISABLED". Since we still want to enable the Linux IPC Example, leave the box for "Linux A53 IPC RP Message" as checked.

    Don't forget to save your changes by going FILE > Save.

    Now we can build ONLY the firmware for the R5F0_0 core like this:

    mcu_plus_sdk_am64x_09_01_00_41$ make -s -C examples/drivers/ipc/ipc_rpmsg_echo_linux/am64x-evm/r5fss0-0_freertos/ti-arm-clang/ clean
    Cleaning: am64x:r5fss0-0:freertos:ti-arm-clang ipc_rpmsg_echo_linux.release.out ...                                                                                          
    
    mcu_plus_sdk_am64x_09_01_00_41$ make -s -C examples/drivers/ipc/ipc_rpmsg_echo_linux/am64x-evm/r5fss0-0_freertos/ti-arm-clang/
    Generating SysConfig files ...                                                                                                                                               
    Running script...
    ...
    Compiling: am64x:r5fss0-0:freertos:ti-arm-clang ipc_rpmsg_echo_linux.release.out: ../../../ipc_rpmsg_echo.c
    Compiling: am64x:r5fss0-0:freertos:ti-arm-clang ipc_rpmsg_echo_linux.release.out: ../main.c
    Compiling: am64x:r5fss0-0:freertos:ti-arm-clang ipc_rpmsg_echo_linux.release.out: generated/ti_drivers_config.c
    Compiling: am64x:r5fss0-0:freertos:ti-arm-clang ipc_rpmsg_echo_linux.release.out: generated/ti_drivers_open_close.c
    Compiling: am64x:r5fss0-0:freertos:ti-arm-clang ipc_rpmsg_echo_linux.release.out: generated/ti_board_config.c
    Compiling: am64x:r5fss0-0:freertos:ti-arm-clang ipc_rpmsg_echo_linux.release.out: generated/ti_board_open_close.c
    Compiling: am64x:r5fss0-0:freertos:ti-arm-clang ipc_rpmsg_echo_linux.release.out: generated/ti_dpl_config.c
    Compiling: am64x:r5fss0-0:freertos:ti-arm-clang ipc_rpmsg_echo_linux.release.out: generated/ti_pinmux_config.c
    Compiling: am64x:r5fss0-0:freertos:ti-arm-clang ipc_rpmsg_echo_linux.release.out: generated/ti_power_clock_config.c
    .
    Linking: am64x:r5fss0-0:freertos:ti-arm-clang ipc_rpmsg_echo_linux.release.out ...
    Linking: am64x:r5fss0-0:freertos:ti-arm-clang ipc_rpmsg_echo_linux.release.out Done !!!
    .
    Boot image: am64x:r5fss0-0:freertos:ti-arm-clang /home/a0226750local/rtos-sdks/am64x/mcu_plus_sdk_am64x_09_01_00_41/examples/drivers/ipc/ipc_rpmsg_echo_linux/am64x-evm/r5fss0-0_freertos/ti-arm-clang/ipc_rpmsg_echo_linux.release.appimage ...
    Generating certificate for ipc_rpmsg_echo_linux.release.appimage ...
    Boot image: am64x:r5fss0-0:freertos:ti-arm-clang /home/a0226750local/rtos-sdks/am64x/mcu_plus_sdk_am64x_09_01_00_41/examples/drivers/ipc/ipc_rpmsg_echo_linux/am64x-evm/r5fss0-0_freertos/ti-arm-clang/ipc_rpmsg_echo_linux.release.appimage.hs_fs Done !!!

    Note that with this new change to build R5F0_0 alone, there will be conflicts if you try to build the entire IPC_Echo example as a system project.