Overview

Screenshot of IOEMU

Welcome to SweetAda.

SweetAda is a lightweight development framework whose purpose is the implementation of Ada-based software systems.

The code produced by SweetAda is able to run on a wide range of machines, from ARM® embedded boards up to x86-64-class machines, as well as MIPS® machines and Virtex®/Spartan® PowerPC®/MicroBlaze® FPGAs. It could theoretically run even on System/390® IBM® mainframes (indeed it runs on the Hercules emulator). SweetAda is not an operating system, however it includes a set of both low- and high-level primitives and kernel services, like memory management, PCI bus handling, FAT mass-storage handling, which could be used as building blocks in the construction of complex software-controlled devices.

SweetAda has some distinctive characteristics, like:
- is ROMable
- uses a ZFP run-time
- has no dependencies; neither external libraries nor underlying code are needed

Screenshot of debugger

SweetAda has a complete toolchain (assembler, linker, Ada compiler and debugger), and optionally you could even use a machine emulator, which can execute the final output code inside a virtual target. In order to use SweetAda, a decent POSIX® environment with a Bash shell and GNU Make are required. For a Linux® workstation this is quite standard, while for a Windows® machine you can download and install either MSYS2 (preferred) or Cygwin®. Anyway, SweetAda toolchains for Windows have an integrated Make suited for a Windows CLI. Being completely makefile- and script- driven, SweetAda is completely configurable and has many hooks which allow an easy integration in a GUI environment such as, e.g., Eclipse, KDE Kate or Visual Studio Code. Insight debugger is also available.

SweetAda comes with high-quality GNU toolchains based on modern official FSF Binutils/GCC/GDB releases, unpatched and compiled with strictly controlled options. The emulators are mainly based on the latest QEMU™ official release, augmented with the IOEMU physical I/O system, which allows software code to interact with a visual environment.

Screenshot of MemecFX12

To make SweetAda generic and, at the same time, reliable, it is regularly tested against an heterogeneous set of machines which are able to successfully execute the system code, e.g.:
- PC-style PIIX3/PIIX4 motherboards (ROM-boot)
- DECstation 5000/133 MIPS R3000 (ROM-boot)
- Memec FX12 Virtex-4 PPC405 (JTAG-boot)
- DigiNS7520 board ARM7TDMI (JTAG-boot)
- Terasic DE10-Lite Nios®II softcore (JTAG-boot)
- MVME1600-011 PPC603 VME board (JTAG-boot)
- Force SPARC®/CPU-3CE VME board (ROM-boot)
- M5235BCC ColdFire development board (ROM-boot)
- SPARCstation™ 5 (ROM-boot)
- Spartan 3E MicroBlaze softcore (JTAG-boot)
- Raspberry Pi™ 3 ARMv8 (microSD-boot)

The SweetAda software code is compiled by a build machinery which enforces a very high severity level. Usefulness, simplicity and expandability rather than extreme or obscure optimizations are the key features behind the project. Nevertheless, SweetAda grants the possibility of employ appropriate customizations, down to machine code level, to satisfy specific needs.

SweetAda is in a state of steady growth. BSPs, device drivers, a TLSF memory allocator, TCP/IP basic functionalities, as well as low-level CAN primitives are under heavy development. More target machines and additional feautures/modules such as intrinsic floating point support and expanded SFP runtimes are scheduled in future releases, as well as language tools and system utilities, like ASIS.

Please note that the platform-specific code included in SweetAda is given as an example. The emphasis of SweetAda is not about operating system design, but rather on exploiting the Ada language everywhere.

Release notes

----------------------------------------------------

core, RTS and LibGCC last version: 0.1g - 15/11/2020

- new toolchains: Binutils 2.35, GCC 10.2.0, GDB 10.1
- some aspects changed due to better Ada front-end compiler analysis
- echo_log() and echo_log_error() renamed to log_print() and log_print_error() in Bash scripts
- general cleanup and cosmetics
- fixed executables in QEMU emulators for Linux (AArch64, ARM, AVR, i386 and M68K targets)
- added missing libffi-6.dll to all QEMU emulators for Windows
Note that Insight has still GDB @ 9.1, and will overwrite the standard GDB executable

----------------------------------------------------

core, RTS and LibGCC last version: 0.1f - 17/08/2020

