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
1 answer

Reading EEPROM AVR

I have a problem when I receive data from the eeprom. first I made the following code : #include #include char NAME[5] EEMEM = "a001"; char UNIT[2] EEMEM = "C"; uint16_t CYCLICITY EEMEM = 2000; int…
0
votes
1 answer

AVR - AT90CAN128, random jump to code

Because i use tabs instead of spaces, the code is available here: http://pastebin.com/ff3m5Cwv The problem: In the main, the chip jumps from the first renderTimeTable() call in the main, to memcpy after the blocking while. Anything involving copying…
MooshBeef
  • 279
  • 1
  • 5
  • 15
0
votes
1 answer

Efficient way to get the absolulte difference of two 16 bit signed integers on atmel AVR 8bit gcc?

I am getting 16 bit signed integers from the I2C bus and store them in a local int16 variable. The sensor is a MEMS gyroscope and it regularly spikes high or low data values, it seems to be a general problem with many MEMS gyroscopes. So normal…
John
  • 7,507
  • 3
  • 52
  • 52
0
votes
2 answers

How to use C++ STD with AVR compiler?

I have set up the AVR compiler for using with an Atmel microcontroller using this guide. I don't have access to strings, vectors etc. How can this be added?
Friend of Kim
  • 850
  • 9
  • 24
0
votes
1 answer

Can avrdude find which controller is it connected to?

I am programming avr microcontrollers using avrgcc and avrdude . If am specifying wrong controllers then avrdude throws error message syaing wrong device signature. Is there an avrdude method from which i can find which controller is it connected to…
ganeshredcobra
  • 1,881
  • 3
  • 28
  • 44
0
votes
1 answer

Compiling c++0x for AVR

I'm currently writing some c++ code for the AVR platform and I'm wanting to disable something that's fundamentally non-copyable. Given that I'm already using c++0x features I thought that a good way to do this would be to use the =delete…
shuttle87
  • 15,466
  • 11
  • 77
  • 106
0
votes
1 answer

Error message for non existent operator

I am trying to code firmware for a custom made joystick. For this I use vusb on a atmega8 microcontroller. When I compile (with avrgcc), it spits out the following error: usbdrv/usbdrv.c:93:54: error: operator '*' has no right operand However, the…
QuantumFlux
  • 73
  • 1
  • 8
0
votes
1 answer

avrdude and attiny2313 and avrisp

I'm trying to program my ATTiny 2313 with avrdude. This is my command line and output (The first line is the command I entered, the others are the output): utnmac:firmware utn$ make flash avrdude -c avrispmkII -p attiny2313 -U…
user2687781
  • 325
  • 2
  • 11
0
votes
1 answer

Details avr assembler modifier lo8 are hard to find

Recently, while going through obdev's virtual usb drive for atmel avr, I found this expression lo8(-usbrxbuf) Unfortunately not much is given about lo8 modifier in the documents of avr-gcc. Can anybody here explain fully or give any link about it?
arka7304
  • 25
  • 1
  • 5
0
votes
3 answers

Is it possible to compile code written for Arduino on iOS?

I would like to be able to create a native iOS app that will let the user write an Arduino sketch, and then compile it to HEX code that can be uploaded to the Arduino board.
0
votes
2 answers

How to store additional code sections in FLASH memory (AVR, GCC)

I am working with AVR ATmega328p MCU and I would like to add constant string at address 0x7000 into flash memory. How can I do this with AVR-GCC? My code contains this declaration: // Firmware version static volatile char version[16] __attribute__…
vasco
  • 1,502
  • 1
  • 16
  • 19
0
votes
2 answers

avr-gcc Atmel AVR microncontrollers on Linux / Windows Arduino IDE

I recently heard all about avr-gcc and avr-lib support on Linux that can be used for developing code for Atmel AVR micro-controller (ATmega48/88/168, ATmega16/32). I also understand that Arduino also uses Atmel's AVR micro-controller (I am not sure…
Programmer
  • 8,303
  • 23
  • 78
  • 162
0
votes
1 answer

How the heck does this compile to 4kb?

#define F_CPU 1000000 #include #include #include const uint8_t sequences[] = { 0b00000001, 0b00000011, 0b00000110, 0b00001100, 0b00011000, 0b00110000, 0b00100000, 0b00110000, …
Bryan Boettcher
  • 4,412
  • 1
  • 28
  • 49
0
votes
1 answer

Signed unsigned, avr assembly

I have a few questions about instructions in asm 1) add Rd, Rr; Are Rd and Rr unsigned or signed numbers? 2) How to load signed numer in register? i know that LDI Rd,K is loading unisgned. 3) Can you provide me with concrete example with adding…
user16401
  • 193
  • 1
  • 9
0
votes
1 answer

Passing defines to function

I'm programming with an AVR and I'm trying to create a function to set a pin as an output. I made a struct to hold the Register and Pin number like this: typedef struct Pin{ uint8_t pinNo; volatile uint8_t* pinReg; }; I then have this…
Nick
  • 9,285
  • 33
  • 104
  • 147