Our project needs to be compiled into PIC (Position Independent Code) function with IAR.
1. The following is the error message generated by using the IAR compile tool.
S32DS_IAR_Converter.out
Error[Lp005]: placement includes a mix of sections with content (example "ro data preinit_array section .prepreinit_array in clockMan1.o") [suitable for placement in ROM] and sections without content (example "rw data section .data in clock_S32K1xx.o") [suitable for placement in RAM] D:\workspace_S32DS_for_IAR\IAR_S32DS\Project_Settings\Linker_Files\S32K144_64_flash.icf 152
Error[Lt043]: Base relative relocation to non-static base address.
Relocation: R_ARM_SBREL32
Destination: "g_pin_mux_InitConfigArr"
Location: "CCIF_Handler" + 0x14
Error[Lt043]: Base relative relocation to non-static base address.
Relocation: R_ARM_SBREL32
Destination: "CLOCK_SYS_GetDefaultConfiguration::peripheralClockConfig"
Location: "CLOCK_DRV_GetFreq" + 0x5f0
Error[Lt043]: Base relative relocation to non-static base address.
Relocation: R_ARM_SBREL32
Destination: "clockMan1_InitConfig0"
Location: ".text14" + 0x14
Error[Lt043]: Base relative relocation to non-static base address.
Relocation: R_ARM_SBREL32
Destination: "peripheralClockConfig0"
Location: "??__sti__routine_0" + 0x4
Error[Lt043]: Base relative relocation to non-static base address.
Relocation: R_ARM_SBREL32
Destination: "xFreeBytesRemaining"
Location: "vPortFree" + 0x7c
Error[Lt043]: Base relative relocation to non-static base address.
Relocation: R_ARM_SBREL32
Destination: "g_lpspiBase"
Location: "LPSPI_DRV_MasterIRQHandler" + 0xc8
Error[Lt043]: Base relative relocation to non-static base address.
Relocation: R_ARM_SBREL32
Destination: "g_lpspiBase"
Location: "LPSPI_DRV_DisableTEIEInterrupts" + 0x30
Error[Lt043]: Base relative relocation to non-static base address.
Relocation: R_ARM_SBREL32
Destination: "g_lpspiBase"
Location: "LPSPI_DRV_SlaveAbortTransfer" + 0x76
Error[Lt043]: Base relative relocation to non-static base address.
Relocation: R_ARM_SBREL32
Destination: "uxCriticalNesting"
Location: "vPortValidateInterruptPriority" + 0x58
Error[Lt041]: Absolute relocation to movable block.
Relocation: R_ARM_ABS32
Destination: "SystemInit" (in movable block: ROPI)
Location: "Reset_Handler" + 0x34 (in movable block: ROPI)
Error[Lt041]: Absolute relocation to movable block.
Relocation: R_ARM_ABS32
Destination: "init_data_bss" (in movable block: ROPI)
Location: "Reset_Handler" + 0x38 (in movable block: ROPI)
Error[Lt041]: Absolute relocation to movable block.
Relocation: R_ARM_ABS32
Destination: "pxCurrentTCB" (in movable block: RWPI)
Location: "vPortEnableVFP" + 0x10 (in movable block: ROPI)
Total number of errors: 13
Total number of warnings: 0
Build failed
See what's the problem?
2. Are there any other suggestions on the function of generating PIC?
Hi Varun
Sorry, it didn't fixed.
how did you fix this error?