Go Down

Topic: Using Arduino 2560 board with only my C-language code and arduino boot (Read 473 times) previous topic - next topic

GeniusPro

I would like to use the Arduino IDE just to load my own C-language programs, manually
initiallizing all ports and registers, etc.  but using the ARM Studio IDE ver 5 and/or Arduino IDE to compile/download a c program to the Arduino 2560 board ready to run.
(somebody must be doing this!)

Terry King

Hi,

I would start by looking at how people are integrating code written in C and C++ into libraries:
http://www.arduino.cc/playground/Code/Library 
Alexander knows LOTS more than I about this ....

Also another Library tutorial:
http://www.arduino.cc/en/Hacking/LibraryTutorial

Regards, Terry King  ...Not Yet Pro   :)
Regards, Terry King  ..On the Red Sea at KAUST.edu.sa
terry@yourduino.com  LEARN! DO! (Arduino Boards, Sensors, Parts @ http://yourduino.com

Terry King


Hi,

I would start by looking at how people are integrating code written in C and C++ into libraries:
http://www.arduino.cc/playground/Code/Library 
Alexander knows LOTS more than I about this ....

...but those libraries have code that gets linked by the AVR stuff inside the Arduino IDE setup...

Also another Library tutorial:
http://www.arduino.cc/en/Hacking/LibraryTutorial

Regards, Terry King  ...Not Yet Pro   :)
Regards, Terry King  ..On the Red Sea at KAUST.edu.sa
terry@yourduino.com  LEARN! DO! (Arduino Boards, Sensors, Parts @ http://yourduino.com

johnwasser


I would like to use the Arduino IDE just to load my own C-language programs, manually
initiallizing all ports and registers, etc.  but using the ARM Studio IDE ver 5 and/or Arduino IDE to compile/download a c program to the Arduino 2560 board ready to run.
(somebody must be doing this!)


In your Arduino sketch you are free to manipulate the AVR registers and ports directly.  You are not required to use any of the Arduino functions if you want to write everything yourself or use the AVR-C library functions.  Put everything you would normally put in main() into setup() and create an empty function "void loop(){}" and the Arduino IDE will be happy to compile, link and upload your program.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Go Up