Error connecting Custom DLL to STM32F302R8 GPIO or PWM
I created a custom DLL to be used in Altair Embed 2021.1. The user block works fine if it runs alone. But when I try to download it to STM32F302R8, I get an error:
" C:\Altair\Embed2021\cg/Diagram1_21.c:41: undefined reference to `cgMain'
c:/program files (x86)/gnu arm embedded toolchain/10 2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: Diagram1_21.o: in function `main':
C:\Altair\Embed2021\cg/Diagram1_21.c:77: undefined reference to `cgMainSS' c:/program files (x86)/gnu arm embedded toolchain/10 2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe:
C:\Altair\Embed2021\cg/Diagram1_21.c:80: undefined reference to `cgMainSE' collect2.exe: error: ld returned 1 exit status".
I have attached a screenshot of the message. Any help?
Find more posts tagged with
I appreciate your response.
I am trying to implement a controller for a motor. I am trying to implement an advanced controller, that requires complex algorithms that cannot be easily implemented using the blocks. I have written the code in C/C++.
Any help or suggestions will be appreciated.
Regards,
Kay

You can use extern blocks to use the external code. Attached the simple example using extern block.
Regards,
Girish
User Blocks works for simulation not for codegen .
May I know what are you trying to achieve??
Regards,
Girish