Tutorial: Running FreeRTOS on NXP i.MX7Dual Cortex-M4F


In my previous article (see “Tutorial: First Steps with NXP i.MX7 and Toradex Colibri Board“) I have booted the i.MX7 on a Toradex CPU module. In this post I’m showing how to run a FreeRTOS application on that board.

UART-A and UART-B Connections

UART-A and UART-B Connections

Outline

The i.MX7 features one or two ARM Cortex-A7, plus a single ARM Cortex-M4. Have a read at this Toradex knowledge base article which describes the overall architecture.

FreeRTOS Git

Next step is to get a FreeRTOS port for the M4. Toradex has a port available on the following git repository:

git://git.toradex.com/freertos-toradex.git freertos-colibri-imx7/

Clone it with your git client.

git clone -b colibri-imx7-m4-freertos-v8 git://git.toradex.com/freertos-toradex.git freertos-colibri-imx7/

💡 Important: do not clone it into a path with spaces, as the make files are *not* space aware!

Or with a client like SourceTree:

Cloning with SourceTree

Cloning with SourceTree

💡 Important: make sure that you use the 1.0.1 branch, see https://www.toradex.com/community/questions/4072/helloworld-demo-doesnt-work-with-freertos-on-colib.html

Below an image how it looks like in SourceTree after cloning:

Toradex FreeRTOS Git

Toradex FreeRTOS Git

💡 As the Git tag indicates, this is an older FreeRTOS V8.0.0 release. I see later how to use the latest V9.0.0 version.

Building FreeRTOS Demo Applications

Inside the repository (freertos-toradex\examples\imx7_colibri_m4\demo_apps), there are several example projects, with subfolders for each IDE supported. To use the armgcc one, it requires cmake installed.

On Linux use the following to get it installed:

sudo apt-get install make cmake

For Windows cmake is available from https://cmake.org/download/. Additionally for Windows the mingw32 package from https://sourceforge.net/projects/mingw-w64/  is needed.

Because I don’t want to change the system paths of my Windows system, I’m using the following batch file which addes the paths and does the example project build:

@ECHO off
ECHO Adding cmake and mingw32 path to PATH
SET CMAKEBIN=C:\nxp\cmake\bin
SET MINGW32BIN=C:\MinGW\bin
ECHO %PATH%|findstr /i /c:"%CMAKEBIN:"=%">nul || set PATH=%PATH%;%CMAKEBIN%
ECHO %PATH%|findstr /i /c:"%MINGW32BIN:"=%">nul || set PATH=%PATH%;%MINGW32BIN%
ECHO %PATH%

@rem set where to find the ARM launchpad compiler and tools
SET ARMGCC_DIR=C:\nxp\KDS_3.2.0\Toolchain

@rem build examples
build_all.bat

Running the build will build the example project.

freertos-demo-example-build

freertos-demo-example-build

Below an example make output:

C:\temp\toradex\freertos-toradex\examples\imx7_colibri_m4\demo_apps\hello_world\armgcc>type build.bat
@ECHO off
ECHO Adding cmake and mingw32 path to PATH
SET CMAKEBIN=C:\nxp\cmake\bin
SET MINGW32BIN=C:\MinGW\bin
ECHO %PATH%|findstr /i /c:"%KDSBIN:"=%">nul || set PATH=%PATH%;%CMAKEBIN%
ECHO %PATH%|findstr /i /c:"%MINGW32BIN:"=%">nul || set PATH=%PATH%;%MINGW32BIN%
ECHO %PATH%

@rem set where to find the ARM launchpad compiler and tools
SET ARMGCC_DIR=C:\nxp\KDS_3.2.0\Toolchain

@rem build examples
build_all.bat
C:\temp\toradex\freertos-toradex\examples\imx7_colibri_m4\demo_apps\hello_world\armgcc>type build.bat
@ECHO off
ECHO Adding cmake and mingw32 path to PATH
SET CMAKEBIN=C:\nxp\cmake\bin
SET MINGW32BIN=C:\MinGW\bin
ECHO %PATH%|findstr /i /c:"%CMAKEBIN:"=%">nul || set PATH=%PATH%;%CMAKEBIN%
ECHO %PATH%|findstr /i /c:"%MINGW32BIN:"=%">nul || set PATH=%PATH%;%MINGW32BIN%
ECHO %PATH%

@rem set where to find the ARM launchpad compiler and tools
SET ARMGCC_DIR=C:\nxp\KDS_3.2.0\Toolchain

