module_handler
Classes
ModuleHandler
Responsible for generating the module source code.
Functions
compute_values
generate_common_files
Generates common files for the module.
Parameters:
-
(save_pathPath) –Path to save the generated files.
generate_neuralspot_module
Generates the NeuralSpot module files.
This method creates the module.mk file for the NeuralSpot module.
generate_zephyr_module
Generates the Zephyr module files.
This method creates the module.yml and CMakeLists.txt files for the Zephyr module.
generate_cmake_module
Generates the CMake module files.
This method creates the CMakeLists.txt files for the CMake module.
generate_nsx_module
Generates the NSX (neuralspotx) module files.
Creates both the nsx-module.yaml manifest and a CMakeLists.txt
that follows NSX conventions (nsx:: alias, board flags linkage,
CMSIS-NN dependency, and an optional attributes-header override hook).
generate_cmsis_pack_module
Generates the CMSIS-Pack .pdsc manifest.
Emits a single Open-CMSIS-Pack .pdsc describing the
AOT-compiled model as a component that depends on the
HeliaCORE / ns-cmsis-nn pack. The .pdsc lives next to
the existing src/ and includes-api/ directories so a
downstream gen-pack / packchk step can zip the
directory verbatim into <vendor>.<pack-name>.<version>.pack.
The pack vendor is fixed to Ambiq and the pack name
defaults to the module name; the HeliaCORE dependency is
declared against Ambiq.NS-CMSIS-NN with a minimum
version pinned to :data:CMSIS_NN_VERSION (the same floor
AOT-emitted code already #errors on at compile time).
A copy of the heliaAOT LICENSE file is placed alongside
the .pdsc by :class:DocHandler (it already stages
LICENSE for every module type from
templates/docs/license.md.j2) so the manifest's
<license> reference resolves during packchk.
Pack archiving is handled by :class:AotConverter when
module.path ends in .pack. packchk CI integration
is tracked in issue #192.
Raises:
-
ValueError–if
module.namecontains characters not permitted in a CMSIS-Pack pack identifier ([A-Za-z0-9_-]).