MyNewt 是由 Apache incubator 推展的新依代 IoT kernel,其主要負責維護的人員來自 runtime.io。 最大的特點是有支援現成 BLE stack,同時以 bootloader 來驗證 kernel image 的正確與安全。以下是官方所描述的 Features:
- Real-time operating system kernel (Mynewt OS)
- Bluetooth Low Energy stack (BLE 4.2) – choose HOST only or CONTROLLER only or FULL stack.
- Command line package management and build system (Newt Tool)
Hardware Abstraction Layer unifying common MCU features, see discussion thread - Board Support Infrastructure
- System level logs and statistics
- Secure bootloader, signed images and remote firmware upgrade
- Flash circular buffers, Newtron Flash File System (nffs), or hook up any other file system
- Serial upgrade of bootloader, see discussion thread
- WiFi support via socket interface, join discussion here
- Basic IP support
目前支援以下這些開發板:
- nRF52 DK from Nordic Semiconductor (Cortex-M4)
- RuuviTag Sensor beacon platform (Nordic nRF52832 based)
- nRF51 DK from Nordic Semiconductor (Cortex-M0)
- 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)
- STM32F3DISCOVERY from ST Micro (Cortex-M4)
- 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)
- NUCLEO-F401RE (Cortex-M4)
- FRDM-K64F from NXP (Cortex-M4)
- Creator Ci40 IoT Kit from Imagination Technologies (MIPS CPU)
本次的目標是將 MyNewt 移植到由 ST(意法半導體) 推出的 STM32F429 開發板上,也就是 BSP (Board Support Package) 的 Porting。有關 MyNewt porting 的部份可以參考 Apache MyNewt 的文件,裏面有 BSP、MCU 以及 CPU Porting 的教學。
STM32F429 的 Porting 算是比較簡單的工作,因為 MyNewt 已經有 STM32F4 的支援,這代表我們的工作可以從拷貝整個 STM32F4 的資料夾開始,接著做出修改即可。
BSP Porting Documentation: https://mynewt.apache.org/latest/os/core_os/porting/port_bsp/
Create a BSP directory
BSP 有關的資料放置在 hw/bspstm32f4discovery
的結構來使用,因此使用 cp -r stm32f4discovery stm32f429discovery
來建立 stm32f429 的資料夾。
Create a Target using Mynewt
Mynewt 使用 newt
來管理各個套件。總之,看完相關的文件後,創造這樣的一個 target 好讓我們可以測試 porting 的結果。
Leave a Reply