@rem build examples
build_all.bat
C:\temp\toradex\freertos-toradex\examples\imx7_colibri_m4\demo_apps\hello_world\armgcc>build.bat
Adding cmake and mingw32 path to PATH
C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\MiKTeX 2.9\miktex\bin\x64\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Users\Erich Styger\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files (x86)\IVI Foundation\VISA\WinNT\Bin\;C:\Program Files\IVI Foundation\VISA\Win64\Bin\;C:\Program Files (x86)\IVI Foundation\VISA\WinNT\Bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Windows\twain_32\CNQL60;C:\CooCox\CoIDE_V2Beta\gcc\bin;C:\CooCox\CoIDE_V2Beta\bin;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\MinGW\bin;C:\nxp\cmake\bin
-- TOOLCHAIN_DIR: C:/nxp/KDS_3.2.0/Toolchain
CMake Deprecation Warning at C:/nxp/cmake/share/cmake-3.7/Modules/CMakeForceCompiler.cmake:69 (message):
 The CMAKE_FORCE_C_COMPILER macro is deprecated. Instead just set
 CMAKE_C_COMPILER and allow CMake to identify the compiler.
Call Stack (most recent call first):
 C:/temp/toradex/freertos-toradex/tools/cmake_toolchain_files/armgcc.cmake:38 (CMAKE_FORCE_C_COMPILER)
 C:/nxp/cmake/share/cmake-3.7/Modules/CMakeDetermineSystem.cmake:85 (include)
 CMakeLists.txt


CMake Deprecation Warning at C:/nxp/cmake/share/cmake-3.7/Modules/CMakeForceCompiler.cmake:83 (message):
 The CMAKE_FORCE_CXX_COMPILER macro is deprecated. Instead just set
 CMAKE_CXX_COMPILER and allow CMake to identify the compiler.
Call Stack (most recent call first):
 C:/temp/toradex/freertos-toradex/tools/cmake_toolchain_files/armgcc.cmake:39 (CMAKE_FORCE_CXX_COMPILER)
 C:/nxp/cmake/share/cmake-3.7/Modules/CMakeDetermineSystem.cmake:85 (include)
 CMakeLists.txt


-- BUILD_TYPE: Debug
-- TOOLCHAIN_DIR: C:/nxp/KDS_3.2.0/Toolchain
CMake Deprecation Warning at C:/nxp/cmake/share/cmake-3.7/Modules/CMakeForceCompiler.cmake:69 (message):
 The CMAKE_FORCE_C_COMPILER macro is deprecated. Instead just set
 CMAKE_C_COMPILER and allow CMake to identify the compiler.
Call Stack (most recent call first):
 C:/temp/toradex/freertos-toradex/tools/cmake_toolchain_files/armgcc.cmake:38 (CMAKE_FORCE_C_COMPILER)
 CMakeFiles/3.7.0-rc2/CMakeSystem.cmake:6 (include)
 CMakeLists.txt


CMake Deprecation Warning at C:/nxp/cmake/share/cmake-3.7/Modules/CMakeForceCompiler.cmake:83 (message):
 The CMAKE_FORCE_CXX_COMPILER macro is deprecated. Instead just set
 CMAKE_CXX_COMPILER and allow CMake to identify the compiler.
Call Stack (most recent call first):
 C:/temp/toradex/freertos-toradex/tools/cmake_toolchain_files/armgcc.cmake:39 (CMAKE_FORCE_CXX_COMPILER)
 CMakeFiles/3.7.0-rc2/CMakeSystem.cmake:6 (include)
 CMakeLists.txt


