There are some items to be aware of when using eIQ projects in VSCode with MCUXpresso SDK 26.03
Debugger hangs when debugging eIQ examples on i.MX RT700 in VSCode
There are two work-arounds available:
1) Use a JLink to debug the project instead of the default CMSIS-DAP interface. To do this:
2) Alternatively update the linker file in the eIQ project:
Open the MIMXRT798Sxxxx_cm33_core0_flash.ld linker file in Repository->mcusdk->examples->_boards->mimxrt700evk->eiq_examples->tflm_label_image->cm33_core0->gcc (use the path based on the eIQ project name that you are trying to use)
In that linker file go to line 198 to 203 and replace the .ncache section with the code below:
.npu_ncache (NOLOAD) :
{
KEEP(*(.npu_ncache_data))
KEEP(*(.npu_ncache_data*))
} > m_ncache
ASSERT(. < 0x20580000, "Error: .npu_ncache cannot go beyond SRAM P18")
.ncache (NOLOAD) :
{
*(NonCacheable)
. = ALIGN(4);
__noncachedata_end__ = .; /* define a global symbol at ncache data end */
} > m_ncache
i.MX RT700 eIQ HiFi4 and HiFi1 projects cannot be imported or compiled in VSCode or command line GCC.
In VSCode use the "Repository" import option.
To compile the projects you must install Xtensa Xplorer, the RT700 license, and RT700 NewLib DSP Configuration file.
Then add the following environmental variables:
XCC_DIR=/
XTENSA_CORE=rt700_hifi4_RI23_11_nlib
The project can then be compiled with command-line GCC with: west build -p always --sysbuild examples/eiq_examples/tflm_cifar10_hifi4/cm --toolchain armgcc --config flash_debug -b mimxrt700evk -Dcore_id=cm33_core0
Note that if using HiFi1 projects then XTENSA_CORE should be set to rt700_hifi1_RI23_11_nlib
Also an additional compile option called -mlongcalls needs to be used to avoid issues when adding additional operators the ops list. Inside
\mcuxsdk\examples\_boards\mimxrt700evk\eiq_examples\tflm_cifar10_hifi4\hifi4 edit the reconfig.cmake file in the mcux_add_xtensa_configuration options:
mcux_add_xtensa_configuration(
CC "-DXOS_CLOCK_FREQ=237500000 -std=c99 -mlongcalls"
CX "-stdlib=libc++ \
-mlongcalls \
-std=c++17"
)
Some eIQ files that are commonly modified are shared among all eIQ examples
For example, the Neutron libraries are shared among all eIQ examples. This can cause version compatibility issues with the default eIQ examples if the eIQ Neutron libraries are updated with eIQ Neutron SDK. This is because the eIQ projects in MCUXPresso SDK were converted using Neutron Converter 3.0.0 and the Neutron libraries in the SDK are shared among all eIQ projects.
To work around this, either revert the Neutron libraries back to version 3.0.0 or else download a separate repository to use the default eIQ examples.