Questions tagged [avr-toolchain]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
2answers
37 views

Multiple defintion error, Linker error [closed]

Trying to create an elf file for two sets of files in different folders. LIDARBOT.h ----------- #ifndef LIDARBOT_H_ #define LIDARBOT_H_ #include <avr/io.h> #include "drivers/motors.h" #endif ...
0
votes
1answer
24 views

ISR definition causing boot loop?

I am trying to compile and upload code to an Arduino Uno from the command-line, however I seem to be experiencing an odd issue. When I compile this code: #include <avr/interrupt.h> #include &...
0
votes
1answer
50 views

My software serial code won't work at > 4800bps

I've put together a simple software serial (send-only) implementation for use on my attiny8[45] microcontrollers. I realize that there are more efficient USI-based implementations out there; this was ...
0
votes
1answer
77 views

AVR-GCC can't call function located on fixed address

I wrote the following code: #include <avr/io.h> __attribute__((noinline, section(".app_start"))) void app_start() //app_start section starts at 0xFA0 { //register_packet_dispatch(...
1
vote
2answers
883 views

How would I include Arduino libraries using AVR-gcc without the IDE?

I am writing my own code for the Arduino Uno. I compile my code with AVR-gcc, and then upload it with AVRdude. I am not using the Arduino software, but I do have it installed and working on my PC. I ...
0
votes
1answer
478 views

avr_g++ compiler error: expected primary-expression before '.' token (C code in .ino)

The compiler is complaining about a macro defined in mjson.h Documents\Arduino\libraries\microjson/mjson.h:135:28: error: expected primary-expression before '.' token #define STRUCTOBJECT(s, f) ....
1
vote
1answer
1k views

avr/io.h No such file or directory error when compiling using avr-gcc

I am trying to use the atmega328p as standalone microchip and program it. I ama using an Arduino Uno as ISP. I have written a simple program to test it however when I try to compile it using avr-gcc ...
0
votes
0answers
161 views

AVR-Toolchain for Arduino crashes on Mac OSX 10.11.6: Hints or debugging help needed

My Arduino IDE does not compile any project since I updated from Mac OSX 10.6.8 to 10.11.6. I even tried reinstalling and also manually installing the original AVR-toolchain. But the behaviour did ...
0
votes
1answer
46 views

Where is CLKPR located on Ubuntu 16.04 with Arduino 1.8.3

I would like to see the definition of CLKPR. I guess that similarly to PORTB and other registers, it should be defined by the toolchain? (see Where is PORTB defined? ) Am I right? Where should I look ...
1
vote
4answers
115 views

Porting code from Arduino IDE to other IDEs - expected code size reduction

Could I realistically be expecting some 25% - 50% code size reduction if I abandoned Arduino IDE's framework and moved to something more rudimentary such as AVR Studio ? I am using the EEPROM, Timer1 ...
0
votes
1answer
113 views

Equivalent to POSIX mmap() in AVR-libc

Is there an similar function in AVR-libc/Arduino C++ to mmap()? I'm looking for a way to place machine code in memory at runtime and make it executable.
1
vote
1answer
540 views

Compiling source with Arduino.h with avr-g++

How should I include the Arduino libraries when I'm compiling from the the command line? I tried to do it like this: avr-g++ -g -Os -Wall -mcall-prologues -mmcu=atmega328p -fno-exceptions -o blink....
2
votes
2answers
791 views

programming arduino in pure c

I'm trying to flash pure c-code to arduino Mega2560 board from linux using avr-gcc & avrdude. Compilation is done , now trying to flash using avr-dude, getting error as "avrdude: stk500_recv(): ...
1
vote
3answers
172 views

Can I port a project built on Arduino Uno to a standalone ATmega328 using the exact same code?

I'm building an IoT power usage monitor in which the data is logged using a RTC and an SD card module and a web app hosted on an ESP8266 gives access to this data. My question is can I use the exact ...
0
votes
1answer
94 views

avr-gcc -D is ignored

Im trying to use XCode to compile avr program with arduino libs but seems like something wrong with my Makefile because it throws me warnings like # warning "F_CPU not defined for <util/delay.h&...
1
vote
2answers
76 views

Logging without IDE

Is there a way to log events on Arduino when developing using C / AVR toolchain, and not the Arduino IDE? Working on Ubuntu.
2
votes
1answer
186 views

How can I make Arduino IDE use Atmel's provided toolchain? (Linux/Ubuntu)

I have an Arduino based board using ATmega168PB, but so far only Atmel's provided toolchain supports this microcontroller. I can download the toolchain from Atmel's website, but I am not sure how to ...
3
votes
2answers
6k views

How to program AVR in Mac OS X?

In our college we are using a module developed by IIT Bombay (called FIREBIRD V[ver 5]). It has ATmega2560 and ATmega8 microcontrollers (master and slave) with bootloader. The staff uses AVR Studio ...
2
votes
1answer
367 views

Interleave Assembly and Source for avr-objdump

Trying to get avr-objdump to generate a listing that interleaves the assembly with the source code. I've tried a bunch of debugging arguments in different configurations but I can't seem to get it. ...
3
votes
1answer
973 views

Arduino in Eclipse IDE: How to add SPI library (core library already added)?

I want to use eclipse for arduino programming, so I followed the guides to set up a static project for the arduino core library. Then I added the library file (.a) and the .h and .cpp files to my new ...
3
votes
1answer
3k views

Storing in a global variable using inline assembly

What I'm trying to do is pretty basic: I have a global variable and I'm trying to store some value in it (specifically, the SP_H and SP_L values). The variable is an array of structs and I'm trying ...
1
vote
1answer
116 views

Why are Tone.cpp and IPAddress.cpp getting built for my project?

I'm using avr-size to see the size of library objects to free up some FLASH. Why are Tone.cpp and IPAddress.cpp getting built? e.g. $ cd /var/folders/3j/6wp3hvrj34n0xg3xzq6vjq380000gn/T/...
12
votes
2answers
1k views

Assembly on the Arduino: IO registers

Question: What registers do I use to access the IO on the Arduino Uno when I am using assembly for programming? Background: I was interested in practicing my assembly language skills on the Arduino (...