I'm working on a project and for proof of concept I used a Cortex M0 based Arduino board (MkrZero) for the micro controller portion. I have some limited experience with C and wrote the firmware using the Arduino IDE. Now that its all working I would like to move away from the speed limitations inherent to the Arduino operating system. The nice thing about the Arduino approach is the readily available open source libraries, but you pay a stiff price in performance. Most of the code I wrote is pretty basic stuff, loops and switch statements etc, so those aspects should compile under a regular C compiler.
The one aspect I'm not looking forward to is the display code, I'm using a generic SPI based 320 x 240 TFT display with touch screen, I'm actually okay with the Arduino library for the display, it works well and is not overly slow.
Assuming I get a conventional C based loop and interrupt firmware to run on this uC, is it possible to use the Arduino display library or do I need to write this from scratch?
Depends of compilier that you are using. For example, Keil uVision support c++, so you can keep using your arduino sources.
Really depends what are you trying to do. If it is just a simple gui - probably, direct driving using this library is enough.
If you need to make a kind of framebuffer with high update rate, you need to write a driver by yourself: memory -> dma -> pereferial (SPI/FSMC) -> display controller.
Assuming I get a conventional C based loop and interrupt firmware to run on this uC, is it possible to use the Arduino display library or do I need to write this from scratch?
Significant part of the libraries for Arduino have their source codes available in the folder designated for the libraries, and I wouldn't doubt that this could be the case at hand, so if I were you I would make a deep search on your computer to see if it is there somewhere.
Any suggestions from anyone that has migrated code from Arduino to regular C or suggestions for a non Arduino IDE are welcome
Although Arduino loses some performance and flexibility in excess abstraction, on the other hand it is a language that gains from C by having C++ as its native SDK running in the background compilation; You can even rename the .ino file to .cpp and find that it is an accepted extension and thus take all the benefits of an object-oriented language, but this would be suited only for those who have a little more familiarity with this language.
Depends of compilier that you are using. For example, Keil uVision support c++, so you can keep using your arduino sources.
Really depends what are you trying to do. If it is just a simple gui - probably, direct driving using this library is enough.
If you need to make a kind of framebuffer with high update rate, you need to write a driver by yourself: memory -> dma -> pereferial (SPI/FSMC) -> display controller.
Software is not my strong point so I'm looking for advice.
Option 1) On the Microchip website, it appears they offer a free IDE and compiler for the SAM MCU https://www.microchip.com/development-tools
Option 2) On the Microchip website, it appears they offer a SAM-ICE debugger for $150, I'm assuming that integrates with their free IDE and compiler for the SAM MCU? https://www.microchip.com/DevelopmentTools/ProductDetails/AT91SAM-ICE
Option 3) Keil offers a free evaluation version with some limitations, I'm not sure if I can work within the limitations, looks like 32k code space limit? However beyond that Keil is way beyond what I'm willing to pay