AM263P4-Q1: ipc example complie error - memory range not found

Part Number: AM263P4-Q1
Other Parts Discussed in Thread: SYSCONFIG

Hi Experts,

I have below error testing the IPC example. 

image.png

This error happens on projects for all three cores other than the first core.

Is this example tested? 

SDK version: mcu_plus_sdk_am263px_26_01_00_08

  • I found the root cause of this. The project only works when build from the system project. Building individual project would not work. Still, this is confusing because customer tends to take individual project as reference. 

    Regards,

    Hang

  • The individual project only works in the "debug" configuration, and would not work in "release" configuration. The missing memory range should be defined in syscfg, however, the debug and release configuration shares the same syscfg. How comes it only work in release? 

  • Hi Hang,

    I see that both builds work fine. Can you please ensure that you modify the profiles for all CPUs. Profile= debug or Release should also be changed from the main system project build configurations and ensure that all the individual projects are also in the desired profile (no mismatch between CPUs for profile, i.e. all debug or all release).

  • Hi Shaunak,

    I somehow created a duplicate post, let's move the discussion here.

    Both Debug and release would work if build from system project. Debug will work for build from individual project, only release won't work building from individual project.

    I get that the idea for this example is build from system project. I am just trying to understand what's making the individual build only works in debug and not release, even though the cmd is from syscfg, and syscfg is shared.  Meanwhile, meantime, does the system project somehow handles the cmd for individual project to avoid conflicts? I'd like to see if there is some design that worth learning to better handle multi-core projects.

    Regards,

    Hang

  •  Meanwhile, meantime, does the system project somehow handles the cmd for individual project to avoid conflicts?

    Not really. The multicore systems project is mostly for helping you obtain a combined .mcelf image for all core's application combined.

    The syscfg are handled individually within the projects. In my local setup, i see both release and debug builds work fine when building from systems project. We do not recommend building directly from individual projects due to interdependencies between CPUs for memory.

    For you, the individual linking might be working sometimes because CCS sometimes smartly picks up the linker.cmd from the projects workspace. So in some cases, this might bypass the build error, but we cannot be sure if the linker.cmd it referenced is the right one. So i'd avoid building individually.

    Regards,
    Shaunak

  • Hi Shaunak,

    CCS sometimes smartly picks up the linker.cmd from the projects workspace.

    In this case there would be a problem for customer.

    Customer usually uses individual build since the core is often spited into different. Each will use individual build, meanwhile, their workspace may contains protect that they import as reference. If the CCS would pick up linker.cmd from other projects, how can they make sure the right cmd is used when compiling the proejct?

    Regards,

    Hang

  • By other project, i meant other project configuration. It is not a reported bug, just something i've noticed in some cases. What my observations based on IPC examples from SDK are:

    1. Importing and building system projects works

    2. Importing system projects and building individual project works (in both Debug and Release binaries)

    3. Importing just the individual projects without the system project and building individual project fails

    Customer usually uses individual build since the core is often spited into different

    For this as well, they can import the systems project and in system.xml file, change the CPU specific project to their desired project.

    Regards,
    Shaunak

  • Hi 

    Importing just the individual projects without the system project and building individual project fails

    That's the problem we are seeing. It would be difficult to add system project when you take software management into consideration. The project of each core should be able to compile, shared, documented on its own, it cannot sit alongside with a system project.

    Even with the convince with the system project, the individual project is still required to able to build and has correct memory map. 

    That's the very reason why we are looking into the impact of the system project to the individual project.

    Let me gives an example on why this is a issue. In this particular case, the individual project has a incorrect cmd file, but the system project would make it work. From another perspective, the system project is "hiding" an error of the individual project, and if the individual project is shared on its own, which is a common case in development flow, then the cmd error would appear on other machine that has a different system project or no system project.

    Regards,

    Hang 

  • Hi Hang

    Let me gives an example on why this is a issue. In this particular case, the individual project has a incorrect cmd file, but the system project would make it work

    I wouldn't call it an incorrect .cmd file. The specific errors you note occur because the shared memory regions are defined by CPU0. The buffers for IPC logging and user shared memory need not be created by each core. That would just mean each CPU is re-defining and duplicating the same region of memory.

    Why system project works?

    When a project is imported as a systems project, you open the syscfg file for any individual project, it will automatically show you all 4 related cores, this is how other CPUs know that the region is defined in CPU0 and is not missing. So it does not hide the error, rather it knows where to look for those memory regions.

     ,

    When you dont use systems project, the other CPUs projects are treated completely separate and you would have to redefine all the sections in both CPUs sysconfig, which is redundant.

    What can customer do?

    Even in customer's setup, even if they use individual projects which are different and not from SDK, having a system project with a correctly defined system.xml is needed.

    They can simply have a system project imported from SDK (for e.g. empty system project), modify the system.xml to point to the correct projects for each CPU from the CCS workspace and modify the makefile_ccs_bootimage_gen file as need by them.

    This is the flow all our customers follow without facing any issues

    Regards,
    Shaunak