Source Code, Compilers, and System Generator
SDVOS has also been ported to the AVR5 architecture. Currently, SDVOS only has support for the ATmega328p microcontroller found in the Arduino UNO board. Support for ATmega2560 in the Arduino Mega 2560 board will be added in the future. To select the AVR5 architecture while building the kerne, a global macro named __ARCH_AVR5__ must be defined. However, you would never do this yourself since it is included in the board configuration file. For instance, src/board/ARDUINO_UNO/config.mk has the following line:
CFG += -D__ARCH_AVR5__
To compile the kernel for the AVR5 architecture, you would need the avr-gcc compiler. Different from the ARMv7-M support, SDVOS does require the existence of the avr-libc for the startup procedures. I will probably work on a more complete AVR5 port with separate linker scripts and startup routines in the future.
To install the avr-gcc and the avr-libc on your host machine, please check your distribution's package manager. On the Ubuntu Linux, you can install these packages with the following command:
bash$ sudo apt-get install avr-gcc avr-libc
If you are using Ubuntu, you should be good to go after the installation. If this is not the case, please make sure the toolchain names are the same as the defaults or define them properly in the board config.mk file. For instance, in src/board/ARDUINO_UNO/config.mk, these names are defined as:
CC = avr-gcc LD = $(CC) OBJDUMP = avr-objdump SIZE = avr-size OBJCPY = avr-objcopy
With the toolchain installed, you should now be able to configure and build the kernel and your applications. Take a look at the tutorials for your target board and example applications to get started.