Codethink recently worked on platform libraries for the real-time M4 cores of the MediaTek MT3620, the first Azure Sphere chip certified by Microsoft focusing on the development of a set of drivers for the peripheral subsystems (SPI, I2C, I2S, ADC, PWM, GPIO and Timers).
The work involved developing the drivers (design of the interface, profiling & optimisation) alongside a set of example applications; showing how they would be used in practice. The libraries are to be used with an IoT platform, and the drivers play an important role. They handle every major I/O function of the Azure Sphere MT3620 library, including microphones, sensors, interfacing screens and even raw GPIO.
Instead of allocating larger teams of engineers to projects, Codethink prefers to identify a small team of experts to work on projects. A team of four embedded systems specialists, Ben, Kostas, Connor and Aiden, completed the initial work over the space of four months, including addressing any issues or bugs that arose. With work complete, the intention was to move the code into the open and publish on GitHub.
The engineers followed simple principles in designing the libraries but ones that require an amount of thought.
“Good library design comes down to following de facto standards and keeping interfaces as minimal as possible. It’s also important to be able to imagine what a user might expect from your library without them knowing anything about how the library works internally.” - Ben Brewer, Senior Engineer
As the libraries were modular; the team decided on priorities and delegated the work on each based on core competencies. The development team used a bare-bones existing API as a jumping off point and generated a similar basic cross-platform API whilst also supporting the hardware. The approach worked well and, as a result, most of the libraries were working early in the project.
The team identified areas to optimise the libraries, with the solution revolving around using DMA acceleration where the hardware would support it and minimising any extra code required. Having a smaller codebase to maintain and reducing the size of the work chain created.
The Codethink team ensured that whilst they worked, they ensured that the codebase is well documented; which is a must for open source work, as poor documentation can prove to be a barrier to use and adoption.
The work completed by the team enables the device to run low-level code in real time. This means that it will be able to interface with time-critical and CPU intensive peripherals. This has a positive impact on performance as developers can now use the two real-time 200MHz M4 cores instead of sharing time on the high-level A7 application processor.
We are delighted to be open sourcing this work, and are excited to further develop our offerings for Azure Sphere.
Here you can find the drivers and a set of example applications.
- Tracking Players at the Edge: An Overview
- What is Remote Asset API?
- Running a devroom: FOSDEM 2021 Safety and Open Source
- Meet the codethings: Understanding BuildGrid and BuildBox with Beth White
- Streamlining Terraform configuration with Jsonnet
- Bloodlight: Designing a Heart Rate Sensor with STM32, LEDs and Photodiode
- Making the tech industry more inclusive for women
- Bloodlight Case Design: Lessons Learned
- Safety is a system property, not a software property
- RISC-V: Codethink's first research about the open instruction set
- Meet the Codethings: Safety-critical systems and the benefits of STPA with Shaun Mooney
- Why Project Managers are essential in an effective software consultancy
- FOSDEM 2021: Devroom for Safety and Open Source
- Meet the Codethings: Ben Dooks talks about Linux kernel and RISC-V
- Here we go 2021: 4 open source events for software engineers and project leaders
- Xmas Greetings from Codethink
- Call for Papers: FOSDEM 2021 Dev Room Safety and Open Source Software
- Building the abseil-hello Bazel project for a different architecture using a dynamically generated toolchain
- Advent of Code: programming puzzle challenges
- Improving performance on Interrogizer with the stm32
- Introducing Interrogizer: providing affordable troubleshooting
- Improving software security through input validation
- More time on top: My latest work improving Topplot
- Cycling around the world
- Orchestrating applications by (ab)using Ansible's Network XML Parser
- My experience of the MIT STAMP workshop 2020
- Red Hat announces new Flatpak Runtime for RHEL
- How to keep your staff healthy in lockdown
- Bloodlight: A Medical PPG Testbed
- Bringing Lorry into the 2020s
- How to use Tracecompass to analyse kernel traces from LTTng
- Fixing Rust's test suite on RISC-V
- The challenges behind electric vehicle infrastructure
- Investigating kernel user-space access
- Consuming BuildStream projects in Bazel: the bazelize plugin
- Improving RISC-V Linux support in Rust
- Creating a Build toolkit using the Remote Execution API
- Trusting software in a pandemic
- The Case For Open Source Software In The Medical Industry
- My experiences moving to remote working
- Impact of COVID-19 on the Medical Devices Industry
- COVID-19 (Coronavirus) and Codethink
- Codethink partners with Wirepas
- Testing Bazel's Remote Execution API
- Passing the age of retirement: our work with Fortran and its compilers
- Sharing technical knowledge at Codethink
- Using the REAPI for Distributed Builds
- An Introduction to Remote Execution and Distributed Builds
- Gluing hardware and software: Board Support Packages (BSPs)
- Engineering's jack of all trades: an intro to FPGAs
- Bust out your pendrives: Debian 10 is out!
- Why you should attend local open source meet-ups
- Acceptance, strife, and progress in the LGBTIQ+ and open source communities
- Codethink helps York Instruments to deliver world-beating medical brain-scanner
- Codethink open sources part of staff onboarding - 'How To Git Going In FOSS'
- Getting into open source
- How to put GitOps to work for your software delivery
- Open Source Safety Requirements Analysis for Autonomous Vehicles based on STPA
- Codethink engineers develop custom debug solution for customer project
- Codethink contributes to CIP Super Long Term Kernel maintenance
- Codethink creates custom USB 3 switch to support customer's CI/CD pipeline requirements
- Codethink unlocks data analysis potential for British Cycling
- MIT Doctor delivers Manchester masterclass on innovative safety methodology
- Balance for Better: Women in Technology Codethink Interviews
- Introducing BuildGrid
- Configuring Linux to stabilise latency
- GUADEC 2018 Talks
- Hypervisor Not Required
- Full archive