Investigating ARM Cortex® M33 core with TrustZone® – Trusted Execution Environment tutorial

When we are learning about TrustZone® it does not take long to recognise that it is the security attributes for memory that define memory regions to be Secure, Non-Secure or Non-Secure Callable. This week’s video shows how the Cortex® M33 core with TrustZone® extension can test the security attributes for every read, write and execute from memory (without impacting performance). And how the security attributes are set with the Trusted Execution Environment configuration tool inside MCUXpresso IDE.

Trusted Execution Environment configuration tool in MCUXpresso IDE
Continue reading

JTAG Debugging the ESP32 with FT2232 and OpenOCD

In “Eclipse JTAG Debugging the ESP32 with a SEGGER J-Link”  I used a SEGGER J-Link to debug an ESP32 device with JTAG. I looked at using one of the FTDI FT2232HL development boards which are supported by OpenOCD. The FT2232HL is dual high-speed USB to UART/FIFO device, and similar FTDI devices are used on many boards as UART to USB converters. With OpenOCD these devices can be turned into inexpensive JTAG debug probes. This article shows how to use a $10 FTDI board as JTAG interface to program and debug the Espressif ESP32.

FTDI JTAG Connection

Continue reading

Investigating ARM Cortex® M33 core with TrustZone® – transition from non-secure to secure world

You might purchase a Cortex® M33 microcontroller with TrustZone® where the supplier has installed a secure ROM. Or you might be an IOT developer using LPC55S69 in your own application where you have partitioned the code into secure and non-secure partitions. At some point with Cortex® M33 core with the TrustZone® security extension you’ll want to transition from non-secure into the secure world. Or (put more elegantly), you’ll want to call one of the secure functions supported when the Cortex® M33 core is in the Secure state.

That’s the topic for this week’s video.

How will you know what secure functions are available? And what parameters are necessary to call these functions? You’ll be provided with a header file veneer_table.h and a secure object library named project_name_CMSE_lib.o. Together these 2 modules describe everything that you need to know to call a secure function and transition from the Non-Secure to the Secure state.

Just two objects – *.o and *.h define resources available in the Secure world
Continue reading

Investigating ARM Cortex® M33 core with TrustZone® – running TrustZone® example projects in MCUXpresso IDE

Last week I wrote about why we need the TrustZone® security extension for ARMv8-M. There are software use-cases where it can be very helpful to partition the software into 2 separate worlds, secure and non-secure. TrustZone® acts as the gatekeeper between these two worlds and manages how the core transitions between the worlds. The ARMv8-M architecture introduces two new States for the core – secure and non-secure. Cortex® M33 core (and M23 core also) is implemented to ARMv8-M standard and of course supports the two new states.

ARMv8-M architecture introduces 2 states for the core – secure and Non-secure
Continue reading

Linking Bootloader Applications with Eclipse and FreeMarker Scripts

Bootloaders are a fine thing: With this I can load any applications I like. Power comes with some complexity, and a bootloader alone is a complex thing already. But this applies to the application part too: I need to link the application to a certain offset in the memory space so it can be loaded by the bootloader, plus the application typically needs to add some extra information to be used by the bootloader. This article describes how to build a bootloader application with Eclipse (MCUXpresso IDE) using the MCUXpresso SDK.

Build Configuration for Bootloader Application

Continue reading