Questions tagged [avr-gcc]

avr-gcc is a suite of executable software development tools for Atmel AVR RISC processors

avr-gcc is a suite of executable software development tools for Atmel AVR RISC processors, hosted on the Windows platform, has GNU GCC compiler for C/C++.

Atmel provides also an AVR Toolchain, which is a collection of tools/libraries used to create applications for AVR microcontrollers. The collection includes compiler, assembler, linker and Standard C & other math libraries.

Most of these tools are based on efforts from GNU (www.gnu.org), and some are developed by Atmel.

614 questions
0
votes
2 answers

Issue with AVR Keypad code

I have written code for reading keypad matrix in Atmega 328. But I am not getting the result for the key connected to Row0 and Column0. Rest all 3 keys are detected correctly. Below is the code. I am not able to makeout what the issue is. There must…
Mahesha Padyana
  • 431
  • 6
  • 22
0
votes
1 answer

Basic makefile for arduino using avr-gcc

I would like to make a makefile for compiling c programs for the arduino. I am somewhat familiar with make but have never used it with avr-gcc. What is the simplest way I could put the commands below in a makefile? $ avr-gcc -Os -DF_CPU=16000000UL…
connorwstein
  • 305
  • 2
  • 13
0
votes
1 answer

timers in avr-c atmega324a

#define F_CPU 8000000UL #include /* * main -- Main program */ int main(void) { /* Set OC1A pin to be an output */ DDRD|=(1<<5); /* Set output compare register value */ OCR1A = 4000; /* Set timer counter control…
0
votes
1 answer

AVR PROGMEM reads garbage instead of string

I have some problem with reading string from program memory: const char str[] PROGMEM = "Test string here\r\n"; Here are my printing routines: /** Send string over UART */ void uart_puts(char* str) { while (*str) { uart_tx(*str++); …
MightyPork
  • 18,270
  • 10
  • 79
  • 133
0
votes
1 answer

SCons ignoring Env AR option

I'm running SCons under cygwin to compile AVR static library In SConstruct I set: Env = Environment() ToolChainPrefix = r'/cygdrive/c/Program\ Files\ \(x86\)/Atmel/Atmel\ Toolchain/AVR8\ GCC/Native/3.4.1056/avr8-gnu-toolchain/bin/' Env.Replace(CXX…
peku33
  • 3,628
  • 3
  • 26
  • 44
0
votes
0 answers

Why is avr-gcc optimisation deleting instricutions which assign zero to variables?

I have a project in which I communicate with some devices using TWI interface. This project like many other of my projects is using a library for communication that was written long time ago and is reliable. Fun part is that in the middle of this…
mszubart
  • 117
  • 1
  • 3
  • 6
0
votes
4 answers

Eclipse Arduino IDE cant't find avr-g++ and avr-gcc

I am trying to replace the Arduino IDE with the Arduino Eclipse plugin. After downloading everything needed and trying to compile even the simplest "Hello World" - Program I get the following error in eclipse: When calling: which avr-gcc in…
pmkrefeld
  • 185
  • 3
  • 14
0
votes
1 answer

Can't assign value of 120 to static const unsigned char or value of 200 to const static unsigned int

I am fairly new to embedded c++ outside of Arduino, but so far I have been able to fix all the problems I have run into, except this one. I am using Atmel Studio on an Atmega 1284P, coding in C++. I am using the following variables to compare to…
0
votes
1 answer

Impact of separating class definition from declaration on program size

I am working on a microcontroller with tight memory constraints. Hence I watch memory consumption. I have some library with classes which are only visible in the cpp file. These class do not show up in the header file. The classes were directly…
Udo Klein
  • 6,784
  • 1
  • 36
  • 61
0
votes
0 answers

int32_t multiplication on ATTiny2313 clobbers variables

I'm stumped by some of my variables getting clobbered on an ATTiny2313. Commenting out lines of my code one by one, the culprit seems to be the multiplication in this function: int32_t bmp085_b5(int32_t ut) { int32_t x1, x2; x1 = (ut -…
Michel
  • 603
  • 6
  • 15
0
votes
0 answers

Setting up avr compiler in code:blocks, not finding #include files

I've installed the avr-gcc compiler and successfully convinced it to compile some test code through the terminal, so I thought I'd have a go at setting it up in code:blocks to make it a little easier to handle. It seems to have detected it ok and I…
0
votes
2 answers

Advice on RTOS for AVR?

I need a very tiny RTOS for AVR similar to mRTOS which just has two files (mrtos.h and mrtos.c). Can anyone please provide any advice?
Fulrus
  • 801
  • 1
  • 7
  • 13
0
votes
2 answers

How to set up Travis to build Arduino/Spark/Teensy library

I have a few Github OSS hosted libraries aimed at running on multiple MCUs and I wish to set up Travis in order to have them built and tested (if possible) automatically. I have run multiple searches and found a couple o different approaches, but…
0
votes
1 answer

xcode and avr arduino "Command /Applications/Xcode.app/Contents/Developer/usr/bin/make failed with exit code 2" error.

I am completely new to avr programming, and I am trying to get xcode to work with my Arduino Mega2560. I managed to get it working with embedxcode, but now I am trying a more slimmed down approach with the xavr project scheme. For some reason I…
Viktor
  • 702
  • 7
  • 14
0
votes
1 answer

Double assignment using inline assembly

Following this manual I wanted to create simplest inline AVR assembly snippet possible: copy values of two variables to two other variables. uint8_t a, b, c, d; a = 42; b = 11; asm( "mov %0, %2\n\t" "mov %1, %3\n\t" : "=r" (c), "=r" (d) …
Pan Hania
  • 468
  • 4
  • 11