In November 2020 Apple announced the first ARM SOC design by Apple as a CPU for their computers with unbelievable performance and power consumption. I will simply enlist some of the features:
-
Up to 3.9x faster video processing
-
Up to 7.1x faster image processing
-
Up to 3.5x faster CPU performance
-
3x CPU performance per watt
There is a growing interest on developers’ forums about the new Apple M1 CPU development. Many applications are ported to Apple silicon as you are reading this email, more than 400 are being written natively and optimized: VS Code, Docker, Node.js, .NET, Python, Golang, Office 365, Adobe and Zoom.
VS Code February 2021 release was specially dedicated to Apple silicon.
This article will demonstrate the workflow for building an application using VS Code with Wind River Studio extension and VxWorks SDK using Mac OS on the new Apple M1 chip.
Requirments:
An Apple Mac Mini, Mac Air or MacBook Pro with the M1 chip
Docker installation on MacOS
VS Code installed with extensions: Remote – Containers and Wind River Studio
A VxWorks SDK for qemu, unpacked in a folder.
Set up the docker development container
Create a docker file
Start the VS Code and open a folder for your project and create a dockerfile for your project. This will let you specify any custom dependencies you have and set up the development container:
FROM --platform=linux/amd64 ubuntu:20.04
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
build-essential cmake qemu-system-x86\
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN echo "dash dash/sh boolean false" | debconf-set-selections \
&& DEBIAN_FRONTEND=noninteractive dpkg-reconfigure dash
You’ll need a .devcontainer file for VS Code to know how to mount the VxWorks SDK in the container:
{
"name": "VxWorks SDK Env",
"dockerFile": "Dockerfile",
"extensions": ["windriver.windsdksupport"],
"mounts": [
"source=/path/to/vxworks/sdk,target=/wrsdk,type=bind,consistency=delegated",
"source=${localWorkspaceFolder},target=/workspace,type=bind,consistency=delegated"
]
}
Modify the correct path to the sdk.
Setting up the VS Code with the extension:
In the VS Code go to WR Studio tab (the one with the / ), in top left SDK MANAGER, click the c ustomised-sdk and then the + sign to add the path to VxWorks SDK in container (shoud be /wrsdk )
Building the project:
From the menu select View → Command Palette and type Remote-Containers: Rebuild and Reopen in Container .
Got to Explorer view (the one with the file tree), open a empty folder as workspace, right click New WR Application Project , select the SDK name , select Makefile RTP
Right click on empty space and select Build WR Application Project
Here you have the the rtp.vxe file build on a M1 cpu.