All Projects → jcmvbkbc → avr-flash-vtbl

jcmvbkbc / avr-flash-vtbl

Licence: GPL-2.0 license
AVR-GCC plugin that puts vtbls into program memory

Programming Languages

Makefile
30231 projects
c
50402 projects - #5 most used programming language

Labels

Projects that are alternatives of or similar to avr-flash-vtbl

avr-ds18b20
AVR library for controlling DS18B20 temperature sensors
Stars: ✭ 52 (+100%)
Mutual labels:  avr-gcc
sim808gpstracker
DIY GPS GSM vehicle tracker based on SIM808 module and ATMEGA328P
Stars: ✭ 39 (+50%)
Mutual labels:  avr-gcc
antispy-jammer
Simplest ultrasonic ANTISPY voice recording jammer based on ATTINY13 / ATTINY85 / ARDUINO with PAM8403 module driving piezo ultrasonic transducers (and optionally AD8933 signal generator)
Stars: ✭ 39 (+50%)
Mutual labels:  avr-gcc
This is a super minimalistic GCC plugin that makes avr-g++ put tables of
vitual functions into the program memory saving RAM. It is meant to be
built as a plugin for the existing avr-g++ and modify its default behavior
when loaded. It is loaded into the compiler during compilation step. It
has no effect at linking step. Libraries that define classes which vtables
are intended to be placed into flash must be compiled with this plugin.

Building.

To build this plugin you need avr-g++ with plugins directory installed
and the host gcc. You may also need to install additional headers not
provided by the gcc, like gmp.h

When building for linux run

  make

in the current directory.

When building for windows-hosted compiler using mingw toolchain run

  make HOST_GCC=x86_64-w64-mingw32 GCCPLUGINS_DIR=<full-path-to-win-avr-gcc-plugin-dir>

in the current directory. Make sure the HOST_GCC matches gcc that was
used to build the target compiler, otherwise plugin build will fail at
linking step b/o missing symbols.

Using.

Invoke avr-g++ for compilation with additional parameter

  -fplugin=<full-path-to>/avr-flash-vtbl.so

More info.

https://habrahabr.ru/company/amperka/blog/264041

More technical info.

This plugin merely adds __flash attribute to the C++ vtable and vtable
pointer types. The rest is taken care of by the existing address space
machinery of the gcc and flash address space support of the AVR backend.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].