I use Linux to run S32DS + RTD, leveraging Linux's overlayfs mechanism to switch between different RTD versions seamlessly. With this setup, a single S32DS installation can work with distinct RTD overlays, enabling flexible RTD version management.
However, the current RTD distribution has two critical compatibility issues on Linux that I hope can be fixed before the official RTD release:
Issue 1: Case Mismatch in Component File Directory Names
In the eclipse/mcu_data/components directory, the directory names defined in the codegen_file nodes of component files have case inconsistencies with the actual physical directory names.
This works fine on Windows (which is case-insensitive for file paths) but causes path resolution failures on Linux (a case-sensitive OS), making the RTD components unusable.
Issue 2: Incorrect Windows Path Separators in Generated Clock Files
The two key configuration files—ClockConfigurationMappings.txt and ClockYaml.txt—are generated using Windows backslash path separators (\) in the file generation logic.
On Linux, this misformatting causes the files to be incorrectly placed directly in the root workspace directory, with filenames formatted as:ProjectName\ClockConfigurationMappings.txt and ProjectName\ClockYaml.txtinstead of being stored in their correct project-specific subdirectories.
Fix: Bash Script for Global Correction
I created a bash script to resolve the second issue automatically. Run this script in the mcu_data directory to apply 3 global find-and-replace operations that fix the path logic for Linux compatibility:
#!/bin/bash
find . -type f -name "*.js" | while read -r file; do
sed -i 's/mexPath\.substring(0,[ ]\?mexPath\.lastIndexOf("\\\\"))/java.nio.file.Paths.get(mexPath).getParent().toString()/g' "$file"
sed -i 's/+[ ]\?"\\\\ClockConfigurationMappings\.txt"/, "ClockConfigurationMappings.txt"/g' "$file"
sed -i 's/+[ ]\?"\\\\ClockYaml\.txt"/, "ClockYaml.txt"/g' "$file"
done