Skip to main content

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.

Filter by
Sorted by
Tagged with
1 vote
1 answer
157 views

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[...
Tomáš Zato's user avatar
2 votes
2 answers
2k views

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 ...
albert's user avatar
  • 205
0 votes
1 answer
179 views

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 ...
Md Jabir Hossain's user avatar
2 votes
0 answers
191 views

I have a 3.5" TFT LCD communicating in parallel connected to Arduino UNO. I expect it draws a white circle on a black background but all it does is to show a white screen. How to fix this? main.c ...
ar2015's user avatar
  • 173
1 vote
1 answer
385 views

Note: This is a reference question (but feel free to write answers of your own!) I want to use the AVR tools directly -- no arduino-builder or arduino-cli. I would also like compilation and uploading ...
glibg10b's user avatar
  • 317
1 vote
1 answer
89 views

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 ...
user137442's user avatar
0 votes
3 answers
3k views

Friend asked me to find problem with compilation for his DigiSpark AT Tiny85 board. We are trying to compile sketch from here: https://forum.arduino.cc/index.php?topic=314773.0 But with no luck - ...
Jan's user avatar
  • 113
2 votes
3 answers
536 views

When I am in the 30-second standby function, I want to turn the LED on and off at 5-second intervals. How can I do what I want using the read_counter() function? The problem here is that I am already ...
harun caliskanoglu's user avatar
1 vote
1 answer
204 views

I have two files blink1.cpp typedef unsigned char int8_t; typedef volatile int8_t * volatile port_type; port_type portB = (port_type) 0x25; port_type ddrB = (port_type) 0x24; void delay_500ms() { ...
ar2015's user avatar
  • 173
1 vote
1 answer
5k views

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 ...
user avatar
11 votes
2 answers
2k views

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 ...
Ash's user avatar
  • 225
1 vote
1 answer
1k views

I have got an telnet server with esp8266 + SoftwareSerial+ UNO, and here I want to on led with command ON . will be 1 or 2. It is for recive 1 or 2 numbered pins. And I extract pin from request with ...
TheGamerCoder's user avatar
1 vote
2 answers
121 views

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 ...
Anubhav's user avatar
  • 137
2 votes
2 answers
7k views

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 ...
Ehryk's user avatar
  • 121
0 votes
1 answer
902 views

I have a code with these two lines: char handshakecode = "S"; // Capital S char receive; The lines of code are placed in a separate void, and not setup or loop. When i change the two variables ...
Stefan Bahrawy's user avatar
2 votes
1 answer
479 views

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(...
Dankó Dávid's user avatar
0 votes
1 answer
287 views

I'm quite a newbie using C ++. I am trying to implement in C ++, the state machine described in this link for C language: https://barrgroup.com/Embedded-Systems/How-To/Coding-State-Machines. I have ...
ezeg's user avatar
  • 18
0 votes
1 answer
9k views

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?
Benichiwa's user avatar
10 votes
1 answer
4k views

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 ...
UserK's user avatar
  • 559
1 vote
2 answers
1k views

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 ...
Mark's user avatar
  • 133
6 votes
1 answer
3k views

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 ...
Ariser's user avatar
  • 577
1 vote
1 answer
999 views

I know this is a problem that has come up many times but I can't seem to get this code fragment to update the count variable on an ATMEGA328P. I am using an Arduino Uno as a development board, with ...
user avatar
15 votes
1 answer
386 views

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 ...
mpflaga's user avatar
  • 2,523
5 votes
2 answers
181 views

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 ...
Ashlyn Black's user avatar
0 votes
1 answer
2k views

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 #...
Igor Liferenko's user avatar