Reading List

The Selfish Gene
The Psychopath Test: A Journey Through the Madness Industry
Bad Science
The Feynman Lectures on Physics
The Theory of Everything: The Origin and Fate of the Universe


ifknot's favorite books »
Showing posts with label Arduino. Show all posts
Showing posts with label Arduino. Show all posts

Tuesday, 28 April 2020

Undefined reference to operator delete(void*) C++ AVR pure virtual and __cxa_pure_virtual()

 __cxa_pure_virtual()
&
Undefined reference to operator delete(void*)


C++ Programming for MCUs such as the Atmel AVR family can be both very productive and also very frustrating as one learns to work without libstdc++ when using certain MCU toolchains e.g.
  • C++ AVR Studio 
  • C++ avr-gcc 
  • C++ Arduino 
Whilst it is generally well known that the MCU programmer must provide their own versions of new and delete[1] it is less well known that the C++ programmer using pure virtual member functions must provide an implementation for __cxa_purevirtual() or face some very confusing errors!

Depeding on toolchain the programmer may be lucky and be notified:

undefined reference to `__cxa_pure_virtual'

What is __cxa_purevirtual()?[2]

Thursday, 17 April 2014

Lovin' the TinyDuino mini Atmel 328 Arduino Board

My TinyDuino - what a perfect distraction!

  • Atmel ATmega328P Microcontroller
    • 32KB Flash, 2KB RAM, 1KB EEPROM
    • 1.2mA (typical) @ 3V, 4MHz
    • Default Clock speed: 8MHz
  • 2.7V – 5.5V operating voltage (Arduino mode)
  • 1.8V – 5.5V operating voltage (with custom fw)
  • 20 I/Os (14 Digital, 6 Analog / Digital I/O) – All the signals on the Arduino Shield connectors are supported!
  • Arduino Bootloader preprogrammed (uses approx 0.5 KBytes of Flash Memory)

This build is rocking the TinyShield USB & ICP programming shield, TinyShield microSD and TinyShield 16 Edge LEDs.