{"id":21191635,"url":"https://github.com/edgeimpulse/example-standalone-inferencing-avh","last_synced_at":"2025-03-14T21:10:59.958Z","repository":{"id":234421867,"uuid":"785159477","full_name":"edgeimpulse/example-standalone-inferencing-avh","owner":"edgeimpulse","description":"Example Standalone for Arm Virtual Hardware using CMSIS toolbox","archived":false,"fork":false,"pushed_at":"2025-02-10T09:58:59.000Z","size":194,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-07T00:58:40.713Z","etag":null,"topics":["arm","avh","csolution","fvp"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause-clear","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/edgeimpulse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-11T10:12:46.000Z","updated_at":"2025-02-10T09:59:03.000Z","dependencies_parsed_at":"2024-05-09T11:45:05.682Z","dependency_job_id":"347774d8-9b91-464a-969b-58e62cab1ed4","html_url":"https://github.com/edgeimpulse/example-standalone-inferencing-avh","commit_stats":null,"previous_names":["edgeimpulse/example-standalone-inferencing-avh"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edgeimpulse%2Fexample-standalone-inferencing-avh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edgeimpulse%2Fexample-standalone-inferencing-avh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edgeimpulse%2Fexample-standalone-inferencing-avh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edgeimpulse%2Fexample-standalone-inferencing-avh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edgeimpulse","download_url":"https://codeload.github.com/edgeimpulse/example-standalone-inferencing-avh/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243646664,"owners_count":20324586,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arm","avh","csolution","fvp"],"created_at":"2024-11-20T19:04:10.694Z","updated_at":"2025-03-14T21:10:59.951Z","avatar_url":"https://github.com/edgeimpulse.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Edge Impulse Example: stand-alone inferencing for CMSIS toolbox\nExample standalone inferencing for AVH created for CMSIS toolbox v2.4.0\n\n## Update the model to test\nOnce you have deployed your model as a Open CMSIS pack, unzip the downloaded file, you will find 2 pack files and a `model.clayer.yml`\n\nTo add your model to your component library you need to use the `cpackget` utility:\n```sh\ncpackget add \u003cyour_model\u003e.pack\n```\n\nYou probably need to install the Edge Impulse sdk too:\n```sh\ncpackget add EdgeImpulse.EI-SDK.x.yy.zzpack\n```\n\nThen you need to copy the `model.clayer.yml` into the `model` folder.\n\nTo test a sample, from you project copy the raw feature you want to test from the processing block and paste it in `feature.h`\n```\nconst float features[] = { \n        // copy raw features here (for example from the 'Live classification' page)\n\n}; \n```\n\n## Build the firmware\n\n### Using command line\nThe most basic compilation command is:\n```sh\ncbuild inferencing.csolution.yml\n```\nThis command will build for every target and every configuration available, so probably isn't what you are looking for.\n\nTo specify a configuration and target (ie speed for CM55):\n```sh\ncbuild inferencing.csolution.yml --context inferencing.speed+CM55\n```\n\nOther useful arguments are:\n```sh\n--update-rte\n```\nUpdate the RTE directory, which contains target specific header.\n\n```sh\n--packs\n```\nAutomatically download any missing software packs with cpackget.\n\n```sh\n--clean\n```\n\nRemove intermediate and output directories\n\nUsually, the most common way to compiler for a specific target and toolchain is:\n```sh\ncbuild inferencing.csolution.yml --update-rte --packs --context inferencing.speed+CM55 --toolchain GCC\n```\n\nCheck the [CMSIS-Toolbox User Guide](https://github.com/Open-CMSIS-Pack/cmsis-toolbox/blob/main/docs/README.md) for a complete overview of the `cbuild` command.\n\n### Using CMSIS toolbox extension\nIn the CMSIS view, click on the hammer icon.\n\n### Using docker\nThis repository contains a docker image with the required dependencies for building with gcc and llvm:\n```sh\ndocker build -t standalone-csolution .\n```\n\nCopy the content of the deployment for your project in the pack folder.\n\nBuild the firmware with the following command:\n```sh\ndocker run --rm -it -v \"${PWD}\":/app standalone-csolution /bin/bash -c \"./build.sh --target \u003cTARGET\u003e --config \u003cBUILD_CONFIG\u003e --toolchain \u003cTOOLCHAIN\u003e\"\n```\n\n### Using the build script\nYou can use the `build.sh` script to compile, target and toolchain can be specified as follow:\n\n```sh\n./build.sh --target \u003cTARGET\u003e --config \u003cBUILD_CONFIG\u003e --toolchain \u003cTOOLCHAIN\u003e\n```\n\nThe script will also install any package present in the `pack` folder.\n\n\u003e [!Note]\n\u003e After building, the bin will be run locally on AVH.\n\n## Run on AVH\n\nThe basic usage is:\n```sh\n\u003cAVH FVP for the target\u003e -f \u003cfvp config file\u003e \u003celf file to be loaded\u003e\n```\n\nSome examples:\n- Run Test on model for Cortex-M3 (speed) compiled with GCC\n```sh\nFVP_MPS2_Cortex-M3 -f ./Target/CM3/model_config.txt ./build/CM3/GCC/speed/outdir/CM3_inferencing.elf\n```\n- Run Test on model for Cortex-M55 with Ethos (none) compiled with Arm Compiler\n```sh\nFVP_Corstone_SSE-300_Ethos-U55 -f ./Target/CM55/model_config.txt ./build/CM55/AC6/speed/outdir/CM55_inferencing.elf\n```\n\n### Using the build script\nYou can also use `--run` when invoncing `build.sh` if you want to run an already built target.\n\nFor example:\n```sh\nbuild.sh --run --target CM7 --toolchain AC6\n```\n\n## Available target\nCM0\nCM0plus\nCM3\nCM4\nCM4-FP\nCM7\nCM33\nCM55\nCM55-U128\nCM55-U55-128\nCM55-U55-128\nCM85\n\n## Note\nTested using GCC 10.3.1, GCC 12.3.1, GCC 13.2.1, GCC 13.3.1, Arm Compiler v6.19 and 6.22 and Arm LLVM v17.1.\nDoesn't work with GCC 12.2.1 for MCU with Helium (Cortex-M55, Cortex-M85).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedgeimpulse%2Fexample-standalone-inferencing-avh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedgeimpulse%2Fexample-standalone-inferencing-avh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedgeimpulse%2Fexample-standalone-inferencing-avh/lists"}