-- BUILD_TYPE: Debug
-- The ASM compiler identification is GNU
-- Found assembler: C:/nxp/KDS_3.2.0/Toolchain/bin/arm-none-eabi-gcc.exe
-- Configuring done
-- Generating done
-- Build files have been written to: C:/temp/toradex/freertos-toradex/examples/imx7_colibri_m4/demo_apps/hello_world/armgcc
Scanning dependencies of target hello_world
[ 4%] Building C object CMakeFiles/hello_world.dir/C_/temp/toradex/freertos-toradex/rtos/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.c.obj[ 8%]
Building ASM object CMakeFiles/hello_world.dir/C_/temp/toradex/freertos-toradex/platform/devices/MCIMX7D/startup/gcc/startup_MCIMX7D_M4.S.obj
[ 13%] Building C object CMakeFiles/hello_world.dir/C_/temp/toradex/freertos-toradex/rtos/FreeRTOS/Source/portable/MemMang/heap_2.c.obj
[ 17%] Building C object CMakeFiles/hello_world.dir/C_/temp/toradex/freertos-toradex/examples/imx7_colibri_m4/demo_apps/hello_world/main.c.obj
[ 21%] Building C object CMakeFiles/hello_world.dir/C_/temp/toradex/freertos-toradex/platform/drivers/src/uart_imx.c.obj
[ 26%] Building C object CMakeFiles/hello_world.dir/C_/temp/toradex/freertos-toradex/rtos/FreeRTOS/Source/croutine.c.obj
[ 30%] Building C object CMakeFiles/hello_world.dir/C_/temp/toradex/freertos-toradex/rtos/FreeRTOS/Source/event_groups.c.obj
[ 34%] Building C object CMakeFiles/hello_world.dir/C_/temp/toradex/freertos-toradex/rtos/FreeRTOS/Source/list.c.obj
[ 39%] Building C object CMakeFiles/hello_world.dir/C_/temp/toradex/freertos-toradex/rtos/FreeRTOS/Source/queue.c.obj
[ 43%] Building C object CMakeFiles/hello_world.dir/C_/temp/toradex/freertos-toradex/rtos/FreeRTOS/Source/tasks.c.obj
[ 47%] Building C object CMakeFiles/hello_world.dir/C_/temp/toradex/freertos-toradex/rtos/FreeRTOS/Source/timers.c.obj
[ 52%] Building C object CMakeFiles/hello_world.dir/C_/temp/toradex/freertos-toradex/platform/drivers/src/ccm_analog_imx7d.c.obj
[ 56%] Building C object CMakeFiles/hello_world.dir/C_/temp/toradex/freertos-toradex/platform/drivers/src/ccm_imx7d.c.obj
[ 60%] Building C object CMakeFiles/hello_world.dir/C_/temp/toradex/freertos-toradex/platform/drivers/src/rdc.c.obj
[ 65%] Building C object CMakeFiles/hello_world.dir/C_/temp/toradex/freertos-toradex/platform/drivers/src/wdog_imx.c.obj
[ 69%] Building C object CMakeFiles/hello_world.dir/C_/temp/toradex/freertos-toradex/platform/utilities/src/debug_console_imx.c.obj
[ 73%] Building C object CMakeFiles/hello_world.dir/C_/temp/toradex/freertos-toradex/platform/utilities/src/print_scan.c.obj
[ 78%] Building C object CMakeFiles/hello_world.dir/C_/temp/toradex/freertos-toradex/platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.c.obj
[ 82%] Building C object CMakeFiles/hello_world.dir/C_/temp/toradex/freertos-toradex/examples/imx7_colibri_m4/pin_mux.c.obj
[ 86%] Building C object CMakeFiles/hello_world.dir/C_/temp/toradex/freertos-toradex/examples/imx7_colibri_m4/board.c.obj
[ 91%] Building C object CMakeFiles/hello_world.dir/C_/temp/toradex/freertos-toradex/examples/imx7_colibri_m4/clock_freq.c.obj
[ 95%] Building C object CMakeFiles/hello_world.dir/C_/temp/toradex/freertos-toradex/examples/imx7_colibri_m4/demo_apps/hello_world/hardware_init.c.obj
[100%] Linking C executable debug\hello_world.elf
[100%] Built target hello_world
-- TOOLCHAIN_DIR: C:/nxp/KDS_3.2.0/Toolchain
CMake Deprecation Warning at C:/nxp/cmake/share/cmake-3.7/Modules/CMakeForceCompiler.cmake:69 (message):
 The CMAKE_FORCE_C_COMPILER macro is deprecated. Instead just set
 CMAKE_C_COMPILER and allow CMake to identify the compiler.
Call Stack (most recent call first):
 C:/temp/toradex/freertos-toradex/tools/cmake_toolchain_files/armgcc.cmake:38 (CMAKE_FORCE_C_COMPILER)
 CMakeFiles/3.7.0-rc2/CMakeSystem.cmake:6 (include)
 CMakeLists.txt


CMake Deprecation Warning at C:/nxp/cmake/share/cmake-3.7/Modules/CMakeForceCompiler.cmake:83 (message):
 The CMAKE_FORCE_CXX_COMPILER macro is deprecated. Instead just set
 CMAKE_CXX_COMPILER and allow CMake to identify the compiler.
Call Stack (most recent call first):
 C:/temp/toradex/freertos-toradex/tools/cmake_toolchain_files/armgcc.cmake:39 (CMAKE_FORCE_CXX_COMPILER)
 CMakeFiles/3.7.0-rc2/CMakeSystem.cmake:6 (include)
 CMakeLists.txt


