Why do I get an error using a microcontroller library with S-function builder?
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello every one, I am currently working with a microcontroler (dsPIC33) and I am trying to programm it with SIMULINK.
I would like to use the S-function Builder block. I already read the associated documentation and found several examples.
I wish to import a library used by MPLAB for microcontroler's programming. I made a copy of it and managed to import it with the S-function Builder but when I try to use one of the functions (__delay32 for example) I have the following error :
error LNK2001: unresolved external symbol __delay32
Does anyone have tried to do something similar?
Thanks for your help. Helene
0 Kommentare
Antworten (2)
Kaustubha Govind
am 21 Mär. 2013
Where is __delay32 defined? Assuming that it is in an external library/source file, you need to add that file to the 'Library/Object/Source files' textbox in the Libraries pane of the S-function Builder Dialog Box.
0 Kommentare
Helene
am 25 Mär. 2013
1 Kommentar
Kaustubha Govind
am 25 Mär. 2013
So it appears that __delay32 is only defined for the microcontroller, but not for a host/PC target? Since the Simulink model runs the S-function on the host machine during simulation, you may want to use an OS-equivalent for __delay32 (or make it a no-op) in the S-function Builder. Then, modify the generated TLC file to call __delay32 instead of its replacement, so that the generated embedded code calls __delay32, but not the S-function itself.
Siehe auch
Kategorien
Mehr zu Simulink Coder finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!