TFLu: Update Stm32f4 target

Some tests were filtered out that are now working.
The enclosing ifdef TARGET is no longer needed.
This commit is contained in:
Måns Nilsson 2020-10-16 17:23:51 +02:00
parent 3c427d4fa4
commit b3d4f8eac2
3 changed files with 75 additions and 81 deletions

View File

@ -27,7 +27,7 @@ limitations under the License.
// Create an area of memory to use for input, output, and intermediate arrays. // Create an area of memory to use for input, output, and intermediate arrays.
constexpr int tensor_arena_size = 93 * 1024; constexpr int tensor_arena_size = 93 * 1024;
uint8_t tensor_arena[tensor_arena_size]; __attribute__((section(".bss.NoInit"), aligned(16))) uint8_t tensor_arena[tensor_arena_size];
TF_LITE_MICRO_TESTS_BEGIN TF_LITE_MICRO_TESTS_BEGIN

View File

@ -17,7 +17,7 @@ Should Run Stm32f4 Test
Execute Command $bin = @${BIN} Execute Command $bin = @${BIN}
Execute Script ${SCRIPT} Execute Script ${SCRIPT}
Create Terminal Tester ${UART} timeout=30 Create Terminal Tester ${UART} timeout=60
Start Emulation Start Emulation
Wait For Line On Uart ${EXPECTED} Wait For Line On Uart ${EXPECTED}

View File

@ -1,5 +1,5 @@
# Settings for stm32f4 based platforms # Settings for stm32f4 based platforms
ifeq ($(TARGET), stm32f4)
export PATH := $(MAKEFILE_DIR)/downloads/gcc_embedded/bin/:$(PATH) export PATH := $(MAKEFILE_DIR)/downloads/gcc_embedded/bin/:$(PATH)
TARGET_ARCH := cortex-m4 TARGET_ARCH := cortex-m4
TARGET_TOOLCHAIN_PREFIX := arm-none-eabi- TARGET_TOOLCHAIN_PREFIX := arm-none-eabi-
@ -60,26 +60,21 @@ ifeq ($(TARGET), stm32f4)
THIRD_PARTY_CC_SRCS := $(filter-out $(EXCLUDED_SRCS), $(THIRD_PARTY_CC_SRCS)) THIRD_PARTY_CC_SRCS := $(filter-out $(EXCLUDED_SRCS), $(THIRD_PARTY_CC_SRCS))
MICROLITE_CC_SRCS := $(filter-out $(EXCLUDED_SRCS), $(MICROLITE_CC_SRCS)) MICROLITE_CC_SRCS := $(filter-out $(EXCLUDED_SRCS), $(MICROLITE_CC_SRCS))
TEST_SCRIPT := tensorflow/lite/micro/testing/test_stm32f4_binary.sh TEST_SCRIPT := tensorflow/lite/micro/testing/test_stm32f4_binary.sh
# TODO, non working tests.. the micro_speech example partly works
# TODO(b/158324045): Examine why some tests fail here.
# TODO(b/158324045): Examine why some tests fail here.
EXCLUDED_TESTS := \ EXCLUDED_TESTS := \
tensorflow/lite/micro/micro_interpreter_test.cc \ tensorflow/lite/micro/micro_interpreter_test.cc \
tensorflow/lite/micro/micro_allocator_test.cc \ tensorflow/lite/micro/micro_allocator_test.cc \
tensorflow/lite/micro/memory_helpers_test.cc \ tensorflow/lite/micro/memory_helpers_test.cc \
tensorflow/lite/micro/memory_arena_threshold_test.cc \ tensorflow/lite/micro/memory_arena_threshold_test.cc \
tensorflow/lite/micro/recording_micro_allocator_test.cc \ tensorflow/lite/micro/recording_micro_allocator_test.cc \
tensorflow/lite/micro/kernels/circular_buffer_test.cc \ tensorflow/lite/micro/kernels/circular_buffer_test.cc
tensorflow/lite/micro/kernels/conv_test.cc \
tensorflow/lite/micro/kernels/fully_connected_test.cc
MICROLITE_TEST_SRCS := $(filter-out $(EXCLUDED_TESTS), $(MICROLITE_TEST_SRCS)) MICROLITE_TEST_SRCS := $(filter-out $(EXCLUDED_TESTS), $(MICROLITE_TEST_SRCS))
EXCLUDED_EXAMPLE_TESTS := \ EXCLUDED_EXAMPLE_TESTS := \
tensorflow/lite/micro/examples/magic_wand/Makefile.inc \ tensorflow/lite/micro/examples/magic_wand/Makefile.inc \
tensorflow/lite/micro/examples/person_detection/Makefile.inc \
tensorflow/lite/micro/examples/person_detection_experimental/Makefile.inc \
tensorflow/lite/micro/examples/micro_speech/Makefile.inc \ tensorflow/lite/micro/examples/micro_speech/Makefile.inc \
tensorflow/lite/micro/examples/person_detection_experimental/Makefile.inc \
tensorflow/lite/micro/examples/image_recognition_experimental/Makefile.inc tensorflow/lite/micro/examples/image_recognition_experimental/Makefile.inc
MICRO_LITE_EXAMPLE_TESTS := $(filter-out $(EXCLUDED_EXAMPLE_TESTS), $(MICRO_LITE_EXAMPLE_TESTS)) MICRO_LITE_EXAMPLE_TESTS := $(filter-out $(EXCLUDED_EXAMPLE_TESTS), $(MICRO_LITE_EXAMPLE_TESTS))
@ -91,4 +86,3 @@ $(BINDIR)/%.bin: $(BINDIR)/%
@mkdir -p $(dir $@) @mkdir -p $(dir $@)
$(OBJCOPY) $< $@ -O binary $(OBJCOPY) $< $@ -O binary
endif