Release notes


----------------------------------------
SweetAda last version: 0.10 - 12/05/2022

- heavy cleanups and cosmetics for everything

- more definitions for CPUs and peripherals

- use aspects rather than pragmas

- changed I/O handling scheme, avoid generics

- some new subprograms in Bits/Memory_Functions

- correct overriding for core units

- RTS and LibGCC synchronized with GCC 11.3.0


---------------------------------------
SweetAda last version: 0.9 - 04/10/2021

- Windos environment does not need the grep utility, nor a dos2unix utility
  (which is now provided internally); elftool is now optionals and its use is
  configurable in configuration.in

- RTS can be build from sources by means of "CPU= make rts" command (the RTS
  type is being picked up from configuration.in as usual), every RTS branch will
  be named like the toolchain triplet being used

- Both SweetAda and RTS are fully buildable in Linux, Windos/cmd.exe, Windos/MSYS
  and OS X; you should only to have online a "make" and "sed" (and for Windos these
  are available as zip packages in Sourceforge); due to this, there are no RTS
  packages anymore

- SweetAda does not relies on SweetAda toolchains, you can use your own GNU toolchain,
  or whatever GNAT you can pick, just be sure to use Ada 2020

- sources for the GCC/GNAT wrappers and elftool

- elftool is made optional (see the top-level configuration.in)

- corrected double-quotes in various Makefile recipes

- new Srecord module, lets you download an S-record in memory, you have to connect
  it to the two procedures TX_Character and RX_Character (perhapas a serial port);
  supports well-formed S-records -- i.e., optional S0 starting, ending with an
  entry point record

- many more changes and fixes


----------------------------------------------------
core, RTS and LibGCC last version: 0.8 - 14/06/2021

- ADA_MODE defaults to ADA20 (-gnat2020)

- now the RTS is not a single common archive, every target CPU has its own;
  i.e. you have to donwload sweetada-rts-(target)-0.8.tar.gz; this way you
  avoid to waste bandwidth downloading a large RTS for, e.g., the AVR, when
  you don't need it

- adjusted Lock_Type definitions according to Ada 2020

- Tcl scripts: use "eq"/"ne" in place of "=="/"!="

- corrected a misinterpretation in the libopenocd.tcl proc version_numeric

- various programmer.tcl front-ends do not inherite OPENOCD_PREFIX, corrected

- change "adapter_khz" to "adapter speed" in OpenOCD configurations

- NiosII RTS has -mgpopt=none switch, so it is inherited in those kind of
  platforms

- NiosII lacks interrupt subprograms declaration (body still TBD), declared

- adjusted linker scripts in NiosII platforms (Altera10M50GHRD, DE10-Lite)

- DigiConnectME has ARM vectors template in llkernel.s

- adjusted some values in VGA low-level register programming; the package
  now can setup graphic mode 12h (640x480x16)

- burned in an EPROM, SweetAda correctly startups in a MIPS DECstation 5000/133
  and output messages on the SCC8530 serial port, blinking also the rear LEDs

- added/removed some Volatile_Full_Access aspects and cleaned up record layouts
  that don't need it (they are placed in the object definition instead)

- every CPUs has eventually an empty LibGCC package spec (which overrides the
  core one); this enforces a catch of package (mis-)using, which cause the compiler
  to flag an error (should you try to use it when the CPU really does not need it)

- corrected a Makefile target dependency (output listings could be out-of-synch
  if "make postbuild" is not explicitly called)

- typos, cosmetics and minor adjustments


----------------------------------------------------
core, RTS and LibGCC last version: 0.7 - 01/06/2021

- updated targets in master Makefile ("all" was tagged default instead of "help");
  the targets "kernel_info" and "kernel_libinfo" are now exposed (kernel_libinfo
  produces listings of library objects even if the kernel build is not successful)

- added implicit dependencies for console unit

- elftool will emit spaces instead of TABs when performing an ELF section dump, this
  will be noted in the next toolchain release

- the linker script filename can now be declared in the platform configuration.in
  by specifying "LD_SCRIPT := ", otherwise it takes a default
  "linker.lds"

- the C library now implements Ada stubs for malloc/free/calloc/realloc, so C code
  can call these Ada subprograms via stdlib wrappers; this has also the benefit of
  resolve references to malloc() when secondary stack tries to return heavy (i.e.,
  unconstrained) objects, but be sure to add "USE_LIBGCC := Y" and "USE_CLIBRARY := Y"
  to the configuration.in file, either the generic one in the top-level directory,
  or the platform-dependent one

