2 Improvements for Running RTD on Linux

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

2 Improvements for Running RTD on Linux

跳至解决方案
428 次查看
chenwilsoft
Contributor II
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

0 项奖励
回复
1 解答
360 次查看
petervlna
NXP TechSupport
NXP TechSupport

Hello,

I have notified SW team to have a look at your comments.

Best regards,

Peter

在原帖中查看解决方案

0 项奖励
回复
1 回复
361 次查看
petervlna
NXP TechSupport
NXP TechSupport

Hello,

I have notified SW team to have a look at your comments.

Best regards,

Peter

0 项奖励
回复
%3CLINGO-SUB%20id%3D%22lingo-sub-2332907%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E2%20%E5%9C%A8%20Linux%20%E4%B8%8A%E8%BF%90%E8%A1%8C%20RTD%20%E7%9A%84%E6%94%B9%E8%BF%9B%E6%8E%AA%E6%96%BD%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2332907%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CDIV%20class%3D%22%22%3E%E6%88%91%E4%BD%BF%E7%94%A8%20Linux%20%E8%BF%90%E8%A1%8C%20S32DS%20%2B%20RTD%EF%BC%8C%E5%88%A9%E7%94%A8%20Linux%20%E7%9A%84%20overlayfs%20%E6%9C%BA%E5%88%B6%E5%9C%A8%E4%B8%8D%E5%90%8C%20RTD%20%E7%89%88%E6%9C%AC%E4%B9%8B%E9%97%B4%E6%97%A0%E7%BC%9D%E5%88%87%E6%8D%A2%E3%80%82%E9%80%9A%E8%BF%87%E8%BF%99%E7%A7%8D%E8%AE%BE%E7%BD%AE%EF%BC%8C%E5%8D%95%E4%B8%AA%20S32DS%20%E5%AE%89%E8%A3%85%E5%8F%AF%E4%B8%8E%E4%B8%8D%E5%90%8C%E7%9A%84%E7%83%AD%E7%94%B5%E9%98%BB%E5%8F%A0%E5%8A%A0%EF%BC%8C%E5%AE%9E%E7%8E%B0%E7%81%B5%E6%B4%BB%E7%9A%84%E7%83%AD%E7%94%B5%E9%98%BB%E7%89%88%E6%9C%AC%E7%AE%A1%E7%90%86%E3%80%82%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%E4%BD%86%E6%98%AF%EF%BC%8C%E5%BD%93%E5%89%8D%E7%9A%84RTD%E5%8F%91%E8%A1%8C%E7%89%88%3CSTRONG%3E%E5%9C%A8Linux%E4%B8%8A%E6%9C%89%E4%B8%A4%E4%B8%AA%E5%85%B3%E9%94%AE%E7%9A%84%E5%85%BC%E5%AE%B9%E6%80%A7%E9%97%AE%E9%A2%98%3C%2FSTRONG%3E%EF%BC%8C%E6%88%91%E5%B8%8C%E6%9C%9B%E5%8F%AF%E4%BB%A5%E5%9C%A8RTD%E6%AD%A3%E5%BC%8F%E7%89%88%E6%9C%AC%E4%B9%8B%E5%89%8D%E8%A7%A3%E5%86%B3%E8%BF%99%E4%BA%9B%E9%97%AE%E9%A2%98%EF%BC%9A%3C%2FDIV%3E%3CH2%20id%3D%22toc-hId--468865600%22%20id%3D%22toc-hId--468784849%22%3E%E9%97%AE%E9%A2%98%201%EF%BC%9A%E5%85%83%E5%99%A8%E4%BB%B6%E6%96%87%E4%BB%B6%E7%9B%AE%E5%BD%95%E5%90%8D%E7%A7%B0%E5%A4%A7%E5%B0%8F%E5%86%99%E4%B8%8D%E5%8C%B9%E9%85%8D%3C%2FH2%3E%3CDIV%20class%3D%22%22%3E%3CSTRONG%3E%E5%9C%A8%20eclipse%2Fmcu_data%2Fcomponents%20%E7%9B%AE%E5%BD%95%E4%B8%AD%EF%BC%8C%E5%85%83%E5%99%A8%E4%BB%B6%E6%96%87%E4%BB%B6%E7%9A%84%20codegen_file%20%E8%8A%82%E7%82%B9%E4%B8%AD%E5%AE%9A%E4%B9%89%E7%9A%84%E7%9B%AE%E5%BD%95%E5%90%8D%E7%A7%B0%E4%B8%8E%E5%AE%9E%E9%99%85%E7%89%A9%E7%90%86%E7%9B%AE%E5%BD%95%E5%90%8D%E7%A7%B0%E5%A4%A7%E5%B0%8F%E5%86%99%E4%B8%8D%E4%B8%80%E8%87%B4%E3%80%82%3C%2FSTRONG%3E%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%E8%BF%99%E5%9C%A8%20Windows%EF%BC%88%E6%96%87%E4%BB%B6%E8%B7%AF%E5%BE%84%E4%B8%8D%E5%8C%BA%E5%88%86%E5%A4%A7%E5%B0%8F%E5%86%99%EF%BC%89%E4%B8%8A%E8%BF%90%E8%A1%8C%E8%89%AF%E5%A5%BD%EF%BC%8C%E4%BD%86%E4%BC%9A%E5%AF%BC%E8%87%B4%20Linux%EF%BC%88%E5%8C%BA%E5%88%86%E5%A4%A7%E5%B0%8F%E5%86%99%E7%9A%84%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%EF%BC%89%3CSTRONG%3E%E8%B7%AF%E5%BE%84%E8%A7%A3%E6%9E%90%E5%A4%B1%E8%B4%A5%3C%2FSTRONG%3E%EF%BC%8C%E5%AF%BC%E8%87%B4%20RTD%20%E5%85%83%E5%99%A8%E4%BB%B6%E4%B8%8D%E5%8F%AF%E7%94%A8%E3%80%82%3C%2FDIV%3E%3CH2%20id%3D%22toc-hId-2018647233%22%20id%3D%22toc-hId-2018727984%22%3E%E9%97%AE%E9%A2%98%202%EF%BC%9A%E7%94%9F%E6%88%90%E7%9A%84%E6%97%B6%E9%92%9F%E6%96%87%E4%BB%B6%E4%B8%AD%E7%9A%84%20Windows%20%E8%B7%AF%E5%BE%84%E5%88%86%E9%9A%94%E7%AC%A6%E4%B8%8D%E6%AD%A3%E7%A1%AE%3C%2FH2%3E%3CDIV%20class%3D%22%22%3E%E4%B8%A4%E4%B8%AA%E5%85%B3%E9%94%AE%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6--ClockConfigurationMappings.txt%20%E5%92%8C%20ClockYaml.txt--%E6%98%AF%E5%9C%A8%E6%96%87%E4%BB%B6%E7%94%9F%E6%88%90%E9%80%BB%E8%BE%91%E4%B8%AD%E4%BD%BF%E7%94%A8%3CSTRONG%3EWindows%20%E5%8F%8D%E6%96%9C%E7%BA%BF%E8%B7%AF%E5%BE%84%E5%88%86%E9%9A%94%E7%AC%A6%20(%5C)%3C%2FSTRONG%3E%E7%94%9F%E6%88%90%E3%80%82%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%E5%9C%A8%20Linux%20%E4%B8%8A%EF%BC%8C%E8%BF%99%E7%A7%8D%E6%A0%BC%E5%BC%8F%E9%94%99%E8%AF%AF%E4%BC%9A%E5%AF%BC%E8%87%B4%E6%96%87%E4%BB%B6%E8%A2%AB%E9%94%99%E8%AF%AF%E5%9C%B0%E7%9B%B4%E6%8E%A5%E6%94%BE%E7%BD%AE%E5%9C%A8%E5%B7%A5%E4%BD%9C%E5%8C%BA%E6%A0%B9%E7%9B%AE%E5%BD%95%E4%B8%AD%EF%BC%8C%E6%96%87%E4%BB%B6%E5%90%8D%E6%A0%BC%E5%BC%8F%E4%B8%BA%EF%BC%9AProjectName%2FClockConfigurationMappings.txt%20%E5%92%8C%20ProjectName%2FClockYaml.txt%EF%BC%8C%E8%80%8C%E4%B8%8D%E6%98%AF%E5%AD%98%E5%82%A8%E5%9C%A8%E6%AD%A3%E7%A1%AE%E7%9A%84%E7%89%B9%E5%AE%9A%E9%A1%B9%E7%9B%AE%E5%AD%90%E7%9B%AE%E5%BD%95%E4%B8%AD%E3%80%82%3C%2FDIV%3E%3CH2%20id%3D%22toc-hId-211192770%22%20id%3D%22toc-hId-211273521%22%3E%E4%BF%AE%E5%A4%8D%EF%BC%9A%20%E7%94%A8%E4%BA%8E%E5%85%A8%E5%B1%80%E6%9B%B4%E6%AD%A3%E7%9A%84%20Bash%20%E8%84%9A%E6%9C%AC%3C%2FH2%3E%3CDIV%20class%3D%22%22%3E%E6%88%91%E5%88%9B%E5%BB%BA%E4%BA%86%E4%B8%80%E4%B8%AA%20bash%20%E8%84%9A%E6%9C%AC%E6%9D%A5%E8%87%AA%E5%8A%A8%E8%A7%A3%E5%86%B3%E7%AC%AC%E4%BA%8C%E4%B8%AA%E9%97%AE%E9%A2%98%E3%80%82%3CSTRONG%3E%E5%9C%A8%20mcu_data%20%E7%9B%AE%E5%BD%95%E4%B8%AD%3C%2FSTRONG%3E%E8%BF%90%E8%A1%8C%E6%AD%A4%E8%84%9A%E6%9C%AC%EF%BC%8C%E5%BA%94%E7%94%A8%203%20%E6%AC%A1%E5%85%A8%E5%B1%80%E6%9F%A5%E6%89%BE%E5%92%8C%E6%9B%BF%E6%8D%A2%E6%93%8D%E4%BD%9C%EF%BC%8C%E4%BB%A5%E4%BF%AE%E5%A4%8D%E8%B7%AF%E5%BE%84%E9%80%BB%E8%BE%91%EF%BC%8C%E5%AE%9E%E7%8E%B0%20Linux%20%E5%85%BC%E5%AE%B9%E6%80%A7%EF%BC%9A%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%3CP%3E%23!%2Fbin%2Fbash%3C%2FP%3E%3CP%3E%E6%89%BE%E5%88%B0-type%20f%20-name%22*.js%22%7C%20while%20read%20-r%20file%3B%20do%3CBR%20%2F%3E%20sed%20-i%20's%2FmexPath%5C.substring(0%2C%5B)%5D%5C%3FmexPath%5C.lastIndexOf(%22%5C%5C%5C%5C%22))%2Fjava.nio.file.Paths.get(mexPath).getParent().toString()%2Fg'%E3%80%82%22%24file%22%3CBR%20%2F%3E%20sed%20-i%20's%2F%2B%5B%20%5D%5C%3F%22%5C%5C%5C%5CClockConfigurationMappings%5C.txt%22%2F%E3%80%81%22ClockConfigurationMappings.txt%22%2Fg'%22%24file%22%3CBR%20%2F%3E%20sed%20-i%20's%2F%2B%5B%20%5D%5C%3F%22%5C%5C%5C%5CClockYaml%5C.txt%22%2F%E3%80%81%22ClockYaml.txt%22%2Fg'%22%24file%22%3CBR%20%2F%3E%20done%3C%2FP%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2333246%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%202%20Improvements%20for%20Running%20RTD%20on%20Linux%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2333246%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E4%BD%A0%E5%A5%BD%3C%2FP%3E%0A%3CP%3E%E6%88%91%E5%B7%B2%E9%80%9A%E7%9F%A5%20SW%20%E5%9B%A2%E9%98%9F%E6%9F%A5%E7%9C%8B%E6%82%A8%E7%9A%84%E6%84%8F%E8%A7%81%E3%80%82%3C%2FP%3E%0A%3CP%3E%E9%A1%BA%E7%A5%9D%E5%95%86%E7%A5%BA%EF%BC%81%3C%2FP%3E%0A%3CP%3EPeter%3C%2FP%3E%3C%2FLINGO-BODY%3E