Skip to content

Use Conan to get up and running with AVR C/C++

Notifications You must be signed in to change notification settings

jputcu/avr_conan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

AVR development using conan>=2.0.7.

Provide the toolchain

Microchip

> cd toolchain/microchip
> conan create .
...
> cd ../..

Zak Kemble

Alternative toolchain using Zak Kemble:

> cd toolchain/zakkemble
> conan create . --version 14.1.0
...
> cd ../..

Provide the conan AVR settings

Install conan/settings_user.yml into ~/.conan2/.

Compile the example project

> cd blink
> conan build . -pr:h ../conan/profiles/arduino_uno
...
> conan build . -pr:h ../conan/profiles/arduino_uno -s build_type=Debug
...

Advanced editors, like Clion, can use cmake presets, now we have:

> cmake --list-presets
Available configure presets:

  "conan-atmega328p-minsizerel" - 'conan-atmega328p-minsizerel' config
  "conan-atmega328p-debug"      - 'conan-atmega328p-debug' config
> conan install . -pr:h ../conan/profiles/arduino_uno
...
> source build/Debug/generators/conanbuildenv-debug-avr.sh
...
> cmake --preset conan-debug
...
> cmake --build --preset conan-debug --verbose
...
> source build/Debug/generators/deactivate_conanbuildenv-debug-avr.sh
Restoring environment
> file build/Debug/blink.elf
build/Debug/blink.elf: ELF 32-bit LSB executable, Atmel AVR 8-bit, version 1 (SYSV), statically linked, with debug_info, not stripped

Potential

Other compiler

Offer HALs

  • TODO

AVR friendly libraries

  • ETL
  • ArduinoJson

AVR architecture

Conan settings have the MCU specified as arch, this means no reuse between other atmegas. Perhaps we can use the arch there.

About

Use Conan to get up and running with AVR C/C++

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published