Hello,
We have two hardware board based on S32K3 and they have different CAN Pin settings.
So I created one project with two different functional groups 'VS_0' and 'VS-1' but when I generate the code it includes both groups code and thus when I compile it, it gives linker error as follows:
c:/nxp/s32ds.3.4/s32ds/build_tools/gcc_v10.2/gcc-10.2-arm32-eabi/bin/../lib/gcc/arm-none-eabi/10.2.0/../../../../arm-none-eabi/bin/real-ld.exe: ./generate/src/FlexCAN_Ip_Sa_VS_1_PBcfg.o:C:\xbms\xbms_application\Application\Debug_FLASH/../generate/src/FlexCAN_Ip_Sa_VS_1_PBcfg.c:107: multiple definition of `FlexCAN_State0'; ./generate/src/FlexCAN_Ip_Sa_VS_0_PBcfg.o:C:\xbms\xbms_application\Application\Debug_FLASH/../generate/src/FlexCAN_Ip_Sa_VS_0_PBcfg.c:107: first defined here
c:/nxp/s32ds.3.4/s32ds/build_tools/gcc_v10.2/gcc-10.2-arm32-eabi/bin/../lib/gcc/arm-none-eabi/10.2.0/../../../../arm-none-eabi/bin/real-ld.exe: ./generate/src/FlexCAN_Ip_Sa_VS_1_PBcfg.o:C:\xbms\xbms_application\Application\Debug_FLASH/../generate/src/FlexCAN_Ip_Sa_VS_1_PBcfg.c:110: multiple definition of `FlexCAN_State1'; ./generate/src/FlexCAN_Ip_Sa_VS_0_PBcfg.o:C:\xbms\xbms_application\Application\Debug_FLASH/../generate/src/FlexCAN_Ip_Sa_VS_0_PBcfg.c:110: first defined here
Can you please guide me as what I am doing wrong.
Regards,
Hemant Kapoor
Solved! Go to Solution.
Thanks for the response...
The way I got round this issue is by excluding the unwanted file from the project.
But there are still some issues with the supporting multiple hardware in the IDE
Hello @HemantK
Unfortunately, the functional groups feature of the S32 Configuration Tools is not fully supported by the PlatformSDK_S32K3_2022_xx_S32K34x_M7 SDK (installed within S32DS as part of the S32K3 Real-Time Drivers package). This is why you are seeing these errors. Most likely, you will need to create 2 separate projects. If you want to keep some of the files shared across the 2 projects, so they could more easily be kept in sync, you might consider either using linked files or maintaining some portion as a library project.
Best Regards,
Mike
Thanks for the response...
The way I got round this issue is by excluding the unwanted file from the project.
But there are still some issues with the supporting multiple hardware in the IDE