Skip to content

Commit c9994dc

Browse files
committed
Update FreeRTOS demo to run in demo script
Also, minor text fixes.
1 parent 924a4be commit c9994dc

File tree

4 files changed

+13
-20
lines changed

4 files changed

+13
-20
lines changed

apps/microtvm/ethosu/src/demo_freertos.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ static void prvDataCollectionTask(void* pvParameters);
4444
/* The queue used to pass data to run through our model */
4545
static QueueHandle_t xQueue = NULL;
4646

47-
void main(void) {
47+
int main(void) {
4848
// Platform UART
4949
uart_init();
5050
// NPU
@@ -61,7 +61,7 @@ void main(void) {
6161
mainQUEUE_INFERENCE_TASK_PRIORITY, NULL);
6262

6363
// Data collector task
64-
xTaskCreate(prvDataCollectionTask, "Data", mainQUEUE_INFERENCE_TASK_STACK_SIZE, NULL,
64+
xTaskCreate(prvDataCollectionTask, "Data", mainQUEUE_DATA_TASK_STACK_SIZE, NULL,
6565
mainQUEUE_DATA_TASK_PRIORITY, NULL);
6666

6767
// Start the task scheduling
@@ -103,7 +103,7 @@ static void prvInferenceTask(void* pvParameters) {
103103
// Print output of inference and exit task
104104
printf("Running inference\n");
105105
struct tvmgen_default_inputs xInputs = {
106-
.input = pucReceivedData,
106+
.tfl_quantize = pucReceivedData,
107107
};
108108
struct tvmgen_default_outputs xOutputs = {
109109
.output = output,
@@ -116,7 +116,7 @@ static void prvInferenceTask(void* pvParameters) {
116116
ethosu_release_driver(xDriver);
117117

118118
// Calculate index of max value
119-
uint8_t ucMaxValue = 0;
119+
int8_t ucMaxValue = -128;
120120
int32_t lMaxIndex = -1;
121121
for (unsigned int i = 0; i < output_len; ++i) {
122122
if (output[i] > ucMaxValue) {

apps/microtvm/zephyr_cmsisnn/run_demo.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ export ARMFVP_BIN_PATH=/opt/arm/FVP_Corstone_SSE-300/models/Linux64_GCC-6.4/
4545
west zephyr-export
4646
west build
4747
west build -t run &> ${LOGDIR}/west.log &
48-
WEST_PID=$!
4948

5049
# Wait for "exit" keyword
5150
until grep -m 1 "exit" ${LOGDIR}/west.log; do sleep 1 ; done

tests/scripts/task_cpp_unittest.sh

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,3 @@ cd apps/bundle_deploy
4545
rm -rf build
4646
make test_dynamic test_static
4747
cd ../..
48-
49-
# Test Arm(R) Cortex(R)-M55 CPU and Ethos(TM)-U55 NPU demo app
50-
FVP_PATH="/opt/arm/FVP_Corstone_SSE-300"
51-
52-
# TODO(@grant-arm): Remove once ci_cpu docker image has been updated to FVP_Corstone_SSE
53-
if test ! -d $FVP_PATH; then
54-
FVP_PATH="/opt/arm/FVP_Corstone_SSE-300_Ethos-U55"
55-
fi
56-
57-
if test -d $FVP_PATH && pip3 list | grep vela; then
58-
cd apps/microtvm/ethosu
59-
./run_demo.sh --fvp_path $FVP_PATH --cmake_path /opt/arm/cmake/bin/cmake
60-
./run_demo.sh --fvp_path $FVP_PATH --cmake_path /opt/arm/cmake/bin/cmake --freertos_path /opt/freertos/FreeRTOSv202112.00
61-
cd ../../..
62-
fi

tests/scripts/task_demo_microtvm.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,12 @@ set -euxo pipefail
2121
pushd apps/microtvm/zephyr_cmsisnn
2222
./run_demo.sh
2323
popd
24+
25+
pushd apps/microtvm/ethosu
26+
FVP_PATH="/opt/arm/FVP_Corstone_SSE-300_Ethos-U55"
27+
CMAKE_PATH="/opt/arm/cmake/bin/cmake"
28+
FREERTOS_PATH="/opt/freertos/FreeRTOSv202112.00"
29+
30+
./run_demo.sh --fvp_path $FVP_PATH --cmake_path $CMAKE_PATH
31+
./run_demo.sh --fvp_path $FVP_PATH --cmake_path $CMAKE_PATH --freertos_path $FREERTOS_PATH
32+
popd

0 commit comments

Comments
 (0)