MATLAB: Do I receive an error when building the HC12 target code using Embedded Target for Motorola HC12 and CodeWarrior 3.1

compilercrossEmbedded Target for Motorola HC12

When I build my target application using Embedded Target for Motorola HC12, I receive the following CodeWarrior error message in a pop-up window:
Failed to load C:\PROGRA~1\MATLAB71\work\HC12_P~1\rtwlib\rtwlib.lib
My StaticLibraryDirectory path name contains spaces in it.

Best Answer

This is a limitation of the CodeWarrior cross-compiler when building a target application and using a directory path name that contains spaces in the "StaticLibraryDirectory" preference.
To work around this issue, rename the full path directory name so that it does not contain spaces. If the issue persists, make sure that each sub-directory name inside this full path is less than 8 characters. You can access the "StaticLibraryDirectory" preference, by typing the following MATLAB command:
hc12editprefs
Then click on the "+" sign next to the "ProjectStationery" node. It will expand, and you will be able to see the "StaticLibraryDirectory" preference.
Related Question