Provide a custom Platform Abstraction Layer. external mode XCP

3 visualizzazioni (ultimi 30 giorni)
Hi,
I have implemented a toolchain based on costum target file cxc_ert.tlc
When I use external mode tcpip -> MEX-file name: ext_comm
The code is generated without problems.
Now I am changing for external mode using XCP on TCP/IP. For that on the sl_costumization.m script I add the line:
cm.ExtModeTransports.add('cxc_ert.tlc', 'XCP on TCP/IP','ext_xcp', 'Level1');
After choose XCP on TCP/IP and try to generate the code the following error appears (see image below).
How can I provide a custom Platform Abstraction Layer? What is the meaning of that? I am new on the Embedded Coder. My target HW is ubuntu Core.
Can you help me?
Many thanks in advance
Miguel Pinto

Risposte (1)

R
R il 12 Set 2024
Hi Miguel,
The issue you're encountering with the custom Platform Abstraction Layer in your Embedded Coder setup is due to the packNGo function not recognizing platform-specific macros such as __WIN32__, __linux__, or __APPLE__ during its parsing phase. This oversight results in an error when the parsing process encounters a #error directive because these macros are not defined.
To work around this issue, you need to manually define the macro corresponding to your target platform before calling packNGo. Since your target hardware is Ubuntu Core, you should define the __linux__ macro.
You can achieve this by adding the following line to your build script.
buildInfo.addDefines('-D__linux__');
This line should be included in your sl_customization.m script or wherever you manage your build configuration.
By defining the __linux__ macro, you ensure that the packNGo parsing process follows the correct platform-specific code paths, thereby avoiding the #error directive. Once this is done, you can attempt to regenerate the code with the "XCP on TCP/IP" setting.
If further issues arise, ensure that all necessary platform-specific files are included in your build configuration and that any other required macros are also defined.

Prodotti


Release

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by