-- BUILD_TYPE: Release
-- Configuring done
-- Generating done
CMake Warning:
 Manually-specified variables were not used by the project:

 CMAKE_TOOLCHAIN_FILE


-- Build files have been written to: C:/temp/toradex/freertos-toradex/examples/imx7_colibri_m4/demo_apps/hello_world/armgcc
[ 4%] Building C object CMakeFiles/hello_world.dir/C_/temp/toradex/freertos-toradex/rtos/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.c.obj
[ 8%] Building ASM object CMakeFiles/hello_world.dir/C_/temp/toradex/freertos-toradex/platform/devices/MCIMX7D/startup/gcc/startup_MCIMX7D_M4.S.obj
[ 13%] Building C object CMakeFiles/hello_world.dir/C_/temp/toradex/freertos-toradex/rtos/FreeRTOS/Source/portable/MemMang/heap_2.c.obj
[ 17%] Building C object CMakeFiles/hello_world.dir/C_/temp/toradex/freertos-toradex/examples/imx7_colibri_m4/demo_apps/hello_world/main.c.obj
[ 21%] Building C object CMakeFiles/hello_world.dir/C_/temp/toradex/freertos-toradex/platform/drivers/src/uart_imx.c.obj
[ 26%] Building C object CMakeFiles/hello_world.dir/C_/temp/toradex/freertos-toradex/rtos/FreeRTOS/Source/croutine.c.obj
[ 30%] Building C object CMakeFiles/hello_world.dir/C_/temp/toradex/freertos-toradex/rtos/FreeRTOS/Source/event_groups.c.obj
[ 34%] Building C object CMakeFiles/hello_world.dir/C_/temp/toradex/freertos-toradex/rtos/FreeRTOS/Source/list.c.obj
[ 39%] Building C object CMakeFiles/hello_world.dir/C_/temp/toradex/freertos-toradex/rtos/FreeRTOS/Source/queue.c.obj
[ 43%] Building C object CMakeFiles/hello_world.dir/C_/temp/toradex/freertos-toradex/rtos/FreeRTOS/Source/tasks.c.obj
[ 47%] Building C object CMakeFiles/hello_world.dir/C_/temp/toradex/freertos-toradex/rtos/FreeRTOS/Source/timers.c.obj
[ 52%] Building C object CMakeFiles/hello_world.dir/C_/temp/toradex/freertos-toradex/platform/drivers/src/ccm_analog_imx7d.c.obj
[ 56%] Building C object CMakeFiles/hello_world.dir/C_/temp/toradex/freertos-toradex/platform/drivers/src/ccm_imx7d.c.obj
[ 60%] Building C object CMakeFiles/hello_world.dir/C_/temp/toradex/freertos-toradex/platform/drivers/src/rdc.c.obj
[ 65%] Building C object CMakeFiles/hello_world.dir/C_/temp/toradex/freertos-toradex/platform/drivers/src/wdog_imx.c.obj
[ 69%] Building C object CMakeFiles/hello_world.dir/C_/temp/toradex/freertos-toradex/platform/utilities/src/debug_console_imx.c.obj
[ 73%] Building C object CMakeFiles/hello_world.dir/C_/temp/toradex/freertos-toradex/platform/utilities/src/print_scan.c.obj
[ 78%] Building C object CMakeFiles/hello_world.dir/C_/temp/toradex/freertos-toradex/platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.c.obj
[ 82%] Building C object CMakeFiles/hello_world.dir/C_/temp/toradex/freertos-toradex/examples/imx7_colibri_m4/pin_mux.c.obj
[ 86%] Building C object CMakeFiles/hello_world.dir/C_/temp/toradex/freertos-toradex/examples/imx7_colibri_m4/board.c.obj
[ 91%] Building C object CMakeFiles/hello_world.dir/C_/temp/toradex/freertos-toradex/examples/imx7_colibri_m4/clock_freq.c.obj
[ 95%] Building C object CMakeFiles/hello_world.dir/C_/temp/toradex/freertos-toradex/examples/imx7_colibri_m4/demo_apps/hello_world/hardware_init.c.obj
[100%] Linking C executable release\hello_world.elf
[100%] Built target hello_world
Press any key to continue . . .

C:\temp\toradex\freertos-toradex\examples\imx7_colibri_m4\demo_apps\hello_world\armgcc>

The subfolders contain the build output files:

demo-example-output

