Skip to content

Commit

Permalink
update usage of himax tflm sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
kris-himax committed Mar 9, 2023
1 parent c393404 commit 1172fc6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ LIB_LOC = third_party/
LIB_NAME = lib.zip
THIRD_PARTY_LIB_NAME = third_party_lib_v04

SDK_LINK = https://www.himax.com.tw/we-i/himax_we1_sdk_v20.zip
SDK_LINK = https://www.himax.com.tw/we-i/himax_we1_sdk_v21.zip
SDK_LOC = .
SDK_NAME = sdk.zip

Expand Down Expand Up @@ -349,6 +349,7 @@ CCFLAGS+= \
-I./third_party/kissfft/tools

LDFLAGS+= \
-buildlib \
$(MLI_PATH)/libmli.a \
-Hheap=8192 \
-Hnocopyr \
Expand All @@ -364,6 +365,7 @@ $(SDK_PATH)/liblibcommon.a \
$(SDK_PATH)/liblibaudio.a \
$(SDK_PATH)/liblibsecurity.a \
$(SDK_PATH)/liblibsensordp.a \
$(SDK_PATH)/liblibclib.a \
$(SDK_PATH)/liblibtflm.a

else ifeq ($(ARC_TOOLCHAIN), gnu)
Expand Down Expand Up @@ -456,6 +458,7 @@ $(SDK_PATH)/liblibcommon.a \
$(SDK_PATH)/liblibaudio.a \
$(SDK_PATH)/liblibsecurity.a \
$(SDK_PATH)/liblibsensordp.a \
$(SDK_PATH)/liblibclib.a \
$(SDK_PATH)/liblibtflm.a \
-Wl,--end-group
endif # ARC_TOOLCHAIN
Expand Down
4 changes: 4 additions & 0 deletions examples/handwriting/himax_we1_evb/image_provider.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ TfLiteStatus GetImage(tflite::ErrorReporter* error_reporter, int image_width,
static bool is_initialized = false;

if (!is_initialized) {
g_pimg_config.sensor_type = HX_DRV_SENSOR_TYPE_HM0360_MONO;
g_pimg_config.format = HX_DRV_VIDEO_FORMAT_YUV400;
g_pimg_config.img_width = 640;
g_pimg_config.img_height = 480;
if (hx_drv_sensor_initial(&g_pimg_config) != HX_DRV_LIB_PASS) {
return kTfLiteError;
}
Expand Down
4 changes: 4 additions & 0 deletions examples/person_detection/himax_we1_evb/image_provider.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ TfLiteStatus GetImage(tflite::ErrorReporter* error_reporter, int image_width,
static bool is_initialized = false;

if (!is_initialized) {
g_pimg_config.sensor_type = HX_DRV_SENSOR_TYPE_HM0360_MONO;
g_pimg_config.format = HX_DRV_VIDEO_FORMAT_YUV400;
g_pimg_config.img_width = 640;
g_pimg_config.img_height = 480;
if (hx_drv_sensor_initial(&g_pimg_config) != HX_DRV_LIB_PASS) {
return kTfLiteError;
}
Expand Down

0 comments on commit 1172fc6

Please sign in to comment.