Hello,
1. Every once in a while, while doing a build from S32DS (v 3.6.2, The OS is Windows 11) , the build fails because it cannot find certain standard header files. Simply re-opening the project's .mex file, doing an 'update code' (although it should not actually update anything) and rebuilding fixes the issue. My question is: why does this happen? It seems to happen randomly, so I cannot provide any 'steps to reproduce', but it happens often enough that I'd be surprised if you are not at least aware of it. I have seen some other people also mentioning this issue on the forum.
This issue is relatively common in Eclipse-based IDEs like S32DS. Here are the most likely causes:
-
Indexing/Path Resolution Glitch
S32DS relies on Eclipse’s CDT indexer and project metadata to resolve include paths. Occasionally, the indexer or the internal build configuration gets out of sync—especially after changes to .mex or environment variables. Reopening the .mex file and regenerating code forces the IDE to refresh paths and rebuild the index.
-
Temporary Workspace Corruption
The IDE stores a lot of state in the workspace. If the workspace cache becomes inconsistent (e.g., after an interrupted build or IDE crash), include paths may not be recognized until a refresh.
-
Windows File System Timing
On Windows, antivirus or file-locking can delay access to header files during parallel build steps, causing intermittent failures.
2. We are working towards putting the entire code base that will be programmed to the flash (as opposed to our application code only) into git and use a CI/CD pipeline, outside of the IDE in a headless environment, to build the image. We are using gitlab running on RHEL.
Are there any 'best practices' recommendation for this? In particular, since the RTD, the C standard library etc are outside the project and the IDE sets up a lot of the connections, how should this be handled in a CI/CD environment and how does one install a stand-alone toolchain?
Handle RTD and External SDKs
Version Control or Artifact Repository:
Store RTD and SDK packages in Git (if allowed) or in an artifact repository like Nexus/Artifactory.
Environment Variables:
Define variables like RTD_PATH and SDK_PATH in your CI/CD pipeline.
Use these variables in your Makefile or build scripts instead of hardcoded paths.
Export Project for Headless Build
In S32DS, export the project as a Makefile project (Project → Generate Makefiles).
This gives you a Makefile that can be used outside the IDE.
Alternatively, use s32ds.exe --build for Windows-based headless builds, but for Linux CI/CD, Makefile is preferred.
Avoid IDE Dependencies
Do not rely on .mex regeneration in CI/CD.
Ensure all include paths and compiler flags are captured in the Makefile or CMake configuration.
I am not sure if there is anything else then general recommendations.
Best regards,
Peter