Tag Archives: Cortex-M4

Vybrid Cortex-M4 Linux support – Status update

Vybrid Cortex-M4 Linux boot log

Vybrid Cortex-M4 Linux boot log

This is a status update about my work on Linux for Cortex-M4 inside Freescale Vybrid SoC’s. While I managed to boot Linux on the M4 core since fall last year, several improvements have been made since then.

MSCM interrupt router driver

Peripheral interrupts need to be routed to the core requiring them. The routing is done by the interrupt router inside MSCM (Miscellaneous System Control Module). So far, the boot loader (U-Boot) configured all interrupts to the primary core. A proper driver for the interrupt router was missing, hence to get Linux running on the secondary core, manual fiddling of the interrupt router registers was needed. Read more »

Make it two: Tuxes on one SoC

Vybrid SoC

Vybrid SoC running two Linux instances

In earlier posts I already wrote about Vybrid, a Freescale ARM SoC consisting of one Cortex-A5 and one Cortex-M4 (microcontroller) CPU. Normally, one would run a Firmware on the Cortex-M4 and Linux on the Cortex-A5 (which is quite well supported by contemporary kernels). But since we have two CPU’s with architectures supported by Linux (ARMv7-A and ARMv7-M), so why not running two independent Linux kernels in one SoC?

Read more »

Vybrid bare-metal fun

Freescale Vybrid SoC

Freescale Vybrid SoC

In preparation to my talk at BetterEmbedded I had a deeper look into the second core of Freescales Vybrid VF6xx SoC. I wanted to create a bare-metal test firmware for the Cortex-M4 processor. As the Cortex-M4 is a companion of the Cotex-A5 in the same SoC, its boot process is different compared to a normal Microcontroller (e.g. STM32F4 or similar). Microcontroller usually boot directly from memory mapped NOR flash.

ARM SoCs in general contain a small, internal boot ROM where the cores start from. This boot ROM then tries to boot from different devices, such as NAND or SD-Card. For the Vybrid SoCs normally the Cotex-A5 is the boot CPU, which in my case is running Linux from NAND (the Timesys BSP). On startup, the Cortex-M4 is in an unclocked state and need to be started from the Linux side. With the Timesys BSP, a Vybrid specific kernel module called mcc is provided. This kernel module not only implements the Multi-Core Communication library but also allows to load an image into RAM and start the secondary CPU. The utility mqxboot allows to access this functionality from userspace. This components implement the boot procedure for the Cortex-M4 described in chapter 19.11, “Running Secondary Core”, of the Vybrid Reference Manaul.

The secondary core has not access to a NOR storage as it would have in a microcontroller. Instead the firmware runs completely from RAM. Read more »