Showing posts with label ada. Show all posts
Showing posts with label ada. Show all posts

Wednesday, 5 February 2025

Visual Studio, Ada Language Server, macOS

If you’re using VSCode on a Mac with Apple silicon (an M-series chip) you will probably have noticed that Ada code formatting doesn’t work.

This is thought to be because of an issue with the aarch64-apple-darwin compiler. It’s stated that the problem doesn’t occur if the Ada Language Server is compiled for the Intel (x86_64) architecture.

Wednesday, 29 January 2025

Ada TS Mode

Ada TS Mode by Troy Brown is an Emacs-based IDE for Ada.

It’s a replacement for Emacs Ada Mode by Stephe Leake and others.

Thursday, 18 July 2024

Ada & FreeRTOS on ESP32 H2

The ESP32 H2 from Espressif, as provided by The Pi Hut, has a RISC-V 32-bit single-core processor with a clock speed of up to 96MHz and 4MB of built-in Flash, an extensive set of on-chip pripherals, and also integrated wireless connectivity.

The Espressif development environment provides a considerable range of software packages to take advantage of the MCU’s features.

It’s possible to implement Ada code in the Espressif environment, but I was more interested in extending Cortex GNAT RTS (which is built over FreeRTOS) to use this new-to-me hardware. This wouldn’t have been possible had FreeRTOS not already supported RISC-V.

Sunday, 11 February 2024

SDK 15 issues

This note covers some problems we’ve had with Xcode/the Command Line Tools (CLTs) at version 15.

Wednesday, 7 June 2023

Alire on macOS, revisited

This note covers some of the considerations that’ll apply when running Alire on macOS.

Wednesday, 22 March 2023

Libadalang, Alire, and macOS

Background

This exercise was prompted by the need for Scripted Testing to be supported by – as far as possible – code generation. The need is for the public or interfacing view of a supporting part (domain) of a system to be able to log calls made to it and to provide values on calls to it, using a scripting mechanism.

Friday, 10 February 2023

ColdFrame and the micro:bit revisited

This article discusses various issues rebuilding a demonstrator intended for the BBC micro:bit (version 1.3b) after an interval of several years.

Sunday, 20 February 2022

SPARK2014 and FSF GCC

This is a note about building SPARK (i.e. gnatprove) against an FSF GCC.

Monday, 16 April 2018

Dependency plot

I wanted to get a dependency graph for a project, and found DePlo (Dependency Plotter). Great stuff, last updated in 2012 but still works with FSF GCC 8.0.1!

This sample is from my Analytical Engine project:


Wednesday, 14 March 2018

Tcl/Tk vs Trampolines

This is a note on a problem I encountered while working on the House Management example domain in my ColdFrame project.
TL;DR: If you write a Tcl callback function in Ada, declare it at library level.

Wednesday, 12 October 2016

MPU9250, continued

This is a note on building support for the MPU9250 9-axis chip in the AdaPilot project (the AdaRacer hardware). It continues this report.

Saturday, 8 October 2016

Invensense MPU9250 via SPI

This is a note on building support for the MPU9250 9-axis chip in the AdaPilot project (the AdaRacer hardware; the prototype board I have is subtly different from the one shown).
9-axis means it can measure each of acceleration, gyro and magnetic field values in 3 axes, which is very useful if your drone needs to know about its own motion.

Sunday, 17 April 2016

IO Expansion

I started checking out AdaCore's support library for STM32F4 boards, particularly to use I2C to talk to the PCF8547A IO expander (for possible use on the AdaPilot project).

I seem to have fritzed one or two of the pins on my STM32F429I-DISC0 board (now replaced by an updated version, STM32F429I-DISC1; that last character was a 0!); after some hair-pulling it turns out that one of said pins is used by the only externally-accessible I2C peripheral on the board; so, until the replacement arrives, here are some interesting facts about the PCF8547A.

Saturday, 12 March 2016

Saturday, 30 January 2016

Arduino Due and the Watchdog

A watchdog is used to detect when a system has gone off with the fairies; you have to reset the watchdog timer ("pat the watchdog") every so often or it takes some recovery action. In the case of the Arduino Due, with the ATSAM3X8E MCU, the recovery action is to reset the CPU.

In the ATSAM3X8E (and probably other Atmel MCUs, too), the watchdog timeout defaults to 16 seconds, and the default hardware state is that the watchdog is enabled! (the default in the Atmel Software Framework is to disable the watchdog unless you have defined CONF_BOARD_KEEP_WATCHDOG_AT_INIT).

Tuesday, 18 August 2015

Arduino Due/Segger J-Link EDU

I’ve been porting my Cortex-based RTS to Arduino Due, using the J-Link JTAG interface (because who can make an RTS without a debugger?). I’ve probably forgotten my initial problems with ST-LINK (an equivalent interface included for free on the STM32F4 board, supported by OSS software), but it seemed a much less trying experience than with Segger.

There are two things with J-Link GDB Server: first, it seems like a bad idea to keep the server alive after a GDB session ends, so start it with -singlerun; and second, you absolutely must issue monitor reset before running your program. If you don’t you’ll end up like I did, scratching my head for three days trying to understand why I was getting a HardFault at the SVC that FreeRTOS uses to kick tasking off.

Tuesday, 2 June 2015

Building a runtime system for arm-eabi

AdaCore provide a compiler (running on Windows and Linux) targeted to ARM (target arm-eabi) and a runtime system (RTS) supporting the Ravenscar profile.

The public version of the AdaCore Ravenscar RTS is released under the full GPL. It seemed as if it would be a good idea (and fun!) to produce an independent RTS with the GCC Runtime Library Exception (FAQ).

Friday, 1 May 2015

Building GCC 5.1.0 for arm-eabi

These notes describe building GCC 5.1.0 for the Cortex M4 on Mac OS X.

My target board is the STM32M4F29I Discovery.

Thursday, 30 April 2015

Building GCC 5.1.0

These notes describe building GCC 5.1.0 for Mac OS X, with Ada, C, C++, Fortran, Objective C, Objective C++, and various GNAT tools.