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.
- Using Git LFS and fast-import together
- Testing in a Box: Streamlining Embedded Systems Testing
- SDV Europe: What Codethink has planned
- How do Hardware Security Modules impact the automotive sector? The final blog in a three part discussion
- How do Hardware Security Modules impact the automotive sector? Part two of a three part discussion
- How do Hardware Security Modules impact the automotive sector? Part one of a three part discussion
- Automated Kernel Testing on RISC-V Hardware
- Automated end-to-end testing for Android Automotive on Hardware
- GUADEC 2023
- Embedded Open Source Summit 2023
- RISC-V: exploring a bug in stack unwinding
- Adding RISC-V Vector Cryptography Extension support to QEMU
- Introducing Our New Open-Source Tool: Quality Assurance Daemon
- Long Term Maintainability
- FOSDEM 2023
- Think before you Pip
- BuildStream 2.0 is here, just in time for the holidays!
- A Valuable & Comprehensive Firmware Code Review by Codethink
- GNOME OS & Atomic Upgrades on the PinePhone
- Flathub-Codethink Collaboration
- Codethink proudly sponsors GUADEC 2022
- Tracking Down an Obscure Reproducibility Bug in glibc
- Web app test automation with `cdt`
- FOSDEM Testing and Automation talk
- Protecting your project from dependency access problems
- Porting GNOME OS to Microchip's PolarFire Icicle Kit
- YAML Schemas: Validating Data without Writing Code
- Deterministic Construction Service
- Codethink becomes a Microchip Design Partner
- Hamsa: Using an NVIDIA Jetson Development Kit to create a fully open-source Robot Nano Hand
- Using STPA with software-intensive systems
- Codethink achieves ISO 26262 ASIL D Tool Certification
- RISC-V: running GNOME OS on SiFive hardware for the first time
- Automated Linux kernel testing
- Native compilation on Arm servers is so much faster now
- Higher quality of FOSS: How we are helping GNOME to improve their test pipeline
- RISC-V: A Small Hardware Project
- Why aligning with open source mainline is the way to go
- Build Meetup 2021: The BuildTeam Community Event
- A new approach to software safety
- Does the "Hypocrite Commits" incident prove that Linux is unsafe?
- ABI Stability in freedesktop-sdk
- Why your organisation needs to embrace working in the open-source ecosystem
- RISC-V User space access Oops
- Tracking Players at the Edge: An Overview
- What is Remote Asset API?
- Running a devroom at FOSDEM: 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
- Full archive