Questions tagged [winavr]

Open source software development tools for the Atmel AVR series.

WinAVR is a suite of executable, open source software development tools for the Atmel AVR series of RISC microprocessors hosted on the Windows platform. It includes the GNU GCC compiler for C and C++.

68 questions
25
votes
6 answers

8 bit enum, in C

I have to store instructions, commands that I will be receiving via serial. The commands will be 8 bits long. I need to preserve transparency between command name, and its value. So as to avoid having to translate an 8-bit number received in serial…
Lyndon White
  • 24,284
  • 15
  • 77
  • 126
5
votes
1 answer

AVR-C error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token

I'm currently attempting to take the code library written for the Arduino USB Host shield and decouple it from the Arduino core libraries so that I can use the code in a non-Arduino microcontroller project. From looking at the code, there aren't a…
qwertymodo
  • 415
  • 5
  • 15
4
votes
2 answers

Leaving a data array (Font) in FLASH - PROGMEM in AVR GCC

Ahhh, PROGMEM, pointers, pointers to pointers, addresses of pointers... My head boggles. I have a data array for the font in question const uint8_t dejaVuSans9ptBitmaps[] = { /* @0 ' ' (5 pixels wide) */ 0x00, /* */ 0x00, /* …
mriksman
  • 177
  • 2
  • 14
4
votes
3 answers

Tasking with AVR-Ada

I'm trying to implement tasking features using AVR-Ada, but when I run make, I get these error messages: C:\avr_test>make avr-gcc.exe (GCC) 4.3.3 Copyright (C) 2008 Free Software Foundation, Inc. This is free software; see the source for copying…
Rego
  • 1,104
  • 1
  • 16
  • 39
3
votes
2 answers

C++; eclipse linker error

So working on getting my eclipse IDE going so I can develop my arduino uno in eclipse. My C++ is weak so this is probably a nube error on my part. I have a blink program that looks for an arduino library I compiled from the arduino IDE's…
goinidias
  • 53
  • 1
  • 6
3
votes
7 answers

Assign delays for 1 ms or 2 ms in C?

I'm using code to configure a simple robot. I'm using WinAVR, and the code used there is similar to C, but without stdio.h libraries and such, so code for simple stuff should be entered manually (for example, converting decimal numbers to…
NLed
  • 1,757
  • 14
  • 36
  • 67
3
votes
4 answers

How to delay a output about 15 minutes after pressing a button?

I am learning micro controller programming. I need help to complete my program at WinAVR with Atmega8L-8PU. i have added 3 buttons, when the buttons pressed: first button will supply output for 15 minutes, 2nd one will 30 minutes and the last 3rd…
Sohel
  • 31
  • 3
3
votes
2 answers

Using Visual Studio to code for AVR

I am using Visual Studio 2013 to write code for AVR. I have been following this tutorial. Whilst writing the code, I noticed that Visual Studio kept on underlining things like DDRB or PORTB and I keep on getting errors like Error: identifier…
kiciek
  • 65
  • 1
  • 7
3
votes
1 answer

WinAVR and native Windows console apps

I'm not that experienced with C, but I've been happily hacking firmware on some hobby projects using WinAVR. I'm visually impaired so I prefer using make files and the command line, instead of a graphically confusing IDE. Sometimes I want to thrash…
2
votes
1 answer

Using arduino Ethernet.h under Eclipse

I want to use eclipse for Arduino development and I have some issues. I use Eclipse + Eclipse AVR plugin + WinAVR. I managed to compile the Arduino core library into a static library. Now I want to use my ethernet shield but I can't find a way to…
kechap
  • 1,929
  • 4
  • 26
  • 48
2
votes
2 answers

Trying to define variables to specific memory locations

Hey, im using WinAVR and programing an ATMEGA32 in C. Basically, I want to link my C program to asm via the: asm(" ") command. Im trying to define memory locations in C to exact memory locations so that I can then access them within the asm…
Ospho
  • 2,538
  • 5
  • 23
  • 38
2
votes
3 answers

pointers in C with a #define

The function: #define ASSOC(port) (*(volatile bit_field *) (&port)) The function call: #define SCLK ASSOC(PORTC).bit0 bit_field defined as a struct like this: typedef struct { unsigned char bit0 :1, bit1 :1, bit2 :1, bit3 :1, bit4 :1, bit5…
milan
  • 2,029
  • 7
  • 24
  • 34
2
votes
1 answer

AT32UC3B0512 project compiled as AT32UC3B0256 -> Consequences

I just figured out that I have compiled and programmed my AT32UC3B0512 project using the AT32UC3B0256 as target device. My application seams to work without problems. Is that possible? What are the differences between AT32UC3B0512 and AT32UC3B0256…
2
votes
2 answers

RAM usage AT32UC3B0512

I'm searching for a way to see the RAM usage of my application running on an at32uc3b0512. arv32-size.exe foo.elf tells me: text data bss dec hex filename 263498 11780 86524 361802 5854a foo.elf According to 'google', RAM…
2
votes
1 answer

lpm rd,Z always translates to lpm rd,Z+ on inline assembly in gcc-avr

This is a follow up question to this. I'm writing code for an __AVR_HAVE_LPMX__ processor (avr25) using GNU C (WinAVR 20100110) version 4.3.3 (avr) / compiled by GNU C version 3.4.5 (mingw-vista special r3), GMP version 4.2.3, MPFR version…
Thomas
  • 585
  • 6
  • 15
1
2 3 4 5