2.2.0
How to upgrade a STELLAR project


ST Edge AI Core

How to upgrade a STELLAR project


for STELLAR target, based on ST Edge AI Core Technology 2.2.0



r2.2

Overview

This article describes how to upgrade a Stellar Studio AI SDK (Stellar-E or Stellar-PG) based project with a new version of the ST Edge AI Core library. The update of generated c-model files is described in the “Update a stellar studio ai sdk based project” section. For the interface between them, backward or/and forward compatibility is never considered, if the generated c-model files are updated with a new version of the Stellar Studio AI tools, the Stellar Studio AI library files should be also aligned. Without specific notification/advice, at source level, no breaking change to the embedded inference API that can break the client’s application is expected.

Typical source tree (%ROOT_PRJ_DIR% indicates the root AI sub-directory created in the Stellar Studio AI project after that a generation has been done):

Manual update

The C-header files and network runtime libraries can be directly copied from the ST Edge AI Core installation pack of Stellar Mcus target.
[%STELLAR_AI_DIR%] indicates the root location where the ST Edge AI Core installation pack of Stellar Mcus target has been installed.

directory contains
%ROOT_PRJ_DIR%/lib/ai/inc all C-header files requested to build the generated c-model files
%ROOT_PRJ_DIR%/lib/ai/Lib the network runtime libraries for all compilers toolchain supported
tool-chain contains
IAR the library for the IAR ARM compiler - IAR ANSI C/C++ compiler V9.30.1.335/W64 tool-chain
GCC the library for the GNU ARM compiler - GNU Arm embedded 10.3-2021.10 toolchain
HT the library for the HighTec ARM compiler - HGHTEC clang version 8.1.0 toolchain
ARMCLANG the library for the ARMCLNG ARM compiler - embedded 6.21 tool-chain

In each <tool-chain> directory, this is one sub-directory named StellarE or StellarPG_R52 or StellarPG_M4 with the runtime libraries for each compiler supported.

Warning

When the project source tree is updated, don’t forget to update also the associated build system to use the new library files.

Upgrading the Stellar Studio AI library for the STELLAR-E device and GCC-based build system

