I'm using the gnu toolchain, arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi, on WSL2 Ubuntu to compile the example code that is with the SDK_2_9_0_MEK-MIMX8QX. The specific code I'm trying to build is rpmsg_lite_str_echo_rtos and I've also tried the hello world example. I'm using the build_debug.sh script. I'm getting the following error:
MIMX8QX6/utilities/fsl_sbrk.c:22:1: error: unknown type name 'caddr_t'
From the research I've done this is related to BSD-ism in older code. Is there an environment variable I can set to correct this error? My research is saying I need to modify the code but I would figure NXP would make code available that does build without basic code modifications.
Solved! Go to Solution.
Following your instructions the hello_world demo program built successfully:
[ 92%] Building C object CMakeFiles/hello_world.elf.dir/home/dlewis/nxp-projects/SDK_2_9_0_MEK-MIMX8QX/devices/MIMX8QX6/drivers/fsl_gpio.c.obj
[ 96%] Building C object CMakeFiles/hello_world.elf.dir/home/dlewis/nxp-projects/SDK_2_9_0_MEK-MIMX8QX/devices/MIMX8QX6/utilities/fsl_sbrk.c.obj
[100%] Linking C executable release/hello_world.elf
[100%] Built target hello_world.elf
Thank you for your help Alejandro.
Hello @duglew60
I hope you are doing well.
Could you please try:
Download gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2 from https://developer.arm.com/downloads/-/gnu-rm
Then:
$ tar -xf gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2
$ export ARMGCC_DIR=~/gcc-arm-none-eabi-10.3-2021.10
$ export PATH=$PATH:~/gcc-arm-none-eabi-10.3-2021.10
Go to SDK example directory (In my case):
$cd ~/SDK_2_9_0_MEK-MIMX8QX.tar/SDK_2_9_0_MEK-MIMX8QX/boards/mekmimx8qx/demo_apps/hello_world/armgcc
And please run the build_release.sh
$./build_release.sh
Please let me know how it was.
Best regards!
Following your instructions the hello_world demo program built successfully:
[ 92%] Building C object CMakeFiles/hello_world.elf.dir/home/dlewis/nxp-projects/SDK_2_9_0_MEK-MIMX8QX/devices/MIMX8QX6/drivers/fsl_gpio.c.obj
[ 96%] Building C object CMakeFiles/hello_world.elf.dir/home/dlewis/nxp-projects/SDK_2_9_0_MEK-MIMX8QX/devices/MIMX8QX6/utilities/fsl_sbrk.c.obj
[100%] Linking C executable release/hello_world.elf
[100%] Built target hello_world.elf