Thanks rzusman. I used gcc-arm-none-eabi toolchain for compiling cortex m-4 controller in eclipse, but this was not being remotely. It needed to burn into the memory of that microcontroller. since the raspberry pi has cortex A7, this tool-chain is probably not going to work.
I am going to try this solution, and will post the result.
Thanks again.
