How to upgrade a STELLAR project ¶
Overview ¶
This article describes how to upgrade a Stellar Studio AI SDK (Stellar-E or Stellar P/G) CPU 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):
Command to update the c-model files with the CLI:
$ stedgeai generate --target sr5e1 <my_model> <my_options> -o %ROOT_PRJ_DIR%/cfg/ or $ stedgeai generate --target sr6p3 <my_model> <my_options> -o %ROOT_PRJ_DIR%/cfg/ or $ stedgeai generate --target sr6p6 <my_model> <my_options> -o %ROOT_PRJ_DIR%/cfg/ or $ stedgeai generate --target sr6p7 <my_model> <my_options> -o %ROOT_PRJ_DIR%/cfg/ or $ stedgeai generate --target sr6p7g7 <my_model> <my_options> -o %ROOT_PRJ_DIR%/cfg/ or $ stedgeai generate --target sr6g6 <my_model> <my_options> -o %ROOT_PRJ_DIR%/cfg/ or $ stedgeai generate --target sr6g7 <my_model> <my_options> -o %ROOT_PRJ_DIR%/cfg/ or $ stedgeai generate --target sr6p3e <my_model> <my_options> -o %ROOT_PRJ_DIR%/cfg/
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 |
|---|---|
|
|
all C-header files requested to build the generated c-model files |
|
|
the network runtime libraries for all compilers toolchain supported |
|
tool-chain |
contains |
|---|---|
|
IAR |
the libraries for the IAR ARM compiler - IAR ANSI C/C++ compiler V9.70.2.500/W64 tool-chain |
|
GCC |
the libraries for the GNU ARM compiler - GNU embedded 13.3.1-2024.06 toolchain |
|
HT |
the libraries for the HT ARM compiler - HIGHTEC clang version 10.0.0 toolchain |
|
ARMCLANG |
the libraries for the CLANG ARM compiler - ARMCLANG embedded 6.21 tool-chain |
|
GHS |
the libraries for the GHS ARM compiler - GREEN HILLS compiler v2025.1.4 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/NetworkRuntime1210_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/NetworkRuntime1210_CR52_GCC.a %ROOT_PRJ_DIR%/lib/ai/Lib/GCC/StellarPG_R52/
cp %STELLAR_AI_DIR%/Middlewares/ST/AI/Lib/GCC/StellarPG_R52/NetworkRuntime1210_CR52_GCC_NEON.a %ROOT_PRJ_DIR%/lib/ai/Lib/GCC/StellarPG_R52/
cp %STELLAR_AI_DIR%/Middlewares/ST/AI/Lib/GCC/StellarPG_M4/NetworkRuntime1210_CM4_GCC.a %ROOT_PRJ_DIR%/lib/ai/Lib/GCC/StellarPG_M4/
Upgrading the Stellar Studio AI library for the STELLAR-E device and HT-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/NetworkRuntime1210_CM7_HT.a %ROOT_PRJ_DIR%/lib/ai/Lib/HT/StellarE/
Upgrading the Stellar Studio AI libraries for the STELLAR P/G devices and HT-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/NetworkRuntime1210_CR52_HT.a %ROOT_PRJ_DIR%/lib/ai/Lib/HT/StellarPG_R52/
cp %STELLAR_AI_DIR%/Middlewares/ST/AI/Lib/HT/StellarPG_R52/NetworkRuntime1210_CR52_HT_NEON.a %ROOT_PRJ_DIR%/lib/ai/Lib/HT/StellarPG_R52/
cp %STELLAR_AI_DIR%/Middlewares/ST/AI/Lib/HT/StellarPG_M4/NetworkRuntime1210_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/NetworkRuntime1210_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/NetworkRuntime1210_CR52_ARMCLANG.a %ROOT_PRJ_DIR%/lib/ai/Lib/ARMCLANG/StellarPG_R52/
cp %STELLAR_AI_DIR%/Middlewares/ST/AI/Lib/ARMCLANG/StellarPG_R52/NetworkRuntime1210_CR52_ARMCLANG_NEON.a %ROOT_PRJ_DIR%/lib/ai/Lib/ARMCLANG/StellarPG_R52/
cp %STELLAR_AI_DIR%/Middlewares/ST/AI/Lib/ARMCLANG/StellarPG_M4/NetworkRuntime1210_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/NetworkRuntime1210_CM7_IAR.a %ROOT_PRJ_DIR%/lib/ai/Lib/IAR/StellarE/
Upgrading the Stellar Studio AI libraries for the STELLAR P/G devices 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/StellarPG_R52/*.a
rm %ROOT_PRJ_DIR%/lib/ai/Lib/IAR/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/IAR/StellarPG_R52/NetworkRuntime1210_CR52_IAR.a %ROOT_PRJ_DIR%/lib/ai/Lib/IAR/StellarPG_R52/
cp %STELLAR_AI_DIR%/Middlewares/ST/AI/Lib/IAR/StellarPG_R52/NetworkRuntime1210_CR52_IAR_NEON.a %ROOT_PRJ_DIR%/lib/ai/Lib/IAR/StellarPG_R52/
cp %STELLAR_AI_DIR%/Middlewares/ST/AI/Lib/IAR/StellarPG_M4/NetworkRuntime1210_CM4_IAR.a %ROOT_PRJ_DIR%/lib/ai/Lib/IAR/StellarPG_M4/
Upgrading the Stellar Studio AI library for the STELLAR-E device and GHS-based build system ¶
# remove the previous files
rm %ROOT_PRJ_DIR%/lib/ai/inc/*.h
rm %ROOT_PRJ_DIR%/lib/ai/Lib/GHS/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/GHS/StellarE/NetworkRuntime1210_CM7_GHS.a %ROOT_PRJ_DIR%/lib/ai/Lib/GHS/StellarE/
Upgrading the Stellar Studio AI libraries for the STELLAR P/G devices and GHS-based build system ¶
# remove the previous files
rm %ROOT_PRJ_DIR%/lib/ai/inc/*.h
rm %ROOT_PRJ_DIR%/lib/ai/Lib/GHS/StellarPG_R52/*.a
rm %ROOT_PRJ_DIR%/lib/ai/Lib/GHS/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/GHS/StellarPG_R52/NetworkRuntime1210_CR52_GHS.a %ROOT_PRJ_DIR%/lib/ai/Lib/GHS/StellarPG_R52/
cp %STELLAR_AI_DIR%/Middlewares/ST/AI/Lib/GHS/StellarPG_R52/NetworkRuntime1210_CR52_GHS_NEON.a %ROOT_PRJ_DIR%/lib/ai/Lib/GHS/StellarPG_R52/
cp %STELLAR_AI_DIR%/Middlewares/ST/AI/Lib/GHS/StellarPG_M4/NetworkRuntime1210_CM4_GHS.a %ROOT_PRJ_DIR%/lib/ai/Lib/GHS/StellarPG_M4/