Learn Swift language with hardware

MadMachine is a lean and effective implementation of the Swift programming language, which includes a small subset of the Swift standard library and is optimised for running on microcontrollers and in restricted environments.

SwiftIO - the microcontroller board with Swift

Now you can write Swift source code on Windows, Linux and Mac.

Features:

  • i.MX RT1052 Crossover Processor with Arm® Cortex®-M7 core @600MHz

  • Micro SD card slot, supporting standard and high capacity SD cards

  • Micro USB connector for power

  • On-board USB to UART for serial communication

  • 46 GPIO on left and right edges

  • On-board GRB LED

  • 2x 12-bit digital to analog (DAC) converters

  • 3x 12-bit analog to digital (ADC) converters, available on 16 pins, 4 with analog ground shielding

  • 4 UART, 2 CAN, 2 IIC and 2 SPI

  • 7 Paired PWM controller

  • Compatible with Arduino Shield

  • Many additional advanced features to meet the needs of advanced users 

Pinout Diagram

MadMachine SwiftIO Board

Comparison

Now You can use Swift to control physical world

Swift is an awesome language for an newbie, and also a powerful language that could run in microcontrollers directly. 

Swift is one of the few modern languages that are extremely suitable for MCU devices. 

The native Swift compiler does not support generating Cortex-M machine instructions, but thanks to the modular architecture of the LLVM framework, it only takes a little hack to add a ready-made Cortex-M backend to it. After getting the machine instructions of the Cortex-M platform, the code can run on the platform. Many advanced features of Swift still need the underlying basic libraries and basic algorithms (such as heap management, thread management) to stand by. In practice, we chose Zephyr,  an open-source RTOS project hosted by the Linux Foundation under the Apache 2.0 license.

Swift can be seamlessly connected to C. What we have done is to drive Zephyr and package the API in C language. We call this layer of API framework SwiftIO. At this point, developers only need to import SwiftIO in the code (similar to the #include of the C language), and then they can use the API to conveniently operate the underlying hardware.

SwiftIO Structure

MADMACHINE
NEWSLETTER

​Be the first to know any update!

  • GitHub
  • Facebook - Black Circle
  • Twitter - Black Circle
  • YouTube - Black Circle
  • Instagram - Black Circle

© 2018-2020 MadMachine Limited. All rights reserved.

Swift and the Swift logo are trademarks of Apple Inc.