I want to compile my project to be PI (it is an RTX app running C code on STM32L1xx). For target options, I check "Make RO Sections PI" in the Linker tab with no scatter file or misc controls. In the C/C++ and Asm tabs, I check "RO PI" and add "--apcs=/fpic" to misc controls.
Upon cleaning/rebuilding the target, I get no compiler warnings or errors, but the linker throws hundreds of warnings and errors for all object files, with these 3 codes: L6412W L6248E L6285E
I've obviously looked up the meaning of these error codes, but I'm not sure what to do about it. I've read infocenter.arm.com/.../index.jsp but I can safely assume I'm not doing this in every object file; I suspect it's something more fundamental to the target options. Even my Startup.s file has these errors and I copied it from STM. Any ideas?
Some examples of warning and error messages are:
.\obj\Project_Pic.axf: Warning: L6412W: Disabling merging for mytask.o(.conststring), unsupported relocation R_ARM_REL32 from mytask.o(.text) .\obj\Project_Pic.axf: Error: L6248E: startup.o(RESET) in PI region 'ER_RO' cannot have address type relocation to Reset_Handler in PI region 'ER_RO'. .\obj\Project_Pic.axf: Error: L6248E: startup.o(RESET) in PI region 'ER_RO' cannot have address type relocation to NMI_Handler in PI region 'ER_RO'. .\obj\Project_Pic.axf: Error: L6248E: startup.o(RESET) in PI region 'ER_RO' cannot have address type relocation to HardFault_Handler in PI region 'ER_RO'. .\obj\Project_Pic.axf: Error: L6248E: params.o(.text) in PI region 'ER_RO' cannot have offset type relocation to m_p_MyParams in ABSOLUTE region 'ER_RW'. .\obj\Project_Pic.axf: Error: L6248E: routing.o(.text) in PI region 'ER_RO' cannot have offset type relocation to m_MyMutex in ABSOLUTE region 'ER_ZI'. .\obj\Project_Pic.axf: Error: L6248E: params.o(.data) in ABSOLUTE region 'ER_RW' cannot have address/offset type relocation to GetMyParam in PI region 'ER_RO'. .\obj\Project_Pic.axf: Error: L6285E: Non-relocatable Load region LR_1 contains R-Type dynamic relocations. First R-Type dynamic relocation found in startup.o(RESET) at offset 0x4.