- general cleanup and cosmetics
- general infrastructure improvements
- the VGA text driver is now unified across platforms; it is actually used by PC-x86, PC-x86-64 and MIPS Malta
- the ugly handling of network packets (Amiga/FS-UAE and PC-x86) is re-routed to a PBUF FIFO handler (the management is still far from ideal, but is not tied to the ISR like before)
- various I/O have now correct aspect specifiers; in particular some hardware registers with specific sizes are now correctly handled without premature optimizations
- AVR is now part of SweetAda and so 2 platforms exist: ArduinoUno and a QEMU emulator (both ATmega328P);
the AVR support is primitive and incomplete, but, with an ArduinoUno board, is sufficient to start up the Ada infrastructure and is able to pulse the onboard LED;
note that programming is performed by means of the AVRDUDE tool, so you should use a version suitable for your environment;
otherwise you could use the IHEX .hex output file with your preferred tool;
the QEMU-AVR platform can be used with GDB or Insight to trace the execution of code;
- runsweetada and IOEMU library now correctly show in argv dumps the launched executable instead of a "NULL" tag
- the parser inside the IOEMU library now expose in the .cfg file a variable (__LASTPID__) that carries the PID of the last launched executable (see QEMU-AVR/qemu.cfg)

QEMU emulators build 20200817 - 17/08/2020

- QEMU version 5.1.0; please note that the Linux version is linked with the SDL2 library instead of the previous GTK+3

-------------------------------------

core last version: 0.1e - 22/07/2020

- general cleanup and cosmetics
- general infrastructure improvements
- QEMU-RISC-V-32 target can do serial output in a terminal
- IntegratorCP target uses LCD VGA
- Malta MIPS target uses a VGA PCI board
- handling of directories in the cpus hierarchy, which allows selective unit overriding
- Insight can be called as a toolchain component
- IOEMU configuration files are now fully consistent

------------------------------------------

QEMU emulators build 20200714 - 14/07/2020

- QEMU now prints to stdout the IOEMU I/O ports, along with their addresses
- QEMU for OS X doesn't need a separate /usr/local/lib hierarchy, .dylibs libraries
are installed in the sibling lib/ directory of <prefix>/bin, so it is now self-consistent

------------------------------------

core last version: 0.1d - 12/07/2020

- general cleanup
- cosmetics and more standardized ioemu.cfg files
- PowerPC Taihu target has more pleasant interrupt handling (still very primitive)
- ML605 MicroBlaze target has more pleasant interrupt handling (still very primitive)
- PC-x86-64 QEMU target has a kludge to overcome problems with QEMU movdqa instruction

-----------------------------------

RTS last version: 0.1c - 07/07/2020

LibGCC last version 0.1c - 07/07/2020

Forum

SweetAda has a forum. Go to the forum and share your opinions, experiences and suggestions. Please note that due to dynamic server address, emails from sweetada.org could be classified as spam by your provider. Check your email spam folder everytime you are waiting for something from this site.

Documentation

Downloads

SweetAda source code

Uncompress the RTS package in the same "rts" directory of the SweetAda top-level hierarchy. The LibGCC support files are assembler sources needed to make the code completely self-consistent (this is required only for ARM, M68k, SH, SH4 and SPARC targets). Uncompress the package in the same "cpus" directory of the SweetAda top-level hierarchy. If you want to link with the standard LibGCC library the package can be ignored.
version all systems
SweetAda 0.1g - core sweetada-0.1g.tar.gz
SweetAda 0.1g - RTS sweetada-rts-0.1g.tar.gz
SweetAda 0.1g - LibGCC sweetada-libgcc-0.1g.tar.gz

Toolchains - build 20201102 - Binutils 2.35, GCC 10.2.0, GDB 10.1

