Skip to content

Commit

Permalink
[onert-micro] onert_micro_dev as default arm Target
Browse files Browse the repository at this point in the history
- for cortex arm target, onert_micro_dev is deafult binary
- Fix exception for TizenRT

ONE-DCO-1.0-Signed-off-by: Chunseok Lee <[email protected]>
  • Loading branch information
chunseoklee committed Jul 4, 2024
1 parent aecb78e commit 68c5ab2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions onert-micro/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,11 @@ unset(DIS_FLOAT CACHE)
unset(ENABLE_ONERT_MICRO_TEST CACHE)
unset(NOT_BUILD_EXTERNALS CACHE)

set(MICRO_ARM_BINARY "${MICRO_ARM_BUILD_DIR}/onert_micro/src/libonert_micro_interpreter.a")
set(MICRO_ARM_BINARY "${MICRO_ARM_BUILD_DIR}/onert_micro/src/libonert_micro_dev.a")

add_custom_command(
OUTPUT "${MICRO_ARM_BINARY}"
COMMAND "${CMAKE_MAKE_PROGRAM}" onert_micro_interpreter -j ${CPU_COUNT}
COMMAND "${CMAKE_MAKE_PROGRAM}" onert_micro_dev -j ${CPU_COUNT}
WORKING_DIRECTORY "${MICRO_ARM_BUILD_DIR}"
DEPENDS onert_micro_arm_cmake ${OM_CIRCLE_SCHEMA}
VERBATIM
Expand Down
6 changes: 4 additions & 2 deletions onert-micro/onert-micro/src/api/onert-micro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ DataBuffer readFile(const char *path)
if (!file.good())
{
std::string errmsg = "Failed to open file";
throw std::runtime_error(errmsg.c_str());
std::cerr << errmsg << std::endl;
exit(-1); //FIXME: proper way
}

file.seekg(0, std::ios::end);
Expand All @@ -57,7 +58,8 @@ DataBuffer readFile(const char *path)
if (file.fail())
{
std::string errmsg = "Failed to read file";
throw std::runtime_error(errmsg.c_str());
std::cerr << errmsg << std::endl;
exit(-1); //FIXME: proper way
}

return model_data;
Expand Down

0 comments on commit 68c5ab2

Please sign in to comment.