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

Can this code cause a memory leak (Arduino)

I have a arduino project and I created this struct: struct Project { boolean status; String name; struct Project* nextProject; }; In my application I parse some data and create Project objects. To have them in a list there is…
tbraun89
  • 2,246
  • 3
  • 25
  • 44
0
votes
2 answers

unable to hold some LED'S : ON , when flickering others

I am using AVR as the micro controller and ATMEGA8 as the processor (inside the micrcontroller). The board that has micro controller has 4 LEDS. I am able to burn the program and light up the LEDS. But I am unable to achieve a particular thing. L1…
Suhail Gupta
  • 22,386
  • 64
  • 200
  • 328
0
votes
2 answers

Undefined reference when linking static libraries

I have a couple of libraries that are created using avr-ar. Each contains a few objects. The objects in library1 need symbols from objects in library2. The problem is that when I try to compile the whole thing I get undefined reference issues. This…
johndoe
  • 15
  • 1
  • 4
0
votes
3 answers

vsnprintf on an ATMega2560

I am using a toolkit to do some Elliptical Curve Cryptography on an ATMega2560. When trying to use the print functions in the toolkit I am getting an empty string. I know the print functions work because the x86 version prints the variables without…
carbon
  • 1
  • 2
0
votes
2 answers

Cannot link Arduino project to include Simulink Code

At work, I recently took training on MATLAB/Simulink, including the Simulink Coder that can generate C code for embedded applications. I wanted to try my hand at it, so I bought an Arduino, and dove in. I am able to write simple sketches with no…
mbmcavoy
  • 2,628
  • 5
  • 23
  • 34
0
votes
2 answers

Temperature convert two int digits to float

How can I convert two unsigned integers that represent the digit and decimal part of a float, into one float. I know there are a few ways todo this, like converting the decimal component into a float and multiplying it to get a decimal and added it…
DogEatDog
  • 2,899
  • 2
  • 36
  • 65
-1
votes
3 answers

Putting C Code in another File

I am programming an AVR microcontroller, and in the programmers notepad in the WINAVR Suite. I am trying to seperate my code, however the sepeaet .c file I am unable to use AVR pre-defined variables. (the variables AVR supplies to point to certain…
Michael
  • 8,229
  • 20
  • 61
  • 113
-1
votes
0 answers

Getting 'make: *** [main.o] Error -1073741502' while compiling C/C++ code. How to troubleshoot and fix this issue?

I am writing this AVR code on eclipse. To test if everything is fine as this is my first time downloading avr on eclipse. #define F_CPU 8000000UL #include #include int main() { while(1) { } } And I got this…
-1
votes
1 answer

AVR-GCC optimzed 'extern' global variable then error with 'undefined reference to ...'

In short, a global const variable (array) defined in a .cpp file disappeared from the .o file, causing "undefined reference ... " error. The problem can be imperfectly solved by add 'volatile' to the definition of variable. It's useless to turn off…
ke_bitter
  • 9
  • 1
-1
votes
1 answer

AVR C programming: Code Doesn't Work (port pin won't toggled) Because Function Declared Outside of Main Function

I tried to programmed my arduino using avr-gcc, as you can see i tried to make a function: #include #include #define ddr (uint8_t*) 0x24 #define port (uint8_t*) 0x25 //func void blink(uint8_t* DIRECT,uint8_t* PORT,uint8_t…
-1
votes
1 answer

declaring function in AVR blinking program makes it malfunction

i have this blinking LED program (it flashes the L led every second) #include #include #define DELAY 1000 int main (void) { DDRB |= _BV(DDB5); while(1) { PORTB |= _BV(PORTB5); _delay_ms(DELAY); …
-1
votes
1 answer

Question about AVR Assembly variable storing best practices

I'm just starting with low level assembly in an AVR microcontroller. I have allocated variables on SRAM as : var1: .BYTE 2 var2: .BYTE 2 Afterwards, I'm populating the variables via SPI from a sensor. Using Indirect adressing as: ;set up Z…
Ait-Gacem Nabil
  • 165
  • 3
  • 12
-1
votes
1 answer

Makefile for AVR

I have folder "I2C AtMega32": and I have my simply Makefile: all: main.hex program clean main.o: main.cpp BMP280_driver-master\bmp280.c avr-gcc -Wall -Os -mmcu=atmega32 -c $< -o $@ main.elf: main.o avr-gcc -Wall -Os -mmcu=atmega32 -o…
Mavimix
  • 119
  • 1
  • 8
-1
votes
2 answers

Why AVR-GCC compiler throws an error when overloading with the same variables but as PROGMEM?

My question is more like: Why the compiler "thinks" that a "PROGMEM variable" is the same as a "plain Variable"? is it because PROGMEM-keyword is "just" a macro and nothing more? or is it for some other reason too? and is there any…
Giorgos Xou
  • 1,461
  • 1
  • 13
  • 32
-1
votes
1 answer

openmp pthread support for avr-gcc

I've been working with a teensy for a multithreaded project using openmp compiling with gcc, however I'm joining a project that uses avr-gcc which doesn't seem to want to compile or recognize omp.h . I get the error "avr-gcc: error: unrecognized…
john8839
  • 11
  • 1