target CPU Linux 64-bit Windows 64-bit OS X 64-bit
AArch64 (ARMv8-A) aarch64-sweetada-elf-20201102L.tar.xz aarch64-sweetada-elf-20201102W.zip aarch64-sweetada-elf-20201102M.tar.gz
ARM arm-sweetada-eabi-20201102L.tar.xz arm-sweetada-eabi-20201102W.zip arm-sweetada-eabi-20201102M.tar.gz
AVR avr-sweetada-elf-20201102L.tar.xz avr-sweetada-elf-20201102W.zip avr-sweetada-elf-20201102M.tar.gz
i686 i686-sweetada-elf-20201102L.tar.xz i686-sweetada-elf-20201102W.zip i686-sweetada-elf-20201102M.tar.gz
M68k/ColdFire m68k-sweetada-elf-20201102L.tar.xz m68k-sweetada-elf-20201102W.zip m68k-sweetada-elf-20201102M.tar.gz
MIPS mips-sweetada-elf-20201102L.tar.xz mips-sweetada-elf-20201102W.zip mips-sweetada-elf-20201102M.tar.gz
MIPS64 mips64-sweetada-elf-20201102L.tar.xz mips64-sweetada-elf-20201102W.zip mips64-sweetada-elf-20201102M.tar.gz
MicroBlaze microblaze-sweetada-elf-20201102L.tar.xz microblaze-sweetada-elf-20201102W.zip microblaze-sweetada-elf-20201102M.tar.gz
NiosII nios2-sweetada-elf-20201102L.tar.xz nios2-sweetada-elf-20201102W.zip nios2-sweetada-elf-20201102M.tar.gz
PowerPC powerpc-sweetada-elf-20201102L.tar.xz powerpc-sweetada-elf-20201102W.zip powerpc-sweetada-elf-20201102M.tar.gz
RISCV riscv-sweetada-elf-20201102L.tar.xz riscv-sweetada-elf-20201102W.zip riscv-sweetada-elf-20201102M.tar.gz
S/390 s390-sweetada-linux-20201102L.tar.xz s390-sweetada-linux-20201102W.zip s390-sweetada-linux-20201102M.tar.gz
SH sh-sweetada-elf-20201102L.tar.xz sh-sweetada-elf-20201102W.zip sh-sweetada-elf-20201102M.tar.gz
SH4 sh4le-sweetada-elf-20201102L.tar.xz sh4le-sweetada-elf-20201102W.zip sh4le-sweetada-elf-20201102M.tar.gz
SPARC sparc-sweetada-elf-20201102L.tar.xz sparc-sweetada-elf-20201102W.zip sparc-sweetada-elf-20201102M.tar.gz
SPARC64 sparc64-sweetada-elf-20201102L.tar.xz sparc64-sweetada-elf-20201102W.zip sparc64-sweetada-elf-20201102M.tar.gz
x86-64 x86_64-sweetada-elf-20201102L.tar.xz x86_64-sweetada-elf-20201102W.zip x86_64-sweetada-elf-20201102M.tar.gz

GPRbuild support - build 20200417

Note that GPRbuild is an optional component of the toolchain.
Linux 64-bit Windows 64-bit OS X 64-bit
gprbuild-20200417L.tar.xz gprbuild-20200417W.zip gprbuild-20200417M.tar.gz

Insight debugger - build 20200417 - GDB 9.1

Note:
Insight requires Tcl 8.6.10, Tk 8.6.10, iTcl 4.2.0, iTk 4.1.0 and iWidgets 4.1.1.
Windows packages have libraries included, for Linux you should refer to your distribution package manager in order to download them.
target CPU Linux 64-bit Windows 64-bit OS X 64-bit
AArch64 (ARMv8-A) insight-aarch64-sweetada-elf-20200417L.tar.xz insight-aarch64-sweetada-elf-20200417W.zip N/A
ARM insight-arm-sweetada-eabi-20200417L.tar.xz insight-arm-sweetada-eabi-20200417W.zip N/A
AVR insight-avr-sweetada-elf-20200417L.tar.xz insight-avr-sweetada-elf-20200417W.zip N/A
i686 insight-i686-sweetada-elf-20200417L.tar.xz insight-i686-sweetada-elf-20200417W.zip N/A
M68k/ColdFire insight-m68k-sweetada-elf-20200417L.tar.xz insight-m68k-sweetada-elf-20200417W.zip N/A
MIPS insight-mips-sweetada-elf-20200417L.tar.xz insight-mips-sweetada-elf-20200417W.zip N/A
MIPS64 insight-mips64-sweetada-elf-20200417L.tar.xz insight-mips64-sweetada-elf-20200417W.zip N/A
MicroBlaze insight-microblaze-sweetada-elf-20200417L.tar.xz insight-microblaze-sweetada-elf-20200417W.zip N/A
NiosII insight-nios2-sweetada-elf-20200417L.tar.xz insight-nios2-sweetada-elf-20200417W.zip N/A
PowerPC insight-powerpc-sweetada-elf-20200417L.tar.xz insight-powerpc-sweetada-elf-20200417W.zip N/A
RISCV insight-riscv-sweetada-elf-20200417L.tar.xz insight-riscv-sweetada-elf-20200417W.zip N/A
S/390 insight-s390-sweetada-linux-20200417L.tar.xz insight-s390-sweetada-linux-20200417W.zip N/A
SH insight-sh-sweetada-elf-20200417L.tar.xz insight-sh-sweetada-elf-20200417W.zip N/A
SH4 insight-sh4le-sweetada-elf-20200417L.tar.xz insight-sh4le-sweetada-elf-20200417W.zip N/A
SPARC insight-sparc-sweetada-elf-20200417L.tar.xz insight-sparc-sweetada-elf-20200417W.zip N/A
SPARC64 insight-sparc64-sweetada-elf-20200417L.tar.xz insight-sparc64-sweetada-elf-20200417W.zip N/A
x86_64 insight-x86_64-sweetada-elf-20200417L.tar.xz insight-x86_64-sweetada-elf-20200417W.zip N/A

