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
3 answers

Packed struct bitfield vs #define'd bitmasks

I have an AVR program which stores a set (usually less than 8) bit flags in a static status variable (which is contained inside a struct holding various other state fields of the module). if it more or less efficient to do it like this: #define…
Inductiveload
  • 6,094
  • 4
  • 29
  • 55
0
votes
1 answer

How run avr-gcc Arduino on Android

Is possible to use AVR-GCC compiler which includes Arduino1.0.5 in Android? I'm trying to run AVR-GCC included in the Arduino 1.0.5 on Android but this don't work! I use the Arduino 1.0.5 for Linux, hoped that this compiler will work on Android…
0
votes
1 answer

AVR-GCC support for ATXMega16a4u

I have a ATXMega16a4u mcu of Atmel and try to compile code with avr-gcc 4.7.2 (Fedora 4.7.2-1.fc17). I got this error: Unrecognized argument in option '-mmcu=atxmega16a4u' So I tried to compile code with -mmcu=atxmega16a4 (without 'u' in the end).…
Long Hoang
  • 567
  • 5
  • 15
0
votes
2 answers

avr-gcc: No such file or directory

I have been following the TinyOS tutorial at this link: http://www.cse.wustl.edu/~lu/cse521s/Slides/tutorial.pdf. I cannot get the final project code to compile in tinyos. I'm using windows xp with cygwin and all the latest rpms. When I try to…
0
votes
2 answers

How to flash error if a macro not defined?

I want my program to flash compile time error like "LCD_PORT not defined" if it is not defined in program itself. For that I modified the header file like this . . . #if LCD_IO_MODE #ifndef LCD_PORT #error LCD_PORT not defined //(e.g. #define…
Adi
  • 407
  • 1
  • 4
  • 13
0
votes
1 answer

Accessing RTC(DS1307) through I2C in ATmega16

I have written a code to access RTC(DS1307) through I2C using ATmega16 and I am using compiler AVR Studio 4. Code is given below:- #include #include #define F_CPU 1000000UL void…
Saad Rafey
  • 531
  • 2
  • 6
  • 18
0
votes
1 answer

Mega Arduino 2560 and Eclipse

I have an Arduino Mega 2560. I want to make it communicate with Eclipse in order set a program on it. I have managed to work with Arduino Uno and Arduino Pro Mini until now. With Arduino Mega 2560, though, I get the error shown on the photo below.…
kyrpav
  • 756
  • 1
  • 13
  • 43
0
votes
1 answer

avr-gcc link error with independent obj

a little project of avr, when i directly compile main.c(all other c are included in main.c), all ok. avr-gcc -Wall -mmcu=atmega8 -g -O1 $1 -o $1.out avr-objdump -dS $1.out>$1.asm with asm, i can see all vector here. main.c.out: file…
eexpress
  • 155
  • 1
  • 10
0
votes
1 answer

Serial communication in Atmega128

I want send some string to PC via serial bus. In cute com its displaying the string along with some chars are missing and at the starting and end of the string its appending some hex numbers. Why this problem occurring I don't know please help in…
Sanjeev
  • 11
  • 1
  • 4
0
votes
2 answers

Switch statement AVR-GCC

Hey so here is just a simple program i wrote in c, compiled under avr-gcc.. The corresponding assembly code is posted too. Still cant understand what the assembly code for the switch statement is doing, any help would be great. thanks. int…
fulhamHead
  • 687
  • 1
  • 10
  • 23
0
votes
1 answer

Assembly code for a switch statement using AVR-GCC

Hey I am having trouble understanding the assembly code omitted by the compiler for the following switch statemet. It is different than the usual assembly code I see from using gcc etc. switch(instr) { case OP_NOP: break; case OP_BIPUSH: …
fulhamHead
  • 687
  • 1
  • 10
  • 23
0
votes
2 answers

bit and byte interpretation in AVR C

I know this may be wrong section for this but my problem is Microcontroller programming specific (AVR mostly)! I am sending bytes between two AVR atmega8 using Uart where each bit in the byte stands for something and only one bit is 1 in each byte…
user1448559
  • 83
  • 2
  • 9
0
votes
1 answer

C function prototyping and .set directive

Question is in AVR GCC context. I have .s file with C function prototype as follows: Mod_BigNum_by_u8: .global Mod_BigNum_by_u8 ; c-prototype ==> uint8_t Mod_BigNum_by_u8(uint8_t * pBigNum, uint8_t ByteCount, uint8_t Divisor); ; Parameters …
Pablo
  • 28,133
  • 34
  • 125
  • 215
0
votes
3 answers

How to define a timer in avr-gcc

I am learning to use avr-gcc, but I have no idea, how to solve the following task: The 8 bits from Port B should alternately set from 0 to 1 with an interval of 500 mili seconds. I appreciate your help.
Daniel Zemljic
  • 443
  • 1
  • 4
  • 8
0
votes
2 answers

Is it possible to use GCC's '__builtin_avr_delay_cycles' in the assembler?

Sory for bad English, please. I need write a time-critical piece of code (a strict part of software protocol implementation via bit-bang) that uses delays. C preprocessor at the compile time can compute the number of clock cycles (with F_CPU macro)…
user1150105