demo-example-output

FreeRTOS Hello World Application

The FreeRTOS Hello World application is very simple: It starts a single task (HelloTask) which prints a “Hello World!”, and then it waits for input characters from the UART which then get printed back on the same UART:

#include "FreeRTOS.h"
#include "task.h"
#include "board.h"
#include "debug_console_imx.h"

/*!
 * @brief A basic user-defined task
 */
void HelloTask(void *pvParameters)
{
 uint8_t receiveBuff;

 // Print the initial banner
 PRINTF("\r\nHello World!\n\n\r");

 while(1)
 {
 // Main routine that simply echoes received characters forever

 // First, get character
 receiveBuff = GETCHAR();

 // Now echo the received character
 PUTCHAR(receiveBuff);
 }
}

/*!
 * @brief Main function
 */
int main(void)
{
 // Initialize demo application pins setting and clock setting.
 hardware_init();

 // Create a demo task which will print Hello world and echo user's input.
 xTaskCreate(HelloTask, "Print Task", configMINIMAL_STACK_SIZE,
 NULL, tskIDLE_PRIORITY+1, NULL);

 // Start FreeRTOS scheduler.
 vTaskStartScheduler();

 // Should never reach this point.
 while (true);
}

The demo uses UART-B for the input/output. UART-A is used by u-boot and Linux for debug console messages (see (“Tutorial: First Steps with NXP i.MX7 and Toradex Colibri Board“), so I attach two terminals to the Iris Carrier board: UART-A for the debug messages and UART-B for the M4 FreeRTOS UART-B:

UART-A and UART-B Connections

UART-A and UART-B Connections

UART-B is available on the expansion header on pin 31 and 32:

UART-B Connection Details

UART-B Connection Details

I connect a terminal program to both UARTs with 115200 baud.

Putting FreeRTOS Application on SD Card

Copy the .bin file on a micro SD card (e.g. on a boot image created for i.MX7):

Hello World binary for Cortex-M4 on micro SD card

Hello World binary for Cortex-M4 on micro SD card

U-Boot

Then reboot the i.MX7 board with the SD card inserted. If it already has booted, login with ‘root’ and issue a ‘reboot’ command:

colibri-imx7 login: root
reboot

During the boot sequence, there is a message

Normal Boot

Hit any key to stop autoboot:  1

Hit a key in the terminal at that time, and it will abort the normal boot process.

With the ‘ls’ command check that the content of the SD card:

ls mmc 0:1

It should show the binary file we have stored on it among other files:

...
    13272   hello_world.bin 
15 file(s), 1 dir(s)

Use the fatload command to load the binary at address 0x7F8000

fatload mmc 0:1 0x7F8000 hello_world.bin

U-boot reports loading the file:

Colibri iMX7 # fatload mmc 0:1 0x7F8000 hello_world.bin
fatload mmc 0:1 0x7F8000 hello_world.bin
reading hello_world.bin
13272 bytes read in 27 ms (479.5 KiB/s)

Then flush the data cache:

dcache flush

Followed by the command to boot the auxiliary M4 core:

bootaux 0x7F8000

FreeRTOS Demo Application on M4

With the terminal connected to UART-B, I should see the ‘hello’ message. And the FreeRTOS task will echo whatever I submit on that UART from the terminal:

FreeRTOS running on M4 on i.MX7

FreeRTOS running on M4 on i.MX7

Success! I have a FreeRTOS application running on the M4 core of the i.MX7 :-).

Summary

I’m ending my current week-end project with first steps on the NXP i.MX7 and running a FreeRTOS application on the M4 core. The combination of a Linux running on one or two A7 plus having a Cortex-M4 for realtime aspects has huge potential to me. I have the module with Linux running, and I have a simple hello world application on the M4 working.

Running a simple FreeRTOS application on the M4 core of the i.MX7 requires several steps, but they should not be too difficult. The above steps currently require manual steps and are using the pre-installed Linux on the Colibri board. It is possible to automatically load and start the code for the M4, but for this it is better that I update the Linux on the Colibri module, as there can be issues with clocks and UARTs:

Note: In V2.6 Alpha 1, there is an issue rendering the Linux clock driver useless when the Cortex-M4 is started. Due to a second bug, this only manifests on Colibri iMX7D. Use the latest 3.14.52 kernel available in the -next branch to avoid those issues.

Some examples seem also to interfere with SPI, therefor the node ecspi3 might need to be disabled as well.

So in a future article I’m exploring how to update the Linux on the module. And as an ultimate goal I want to use JTAG debugging for the Cortex-M4 too.

