Do you have any ideas about how are you going to launch arduino sketches and how they should be prepared before/after compilation? This sketch (maybe) should be compiled and linked with position independent flags, which is not fully supported by arm-gcc. I am asking because it’s really non-trivial and I faced a similar problem and, maybe, can help)