I am trying to build S32K14X MCAL Sample Application as per the attached PDF file
I have compiled the code by adding
#define MCAL_ENABLE_USER_MODE_SUPPORT 1
in
cfg/include/CDD_Mcl_Cfg.h
cfg/include/Can_Cfg.h
cfg/include/Fls_Cfg.h
cfg/include/Gpt_Cfg.h
cfg/include/Mcu_Cfg.h
I am trying to build using the command inside build.bat: (refer attached 7z file)
call launch.bat TOOLCHAIN=linaro MODE=SUPR DERIV=144
But I am getting following link errors:
Kindly help to resolve these issues.
c:/toolchain/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: warning: bin/sample_app_mcal.elf has a LOAD segment with RWX permissions
c:/toolchain/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: ./bin/Can.o: in function `Can_Init':
C:/NXP/AUTOSAR/S32K14X_MCAL4_2_RTM_1_0_0/eclipse/plugins/Can_TS_T40D2M10I0R0/src/Can.c:471: undefined reference to `Sys_GoToSupervisor'
c:/toolchain/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: C:/NXP/AUTOSAR/S32K14X_MCAL4_2_RTM_1_0_0/eclipse/plugins/Can_TS_T40D2M10I0R0/src/Can.c:471: undefined reference to `Sys_GoToUser_Return'
c:/toolchain/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: ./bin/Can.o: in function `Can_ChangeBaudrate':
C:/NXP/AUTOSAR/S32K14X_MCAL4_2_RTM_1_0_0/eclipse/plugins/Can_TS_T40D2M10I0R0/src/Can.c:590: undefined reference to `Sys_GoToSupervisor'
c:/toolchain/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: C:/NXP/AUTOSAR/S32K14X_MCAL4_2_RTM_1_0_0/eclipse/plugins/Can_TS_T40D2M10I0R0/src/Can.c:590: undefined reference to `Sys_GoToUser_Return'
c:/toolchain/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: ./bin/Can.o: in function `Can_SetControllerMode':
C:/NXP/AUTOSAR/S32K14X_MCAL4_2_RTM_1_0_0/eclipse/plugins/Can_TS_T40D2M10I0R0/src/Can.c:757: undefined reference to `Sys_GoToSupervisor'
c:/toolchain/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: C:/NXP/AUTOSAR/S32K14X_MCAL4_2_RTM_1_0_0/eclipse/plugins/Can_TS_T40D2M10I0R0/src/Can.c:757: undefined reference to `Sys_GoToUser_Return'
c:/toolchain/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: ./bin/Can.o: in function `Can_MainFunction_BusOff':
C:/NXP/AUTOSAR/S32K14X_MCAL4_2_RTM_1_0_0/eclipse/plugins/Can_TS_T40D2M10I0R0/src/Can.c:2005: undefined reference to `Sys_GoToSupervisor'
c:/toolchain/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: C:/NXP/AUTOSAR/S32K14X_MCAL4_2_RTM_1_0_0/eclipse/plugins/Can_TS_T40D2M10I0R0/src/Can.c:2005: undefined reference to `Sys_GoToUser_Return'
c:/toolchain/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: ./bin/Can.o: in function `Can_MainFunction_Mode':
C:/NXP/AUTOSAR/S32K14X_MCAL4_2_RTM_1_0_0/eclipse/plugins/Can_TS_T40D2M10I0R0/src/Can.c:2105: undefined reference to `Sys_GoToSupervisor'
c:/toolchain/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: C:/NXP/AUTOSAR/S32K14X_MCAL4_2_RTM_1_0_0/eclipse/plugins/Can_TS_T40D2M10I0R0/src/Can.c:2105: undefined reference to `Sys_GoToUser'
c:/toolchain/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: ./bin/Fls_Flash.o: in function `Fls_Flash_VerifyWrite':
C:/NXP/AUTOSAR/S32K14X_MCAL4_2_RTM_1_0_0/eclipse/plugins/Fls_TS_T40D2M10I0R0/src/Fls_Flash.c:1237: undefined reference to `Mcal_Trusted_Call'
c:/toolchain/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: ./bin/Fls_Flash.o: in function `Fls_Flash_VerifyErase':
C:/NXP/AUTOSAR/S32K14X_MCAL4_2_RTM_1_0_0/eclipse/plugins/Fls_TS_T40D2M10I0R0/src/Fls_Flash.c:1044: undefined reference to `Mcal_Trusted_Call'
c:/toolchain/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: ./bin/Fls_Flash.o: in function `Fls_Flash_SectorRead':
C:/NXP/AUTOSAR/S32K14X_MCAL4_2_RTM_1_0_0/eclipse/plugins/Fls_TS_T40D2M10I0R0/src/Fls_Flash.c:3033: undefined reference to `Mcal_Trusted_Call'
c:/toolchain/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: ./bin/Fls_Flash.o: in function `Fls_Flash_SectorCompare':
C:/NXP/AUTOSAR/S32K14X_MCAL4_2_RTM_1_0_0/eclipse/plugins/Fls_TS_T40D2M10I0R0/src/Fls_Flash.c:3407: undefined reference to `Mcal_Trusted_Call'
c:/toolchain/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: ./bin/Mcu_IPW.o: in function `Mcu_Ipw_Init':
C:/NXP/AUTOSAR/S32K14X_MCAL4_2_RTM_1_0_0/eclipse/plugins/Mcu_TS_T40D2M10I0R0/src/Mcu_IPW.c:405: undefined reference to `Mcal_Trusted_Call1param'
c:/toolchain/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: C:/NXP/AUTOSAR/S32K14X_MCAL4_2_RTM_1_0_0/eclipse/plugins/Mcu_TS_T40D2M10I0R0/src/Mcu_IPW.c:409: undefined reference to `Mcal_Trusted_Call1param'
c:/toolchain/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: C:/NXP/AUTOSAR/S32K14X_MCAL4_2_RTM_1_0_0/eclipse/plugins/Mcu_TS_T40D2M10I0R0/src/Mcu_IPW.c:413: undefined reference to `Mcal_Trusted_Call1param'
c:/toolchain/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: ./bin/Mcu_IPW.o: in function `Mcu_Ipw_InitClock':
C:/NXP/AUTOSAR/S32K14X_MCAL4_2_RTM_1_0_0/eclipse/plugins/Mcu_TS_T40D2M10I0R0/src/Mcu_IPW.c:439: undefined reference to `Mcal_Trusted_Call1param'
c:/toolchain/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: C:/NXP/AUTOSAR/S32K14X_MCAL4_2_RTM_1_0_0/eclipse/plugins/Mcu_TS_T40D2M10I0R0/src/Mcu_IPW.c:447: undefined reference to `Mcal_Trusted_Call'
c:/toolchain/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: C:/NXP/AUTOSAR/S32K14X_MCAL4_2_RTM_1_0_0/eclipse/plugins/Mcu_TS_T40D2M10I0R0/src/Mcu_IPW.c:455: undefined reference to `Mcal_Trusted_Call1param'
c:/toolchain/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: C:/NXP/AUTOSAR/S32K14X_MCAL4_2_RTM_1_0_0/eclipse/plugins/Mcu_TS_T40D2M10I0R0/src/Mcu_IPW.c:462: undefined reference to `Mcal_Trusted_Call1param'
c:/toolchain/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: C:/NXP/AUTOSAR/S32K14X_MCAL4_2_RTM_1_0_0/eclipse/plugins/Mcu_TS_T40D2M10I0R0/src/Mcu_IPW.c:468: undefined reference to `Mcal_Trusted_Call1param'
c:/toolchain/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: C:/NXP/AUTOSAR/S32K14X_MCAL4_2_RTM_1_0_0/eclipse/plugins/Mcu_TS_T40D2M10I0R0/src/Mcu_IPW.c:475: undefined reference to `Mcal_Trusted_Call1param'
c:/toolchain/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: C:/NXP/AUTOSAR/S32K14X_MCAL4_2_RTM_1_0_0/eclipse/plugins/Mcu_TS_T40D2M10I0R0/src/Mcu_IPW.c:482: undefined reference to `Mcal_Trusted_Call1param'
c:/toolchain/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: ./bin/Mcu_IPW.o: in function `Mcu_Ipw_SetMode':
C:/NXP/AUTOSAR/S32K14X_MCAL4_2_RTM_1_0_0/eclipse/plugins/Mcu_TS_T40D2M10I0R0/src/Mcu_IPW.c:581: undefined reference to `Mcal_Trusted_Call'
c:/toolchain/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: C:/NXP/AUTOSAR/S32K14X_MCAL4_2_RTM_1_0_0/eclipse/plugins/Mcu_TS_T40D2M10I0R0/src/Mcu_IPW.c:585: undefined reference to `Mcal_Trusted_Call'
c:/toolchain/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: ./bin/Mcu_IPW.o: in function `Mcu_Ipw_GetResetReason':
C:/NXP/AUTOSAR/S32K14X_MCAL4_2_RTM_1_0_0/eclipse/plugins/Mcu_TS_T40D2M10I0R0/src/Mcu_IPW.c:663: undefined reference to `Mcal_Trusted_Call_Return'
c:/toolchain/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: ./bin/Mcu_IPW.o: in function `Mcu_Ipw_Init':
C:/NXP/AUTOSAR/S32K14X_MCAL4_2_RTM_1_0_0/eclipse/plugins/Mcu_TS_T40D2M10I0R0/src/Mcu_IPW.c:416: undefined reference to `Mcal_Trusted_Call1param'
c:/toolchain/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: ./bin/Mcu_IPW.o: in function `Mcu_Ipw_InitClock':
C:/NXP/AUTOSAR/S32K14X_MCAL4_2_RTM_1_0_0/eclipse/plugins/Mcu_TS_T40D2M10I0R0/src/Mcu_IPW.c:487: undefined reference to `Mcal_Trusted_Call1param'
c:/toolchain/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: ./bin/Mcu_IPW.o: in function `Mcu_Ipw_DistributePllClock':
C:/NXP/AUTOSAR/S32K14X_MCAL4_2_RTM_1_0_0/eclipse/plugins/Mcu_TS_T40D2M10I0R0/src/Mcu_IPW.c:514: undefined reference to `Mcal_Trusted_Call1param'
c:/toolchain/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: ./bin/Mcu_IPW.o: in function `Mcu_Ipw_SetMode':
C:/NXP/AUTOSAR/S32K14X_MCAL4_2_RTM_1_0_0/eclipse/plugins/Mcu_TS_T40D2M10I0R0/src/Mcu_IPW.c:618: undefined reference to `Mcal_Trusted_Call1param'
c:/toolchain/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: ./bin/Mcu_IPW.o: in function `Mcu_Ipw_GetResetRawValue':
C:/NXP/AUTOSAR/S32K14X_MCAL4_2_RTM_1_0_0/eclipse/plugins/Mcu_TS_T40D2M10I0R0/src/Mcu_IPW.c:683: undefined reference to `Mcal_Trusted_Call_Return'
collect2.exe: error: ld returned 1 exit status
make: *** [makefile:230: bin/sample_app_mcal.elf] Error 1
Hello,
Please do not manually modify the generation code. Instead, please configure user mode in EB Tresos GUI. Besides, build the app with MODE=SUPR means MCAL_ENABLE_SUPERVISOR_MODE is defined, not MCAL_ENABLE_USER_MODE_SUPPORT.
Best Regards,
Nam
Thanks.
We solved this issue by selecting right combination as follows:
SET TRESOS_DIR=C:/EB/tresos23
SET MAKE_DIR=C:/NXP/S32DS_ARM_v2018.R1/utils/msys32/usr
SET GCC_DIR=C:/GNUArmEmbeddedToolchain/102021.10
SET LINARO_DIR=C:/GNUToolsARMEmbedded/62017-q2-update
SET PLUGINS_DIR=C:/NXP/AUTOSAR/S32K14X_MCAL4_2_RTM_1_0_0/eclipse/plugins