# remove the previous files
rm %ROOT_PRJ_DIR%/lib/ai/inc/*.h 
rm %ROOT_PRJ_DIR%/lib/ai/Lib/GCC/StellarE/*.a
# copy the new files
cp %STELLAR_AI_DIR%/Middlewares/ST/AI/Inc/*  %ROOT_PRJ_DIR%/lib/ai/inc/
cp %STELLAR_AI_DIR%/Middlewares/ST/AI/Lib/GCC/StellarE/NetworkRuntime1020_CM7_GCC.a  %ROOT_PRJ_DIR%/lib/ai/Lib/GCC/StellarE/

Upgrading the Stellar Studio AI libraries for the STELLAR P/G devices and GCC-based build system

# remove the previous files
rm %ROOT_PRJ_DIR%/lib/ai/inc/*.h 
rm %ROOT_PRJ_DIR%/lib/ai/Lib/GCC/StellarPG_R52/*.a
rm %ROOT_PRJ_DIR%/lib/ai/Lib/GCC/StellarPG_M4/*.a
# copy the new files
cp %STELLAR_AI_DIR%/Middlewares/ST/AI/Inc/*  %ROOT_PRJ_DIR%/lib/ai/inc/
cp %STELLAR_AI_DIR%/Middlewares/ST/AI/Lib/GCC/StellarPG_R52/NetworkRuntime1020_CR52_GCC.a  %ROOT_PRJ_DIR%/lib/ai/Lib/GCC/StellarPG_R52/
cp %STELLAR_AI_DIR%/Middlewares/ST/AI/Lib/GCC/StellarPG_R52/NetworkRuntime1020_CR52_GCC_NEON.a  %ROOT_PRJ_DIR%/lib/ai/Lib/GCC/StellarPG_R52/
cp %STELLAR_AI_DIR%/Middlewares/ST/AI/Lib/GCC/StellarPG_M4/NetworkRuntime1020_CM4_GCC.a  %ROOT_PRJ_DIR%/lib/ai/Lib/GCC/StellarPG_M4/

Upgrading the Stellar Studio AI library for the STELLAR-E device and HIGHTEC-based build system

# remove the previous files
rm %ROOT_PRJ_DIR%/lib/ai/inc/*.h 
rm %ROOT_PRJ_DIR%/lib/ai/Lib/HT/StellarE/*.a
# copy the new files
cp %STELLAR_AI_DIR%/Middlewares/ST/AI/Inc/*  %ROOT_PRJ_DIR%/lib/ai/inc/
cp %STELLAR_AI_DIR%/Middlewares/ST/AI/Lib/HT/StellarE/NetworkRuntime1020_CM7_HT.a  %ROOT_PRJ_DIR%/lib/ai/Lib/HT/StellarE/

Upgrading the Stellar Studio AI libraries for the STELLAR P/G devices and HIGHTEC-based build system

# remove the previous files
rm %ROOT_PRJ_DIR%/lib/ai/inc/*.h 
rm %ROOT_PRJ_DIR%/lib/ai/Lib/HT/StellarPG_R52/*.a
rm %ROOT_PRJ_DIR%/lib/ai/Lib/HT/StellarPG_M4/*.a
# copy the new files
cp %STELLAR_AI_DIR%/Middlewares/ST/AI/Inc/*  %ROOT_PRJ_DIR%/lib/ai/inc/
cp %STELLAR_AI_DIR%/Middlewares/ST/AI/Lib/HT/StellarPG_R52/NetworkRuntime1020_CR52_HT.a  %ROOT_PRJ_DIR%/lib/ai/Lib/HT/StellarPG_R52/
cp %STELLAR_AI_DIR%/Middlewares/ST/AI/Lib/HT/StellarPG_R52/NetworkRuntime1020_CR52_HT_NEON.a  %ROOT_PRJ_DIR%/lib/ai/Lib/HT/StellarPG_R52/
cp %STELLAR_AI_DIR%/Middlewares/ST/AI/Lib/HT/StellarPG_M4/NetworkRuntime1020_CM4_HT.a  %ROOT_PRJ_DIR%/lib/ai/Lib/HT/StellarPG_M4/

Upgrading the Stellar Studio AI library for the STELLAR-E device and ARMCLANG-based build system

# remove the previous files
rm %ROOT_PRJ_DIR%/lib/ai/inc/*.h 
rm %ROOT_PRJ_DIR%/lib/ai/Lib/ARMCLANG/StellarE/*.a
# copy the new files
cp %STELLAR_AI_DIR%/Middlewares/ST/AI/Inc/*  %ROOT_PRJ_DIR%/lib/ai/inc/
cp %STELLAR_AI_DIR%/Middlewares/ST/AI/Lib/ARMCLANG/StellarE/NetworkRuntime1020_CM7_ARMCLANG.a  %ROOT_PRJ_DIR%/lib/ai/Lib/ARMCLANG/StellarE/

Upgrading the Stellar Studio AI libraries for the STELLAR P/G devices and ARMCLANG-based build system

# remove the previous files
rm %ROOT_PRJ_DIR%/lib/ai/inc/*.h 
rm %ROOT_PRJ_DIR%/lib/ai/Lib/ARMCLANG/StellarPG_R52/*.a
rm %ROOT_PRJ_DIR%/lib/ai/Lib/ARMCLANG/StellarPG_M4/*.a
# copy the new files
cp %STELLAR_AI_DIR%/Middlewares/ST/AI/Inc/*  %ROOT_PRJ_DIR%/lib/ai/inc/
cp %STELLAR_AI_DIR%/Middlewares/ST/AI/Lib/ARMCLANG/StellarPG_R52/NetworkRuntime1020_CR52_ARMCLANG.a  %ROOT_PRJ_DIR%/lib/ai/Lib/ARMCLANG/StellarPG_R52/
cp %STELLAR_AI_DIR%/Middlewares/ST/AI/Lib/ARMCLANG/StellarPG_R52/NetworkRuntime1020_CR52_ARMCLANG_NEON.a  %ROOT_PRJ_DIR%/lib/ai/Lib/ARMCLANG/StellarPG_R52/
cp %STELLAR_AI_DIR%/Middlewares/ST/AI/Lib/ARMCLANG/StellarPG_M4/NetworkRuntime1020_CM4_ARMCLANG.a  %ROOT_PRJ_DIR%/lib/ai/Lib/ARMCLANG/StellarPG_M4/

Upgrading the Stellar Studio AI library for the STELLAR-E device and IAR-based build system

# remove the previous files
rm %ROOT_PRJ_DIR%/lib/ai/inc/*.h 
rm %ROOT_PRJ_DIR%/lib/ai/Lib/IAR/StellarE/*.a
# copy the new files
cp %STELLAR_AI_DIR%/Middlewares/ST/AI/Inc/*  %ROOT_PRJ_DIR%/lib/ai/inc/
cp %STELLAR_AI_DIR%/Middlewares/ST/AI/Lib/IAR/StellarE/NetworkRuntime1020_CM7_IAR.a  %ROOT_PRJ_DIR%/lib/ai/Lib/IAR/StellarE/