Zephyr openamp_rsc_table example making cortex a7 crash in colibri imx7d

Hi, I’m the Toradex AI Assistant.

I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.

Did you like my answer? :+1: :-1:


The crash you’re experiencing when starting the Cortex-M4 firmware indicates a memory configuration conflict between the Zephyr firmware and the Linux system. This is a common issue when the Resource Domain Controller (RDC) and device tree configurations don’t properly isolate resources between the A7 and M4 cores (1).

Root Cause Analysis

The prefetch abort and data abort errors suggest that the M4 firmware is trying to access memory regions or peripherals that are still being used by the Linux kernel (1). This happens because:

  1. Device Tree Conflicts: Linux device tree hasn’t properly disabled peripherals used by M4
  2. Memory Region Overlap: Shared memory regions aren’t correctly configured
  3. RDC Configuration Issues: Resource Domain Controller isn’t properly separating A7 and M4 resources

Recommended Solution: Use Toradex FreeRTOS Examples

Instead of the Zephyr tutorial, I recommend using Toradex’s validated FreeRTOS examples for Colibri iMX7, which have been tested and validated with embedded Linux running on the A-cores (1).

Step 1: Set Up FreeRTOS Environment

  1. Install dependencies (1):
sudo apt-get install make cmake libc6:i386 libncurses6:i386
  1. Clone the FreeRTOS repository (1):
git clone -b master https://github.com/toradex/FreeRTOS-Colibri-iMX7 freertos-colibri-imx7/
cd freertos-colibri-imx7/
  1. Download and install GCC toolchain (1):
tar xjf ~/Downloads/gcc-arm-none-eabi-4_9-2015q3-20150921-linux.tar.bz2

Step 2: Build RPMsg Example

  1. Set environment variables and build (1):
export ARMGCC_DIR=~/gcc-arm-none-eabi-4_9-2015q3/
cd examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo_freertos/armgcc
./build_all.sh

Step 3: Device Tree Configuration

You need to disable UART_B in your Linux device tree since the FreeRTOS firmware uses it as its debugging console (1). The FreeRTOS firmware uses Colibri UART_B (RS232 X25-Top on the Colibri Evaluation Board) with a baudrate of 115200 (1).

Step 4: Load Firmware

For eMMC-based Colibri iMX7, use the ext4load method as described in the documentation (1):

# In U-Boot
fatload mmc 0:1 ${loadaddr} rpmsg_str_echo_freertos_example.elf
# Follow the complete loading procedure from the documentation

Step 5: Load RPMsg Driver

After booting Linux, load the RPMsg driver (1):

modprobe imx_rpmsg_tty

The Cortex-M4 should then print “hello world!” showing the channel was created correctly (1).

Why This Approach Works

The Toradex FreeRTOS examples include proper:

  • RDC Configuration: The firmware reassigns the Cortex-M4 and required peripherals to domain 1 (1)
  • Memory Management: Examples are linked to run in the TCM area (1)
  • Peripheral Isolation: Proper separation between A7 and M4 resources (1)

The validated examples ensure compatibility with Toradex Linux BSP and avoid the memory conflicts causing your system crashes.

Best regards, Toradex AI Assistant.