Imx rt1024 position independent code - fail to start first task

I can remove these compiler flags without a problem. But removing the part where I no longer setup r9 results in hard faults. First step was no longer to setup r9 and remove your suggested line in port.c. That already failed. Next I removed the compiler flag -mpic-register-r9 anyway just to try; but that results in the same problem. So it looks like these are mandatory for me. Which is weird, if you say that you don’t need them, while you are using an arm cpu too (right?)

So at least you spared me another 2 compiler flags. Not sure why I do need the r9 to locate my .got, while you don’t.

Can this be something specific for nxp’s imx rt boards? Which board do you use where you don’t need to setup r9?

I can also drop a question on nxp community, maybe they can clarify this bit