Happy FreeRTOSing 🙂

Links

Advertisements

18 thoughts on “Tutorial: Running FreeRTOS on NXP i.MX7Dual Cortex-M4F

  1. Great ! I was just thinking about to order Colibri. But there is also the Warp7
    available on Farnell Element14. What do you think about Warp7 ?

    Like

  2. Great article. Just had the chance myself to play with this at the NXP FTF Connects Toronto about 2 weeks ago. I was very much interested in the interaction between the i.MX7 and the M4 core.

    We had a hands-on session with the NXP SABRE board. Briefly played with the MU (Messaging Unit) and semaphore unit to coordinate comms between the A7 and M4 core complexes. Very valuable addition for inter-process communications.

    We too used UBOOT to lauch (automatically or manually) a custom image. Unfortunately not enough time to go into details. This left me wondering: how can this be done via the eclipse IDE and how do you debug an application running on the M4?

    I had a nice chat with Toradex during the lunch break. This coupled with your articles has me checking their website right now.

    Like

    • Hi Ralf,
      thanks :-). I think you attended the same training I attended at FTF in Austin/TX this year. I’m trying to replicate the same kind of thing with the Toradex Colibri board, and I’m right now in the process or building the project with Kinetis Design Studio. This works so far. What is missing is to be able to debug it over JTAG. I would like to use either a P&E Multilink or Segger J-Link for this, but on the Iris and Viola board the JTAG connector is not available on the board, I have to check out the full evaluation board. I have the SABRE board too which I need to look at: this one has the connector available.

      Like

  3. Dear Erich,
    I will begin to work with iMX7 Toradex. I am curious is there support of IDE for Baremetal project on M4? Until now I was working with Kinetis M4 (CodeWarrior, KDS, PEx). There are cases when is suitable to transfer project to iMX7 (original project iMX6 + Kinetis M4). Linux on A7 will handle ethernet, USB and SD Card so there is no need for using RTOS on M4. Is it possible to set up new project for M4 on iMX7 in these variants: RTOS, RTOS + Baremetal (motor driver) or baremetal project only? Is there processor expert support for A7 (BSP) and M4 on iMX7? It would be nice if there would be an article about IDE + JTAG, what projects could be set up, ups/downs. Such options review I am missing. In every forum is discussed only selected option but choosing the right one is hard.
    Is there any IDE and project example for embedded linux for A7 or how is usually done linux development for A7? Is necessarily to modify kernel in oder to run ethernet, USB, AUDIO or these peripherals are enabled in preinstalled linux image?

    Thank you.
    Jaroslav

    Like

    • Hi Jaroslav,
      lots of questions 🙂
      I’m using Eclipse with GNU ARM Eclipse and the launchpad (actuall Kinetis Design Studio V3.2.0) to build baremetal and RTOS projects for the M4. I’ll plan to publish an article about this probably next weekend (if time permits).
      Using FreeRTOS (or any other RTOS) on the M4 is optional, but gives a very nice environment. I have motor applications running with FreeRTOS nicely, because FreeRTOS is is able to work nicely with the interrupts, see my other articles around the ARM Cortex interrupts (https://mcuoneclipse.com/2016/08/14/arm-cortex-m-interrupts-and-freertos-part-1/).
      There is no Processor Expert for the Cortex A (well, there is the Pin Muxing for it, see https://mcuoneclipse.com/2016/06/08/tutorial-muxing-with-the-new-nxp-pins-tool/), but not for the drivers.
      About IDE and JTAG debugging: I’m not there yet (facing some issues), but that’s definitely my goal, and I will write about it as soon as I have it working.
      As for the Linux part: the usual way is to use a pre-built image and flash it to the board (I plan to write an article about this too on the week-end), and then you have pretty much everything in it. But of course you are free to build your own linux image if you want.

      I hope this helps,
      Erich

      Like

  4. Hi Erich!
    Can you make a post or tutorial (somewhen in future) about bootloader in kinetis boards? I’m getting interested in this area but I can’t even start, it’s so complicated.

    Like

  5. Pingback: Tutorial: Updating Embedded Linux on Toradex i.MX7 Colibri Module using SD Card | MCU on Eclipse

  6. Pingback: Tutorial: First Steps with NXP i.MX7 and Toradex Colibri Board | MCU on Eclipse

  7. Pingback: Tutorial: Building FreeRTOS Applications for ARM Cortex-M4 on i.MX7 with Eclipse | MCU on Eclipse

What do you think?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s