MATLAB Answers

Simulink Make Error: MemUnit_T is undefined

1 view (last 30 days)
Marc
Marc on 11 Apr 2014
Commented: AJ von Alt on 23 Apr 2014
Hello everyone,
i'm currently experimenting with an STM32F401 Discovery Board. I successfully installed the embedded Target files and want to try out some of the shipped PIL Demonstration models. I can get to the point where C-Files are created and make is being executed. Then i get an error (from the Compiler itself) saying MemUnit_T is undefined .
Has anyone ever had this type of error? I can't find a single result on google.
OS: Windows 8.1
MATLAB Version: R2014a (i actually downloaded it just yesterday)
Toolchain: KEIL MDK 5

Accepted Answer

Marc
Marc on 23 Apr 2014
Thanks for the answer, at some point i had that quite figured out myself. The real problem behind this error is a little bit more though. Once i had the MemUnit_T thing figured out after a little expirementing, i decided to give the whole thing a try with R2013b and it worked like a charm. Apparently the ST Blocksets don't work with R2014a (yet?). It fails to copy almost all of the necessary .h files from the toolbox folder to the code generation target directory. That's what caused my initial issue aswell as the following ones.
little sidenote: KEIL uVision v5 works but you need to adjust several Flash- and Debugsettings. You're probably better off with version 4 at the moment.
tl;dr do not use a release higher than 2013b with the STM32F4 blocksets and go for uVision v4, not 5. that should solve most of the upcoming issues
  1 Comment
AJ von Alt
AJ von Alt on 23 Apr 2014
That makes it sound like it might be a path issue.
Try:
restoredefaultpath
savepath
rehash toolboxcache
and restart MATLAB.

Sign in to comment.

More Answers (1)

Pascal REYNAUD
Pascal REYNAUD on 22 Apr 2014
Hi Marc,
MemUnit_T is a preprocessor symbol that must be defined in your project settings.
You just have to add MemUnit_T=uint8_T to preprocessor symbol definition.
Best regards
pascal

Community Treasure Hunt

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

Start Hunting!

Translated by