ArticleslgStudy

computer science

Apache Mynewt

Apache Mynewt is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Apache Mynewt rather than just read about it. In short: Apache Mynewt is a modular real-time operating system for connected Internet of things (IoT) devices that must operate for long times under power, memory, and storage constraints. It is free and open-source software incubating under the Apache Software Foundation, with source code distributed under the Apache License 2.0, a permissive license that is conducive to commercial adoption of open-source software.

Apache Mynewt — main illustration
Apache Mynewt — illustration

Key takeaways

  • Apache Mynewt belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Apache Mynewt to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Apache Mynewt from memory before moving on to harder problems.

Reference excerpt

Apache Mynewt is a modular real-time operating system for connected Internet of things (IoT) devices that must operate for long times under power, memory, and storage constraints. It is free and open-source software incubating under the Apache Software Foundation, with source code distributed under the Apache License 2.0, a permissive license that is conducive to commercial adoption of open-source software.

Overview Apache Mynewt is a real-time operating system with a rich set of libraries intended to make prototyping, deploying, and managing 32-bit microcontroller based IoT devices easy. It is highly composable, to allow building embedded system applications (e.g., locks, medical devices, industrial IoT) across different types of microcontrollers. The name Mynewt is wordplay on the English word minute, meaning very small: the kernel is only 6 KB in size. The OS is designed for connectivity, and comes with a full implementation of the Bluetooth low energy 4.2 stack. With the addition of BLE (supporting all Bluetooth 4.2 compliant security features except privacy) and various utilities such as the default file system, console, shell, logs, stats, etc., the image size is approximately 96 KB for the Nordic nRF51822 Bluetooth SoC. This size metric excludes the boot loader image.

Core features The core operating system supports:[3]

Preemptive multithreading Tickless priority based scheduling Programmable timers System time Semaphores Mutexes Event queues Memory management (allocation): dynamic (heap) and pool Multi-stage software watchdog timer Memory or data buffers, to hold packet data as it moves up and down the networking protocol stack Other features and utilities include:

Hardware abstraction layer with support for CPU time, analog-to-digital converter (ADC), digital-to-analog converter (DAC), general-purpose input/output (GPIO), Inter-Integrated Circuit (I2C), pulse-width modulation (PWM), serial port, Serial Peripheral Interface Bus (SPI), universal asynchronous receiver/transmitter (UART). Newtron flash file system (nffs) with minimal RAM usage and reliability features File system abstraction to allow client code to choose alternate file systems Console access and shell package Secure boot loader and image organizer (manager) that includes image integrity verification using SHA-256 and optional digital signature verification of images before running them Test utilities to build regression testing Statistics and logs for all major packages JavaScript Object Notation (JSON) encoder and decoder libraries Lua interpreter

Bluetooth low energy The first network stack available in Mynewt is Bluetooth low energy and is called NimBLE. It complies with Bluetooth Core Specification 5.0. NimBLE includes both the host and controller components. Access to the controller source code makes the BLE performance highly configurable. For example, the BLE throughput can be adjusted by changing the connection intervals, data packet size, packet queue size etc. A use case requiring a large number of concurrent connections can similarly be configured, provided there is adequate RAM allocated. Example applications that demonstrate how to use available services are included in the package.

Supported boards The operating system is designed for cross-platform use in embedded systems (devices) and microcontrollers. It includes board support packages for the following, as of July 2023:

nRF52 DK from Nordic Semiconductor (Cortex-M4) RuuviTag Sensor beacon platform (Nordic nRF52832 based) nRF51 DK from Nordic Semiconductor (Cortex-M0) VBLUno51 from VNG IoT Lab (Nordic nRF51822 SoC based) VBLUno52 from VNG IoT Lab (Nordic nRF52832 SoC based, Cortex-M4) BLE Nano from RedBear (Nordic nRF51822 SoC based) BLE Nano2 and Blend2 from RedBear (Nordic nRF52832 SoC based) BMD-300-EVAL-ES from Rigado (Cortex-M4) BMD-200 from Rigado (Cortex-M0) Adafruit Feather nRF52 Pro STM32F4DISCOVERY from ST Micro (Cortex-M4) STM32-E407 from Olimex (Cortex-M4) Arduino Zero (Cortex-M0) Arduino Zero Pro (Cortex-M0) Arduino M0 Pro (Cortex-M0) Arduino MKR1000 (Cortex-M0) Arduino Primo NRF52 (Cortex-M4) NUCLEO-F401RE (Cortex-M4) NUCLEO-F767ZI (Cortex-M7) Discovery kit for STM32F7 Series (Cortex-M7) FRDM-K64F from NXP (Cortex-M4) BBC micro:bit (Nordic nrf51822; Cortex-M0) SiFive HiFive1 (RISC-V Instruction Set Architecture) NINA-B1 BLE module from u-blox (Cortex-M4) 6LoWPAN clicker from MikroElectronika (PIC32MX470 microcontroller) chipKIT Wi-FIRE (PIC32MZ microcontroller) Creator Ci40 module (dual MIPS interAptiv CPU) EE-02 board with Semtech Sx1276 chip from Telenor (Cortex-M4) DA1469x Pro DK from Dialog Semiconductor (Cortex-M33)

Package management The project includes the Newt Tool which is a command-line interface (CLI) based smart source package manager system for embedded systems development. Also, it allows composing builds with specified packages and compiler options, generating images and their digital signatures, and finally downloading and debugging the firmware on different targets.

See also Embedded operating system Comparison of real-time operating systems

References

External links Official website

Worked examples

Example 1 — a first encounter with Apache Mynewt

Start with the simplest possible case. Write down what Apache Mynewt claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Apache Mynewt before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Apache Mynewt ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Apache Mynewt

In research
Apache Mynewt appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Apache Mynewt in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Apache Mynewt is common in secondary-school and first-year university syllabi. It links to neighbouring topics Embedded operating systems, Free software operating systems, Free software programmed in C, so understanding it makes those chapters shorter.
In everyday life
Look for Apache Mynewt outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Apache Mynewt” →

How to study Apache Mynewt in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Apache Mynewt means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Apache Mynewt out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Apache Mynewt in simple terms?

Apache Mynewt is a modular real-time operating system for connected Internet of things (IoT) devices that must operate for long times under power, memory, and storage constraints. It is free and open-source software incubating under the Apache Software Foundation, with source code distributed under…

Why does Apache Mynewt matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Apache Mynewt?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Apache Mynewt.

Tags

  • Embedded operating systems
  • Free software operating systems
  • Free software programmed in C
  • Free software programmed in Go
  • Internet of things
  • Real-time operating systems
  • Software using the Apache license

Keep exploring