How to add libraries to RTW Custom Files?

2 views (last 30 days)
Charles Wang
Charles Wang on 19 Oct 2011
In Simulink "Configuration Parameters" window, under "Real Time Workshop\Custom Code" then "Include list of additional", one can add "Libraries" besides .c and .h source files.
What I intend to do is: use CodeWarior to build a library "driver.lib" to package the board-level drivers and add it here. Therefore I can use those driver functions such as Setup_Interrupts() in a transition within a stateflow chart.
I did a test with only one driver function and a chart with one transition, but I got an error saying unresolved function Setup_Interrupts(), i.e. driver.lib could not be recognized.
If I added Setup_Interrupts() as source files, model simulation succeeded. But my intention is to add a library.
I could not find any support in Matlab Help. Please give me some advice. Thanks!
  2 Comments
Kaustubha Govind
Kaustubha Govind on 19 Oct 2011
Is your MATLAB 32-bit or 64-bit? Make sure your .lib file is also of the same type.
Charles Wang
Charles Wang on 19 Oct 2011
Since I work on a PC with Windows XP, I think that my Matlab is 32-bit (how do find it out?).
The library was built with CodeWarror for a 16-bit platform Freesacle HC9S12. Will this have an impact?

Sign in to comment.

Answers (0)

Categories

Find more on Simulink Coder in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!