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
1
vote
1
answer
157
views
Why does the use of serial.readBytes increase program size by 10kb?
If I put this in my arduino program, in main.cpp, I suddenly run out of memory for flash program size:
if(msgSize > 2) {
//sr::sequentialRead(&serialRead, newTram.hash);
uint8_t bytes[...
0
votes
1
answer
179
views
How to run avr-gcov on a .ino sketch file
I am new to Arduino and gcov. I have a .ino sketch file, avr-gcov, and avr-gcc from Arduino library in the same directory. Could someone guide me to the steps I should take to run avr-gcov on my .ino ...
0
votes
2
answers
317
views
slower clock frequency than expected on attiny202
I am programming an attiny202 which as per datasheet can run up to 20Mhz, but after compiling/uploading this simple code to the attiny202 and watch the PA2 pin on the oscilloscope, I see that the pin ...
0
votes
1
answer
86
views
Do I need to use resisters and ICes for specific sensors.What if I dont use it,Will it impact my arduino board some how like making it useless &faulty
So I was reading about Simple AutomaticLight Controller using LDR. or with the help of LDRSenso. But I have LM393 Photoresistor (LDR) Sensor I like to know are they same thing or somewhat different. ...
1
vote
1
answer
89
views
Why do I have to burn the code to make it run? [closed]
Why do I have to burn the code twice to actually burn it on to the Arduino board? I have to execute this command twice - only then is the chip getting programmed.
I'm using this command to burn the ...
1
vote
1
answer
2k
views
AVRdude does not read the FUSE byte values correctly
I am exploring the ATmega328p MCU via a standard Arduino UNO, with the help of avr-gcc toolchain and AVRdude (All in the WINAVR package). I have successfully programmed the board a few times with it. ...
2
votes
2
answers
2k
views
Own type definition using a struct does not name a type
I need to initialize several buttons and LEDs connected to my Arduino. To store data related to an individual button or LED, I decided to define my own data type using two different structs. One for a ...
1
vote
2
answers
121
views
Weird assembly output
I was taking a look at the disassembly for a loop of mine that seemed to be taking too long and I found these assembly instructions that I don't understand. Why does it load 0 into r25 and then do two ...
1
vote
1
answer
552
views
Reading port register and print
I am playing with port registers directly to improve speed on a Arduino micro. I have no problem writing them, like
PORTF &= B11101111
However, when I try to read and print it, things get funny ...
1
vote
0
answers
88
views
Error Compiling any coding in Arduino IDE
I was using the example code of "Blink", and when I try to compile it, it pop out an error as below.
I tried to:
uninstall and installed back the Arduino IDE
installed different versions of Arduino ...
0
votes
2
answers
93
views
Atmega collecting and relaying interrupt calls
I like to collect all possible interrupt and relay them to an alternative handler interrupt table what the user can set.
In order to do this i have to:
1) collect all/any interrup request
2) ...
2
votes
1
answer
479
views
AVR-GCC can't call function located on fixed address
I wrote the following code:
#include <avr/io.h>
__attribute__((noinline, section(".app_start"))) void app_start() //app_start section starts at 0xFA0
{
//register_packet_dispatch(...
2
votes
2
answers
138
views
Weird behavior (Couldn't pull the pin LOW)
I was trying to implement my own code to control a stepper motor on arduino uno, however I noticed that the pins were always HIGH despite what was written to them. I started to erase the code to leave ...
1
vote
1
answer
5k
views
How would I include Arduino libraries using AVR-gcc without the IDE?
I am writing my own code for the Arduino Uno. I compile my code with AVR-gcc, and then upload it with AVRdude. I am not using the Arduino software, but I do have it installed and working on my PC. I ...
2
votes
1
answer
320
views
How does the build process in Arduino IDE work for ESP8266
How does the build process for esp8266 work in arduino IDE. Arduino ide uses avr-gcc to compile programs For atmel micro controllers. Does it uses same for compiling programs for esp8266?
1
vote
0
answers
301
views
AVR-Toolchain for Arduino crashes on Mac OSX 10.11.6: Hints or debugging help needed
My Arduino IDE does not compile any project since I updated from Mac OSX 10.6.8 to 10.11.6.
I even tried reinstalling and also manually installing the original AVR-toolchain. But the behaviour did ...
1
vote
0
answers
156
views
Bootloader fails when two Arduinos are connected over serial port
I’d like to connect two Arduinos over serial port so that they can communicate with each other. Initially, I put all necessary code onto one device and now connected another via serial port. As soon ...
1
vote
2
answers
1k
views
Building mocoLUFA under OSX & Linux
I am attempting to build mocoLUFA under OS X el Capitan 10.11.6.
[Editor: mocoLUFA (MIDI firmware for Arduino Uno)]
I am using the specified LUFA version (LUFA101122) and I have tried building with ...
2
votes
1
answer
1k
views
programming arduino in pure c
I'm trying to flash pure c-code to arduino Mega2560 board from linux using avr-gcc & avrdude. Compilation is done , now trying to flash using avr-dude, getting error as "avrdude: stk500_recv(): ...
1
vote
1
answer
1k
views
Melzi 2.0 Board Firmware Upload problem
I'm trying to flash the repetier Firmware to my Prusa i3 3D Printer, which uses Melzi 2.0 board. I uploaded it successfully 2 days ago with same settings but now is failing always.
@avrdude -p ...
1
vote
1
answer
200
views
Compiling Error
I am trying to compile this code on arduino IDE...It showing error
code is
#include <IRremote.h>
int RECV_PIN = 6;
int led = 12;//1FE50AF
int led1 = 10;//1FED827
int led2 = 9; //1FEF807
int ...
1
vote
1
answer
265
views
How to detect Genuino 101 from inside the code?
I am using a custom library for Arduino Mega which uses AES library for AES-128 encryption.
However, when I try to use that library in Intel Genuino 101 development board, it shows compilation error ...
2
votes
2
answers
7k
views
Since double and float represent the same data type (usually), which is preferable?
It looks like on ATMega based boards, float and double are equivalent 32-bit (4-byte) data types.
However, on the Arduino Due, doubles are 64-bit (8-byte) where floats are 32-bit (4-byte), same as ...
5
votes
2
answers
180
views
Trouble with Timer 0
I'm taking my first wobbly steps outside the Arduino IDE and I'm not having much success with timers / interrupts. I can set a pin to output and light an LED with registers fine but I cannot for the ...
0
votes
1
answer
2k
views
Why serial communication does not work on atmega168/328p?
I expect from the following program serial.c to light the led on if I send key 1 from terminal, and light the led off when I send key 0 from terminal:
#define F_CPU 16000000UL
#define BAUD 9600
#...