- SFP RTS: a-except: Raise_Exception calls Last_Chance_Handler

- SFP RTS: added Ada.Assertions (for pragma Assert you need to turn on -gnata in
  the "Ada Run-Time Checks switches" section of Makefile.tc.in)

- core/bits: added BITZERO/BITONE/BITL/BITH/BITOFF/BITON declarations

- core/console: Print (Boolean), emits "T" or "F"

- core/llutils: HexDigit_To_U8 uses a case instead of longer ifs

- modules/definitions: added a few definitions

- added various Volatile_Full_Access aspects here and there

- corrected some section wildcards in linker scripts for ARM platforms

- x86_64 lacks some low-level CPU subprograms (but thay are empty anyway) and so the
  build could fail with unresolved objects, added

- new libutils/libopenocd.tcl file, useful for small OpenOCD function helpers

- Digi Connect ME (NET+ARM NS7520): some more register definitions; adopted a Tcl
  script as front-end to OpenOCD

- Synergy S5D9: OpenOCD cfg file renamed to standard "openocd.cfg"

- Synergy S5D9: more register definitions, SCI almost completely parameterized

- platform Spartan3E renamed as Spartan3E-SK

- new target: Avnet Xilinx Spartan-3A Evaluation Kit (Spartan3A-EK, MicroBlaze v7.00.b),
  only able to blink a LED; the programmer.tcl front-end will download the bitstream by
  directly interfacing with the on-board Cypress PSoC via USB protocol (no external
  tools needed in a Linux environment)

- targets involving OpenOCD (DigiConnectME, FRDM-KL46Z, HiFive1, MSP432P401R,
  STM32F769I, Synergy-S5D9) now should specify in the platform configuration.in the
  OpenOCD prefix (in Windows is the installation directory, i.e., that which is the
  parent of bin/, etc); the default is the *nix path "/usr/local"

- in the top-level directory there are the two files .cproject and .project for Eclipse
  CDT; no big deal since you have absolutely no Ada support, but if you import the
  project and configure the *.adb and *.ads files as textual source files, you could
  do a make build cycle, with error signalling (clicking on the error shown in console
  should redirect you to the offending source line)

- typos, cosmetics and minor adjustments


---------------------------------------------------
core, RTS and LibGCC last version: 0.6 - 17/05/2021

- spurious entry core/last_chance_directory was not removed in the configuration.in
  for the core complex, and this causes a build failure in GPRbuild mode, corrected

- Makefile.tc.in: new ADAC_SWITCHES_WARNING switches:
  -gnatw.q - (Activate warnings on questionable layout of record types)
  -gnatw_r - (Activate warnings for out-of-order record representation clauses) (unused)

- Makefile.tc.in: added DISABLE_STACK_USAGE flag (some targets do not support stack
  usage computation, can be set from platform-level configuration.in)

- menu-dialog.sh remains in menu until you exit explicitly (e.g., by pressing
  double-ESC), so you can perform various actions sequentially; if instead you specify
  an action as an argument in the command line then the behaviour is unchanged,
  exiting at once after execution

- qemu-ifup.sh/qemu-ifdown.sh are now a single common copy in libutils directory;
  Dreamcast makeip.tcl/scramble.tcl are now merged in makecdrom.tcl; pc-x86-bootX.tcl
  moved as a single copy in share directory

- package Definitions is now placed in modules directory

- more error checking in various Tcl scripts

- initial cleanup of cpus branch file layout, removed duplicated files

- new target: SiFive HiFive1 Rev B, only able to blink the on-board RGB LEDs (needs
  OpenOCD to download the executable)

- Synergy-S5D9: bsp.ads got accidentally deleted, corrected

- Synergy-S5D9: added SCI definitions so that it can output something on SCI (UART
  mode, very primitive)

- partial rewriting of the NE2000 driver, more register definitions

- removed all ugly, unpleasant, ill-designed temporary code from exceptions.adb
  in PC-x86 interrupt handling (which now processes, e.g., raw TCP/IP traffic from
  applications.adb); the same in Amiga-FS-UAE

- some changes in Ethernet FIFO queue to make it more efficient

- ATmega328P (ArduinoUno): more register definitions, timers and general purpose
  registers; added some low-level templates; deleted unuseful subprogram in proprietary
  core unit and its dependency on console

