
This SDK has been patched by Embedded Artists for the iMXRT1062 Developer's Kit.
The SDK was released on 2022-11-18 and is based on NXP's 2.12.1 SDK (SDK_2_12_1_MIMXRT1062xxxxA.zip).

This is what has been patched:
* Set CPU speed according to Commercial/Industrial CPU
* Correction of the VDD_SOC_IN voltage.
* Flash settings (speed, algorithm, size, driver) to work with the 4MB OctalSPI ATXP032
* LWIP projects - added reading of the MAC address from the onboard I2C EEPROM
* Added an I2C driver for the gpio expander (PCA6416) and code to use it
* Modified pin muxing
* SEMC projects - changed algorithm for memory test and now test entire 32MB instead of only 4KB
* Adjusted the USB interface number for USB Host examples (it is different for host and device examples)
* Added a software_reset() function in board.c/.h to issue a JEDEC reset before NVIC_SystemReset()
* Changed the Wi-Fi examples to use the Embedded Artists 1XK M.2 Module (EAR00385) as default
* Many of the projects have been updated to use a more complete pin_mux.c file where all
  necessary pins have been initialized. The SDK examples used to only configure the pins
  that they use (and often not every pin) and most of the time the configuration was only
  for MUX:ing and not the PAD settings (pull up/down/none, drive strength and slew).
* Embedded Wizard project 'ew_gui_smart_thermostat' was incorrectly setup for EVKB
* Changed the default display to RK043FN02H as it is the one mounted on the Developer's Kits

This has been added:
* New WDOG examples that work
* I2C probe example
* Example to show the use of software_reset()

This has been removed:
* All projects for the EVK - only keeping EVKB which is then patched
* The original WDOG and RTWDOG examples as those were not working

Important things to note:
* Read section "8 - Known Issues" in docs/MCUXpresso SDK Release Notes for EVK-MIMXRT1060.pdf
  to see known issues with the current version of the SDK.
* For Iperf examples, set compiler optimization to -O3 or similar to improve performance.
* If the hardware seems unresponsive and the debugger cannot connect/flash/erase the current program
  then the most likely cause is the running program preventing the access. To stop the currently
  running program and regain control:
  1) Press and hold down the ISP_ENABLE button (SW1)
  2) Press and hold down the RESET button (SW3)
  3) Let go of the RESET button
  4) Wait an extra second or two
  5) Release the ISP_ENABLE button
  6) The hardware is now in a mode where programming/erasing it should work

Connectors:
* J22 (micro USB) is the default UART and unless specified otherwise it is setup for 115200 8/N/1


!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
THIS PROJECT IS NOT DIRECTLY COMPATIBLE WITH THE HARDWARE AND WILL NOT WORK.

This example for the EVKB requires requires a camera but that is not
supported on the iMX OEM Carrier Board.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!



Everything below this line is the original content of the readme file.
=======================================================================



Overview
================
DeepViewRT Camera label iamge Demo for IMXRT. This project shows the demonstration of real-time object recognition using DeepViewRT on an IMXRT platform together with a camera and LCD module.  The firmware uses a user defined model and real-time camera to classify object.

This program is a deepviewrt demonstration program which uses the SDRAM/TCM to allocate the memory pool. The cache can be allocated on SDRAM or TCM, the performance will be different then.The firmware will use PXP API's to crop the region of interest (ROI) to appropriate size for the neural network (resize by calls to PXP API's). The results of labels can be shown in the LCD, and some other processed results will be redirected to UART console and/or toolchain GUI console. 

Cache can be placed on DTC or SDRAM.

Experiments
===========
The deepview-rt-cortex-m7f library is located in 'libs' folder. By default, a pre-trained mobilenetv1 width multiplier of 0.25, pixel of 160x160 model for classification is used and located in 'models' folder.

Files:
  main.cpp - example main function
  image_data.h - image file converted to a C language array of RGB values
    using Python with the OpenCV and Numpy packages:
    import cv2
    import numpy as np
    img = cv2.imread('giant_panda.jpeg')
    img = cv2.resize(img, (160, 160))
    img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
    with open('image_data.h', 'w') as fout:
      print('#define STATIC_IMAGE_NAME "giant panda"\n', file=fout)
      print('static const uint8_t image_data[] = {', file=fout)
      img.tofile(fout, ', ', '0x%02X')
      print('};\n', file=fout)
  mobilenet_v1_0.25_160.rtm - pre-trained DeepviewRT model
  video/* - camera and display handling

Running the demo
================
The log below shows the output of the demo in the terminal window (compiled with MDK):

==========================================================================
                    DeepviewRT camera label image Demo
===========================================================================

Static data processing:
Label index = 389, score = 0.986, runtime: 195
        MATCH - giant panda - 389

Camera data processing:

Data for inference are ready
Label index = 795, score = 0.050, runtime: 202
        NO MATCH - shower curtain - 795

Data for inference are ready
Label index = 795, score = 0.061, runtime: 201
        NO MATCH - shower curtain - 795

Data for inference are ready
Label index = 509, score = 0.403, runtime: 201
        MATCH - computer keyboard - 509