Emulators - QEMU 5.1.0 - FS-UAE - GXemul

Note:
Linux and Windows versions of QEMU are linked against SDL2 library (previously the Linux version was linked against GTK+3). The library is included only in Windows packages. FS-UAE requires libmpeg2 and OpenAL libraries. For S/390 emulation, you can download and build the Hercules emulator (possibly together with a X3270 emulator), which is not supplied here since the IOEMU library is not provided for this target.
target CPU Linux 64-bit Windows 64-bit OS X 64-bit
AArch64 (ARMv8-A) qemu-aarch64-20200817L.tar.xz qemu-aarch64-20200817W.zip qemu-aarch64-20200817M.tar.gz
ARM qemu-arm-20200817L.tar.xz qemu-arm-20200817W.zip qemu-arm-20200817M.tar.gz
AVR qemu-avr-20200817L.tar.xz qemu-avr-20200817W.zip qemu-avr-20200817M.tar.gz
i686 qemu-i386-20200817L.tar.xz qemu-i386-20200817W.zip qemu-i386-20200817M.tar.gz
M68k/ColdFire qemu-m68k-20200817L.tar.xz qemu-m68k-20200817W.zip qemu-m68k-20200817M.tar.gz
M68k fs-uae.tar.xz N/A N/A
MIPS qemu-mips-20200817L.tar.xz qemu-mips-20200817W.zip qemu-mips-20200817M.tar.gz
MIPS64 qemu-mips64-20200817L.tar.xz qemu-mips64-20200817W.zip qemu-mips64-20200817M.tar.gz
MicroBlaze qemu-microblaze-20200817L.tar.xz qemu-microblaze-20200817W.zip qemu-microblaze-20200817M.tar.gz
NiosII qemu-nios2-20200817L.tar.xz qemu-nios2-20200817W.zip qemu-nios2-20200817M.tar.gz
PowerPC qemu-ppc-20200817L.tar.xz qemu-ppc-20200817W.zip qemu-ppc-20200817M.tar.gz
PowerPC64 qemu-ppc64-20200817L.tar.xz qemu-ppc64-20200817W.zip qemu-ppc64-20200817M.tar.gz
RISCV32 qemu-riscv32-20200817L.tar.xz qemu-riscv32-20200817W.zip qemu-riscv32-20200817M.tar.gz
RISCV64 qemu-riscv64-20200817L.tar.xz qemu-riscv64-20200817W.zip qemu-riscv64-20200817M.tar.gz
SH4 gxemul.tar.xz N/A N/A
SPARC qemu-sparc-20200817L.tar.xz qemu-sparc-20200817W.zip qemu-sparc-20200817M.tar.gz
x86_64 qemu-x86_64-20200817L.tar.xz qemu-x86_64-20200817W.zip qemu-x86_64-20200817M.tar.gz

Contacts

My name is Gabriele Galeotti; I work as a software engineer. You can reach me at < gabriele dot galeotti at sweetada dot org >. Feel free to contact me for everything (chances are I will respond from another email account due to ISP spam restrictions on dynamic not-business-class websites).

POSIX is a registered trademark of the IEEE. Linux is a registered trademark of Linus Torvalds. Windows is a registered trademark of Microsoft Corp. OS X is a registered trademark of Apple Inc. Cygwin is a registered trademark of Red Hat, Inc. ARM is a registered trademark of ARM Ltd. ColdFire is a registered trademark of Motorola, Inc. MIPS is a registered trademark of MIPS Technologies, Inc. MicroBlaze and Virtex are trademarks and/or registered trademarks of Xilinx, Inc. Nios is a registered trademark of Altera Corp. PowerPC is a registered trademark of IBM Corp. SPARC is a registered trademark of SPARC International, Inc. Raspberry Pi is a trademark of the Raspberry Pi Foundation. IBM and System/390 are registered trademarks of IBM Corp. QEMU is a trademark of Fabrice Bellard. Other trademarks and trade names are properties of their respective owners.