# [Run image classification on an Alif Ensemble E8 DevKit using ExecuTorch and Ethos-U85](https://learn.arm.com/learning-paths/embedded-and-microcontrollers/alif-image-classification/)

## In this learning path

- [Introduction](https://learn.arm.com/learning-paths/embedded-and-microcontrollers/alif-image-classification/)
- [Set up the Alif Ensemble E8 DevKit](https://learn.arm.com/learning-paths/embedded-and-microcontrollers/alif-image-classification/board-setup/)
- [Compile the model on an Arm cloud instance](https://learn.arm.com/learning-paths/embedded-and-microcontrollers/alif-image-classification/aws-ec2-setup/)
- [Create the image classification firmware project](https://learn.arm.com/learning-paths/embedded-and-microcontrollers/alif-image-classification/create-project/)
- [Add the application code](https://learn.arm.com/learning-paths/embedded-and-microcontrollers/alif-image-classification/application-code/)
- [Configure memory layout and flash settings](https://learn.arm.com/learning-paths/embedded-and-microcontrollers/alif-image-classification/memory-configuration/)
- [Prepare a test image](https://learn.arm.com/learning-paths/embedded-and-microcontrollers/alif-image-classification/image-preparation/)
- [Build, flash, and verify inference](https://learn.arm.com/learning-paths/embedded-and-microcontrollers/alif-image-classification/build-flash-verify/)
- [Next Steps](https://learn.arm.com/learning-paths/embedded-and-microcontrollers/alif-image-classification/_next-steps/)

## About this Learning Path

| Skill level:   | Advanced       |
|-----------------|----------------|
| Reading time:   | 2 hrs          |
| Last updated:   | 08 Jul 2026    |

| Author:         | Gabriel Peterson, Arm [GitHub](https://github.com/gabrieldpeterson) [LinkedIn](https://linkedin.com/in/gabrieldpeterson) [Twitter](https://twitter.com/@gabedpeterson) [Website](https://corteximplant.com/@gabe)  |
|-----------------|----------------|
| Arm IP:         | [Cortex-M](https://support.arm.com/?tab=compute-ip&Product%20Type=Microcontrollers) [Ethos-U](https://support.arm.com/?tab=compute-ip&Product%20Type=Neural%20Processing%20Units)  |
| Tags:           | [ML](https://learn.arm.com/tag/ml) [Baremetal](https://learn.arm.com/tag/baremetal) [ExecuTorch](https://learn.arm.com/tag/executorch) [PyTorch](https://learn.arm.com/tag/pytorch) [GCC](https://learn.arm.com/tag/gcc) [CMSIS-Toolbox](https://learn.arm.com/tag/cmsis-toolbox) [Python](https://learn.arm.com/tag/python)  |

### Who is this for?
This is an advanced topic for embedded developers who want to deploy a neural network model to an Arm Cortex-M55 microcontroller using ExecuTorch and an Ethos-U85 NPU.

### What will you learn?
Upon completion of this Learning Path, you will be able to:
- Compile a MobileNetV2 model for the Ethos-U85 NPU using ExecuTorch's ahead-of-time (AOT) compiler on an Arm-based cloud instance
- Build ExecuTorch static libraries for bare-metal Cortex-M55 targets
- Configure CMSIS project files, memory layout, and linker scripts for an ML workload on the Alif Ensemble E8
- Run real-time image classification inference on the Ethos-U85 NPU and verify results using SEGGER Real-Time Transfer (RTT)

### Prerequisites
Before starting, you will need the following:
- Experience with C/C++ and embedded development concepts
- An [Alif Ensemble E8 DevKit](https://alifsemi.com/support/kits/ensemble-e8devkit/) with a USB-C cable
- A SEGGER J-Link debug probe (included in the DevKit)
- A development machine running macOS on Apple Silicon with Visual Studio Code installed
- An AWS account or access to an Arm-based cloud instance for native Arm compilation

### Summary
You’ll deploy a MobileNetV2 image classifier on the Alif Ensemble E8 DevKit by compiling the model and runtime for the Ethos-U85 NPU, building a CMSIS project, and running inference with SEGGER RTT output. First, you’ll validate the board, debug probe, and flashing workflow, then use an Arm-based cloud instance to produce ExecuTorch static libraries and an Ethos-U85–targeted model. Next, you’ll create an `mv2_runner` firmware project from the Blinky template, add the provided application code that initializes the NPU and executes inference on a test image, and integrate RTT for result reporting. Finally, you’ll make memory layout and linker updates so the model, runtime, and SRAM working set fit, enabling real-time classification on the device.

### Frequently asked questions

#### Which core should I target when flashing and debugging the firmware?
Use the Cortex-M55 High-Performance (HP) core to orchestrate inference on the Ethos-U85. The steps assume this core for building, flashing, and running the application.

#### What artifacts should I expect after compiling on the Arm cloud instance?
You’ll have ExecuTorch static libraries and a compiled MobileNetV2 model targeted for the Ethos-U85. These outputs are linked into the `mv2_runner` firmware project.

#### After duplicating the Blinky example, which project files need to be updated?
Rename `blinky.cproject.yml` to `mv2_runner.cproject.yml` and replace internal references from `blinky` to `mv2_runner`. This establishes a new CMSIS project for the application.

#### Where do I place the provided `main.cpp` and how do I verify it works?
Place `main.cpp` in the `mv2_runner` project directory as instructed. When you flash and run the firmware, check the SEGGER RTT console for the printed classification result.

#### What memory changes are required for the model and runtime to fit?
Increase MRAM allocation for the embedded model (about 3.7 MB) and code (around 800 KB), and provision approximately 7.6 MB of SRAM for inference buffers. Update stack and heap sizes, and the linker script in the CMSIS project accordingly.