- drivers/pc:
  - revised 8254 PIT; PIT_Counter0_Init now uses MODE 2 (rate generator) instead
    of MODE 3 (square wave generator) as a system timer
  - simple stub for RTC handling
  - IrqX renamed to PIC_IrqX
  - Irq0 aliased to PIT_Interrupt
  - Irq8 aliased to RTC_Interrupt

- added -mno-red-zone to GCC switches in x86-64

- use rounding instead of floor integer division when computing timing counts, where
  appropriate


---------------------------------------------------
core, RTS and LibGCC last version: 0.5 - 04/05/2021

- The SFP RTS now gets Ada.Tags installed, and so it should be possible to use
  Ada tagged types

- there are no more multiple Makefile.rts.in scattered in every multilib directory,
  only a single file is stored in the RTS root path of the toolchain target

- Master Makefile does not export FPU_MODEL, corrected

- new target: Synergy-S5D9 ARM-CortexM4 board, only able to blink a LED
  (needs OpenOCD to communicate with the target from inside SweetAda)

- LibGCC now has adddi3/subdi3/negdi2/mulsi3/muldi3 implemented in pure Ada (although
  a bit superflous, since in most cases these subprograms will be overriden by CPU's
  own LibGCC assembly routines)

- The MVME162-510A platform has now a little Tcl script to download a SweetAda
  S-record image by means of 162-Bug on-board monitor communication; very simple script
  (and at 19200 also very slow for big images, but good enough for testing)

- the hard disk images for some platforms (Amiga-FS-UAE, Malta, PC-x86, etc) got
  accidentally deleted, they are now re-integrated for testing purposes

- removed superflous conversion in Address_Displacement

- drivers/PC: PIC_Init has now Vector_Offset_Master/Slave input parameters and can be
  used also from non-x86 targets

- Malta MIPS: use PIC code from PC unit rather than an ad-hoc piece of code

- drivers/PC: PIT_Counter0_Init has an input Count parameter

- drivers/PC: unit does not depend on configure.ads anymore, and so the entire drivers
  branch should be CPU-independent

- typos, cosmetics and minor adjustments


---------------------------------------------------
core, RTS and LibGCC last version: 0.4 - 27/04/2021

- SweetAda has a new toolchain, armeb-sweetada-eabi, to handle big-endian ARMs
  (previously this was not necessary since ZFP does not link against libraries);
  affected target is DigiConnectME -- and eventually your own experimental target;
  ARM BE targets now not need to specify big-endian switches anymore, but they should
  explicitly specify armeb-sweetada-eabi as the toolchain name in the platform
  configuration.in, i.e.:
  TOOLCHAIN_NAME := $(TOOLCHAIN_NAME_ARMeb)
  whilst ARM LE takes the default toolchain

- the non-optimized versions of divsi3/modsi3 for MicroBlaze were not selected;
  this is now corrected

- the download script for Dreamcast -- bba.tcl -- is now written in Tcl (note:
  requires Tcl UDP extension) and thus does not require the dc-tool-ip utility,
  quick'n'dirty, no error checking yet; if it is difficult to install a Tcl extensions,
  then stuck yourself with dc-tool-ip by just uncommenting its exec line, and do
  an exit

- remove useless return statements in various Tcl scripts

- use Bits.BigEndian/LittleEndian booleans in llutils unit

- ATmega328P has more MCU definitions (not complete yet)

- ArduinoUno:
  - XTAL clock frequency is specified in configure.ads
  - ZFP profile is forced in configuration.in to avoid problems with a small foot-print
    memory, thus overriding the settings in the top-level configuration.in
  - BSP does nothing; tests moved in application/test-ArduinoUno

- FRDM-KL46Z has more definitions; ZFP profile is forced in configuration.in to avoid
  problems with a small foot-print memory, thus overriding the settings in the
  top-level configuration.in

- bits.ads: some Bits_XX_Mask corrected; added Bits_XX_RMask

- now RTSes have, in every CPU target, two more files:
  1) Makefile.srcs.in, the list of source files used (not of particular use so far,
     just a reference);
  2) Makefile.rts.in, contains CPU-wide switches (i.e., not dependent on the multilib
     selected) used during the RTS build;
  those switches, which normally are empty, are automatically imported in the master
  Makefile and added to the target platform CPU, thus assuring that the compiler agrees
  on both RTS code and SweetAda/user code; as a consequence of this, there is no
  more need to specify, e,g, "-fno-leading-underscore" in SuperH/SH4 targets, and
  MIPS targets inherit automatically a -G0 switch (they are the only switches which
  are actually used in the RTS for those targets)

