Questions tagged [avr-gcc]
AVR-GCC is a compiler that takes C language high level code and creates a binary source which can be uploaded into an AVR micro controller.
68 questions
0
votes
1
answer
293
views
Running Arduino code for Bluefruit LE on bare ATMega328
I need to hook up Bluefruit LE Breakout (nRF8001-based) to ATMega328 chip (to use it as wireless UART), and it seems like the library provided is for Arduino.
What I have is just bare ATMega328 (note ...
2
votes
1
answer
1k
views
avr-g++ (or avr-gcc) and LiquidCrystal library
I'm trying to run a simple Hello World program from Arduino 1.6.5 from terminal. When I run it in Arduino IDE, it works good. When I'm trying to get it by avr-g++ I have hard way to figure out how to ...
1
vote
1
answer
2k
views
undefined reference to `PPMintIn::PPMintIn(int)'
I am making a new library that will utilize PinChangeInt's library.
My intention is to further simplify repetitive code by creating a library. (This is to allow for multiple PPM channels without ...
1
vote
2
answers
490
views
New Language - Interfacing with AVR
So I'm taking a class where the project is to create a new embedded language. We are using OCaml for the compiler, so I was looking for a way to interface with AVR or its C library in such a way as I ...
2
votes
2
answers
917
views
Passing arguments to LCD.print through another function
I'd like to write a function like this:
void lcdPositionPrint(int row, int col, content) {
lcdPosition(row, col);
LCD.print(content);
}
but I'm not certain how to declare "content", because ...
0
votes
1
answer
9k
views
Running C for arduino
Is there a compiler that I can use to run C on an arduino or any other way so that I can upload C programs to my arduino?
1
vote
2
answers
636
views
Use Arduino Uno to program the on-board Atmega328 in C
I have an Arduino Uno board. I have seen how it is possible to program external AVR's through the Arduino Uno board, for instance an ATtiny. But I'm starting with c for atmel µc and I just want to ...
3
votes
1
answer
2k
views
Using an Arduino board to program an AVR
I think the arduino board is awesome.
Though I'm not interested in the library and IDE at all...
Is there a way, to use an AVR 328p, as you normally would, on an arduino board?
I like how arduino's ...
2
votes
0
answers
1k
views
Cannot program Mega2560 using Atmel Studio 6.2 and avrdude
So I will admit that I am a noob to Arduino. I have some experience programming microcontrollers, and that was back in the day (about 4 years ago - such as the Freescale 68HC12) so up until this point ...
0
votes
1
answer
819
views
TIMER1 CTC Interrupts not working with avr-gcc
I am attempting to program my arduino in plain C, and I've come across some very strange behavior. If I load the following code from the Arduino IDE, it works as expected and toggles Pin 6 every 100ms....
6
votes
1
answer
3k
views
What are the benfits of global variables over static class members?
On an embedded system we use global variables often to keep dynamic memory consumption on heap and stack low. But global variables are also considered bad programming practice if they aren't used in a ...
10
votes
1
answer
4k
views
Setting timer3 in CTC mode - conflict with servo library
I would like to set up a timer in order to call a function 800 times per second. I'm using the Arduino Mega and Timer3 with a prescaler of 1024. To choose the prescaler factor I've considered the ...
4
votes
1
answer
10k
views
Does ATMega 328/2560 chips support JTAG-type programmer and hardware debugger?
As stated in www.Arduino.cc FAQ, "Can I use an Arduino board without the Arduino software? Sure. It's just an AVR development board, you can use straight AVR C or C++ (with avr-gcc and avrdude or AVR ...
9
votes
3
answers
3k
views
How to write makefile-compatible sketches?
I'd like to write my sketches so that I can either build/upload them using the Arduino IDE, or optionally using GCC and a makefile.
I know about including the function declarations at the top, but is ...
11
votes
2
answers
2k
views
Understanding the compilation/linking/upload process (so I don't have to use the IDE)
I have started to play with and arduino UNO quite recently (without any prior experience with micro-controllers). I would like to use emacs instead of the IDE, and I'd also like to know what the IDE ...
1
vote
2
answers
4k
views
Why does my Arduino IDE hang/crash so often?
I've traditionally used a text editor with avr-gcc and makefiles for working with Arduino boards. I'm now trying to develop projects for the wider Arduino user-base, so I am trying to use the Arduino ...
21
votes
2
answers
13k
views
Would an infinite loop inside loop() perform faster?
When you're writing a typical sketch, you usually rely on loop() being called repeatedly for as long as the Arduino is running. Moving in and out of the loop() function must introduce a small overhead ...
15
votes
1
answer
386
views
Is there a preprocessor constant for memory size
I would like my compiles to exclude some code depending upon the flash/program space available. To be used in the demo code of a library I support. Whereas my current solution is to use a #ifdef of ...