Envoking a script to set paths from the launch command freezes 2013b command window; but works fine if run separately

3 views (last 30 days)
Our product, Altera's DSP Builder, adds a number of Simulink libraries to enable users to design and compile to our FPGAs. To remain flexible to users with multiple versions of both our product and Matlab, we add the paths and javeclasspaths dynamically on launching via a short-cut batch script we provide.
This worked up until 2013b on Windows (32-bit and 64bit versions), where some customers (not all) report this freezes the Matlab command window. The launch command we use is something like
MATLAB -r "setenv('DSPBA_ROOT','D:\Altera\quartus\dspba');run('D:\Altera\quartus\dspba\setup_dspba');setenv('DSP_BUILDER_ROOT','D:\Altera\quartus\dsp_builder');run('D:\Altera\quartus\dsp_builder\setup_dsp_builder');"
If instead the set-up scripts (setup_dspba and setup_dsp_builder) can be run separately after opening Matlab and setting the environment variables, the set-up completes fine without freezing: only when invoked using -r does the problem arise. The set-up scripts just add directories to the path and javaclasspath - that's it. Adding further debug output to the setup and adding commands to display paths and open libraries to the end of the script shows that the script does indeed complete before Matlab freezes and that it is only the command window that freezes (library windows that are opened in additional added commands still remaining responsive).
Earlier versions of Matlab (2013a and earlier), and Linux releases are unaffected.
Any ideas?

Answers (0)

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!

Translated by