- QEMU-MIPS was based on "mips" machine; this machine does not exist anymore in current
  QEMU and so the platform is now based on "mipssim", what changes is just the
  UART16450 base I/O address in monitor.S

- Nios II Terasic DE10-Lite now has a Tcl front-end (programmer.tcl) which
  automatically downloads the SOF bitstream and executes the SweetAda code by means
  of Quartus command-line utilities and jtagd daemon

- Nios II Terasic DE10-Lite exposes a configuration setup that explains practically
  how to override core units, i.e., it invalidates last_chance_handler in the core
  directory and redefines the same subprogram package in its own directory, so to avoid
  dragging in the entire console package (which is used by the standard implementation
  of last_chance_handler)

- all Tcl scripts that handle the download of code on a physical target board are
  possibly renamed to a standardized "programmer.tcl"

- menu-dialog.sh now always shows warnings (previously it used to show warnings only
  if the build failed due to hard errors)

- typos, cosmetics and minor adjustments


---------------------------------------------------
core, RTS and LibGCC last version: 0.3 - 06/04/2021

- due to changes in RTSes, switch -gnatp (pragma Suppress (All_Checks)) is again
  commented out (Makefile.tc.in), to bring in exception processing; re-enable it if
  the final object is too big for your setup

- initial implementation of a secondary stack in the SFP RTS (not fully operational
  yet)

- strict compiler conformance, -gnatE and -gnato are defaults in Makefile.tc.in

- suppress No_Elaboration_Code in gnat.adc

- console.ali was not dragged in under GPRbuild mode and is missing in some
  configurations, which could lead to undefined references

- build.gpr/configure.gpr now correctly process implicit .ali units

- configure.ads (auto-generated from configuration.in) is pragma Pure

- a kernel link phase is performed if linker script changed

- Makefile now has two more targets: "session-start" and "session-end"; like "run"
  and "debug" targets, they are associated with shell commands that you can define
  in the platform configuration.in and can be useful for starting and ending JTAG
  servers, remote communication, and so on; these targets have nothing special,
  the names are only placeholders and their purposes are completely defined by the
  shell commands carried on; see an example in the new platform FRDM-KL46Z, where the
  commands respectively define an OpenOCD server startup and shutdown action

- Makefile.tc.in could specify -gsplit-dwarf; thus you can find *.dwo DWARF files in
  the object directory

- still more Makefiles tweaks: now there should be no problem building in GPRbuild
  mode; furthermore, "make createkernelcfg" forces a distclean

- menu-dialog.sh is standardized and behaves like menu.[bat|sh], so there are now
  separate items "createkernelcfg" and "configure" (previosuly there was a single
  "configure" item which executed them sequentially)

- elftool has a new command switch to find a symbol value:
  elftool -c findsymbol= 
  which returns the symbol value; it is used, e.g., in the FRDM-KL46Z platform to
  automatically find the _start address in the executable image and instruct OpenOCD
  to run the target with a properly resume address; see an example as outlined in
  .../platforms/FRDM-KL46Z/runopenocd.tcl

- mbr can read other partitions beyond the first

- mbr partition read could cause a misaligned access with some CPUs, so an
  assignemnt is replaced with a memory copy

- Dreamcast code runs on a real device, not just in the GXemul emulator; this requires:
  - a HIT-0400 "BroadBand Adapter" Ethernet module
  - a CDI CD-ROM burned with "Dreamcast CDI Burner" https://alex-free.github.io/dcdib/
  - a dc-tool-ip utility http://napalm-x.thegypsy.com/adk/dc/dcload-ip/index.html
  (the dc-tool-ip utility will be soon replaced by a Tcl script)

- MicroBlaze has now udivsi3 and umodsi3 LibGCC assembler routines

- MemecFX12 and Spartan3E platforms now have Tcl scripts to build, download and execute
  SweetAda kernel

- new target: FRDM-KL46Z Freescale/NXP ARM-CortexM0 board (a.k.a. "Freedom"), only able
  to blink a LED (needs OpenOCD to communicate with the target from inside SweetAda)

- FS-UAE platform renamed as Amiga-FS-UAE

- typos, cosmetics and minor adjustments


---------------------------------------------------
core, RTS and LibGCC last version: 0.2 - 21/01/2021

