File tree Expand file tree Collapse file tree 6 files changed +30
-128
lines changed Expand file tree Collapse file tree 6 files changed +30
-128
lines changed Original file line number Diff line number Diff line change 22
33set -e
44
5+ # Print/speak build completion on exit (whether successful or not)
6+ function finish {
7+ echo " Build complete for board ${BOARD} "
8+ if [[ " $OSTYPE " == " darwin" * ]]; then
9+ say " Finished building"
10+ else
11+ echo " Build complete"
12+ fi
13+ }
14+ trap finish EXIT
15+
516BOARD=${1:- MICROLITE}
617IDF_VERSION=${IDF_VERSION:- v5.2.2}
718
@@ -41,6 +52,9 @@ popd >/dev/null
4152pushd boards/${BOARD} > /dev/null
4253rm -rf build
4354
55+
56+ cd ../../third_party/micropython/ports/esp32
57+
4458# Inject flags so that:
4559# • C builds drop -Werror=stringop-overflow
4660# • C++ builds retain -fno-rtti
@@ -51,4 +65,4 @@ chmod +x ../../scripts/assemble-unified-image-esp.sh
5165../../scripts/assemble-unified-image-esp.sh ../../third_party/micropython/ports/esp32
5266popd > /dev/null
5367
54- echo " Build complete for board ${BOARD} "
68+ # (No need for a final echo/say here—it's handled by the EXIT trap.)
Original file line number Diff line number Diff line change 1- # Include the board's default manifest.
2- include ("$(PORT_DIR)/boards/manifest.py" )
1+ freeze ("$(PORT_DIR)/modules" )
2+ include ("$(MPY_DIR)/extmod/asyncio" )
3+
4+ # Useful networking-related packages.
5+ require ("bundle-networking" )
6+
7+ # Require some micropython-lib modules.
8+ require ("aioespnow" )
9+ require ("dht" )
10+ require ("ds18x20" )
11+ require ("neopixel" )
12+ require ("onewire" )
13+ require ("umqtt.robust" )
14+ require ("umqtt.simple" )
15+ require ("upysh" )
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 66// Copied and modified for using with newer tflite-micro sources
77
88#include " python_ops_resolver.h"
9- #include " tensorflow/lite/micro/tflite_bridge/micro_error_reporter.h"
109#include " tensorflow/lite/micro/micro_interpreter.h"
1110#include " tensorflow/lite/schema/schema_generated.h"
1211
1312#include " tensorflow-microlite.h"
1413#include " openmv-libtf.h"
15- #include " micropython-error-reporter.h"
1614#include < stdio.h>
1715
1816extern " C" {
19- static microlite::MicropythonErrorReporter micro_error_reporter;
2017/*
2118 Return the index'th tensor
2219 */
@@ -59,9 +56,6 @@ extern "C" {
5956
6057 int libtf_interpreter_init (microlite_interpreter_obj_t *microlite_interpreter) {
6158
62- // The error reporter
63- tflite::ErrorReporter *error_reporter = µ_error_reporter;
64-
6559 // Get the tflite model from the model data
6660 const tflite::Model *model = tflite::GetModel (microlite_interpreter->model_data ->items );
6761
@@ -75,9 +69,6 @@ extern "C" {
7569 // return 1;
7670 // }
7771
78- // Set the tensorflow error reporter
79- microlite_interpreter->tf_error_reporter = (mp_obj_t )error_reporter;
80-
8172 // Set the tensorflow model
8273 microlite_interpreter->tf_model = (mp_obj_t )model;
8374
Original file line number Diff line number Diff line change @@ -56,7 +56,6 @@ typedef struct _microlite_interpreter_obj_t {
5656 mp_obj_array_t * tensor_arena ;
5757 mp_obj_t tf_interpreter ;
5858 mp_obj_t tf_model ;
59- mp_obj_t tf_error_reporter ;
6059 int16_t inference_count ;
6160 mp_obj_t input_callback ;
6261 mp_obj_t output_callback ;
You can’t perform that action at this time.
0 commit comments