Echo out Simulink Coder environmental variables
조회 수: 2 (최근 30일)
이전 댓글 표시
Hallo,
is there a way to echo out Environmental variables used by Simulink Coder?
For example, the linker file for the Simulink Embedded Coder Hardware Support package is addressed by default by:
$(TARGET_ROOT)\src\c28377D.cmd
Screenshot:
which evaluates in the end to:
C:\ProgramData\MATLAB\SupportPackages\R2021b\toolbox\target\supportpackages\tic2000\src\c28377D.cmd
Is there a way how I could get this path in Matlab? I'd like to write a script that moves a file to that specific location, and for that I'd need the target path.
Alternatively, are there other environmental variables like $(TARGET_ROOT) available?
Thanks in advance!
댓글 수: 0
답변 (1개)
Gyan Vaibhav
2024년 2월 28일
Hi Michael,
For accessing environment variables in MATLAB you can use the "getenv" function as follows:
This gives you the values of the environment variables that MATLAB and Simulink uses to specify various attributes and properties.
targetRoot = getenv('TARGET_ROOT');
Find more information about this on the following documentation page:
Thanks
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Deployment, Integration, and Supported Hardware에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!