- Makefile is now optimized and does not perform a bind phase every time; note, this
  requires an updated gnat-wrapper, please download a fresh copy of the toolchain

- Makefile "all-clean" target renamed as "distclean" (and so do all variables
  starting with "ALL_CLEAN...")

- Makefile: added GNATLS tool, deleted unnecessary variables, added .h dependencies
  in clibrary build, deleted C++ toolchain variables in Makefile.tc.in

- Makefile: double-quoted some file references which lead to errors if SweetAda lays
  in a path directory which contains spaces

- there is a new "share" directory, which contains various auxiliary files, in
  order to centralize sparse and/or duplicated files

- AVR ATmega328P targets specify now an emulation mode during linking objects so that
  the final ELF object has correct flags; this prevents, e.g., QEMU-AVR from exiting
  prematurely

- QEMU-AVR: startup.S #undef's __AVR_ENHANCED__ because QEMU isn't yet able to
  fully emulate ELPM instructions

- new target STM32F769I (disco) ARM-CortexM7; only able to blink a LED (needs OpenOCD
  to communicate with the target from inside SweetAda)

- PC-x86-64 uses Tcl scripts for FD/HD booting in QEMU

- upgraded SPARCstation5 and DECstation5000, which missed the new $(SYMLINK) script

- Dreamcast target produces a CD-ROM image suitable to create a physical CDI

- S/390 can IPL SweetAda from DASD devices (thanks to Hercules' DASDLOAD -- you need it)

- S/390 createtxtrecord.tcl script now renamed as S360obj.tcl

- typos, cosmetics and minor adjustments


----------------------------------------------------
core, RTS and LibGCC last version: 0.1h - 05/01/2021

- There is now a primitive SFP (Small-FootPrint) runtime, does nothing very interesting
  so far, only allows non-trivial exception declarations and floating-point validation;
  when I will implement the Secondary Stack, things should start to be far better

- RTS and PROFILE items are now lowercased, as well as RTS directory names

- RTS for MIPS* targets is tuned with -G0, you should use this in your target compiler
  setup

- RTS for SH* targets is tuned with -fno-leading-underscore, you should use this in
  your target compiler setup

- the Bits library unit now exposes BigEndian and LittleEndian static booleans

- new procedure Print (Interfaces.C.char) in Console library unit

- Tcl will be the default scripting language for complex tasks, it is strongly advised
  to install it in your machine (Windows users could download the tcltk.zip package)
  since script files will be gradually replaced, at least those too heavy for a shell

- as just said, the "createtxtrecord" tool in S/390 and the scripts for the creation of
  bootable PC floppy/hard disk images are now written quick-and-dirty in Tcl, but they
  should be widely usable and requires no external OS utilities support

- IDE driver sets LBA mode, and FAT (read-only) works with LBA logical sectors

- MBR library unit to recognize partitions (very minimal, only 1st partition detected)

- menu.bat now shows automatically an usage if an incorrect action was supplied

- libutils provides a createsymlink shell script to create symbolic (soft) links in
  an OS-transparent way, use it by referencing $(CREATESYMLINK) in the Makefiles; this
  substitutes a physical copy of files in non-Linux machines during subplatform-specific
  installation; however, in Windows machines it requires PowerShell elevation rights
  in order to avoid bloated warning messages, so adjust your OS settings; the good news
  are that is now possible to edit subplatform-specific files without lose your changes
  whenever you restart from scratch with a "createkernelcfg" build cycle

- Makefile cleanups, there are no scattered shell-dependent bloated constructs,
  except for the trivial ones, and they are now concentrated logically in few places;
  the build system should tolerate even spaces in pathnames (very bad practice, though)

- delete unnecessary functions and variables in Makefiles

- reordering of gnat1 debug switches in Makefile.tc.in, corrected -gnatdt switch
  description

- reordering of configuration dump in Makefile

- reordering/deletion/tuning of compiler switches in various platforms

- new target MSP432P401R, very minimal, only blinks the on-board LED

- DE10-Lite NiosII target now performs stack setup and calls the low-level adainit
  function in startup.S, so that proper runtime elaboration happens

- AVR targets can now use aggregates (see explanation below)

- ArduinoUno does not specify the path to AVRDUDE executable, this is now
  delegated to the run script

- the S/390 target specifies a correct emulation mode in linking objects so that
  there are no more problems during processing

- typos, cosmetics and minor adjustments


----------------------------------------------------
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 blink the on-board 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