From a4781668842811e129014c959f63efc0a7bed074 Mon Sep 17 00:00:00 2001 From: Wang Xin Date: Fri, 21 Feb 2020 16:54:20 +0800 Subject: [PATCH 01/15] sdk build --- wamr-sdk/Kconfig | 35 ++-- wamr-sdk/build_sdk.sh | 259 +---------------------------- wamr-sdk/menuconfig.sh | 3 + wamr-sdk/wamr_config_default.cmake | 3 + 4 files changed, 33 insertions(+), 267 deletions(-) diff --git a/wamr-sdk/Kconfig b/wamr-sdk/Kconfig index 0431abe29..c39584272 100644 --- a/wamr-sdk/Kconfig +++ b/wamr-sdk/Kconfig @@ -1,7 +1,7 @@ mainmenu "WebAssembly Micro Runtime Configuration" config WAMR_SDK_PROFILE - string "wamr sdk profile name" + string "wamr SDK profile name" default "default" help create a new SDK by giving a name or overwrite @@ -64,20 +64,33 @@ choice endchoice -config APP_FRAMEWORK_ENABLE - bool "enable app framework" - help - enable wamr app framework + -menu "app modules" - depends on APP_FRAMEWORK_ENABLE +choice + prompt "application framework" + config APP_FRAMEWORK_DISABLE + bool "Disable app framework" + help + Disable wamr app framework - config APP_BUILD_ALL - bool "enable all modules" + config APP_FRAMEWORK_DEFAULT + bool "Default components" + help + Default components + + config TRI_CHOICE_SYM_2 + tristate "Tristate choice sym 2" - source ".wamr_modules" + config APP_BUILD_CUSTOM + bool "customized module config" -endmenu + menu "modules:" + depends on APP_BUILD_CUSTOM + + source ".wamr_modules" + + endmenu +endchoice config EXTRA_INCLUDE_ENABLE bool "enable extra include dir" diff --git a/wamr-sdk/build_sdk.sh b/wamr-sdk/build_sdk.sh index f3e153528..99b8b9bcf 100755 --- a/wamr-sdk/build_sdk.sh +++ b/wamr-sdk/build_sdk.sh @@ -20,9 +20,6 @@ usage () echo "build.sh [options]" echo " -n [profile name]" echo " -x [config file path name]" - echo " -p [platform]" - echo " -t [target]" - echo " -m [mode]" echo " -e [extra include path], files under this path will be copied into SDK package" echo " -c, clean" echo " -i, enter interactive config setting" @@ -30,7 +27,7 @@ usage () } -while getopts "e:x:n:p:t:m:l:awgicg" opt +while getopts "e:x:n:t:m:l:awgicg" opt do case $opt in n) @@ -39,24 +36,6 @@ do x) wamr_config_cmake_file=$OPTARG ;; - p) - PLATFORM=$OPTARG - ;; - t) - TARGET=$OPTARG - ;; - m) - OLD_IFS="$IFS" - IFS="," - MODES=($OPTARG) - IFS="$OLD_IFS" - ;; - l) - OLD_IFS="$IFS" - IFS="," - APP_LIST=($OPTARG) - IFS="$OLD_IFS" - ;; e) CMAKE_DEXTRA_SDK_INCLUDE_PATH="-DEXTRA_SDK_INCLUDE_PATH=${OPTARG}" ;; @@ -69,9 +48,6 @@ do w) LIBC_SUPPORT="WASI" ;; - g) - FROM_GUI_MENU="TRUE" - ;; i) MENUCONFIG="TRUE" ;; @@ -107,7 +83,7 @@ fi # 1. use the users provided the config cmake file path. # 2. if user set MENU CONFIG, enter menu config to generate menu_config.cmake in the profile output folder # 3. If the menu_config.cmake is already in the profile folder, use it -#4: use the default config cmake file +# 4. Use the default config cmake file if [[ -n "$wamr_config_cmake_file" ]]; then echo "User config file: [${wamr_config_cmake_file}]" else @@ -138,240 +114,11 @@ if [ "${FROM_GUI_MENU}" != "TRUE" ]; then fi fi + mkdir -p ${curr_profile_dir} mkdir -p ${curr_profile_dir}/app-sdk mkdir -p ${curr_profile_dir}/runtime-sdk -function set_build_target () { - target=$1 - - if [[ "${target}" = "X86_64" ]]; then - echo -e "set (WAMR_BUILD_TARGET \"X86_64\")" >> ${wamr_config_cmake_file} - elif [[ "${target}" = "X86_32" ]]; then - echo -e "set (WAMR_BUILD_TARGET \"X86_32\")" >> ${wamr_config_cmake_file} - else - echo "unknown build target." - exit 1 - fi -} - -function set_build_platform () { - platform=$1 - - if [[ "${platform}" = "linux" ]]; then - echo -e "set (WAMR_BUILD_PLATFORM \"linux\")" >> ${wamr_config_cmake_file} - # TODO: add other platforms - else - echo "${platform} platform currently not supported" - exit 1 - fi -} - -# input: array of selected exec modes [aot jit interp] -function set_exec_mode () { - modes=($1) - - for mode in ${modes[@]} - do - if [[ "$mode" = "aot" ]]; then - echo "set (WAMR_BUILD_AOT 1)" >> ${wamr_config_cmake_file} - elif [[ "$mode" = "jit" ]]; then - echo "set (WAMR_BUILD_JIT 1)" >> ${wamr_config_cmake_file} - BUILD_LLVM="TRUE" - elif [[ "$mode" = "interp" ]]; then - echo "set (WAMR_BUILD_INTERP 1)" >> ${wamr_config_cmake_file} - else - echo "unknown execute mode." - exit 1 - fi - done -} - -function set_libc_support () { - libc=$1 - - if [ "$libc" = "WASI" ]; then - echo "set (WAMR_BUILD_LIBC_WASI 1)" >> ${wamr_config_cmake_file} - else - echo "set (WAMR_BUILD_LIBC_BUILTIN 1)" >> ${wamr_config_cmake_file} - fi -} - -function set_app_framework () { - app_support=$1 - - if [ "$app_support" = "TRUE" ]; then - echo "set (WAMR_BUILD_APP_FRAMEWORK 1)" >> ${wamr_config_cmake_file} - fi -} - -# input: array of selected app modules -function set_app_module () { - modules=($1) - - for module in ${modules[*]} - do - if [ "${module}" = "all" ]; then - cmake_app_list="WAMR_APP_BUILD_ALL" - break - fi - - cmake_app_list="${cmake_app_list} WAMR_APP_BUILD_${module^^}" - done - - # APP module list - if [ -n "${cmake_app_list}" ]; then - echo "set (WAMR_BUILD_APP_LIST ${cmake_app_list# })" >> ${wamr_config_cmake_file} - fi -} - -if [ ! -f "/opt/wasi-sdk/bin/clang" ]; then - echo "Can't find wasi-sdk under /opt/wasi-sdk" - echo "You can download wasi-sdk from here:" - echo "" - echo "https://github.com/CraneStation/wasi-sdk/releases/tag/wasi-sdk-7" - echo "" - echo "please install it to the default path for your convenience" - echo "" - exit 1 -fi - -if [ "${FROM_GUI_MENU}" = "TRUE" ]; then - # called from gui based menuconfig, - # all settings are passed from command line options - - if [[ -f $wamr_config_cmake_file ]]; then - rm $wamr_config_cmake_file - fi - - set_build_target ${TARGET} - set_build_platform ${PLATFORM} - set_exec_mode "${MODES[*]}" - set_libc_support ${LIBC_SUPPORT} - set_app_module "${APP_LIST[*]}" - set_app_framework ${APP} -fi - - -# No options passed, ask for user input -if [ "$MENUCONFIG" = "TRUE" ]; then - - if [[ -f $wamr_config_cmake_file ]]; then - rm $wamr_config_cmake_file - fi - - echo "" - echo "-----------------------------------------------------------------" - echo "select a build target:" - echo "[1] X86_64 (default)" - echo "[2] X86_32" - read -a select_target - - if [ "${select_target}" = "2" ]; then - TARGET="X86_32" - else - TARGET="X86_64" - fi - - echo "" - echo "-----------------------------------------------------------------" - echo "select a build platform:" - echo "[1] linux (default)" - echo "More platforms to be add here ..." - - read -a select_platform - - if [ "${select_platform}" = "1" ]; then - PLATFORM="linux" - # TODO: add more platforms - else - PLATFORM="linux" - fi - - echo "" - echo "-----------------------------------------------------------------" - echo "select one or more execution mode of the WAMR runtime" - - enable_interp="y" - enable_jit="n" - enable_aot="n" - - read -p "enable interpreter mode [y]/n: " -a enable_interp - read -p "enable jit mode y/[n]: " -a enable_jit - read -p "enable aot mode y/[n]: " -a enable_aot - - # by default the interpreter mode is selected - if [[ ${enable_interp} != "n" ]] && [[ ${enable_interp} != "N" ]]; then - enable_interp="y" - fi - - if [[ ${enable_interp} != "y" ]] && [[ ${enable_aot} != "y" ]]; - then - echo "WASM Interpreter and AOT must be enabled at least one" - exit 1 - fi - - if [[ ${enable_interp} = "y" ]]; then - MODES[${#MODES[@]}]=interp - fi - if [[ ${enable_jit} = "y" ]] || [[ ${enable_jit} = "Y" ]]; then - MODES[${#MODES[@]}]=jit - fi - if [[ ${enable_aot} = "y" ]] || [[ ${enable_aot} = "Y" ]]; then - MODES[${#MODES[@]}]=aot - fi - - echo "" - echo "-----------------------------------------------------------------" - echo "select a libc support:" - echo "[1] builtin libc (default)" - echo "[2] WebAssembly System Interface (WASI)" - read -a libc_select - - if [ "$libc_select" = "1" ]; then - LIBC_SUPPORT="BUILTIN" - elif [ "$libc_select" = "2" ]; then - LIBC_SUPPORT="WASI" - fi - - echo "" - echo "-----------------------------------------------------------------" - echo "enable app framework? [y]/n" - read -a enable_app - - if [[ "$enable_app" != "n" ]] && [[ "$enable_app" != "N" ]]; then - APP="TRUE" - fi - - if [[ "$APP" = "TRUE" ]]; then - echo "" - echo "-----------------------------------------------------------------" - echo "please input the name of the module you need, seperate by ',' " - echo "type \"all\" if you want to enable all of them" - echo "---------------" - for folder in `ls ${wamr_root_dir}/core/app-framework -F | grep "/$" | grep -v "base" | grep -v "app-native-shared" | grep -v "template"` - do - folder=${folder%*/} - echo "${folder}" - done - echo "---------------" - read -a app_select - - app_select=${app_select},base - app_select=${app_select#,} - OLD_IFS="$IFS" - IFS="," - APP_LIST=($app_select) - IFS="$OLD_IFS" - fi - - set_build_target ${TARGET} - set_build_platform ${PLATFORM} - set_exec_mode "${MODES[*]}" - set_libc_support ${LIBC_SUPPORT} - set_app_module "${APP_LIST[*]}" - set_app_framework ${APP} -fi if [ "${BUILD_LLVM}" = "TRUE" ]; then if [ ! -d "${wamr_root_dir}/core/deps/llvm" ]; then diff --git a/wamr-sdk/menuconfig.sh b/wamr-sdk/menuconfig.sh index 320a3ecd6..87672de59 100755 --- a/wamr-sdk/menuconfig.sh +++ b/wamr-sdk/menuconfig.sh @@ -28,6 +28,7 @@ do done menuconfig Kconfig +[ $? -eq 0 ] || exit $? if [ ! -e ".config" ]; then exit 0 @@ -50,6 +51,8 @@ function args_add_array() args="${args} -$1 ${2#,}" } +source .config + profile=`cat .config | grep "^CONFIG_WAMR_SDK_PROFILE"` profile=${profile#CONFIG_WAMR_SDK_PROFILE=\"} profile=${profile%*\"} diff --git a/wamr-sdk/wamr_config_default.cmake b/wamr-sdk/wamr_config_default.cmake index ab0c014dd..98cc6e9cf 100644 --- a/wamr-sdk/wamr_config_default.cmake +++ b/wamr-sdk/wamr_config_default.cmake @@ -7,3 +7,6 @@ set (WAMR_BUILD_LIBC_BUILTIN 1) set (WAMR_BUILD_LIBC_WASI 0) set (WAMR_BUILD_APP_FRAMEWORK 1) set (WAMR_BUILD_APP_LIST WAMR_APP_BUILD_BASE) + +# +# set (EXTRA_SDK_INCLUDE_PATH "") From de47e72284eb735ca6b1c4496b5ae1e464800980 Mon Sep 17 00:00:00 2001 From: Wang Xin Date: Fri, 21 Feb 2020 19:45:27 +0800 Subject: [PATCH 02/15] aa --- wamr-sdk/build_sdk.sh | 60 ++++++++++---------- wamr-sdk/menuconfig.sh | 125 ++++++++++++++++++++++++++++++++++++++++- 2 files changed, 154 insertions(+), 31 deletions(-) diff --git a/wamr-sdk/build_sdk.sh b/wamr-sdk/build_sdk.sh index 99b8b9bcf..1f1330e69 100755 --- a/wamr-sdk/build_sdk.sh +++ b/wamr-sdk/build_sdk.sh @@ -27,7 +27,7 @@ usage () } -while getopts "e:x:n:t:m:l:awgicg" opt +while getopts "e:x:n:ic" opt do case $opt in n) @@ -39,15 +39,9 @@ do e) CMAKE_DEXTRA_SDK_INCLUDE_PATH="-DEXTRA_SDK_INCLUDE_PATH=${OPTARG}" ;; - a) - APP="TRUE" - ;; c) CLEAN="TRUE" ;; - w) - LIBC_SUPPORT="WASI" - ;; i) MENUCONFIG="TRUE" ;; @@ -59,10 +53,29 @@ do esac done + +if [ ! -f "/opt/wasi-sdk/bin/clang" ]; then + echo "Can't find wasi-sdk under /opt/wasi-sdk" + echo "You can download wasi-sdk from here:" + echo "" + echo "https://github.com/CraneStation/wasi-sdk/releases/tag/wasi-sdk-7" + echo "" + echo "please install it to the default path for your convenience" + echo "" + exit 1 +fi + + + if [ ! -d "${out_dir}" ]; then mkdir -p ${out_dir} fi +curr_profile_dir=${out_dir}/${PROFILE} +wamr_app_out_dir=${curr_profile_dir}/app-sdk/wamr-app-framework +sysroot_dir=${curr_profile_dir}/app-sdk/libc-builtin-sysroot + + echo "CMAKE_DEXTRA_SDK_INCLUDE_PATH=${CMAKE_DEXTRA_SDK_INCLUDE_PATH}" @@ -71,25 +84,28 @@ if [ -z "$PROFILE" ]; then echo "PROFILE argument not set, using DEFAULT" fi -curr_profile_dir=${out_dir}/${PROFILE} -wamr_app_out_dir=${curr_profile_dir}/app-sdk/wamr-app-framework -sysroot_dir=${curr_profile_dir}/app-sdk/libc-builtin-sysroot - if [[ "$CLEAN" = "TRUE" ]]; then rm -rf ${curr_profile_dir} fi + + # cmake config file for wamr runtime: # 1. use the users provided the config cmake file path. -# 2. if user set MENU CONFIG, enter menu config to generate menu_config.cmake in the profile output folder +# 2. if user set MENU CONFIG, enter menu config to generate +# menu_config.cmake in the profile output folder # 3. If the menu_config.cmake is already in the profile folder, use it # 4. Use the default config cmake file +# if [[ -n "$wamr_config_cmake_file" ]]; then echo "User config file: [${wamr_config_cmake_file}]" else wamr_config_cmake_file=${curr_profile_dir}/wamr_config_menu.cmake - if [[ "$MENUCONFIG" = "TRUE" ]] || [[ "$FROM_GUI_MENU" = "TRUE" ]]; then - echo "MENUCONFIG: user config file: [${wamr_config_cmake_file}]" + if [[ "$MENUCONFIG" = "TRUE" ]]; then + echo "MENUCONFIG: [${wamr_config_cmake_file}]" + ./menuconfig.sh -x ${wamr_config_cmake_file} + [ $? -eq 0 ] || exit $? + elif [[ -f $wamr_config_cmake_file ]]; then echo "use existing config file: [$wamr_config_cmake_file]" else @@ -98,22 +114,6 @@ else fi fi -# if called by gui menuconfig, overwrite the exist profile -if [ "${FROM_GUI_MENU}" != "TRUE" ]; then - if [[ "$PROFILE" != "default" ]] && [[ -d "$curr_profile_dir" ]]; then - echo "#########################################################" - echo "profile ${curr_profile_dir} already exists" - echo " skip the build process and use the previous settings: [y]" - echo " or delete the profile and generate a new one: n" - read -a erase_exist - if [[ "$erase_exist" != "n" ]] && [[ "$erase_exist" != "N" ]]; then - exit 0 - fi - - rm -rf ${curr_profile_dir} - fi -fi - mkdir -p ${curr_profile_dir} mkdir -p ${curr_profile_dir}/app-sdk diff --git a/wamr-sdk/menuconfig.sh b/wamr-sdk/menuconfig.sh index 87672de59..85e49f0c8 100755 --- a/wamr-sdk/menuconfig.sh +++ b/wamr-sdk/menuconfig.sh @@ -3,6 +3,118 @@ # Copyright (C) 2019 Intel Corporation. All rights reserved. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +usage () +{ + echo "menuconfig.sh [options]" + echo " -x [config file path name]" + exit 1 +} + + +while getopts "x:" opt +do + case $opt in + x) + wamr_config_cmake_file=$OPTARG + ;; + ?) + echo "Unknown arg: $arg" + usage + exit 1 + ;; + esac +done + + + + +function set_build_target () { + target=$1 + + if [[ "${target}" = "X86_64" ]]; then + echo -e "set (WAMR_BUILD_TARGET \"X86_64\")" >> ${wamr_config_cmake_file} + elif [[ "${target}" = "X86_32" ]]; then + echo -e "set (WAMR_BUILD_TARGET \"X86_32\")" >> ${wamr_config_cmake_file} + else + echo "unknown build target." + exit 1 + fi +} + +function set_build_platform () { + platform=$1 + + if [[ "${platform}" = "linux" ]]; then + echo -e "set (WAMR_BUILD_PLATFORM \"linux\")" >> ${wamr_config_cmake_file} + # TODO: add other platforms + else + echo "${platform} platform currently not supported" + exit 1 + fi +} + +# input: array of selected exec modes [aot jit interp] +function set_exec_mode () { + modes=($1) + + for mode in ${modes[@]} + do + if [[ "$mode" = "aot" ]]; then + echo "set (WAMR_BUILD_AOT 1)" >> ${wamr_config_cmake_file} + elif [[ "$mode" = "jit" ]]; then + echo "set (WAMR_BUILD_JIT 1)" >> ${wamr_config_cmake_file} + BUILD_LLVM="TRUE" + elif [[ "$mode" = "interp" ]]; then + echo "set (WAMR_BUILD_INTERP 1)" >> ${wamr_config_cmake_file} + else + echo "unknown execute mode." + exit 1 + fi + done +} + +function set_libc_support () { + libc=$1 + + if [ "$libc" = "WASI" ]; then + echo "set (WAMR_BUILD_LIBC_WASI 1)" >> ${wamr_config_cmake_file} + else + echo "set (WAMR_BUILD_LIBC_BUILTIN 1)" >> ${wamr_config_cmake_file} + fi +} + +function set_app_framework () { + app_support=$1 + + if [ "$app_support" = "TRUE" ]; then + echo "set (WAMR_BUILD_APP_FRAMEWORK 1)" >> ${wamr_config_cmake_file} + fi +} + +# input: array of selected app modules +function set_app_module () { + modules=($1) + + for module in ${modules[*]} + do + if [ "${module}" = "all" ]; then + cmake_app_list="WAMR_APP_BUILD_ALL" + break + fi + + cmake_app_list="${cmake_app_list} WAMR_APP_BUILD_${module^^}" + done + + # APP module list + if [ -n "${cmake_app_list}" ]; then + echo "set (WAMR_BUILD_APP_LIST ${cmake_app_list# })" >> ${wamr_config_cmake_file} + fi +} + + + + sdk_root=$(cd "$(dirname "$0")/" && pwd) wamr_root=${sdk_root}/.. @@ -123,4 +235,15 @@ if [ -n "${extra_path}" ]; then fi args="-g ${args}" -./build_sdk.sh ${args} \ No newline at end of file + + +if [[ -f $wamr_config_cmake_file ]]; then + rm $wamr_config_cmake_file +fi + +set_build_target ${TARGET} +set_build_platform ${PLATFORM} +set_exec_mode "${MODES[*]}" +set_libc_support ${LIBC_SUPPORT} +set_app_module "${APP_LIST[*]}" +set_app_framework ${APP} From 87f725b5d58dcbbee4ae19c5d7180f2545d03692 Mon Sep 17 00:00:00 2001 From: Wang Xin Date: Fri, 21 Feb 2020 19:45:55 +0800 Subject: [PATCH 03/15] ab --- wamr-sdk/build_sdk.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/wamr-sdk/build_sdk.sh b/wamr-sdk/build_sdk.sh index 1f1330e69..60a1d9aa2 100755 --- a/wamr-sdk/build_sdk.sh +++ b/wamr-sdk/build_sdk.sh @@ -79,11 +79,6 @@ sysroot_dir=${curr_profile_dir}/app-sdk/libc-builtin-sysroot echo "CMAKE_DEXTRA_SDK_INCLUDE_PATH=${CMAKE_DEXTRA_SDK_INCLUDE_PATH}" -if [ -z "$PROFILE" ]; then - PROFILE="default" - echo "PROFILE argument not set, using DEFAULT" -fi - if [[ "$CLEAN" = "TRUE" ]]; then rm -rf ${curr_profile_dir} fi @@ -98,9 +93,16 @@ fi # 4. Use the default config cmake file # if [[ -n "$wamr_config_cmake_file" ]]; then + if [[ ! -f $wamr_config_cmake_file ]]; then + echo "user given file not exist: ${wamr_config_cmake_file}" + exit 1 + fi + echo "User config file: [${wamr_config_cmake_file}]" + else - wamr_config_cmake_file=${curr_profile_dir}/wamr_config_menu.cmake + wamr_config_cmake_file=${out_dir}/wamr_config_${PROFILE}.cmake + if [[ "$MENUCONFIG" = "TRUE" ]]; then echo "MENUCONFIG: [${wamr_config_cmake_file}]" ./menuconfig.sh -x ${wamr_config_cmake_file} From ef611452cee67b5c83b5d23b54253960dbbfb572 Mon Sep 17 00:00:00 2001 From: Wang Xin Date: Fri, 21 Feb 2020 20:45:06 +0800 Subject: [PATCH 04/15] build.sdk. --- core/app-framework/base/native/base_lib.inl | 14 +++++ .../base/native/base_lib_export.c | 10 +--- wamr-sdk/build_sdk.sh | 53 +++++++++++-------- 3 files changed, 46 insertions(+), 31 deletions(-) create mode 100644 core/app-framework/base/native/base_lib.inl diff --git a/core/app-framework/base/native/base_lib.inl b/core/app-framework/base/native/base_lib.inl new file mode 100644 index 000000000..84df855f8 --- /dev/null +++ b/core/app-framework/base/native/base_lib.inl @@ -0,0 +1,14 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + */ + + EXPORT_WASM_API(wasm_register_resource), + EXPORT_WASM_API(wasm_response_send), + EXPORT_WASM_API(wasm_post_request), + EXPORT_WASM_API(wasm_sub_event), + EXPORT_WASM_API(wasm_create_timer), + EXPORT_WASM_API(wasm_timer_destroy), + EXPORT_WASM_API(wasm_timer_cancel), + EXPORT_WASM_API(wasm_timer_restart), + EXPORT_WASM_API(wasm_get_sys_tick_ms), diff --git a/core/app-framework/base/native/base_lib_export.c b/core/app-framework/base/native/base_lib_export.c index 04086ba55..3c6d1d74c 100644 --- a/core/app-framework/base/native/base_lib_export.c +++ b/core/app-framework/base/native/base_lib_export.c @@ -12,15 +12,7 @@ static NativeSymbol extended_native_symbol_defs[] = { /* TODO: use macro EXPORT_WASM_API() or EXPORT_WASM_API2() to add functions to register. */ - EXPORT_WASM_API(wasm_register_resource), - EXPORT_WASM_API(wasm_response_send), - EXPORT_WASM_API(wasm_post_request), - EXPORT_WASM_API(wasm_sub_event), - EXPORT_WASM_API(wasm_create_timer), - EXPORT_WASM_API(wasm_timer_destroy), - EXPORT_WASM_API(wasm_timer_cancel), - EXPORT_WASM_API(wasm_timer_restart), - EXPORT_WASM_API(wasm_get_sys_tick_ms), + #include "base_lib.inl" }; int get_base_lib_export_apis(NativeSymbol **p_base_lib_apis) diff --git a/wamr-sdk/build_sdk.sh b/wamr-sdk/build_sdk.sh index 60a1d9aa2..6a64d331e 100755 --- a/wamr-sdk/build_sdk.sh +++ b/wamr-sdk/build_sdk.sh @@ -22,7 +22,7 @@ usage () echo " -x [config file path name]" echo " -e [extra include path], files under this path will be copied into SDK package" echo " -c, clean" - echo " -i, enter interactive config setting" + echo " -i, enter menu config settings" exit 1 } @@ -65,6 +65,14 @@ if [ ! -f "/opt/wasi-sdk/bin/clang" ]; then exit 1 fi +if [ -z "$PROFILE" ]; then + PROFILE="default" + echo "PROFILE argument not set, using DEFAULT" + if [[ -z "$wamr_config_cmake_file" ]]; then + wamr_config_cmake_file=${sdk_root}/wamr_config_default.cmake + echo "use default config file: [$wamr_config_cmake_file]" + fi +fi if [ ! -d "${out_dir}" ]; then @@ -102,17 +110,17 @@ if [[ -n "$wamr_config_cmake_file" ]]; then else wamr_config_cmake_file=${out_dir}/wamr_config_${PROFILE}.cmake + # always rebuilt the sdk if user is not giving the config file + if [ -d ${curr_profile_dir} ]; then + rm -rf ${curr_profile_dir} + fi - if [[ "$MENUCONFIG" = "TRUE" ]]; then + if [[ "$MENUCONFIG" = "TRUE" ]] || [[ ! -f $wamr_config_cmake_file ]]; then echo "MENUCONFIG: [${wamr_config_cmake_file}]" ./menuconfig.sh -x ${wamr_config_cmake_file} [ $? -eq 0 ] || exit $? - - elif [[ -f $wamr_config_cmake_file ]]; then + else echo "use existing config file: [$wamr_config_cmake_file]" - else - wamr_config_cmake_file=${sdk_root}/wamr_config_default.cmake - echo "use default config file: [$wamr_config_cmake_file]" fi fi @@ -137,6 +145,11 @@ echo "############## Start to build wasm app sdk ###############" cd ${sdk_root}/app rm -fr build && mkdir build cd build + +out=`grep WAMR_BUILD_LIBC_WASI ${wamr_config_cmake_file} |grep 1` +if [ -n "$out" ]; then + LIBC_SUPPORT="WASI" +fi if [ "${LIBC_SUPPORT}" = "WASI" ]; then echo "using wasi toolchain" cmake .. $CMAKE_DEXTRA_SDK_INCLUDE_PATH -DWAMR_BUILD_SDK_PROFILE=${PROFILE} -DCONFIG_PATH=${wamr_config_cmake_file} -DCMAKE_TOOLCHAIN_FILE=../wasi_toolchain.cmake @@ -145,8 +158,8 @@ else cmake .. $CMAKE_DEXTRA_SDK_INCLUDE_PATH -DWAMR_BUILD_SDK_PROFILE=${PROFILE} -DCONFIG_PATH=${wamr_config_cmake_file} -DCMAKE_TOOLCHAIN_FILE=../wamr_toolchain.cmake fi [ $? -eq 0 ] || exit $? -make +make if (( $? == 0 )); then echo -e "\033[32mSuccessfully built app-sdk under ${curr_profile_dir}/app-sdk\033[0m" else @@ -156,8 +169,10 @@ fi cd .. rm -fr build - echo -e "\n\n" + + + echo "############## Start to build runtime sdk ###############" cd ${sdk_root}/runtime rm -fr build_runtime_sdk && mkdir build_runtime_sdk @@ -173,21 +188,15 @@ else exit 1 fi -cd .. -rm -fr build_runtime_sdk - -if [ "$APP" = "TRUE" ]; then +APP=`grep WAMR_BUILD_APP_FRAMEWORK ${wamr_config_cmake_file} |grep 1` +if [ -n "$APP" ]; then # Generate defined-symbol list for app-sdk cd ${wamr_app_out_dir}/share cat ${curr_profile_dir}/runtime-sdk/include/*.inl | egrep "^ *EXPORT_WASM_API *[(] *[a-zA-Z_][a-zA-Z0-9_]* *?[)]" | cut -d '(' -f2 | cut -d ')' -f1 > defined-symbols.txt - echo "wasm_register_resource" >> defined-symbols.txt - echo "wasm_response_send" >> defined-symbols.txt - echo "wasm_post_request" >> defined-symbols.txt - echo "wasm_sub_event" >> defined-symbols.txt - echo "wasm_create_timer" >> defined-symbols.txt - echo "wasm_timer_destroy" >> defined-symbols.txt - echo "wasm_timer_cancel" >> defined-symbols.txt - echo "wasm_timer_restart" >> defined-symbols.txt - echo "wasm_get_sys_tick_ms" >> defined-symbols.txt fi + +cd .. +rm -fr build_runtime_sdk + +exit 0 From ccdba48d300f743c2cd248bfe58eb60f8d562498 Mon Sep 17 00:00:00 2001 From: Xu Jun <693788454@qq.com> Date: Fri, 21 Feb 2020 23:03:58 +0800 Subject: [PATCH 05/15] update menuconfig.sh --- core/app-framework/wgl/app/wasm_app.cmake | 4 + wamr-sdk/Kconfig | 33 ++----- wamr-sdk/build_sdk.sh | 28 +++++- wamr-sdk/menuconfig.sh | 112 ++++++++-------------- 4 files changed, 74 insertions(+), 103 deletions(-) diff --git a/core/app-framework/wgl/app/wasm_app.cmake b/core/app-framework/wgl/app/wasm_app.cmake index e64566378..f01be9ff6 100644 --- a/core/app-framework/wgl/app/wasm_app.cmake +++ b/core/app-framework/wgl/app/wasm_app.cmake @@ -5,6 +5,10 @@ set (WASM_APP_GUI_DIR ${CMAKE_CURRENT_LIST_DIR}) set (DEPS_DIR ${WASM_APP_GUI_DIR}/../../../deps) +if (NOT EXISTS "${DEPS_DIR}/lvgl") + message (FATAL_ERROR "Can not find third party dependency: ${DEPS_DIR}/lvgl") +endif () + include_directories(${WASM_APP_GUI_DIR} ${DEPS_DIR} ${DEPS_DIR}/lvgl diff --git a/wamr-sdk/Kconfig b/wamr-sdk/Kconfig index c39584272..96c23a83c 100644 --- a/wamr-sdk/Kconfig +++ b/wamr-sdk/Kconfig @@ -1,12 +1,5 @@ mainmenu "WebAssembly Micro Runtime Configuration" -config WAMR_SDK_PROFILE - string "wamr SDK profile name" - default "default" - help - create a new SDK by giving a name or overwrite - the "default" profile - choice prompt "select a build target" @@ -64,9 +57,7 @@ choice endchoice - - -choice +choice prompt "application framework" config APP_FRAMEWORK_DISABLE bool "Disable app framework" @@ -77,29 +68,17 @@ choice bool "Default components" help Default components - - config TRI_CHOICE_SYM_2 - tristate "Tristate choice sym 2" - config APP_BUILD_CUSTOM + config APP_FRAMEWORK_ALL + bool "All components" + + config APP_FRAMEWORK_CUSTOM bool "customized module config" menu "modules:" - depends on APP_BUILD_CUSTOM + depends on APP_FRAMEWORK_CUSTOM source ".wamr_modules" endmenu endchoice - -config EXTRA_INCLUDE_ENABLE - bool "enable extra include dir" - -config EXTRA_INCLUDE_PATH - string "external include path" - depends on EXTRA_INCLUDE_ENABLE - help - Pass external include path to be added in the SDK - This is useful when your app modules need some external - header files, such as the wgl modules which need some config - file when building the runtime library \ No newline at end of file diff --git a/wamr-sdk/build_sdk.sh b/wamr-sdk/build_sdk.sh index 6a64d331e..3f0644452 100755 --- a/wamr-sdk/build_sdk.sh +++ b/wamr-sdk/build_sdk.sh @@ -95,7 +95,7 @@ fi # cmake config file for wamr runtime: # 1. use the users provided the config cmake file path. -# 2. if user set MENU CONFIG, enter menu config to generate +# 2. if user set MENU CONFIG, enter menu config to generate # menu_config.cmake in the profile output folder # 3. If the menu_config.cmake is already in the profile folder, use it # 4. Use the default config cmake file @@ -105,16 +105,16 @@ if [[ -n "$wamr_config_cmake_file" ]]; then echo "user given file not exist: ${wamr_config_cmake_file}" exit 1 fi - + echo "User config file: [${wamr_config_cmake_file}]" - + else wamr_config_cmake_file=${out_dir}/wamr_config_${PROFILE}.cmake - # always rebuilt the sdk if user is not giving the config file + # always rebuilt the sdk if user is not giving the config file if [ -d ${curr_profile_dir} ]; then rm -rf ${curr_profile_dir} fi - + if [[ "$MENUCONFIG" = "TRUE" ]] || [[ ! -f $wamr_config_cmake_file ]]; then echo "MENUCONFIG: [${wamr_config_cmake_file}]" ./menuconfig.sh -x ${wamr_config_cmake_file} @@ -146,6 +146,24 @@ cd ${sdk_root}/app rm -fr build && mkdir build cd build +# If wgl module is selected, check if the extra SDK include dir is passed by the args, prompt user to input if not. +app_all_selected=`cat ${wamr_config_cmake_file} | grep WAMR_APP_BUILD_ALL` +app_wgl_selected=`cat ${wamr_config_cmake_file} | grep WAMR_APP_BUILD_WGL` + +if [[ -n "${app_wgl_selected}" ]] || [[ -n "${app_all_selected}" ]]; then + if [ -z "${CMAKE_DEXTRA_SDK_INCLUDE_PATH}" ]; then + echo -e "\033[31mWGL module require lvgl config files, please input the path to the lvgl SDK include path:\033[0m" + read -a extra_file_path + + if [[ -z "${extra_file_path}" ]] || [[ ! -d "${extra_file_path}" ]]; then + echo -e "\033[31mThe extra SDK path is invalid, exiting\033[0m" + exit 1 + else + CMAKE_DEXTRA_SDK_INCLUDE_PATH="-DEXTRA_SDK_INCLUDE_PATH=${extra_file_path}" + fi + fi +fi + out=`grep WAMR_BUILD_LIBC_WASI ${wamr_config_cmake_file} |grep 1` if [ -n "$out" ]; then LIBC_SUPPORT="WASI" diff --git a/wamr-sdk/menuconfig.sh b/wamr-sdk/menuconfig.sh index 85e49f0c8..d8499d74c 100755 --- a/wamr-sdk/menuconfig.sh +++ b/wamr-sdk/menuconfig.sh @@ -146,104 +146,74 @@ if [ ! -e ".config" ]; then exit 0 fi - -args="" -function args_add_bool() -{ - args="${args} -$1" -} - -function args_add_one() -{ - args="${args} -$1 $2" -} - -function args_add_array() -{ - args="${args} -$1 ${2#,}" -} - -source .config - -profile=`cat .config | grep "^CONFIG_WAMR_SDK_PROFILE"` -profile=${profile#CONFIG_WAMR_SDK_PROFILE=\"} -profile=${profile%*\"} -args_add_one n ${profile} - +# parse platform platform=`cat .config | grep "^CONFIG_PLATFORM"` platform=${platform%*=y} platform=${platform,,} platform=${platform#config_platform_} -if [ -n "${platform}" ]; then - args_add_one p ${platform#config_platform_} -fi +# parse target target=`cat .config | grep "^CONFIG_TARGET"` target=${target%*=y} target=${target#CONFIG_TARGET_} -if [ -n "${target}" ]; then - args_add_one t ${target#CONFIG_TARGET_} -fi - +# parse execution mode modes=`cat .config | grep "^CONFIG_EXEC"` -arg_mode="" +mode_list="" for mode in ${modes} do mode=${mode%*=y} mode=${mode#CONFIG_EXEC_} - arg_mode="${arg_mode},${mode,,}" + mode_list="${mode_list} ${mode,,}" done -if [ -z "${arg_mode}" ]; then +if [ -z "${mode_list}" ]; then echo "execution mode are not selected" exit 1 fi -args_add_array m "${arg_mode}" +# parse libc support libc=`cat .config | grep "^CONFIG_LIBC"` libc=${libc%*=y} if [ "${libc}" = "CONFIG_LIBC_WASI" ]; then - args_add_bool w + libc_support="WASI" +else + libc_support="BUILTIN" fi -app_en=`cat .config | grep "^CONFIG_APP_FRAMEWORK"` -app_en=${app_en%*=y} -app_en=${app_en,,} -if [ -n "${app_en}" ]; then - args_add_bool a +# parse application framework options +app_option=`cat .config | grep "^CONFIG_APP_FRAMEWORK"` +app_option=${app_option%*=y} +app_option=${app_option#CONFIG_APP_FRAMEWORK_} + +if [ "${app_option}" != "DISABLE" ]; then + app_enable="TRUE" + + # Default components + if [ "${app_option}" = "DEFAULT" ]; then + app_list="base connection sensor" + # All components + elif [ "${app_option}" = "ALL" ]; then + app_list="all" + # Customize + elif [ "${app_option}" = "CUSTOM" ]; then + app_option=`cat .config | grep "^CONFIG_APP_BUILD"` + app_list="base" + for app in ${app_option} + do + app=${app%*=y} + app=${app#CONFIG_APP_BUILD_} + app_list="${app_list} ${app,,}" + done + fi fi -apps=`cat .config | grep "^CONFIG_APP_BUILD"` -arg_app="" -for app in ${apps} -do - app=${app%*=y} - app=${app#CONFIG_APP_BUILD_} - arg_app="${arg_app},${app,,}" -done - -if [ -n "${app_en}" ]; then - arg_app="${arg_app},base" - args_add_array l "${arg_app}" -fi - -extra_path=`cat .config | grep "^CONFIG_EXTRA_INCLUDE_PATH"` -if [ -n "${extra_path}" ]; then - extra_path=${extra_path#CONFIG_EXTRA_INCLUDE_PATH=\"} - extra_path=${extra_path%*\"} - args_add_one e ${extra_path} -fi - -args="-g ${args}" - - if [[ -f $wamr_config_cmake_file ]]; then rm $wamr_config_cmake_file fi -set_build_target ${TARGET} -set_build_platform ${PLATFORM} -set_exec_mode "${MODES[*]}" -set_libc_support ${LIBC_SUPPORT} -set_app_module "${APP_LIST[*]}" -set_app_framework ${APP} +set_build_target ${target} +set_build_platform ${platform} +set_exec_mode "${mode_list[*]}" +set_libc_support ${libc_support} +set_app_module "${app_list[*]}" +set_app_framework ${app_enable} From 983209854c31f26c78be7f86c3b71628d4185000 Mon Sep 17 00:00:00 2001 From: Wang Xin Date: Sat, 22 Feb 2020 08:34:03 +0800 Subject: [PATCH 06/15] rename the api header files --- .../app-native-shared/native_interface.h | 94 ------------------- .../base/native/base_lib_export.c | 4 +- .../base/native/base_lib_export.h | 13 --- core/app-framework/base/native/req_resp_api.h | 32 ------- .../base/native/req_resp_native_api.h | 36 +++++++ core/app-framework/base/native/timer_api.h | 37 -------- .../base/native/timer_native_api.h | 43 +++++++++ .../app-framework/base/native/timer_wrapper.c | 1 + .../connection/native/connection_api.h | 32 ------- .../connection/native/connection_native_api.h | 41 ++++++++ .../connection/native/connection_wrapper.c | 2 + core/app-framework/sensor/app/sensor.c | 1 + .../sensor/native/runtime_sensor.h | 17 +--- core/app-framework/sensor/native/sensor_api.h | 32 ------- .../sensor/native/sensor_mgr_ref.c | 36 +++---- .../sensor/native/sensor_native_api.h | 37 ++++++++ core/app-framework/wgl/native/gui_api.h | 36 ------- .../app-framework/wgl/native/gui_native_api.h | 46 +++++++++ .../gui/wasm-runtime-wgl/src/ext_lib_export.c | 6 +- .../vgl-wasm-runtime/src/ext_lib_export.c | 4 +- samples/simple/src/ext_lib_export.c | 6 +- samples/simple/src/iwasm_main.c | 42 ++++++++- 22 files changed, 278 insertions(+), 320 deletions(-) delete mode 100644 core/app-framework/base/native/base_lib_export.h delete mode 100644 core/app-framework/base/native/req_resp_api.h create mode 100644 core/app-framework/base/native/req_resp_native_api.h delete mode 100644 core/app-framework/base/native/timer_api.h create mode 100644 core/app-framework/base/native/timer_native_api.h delete mode 100644 core/app-framework/connection/native/connection_api.h create mode 100644 core/app-framework/connection/native/connection_native_api.h delete mode 100644 core/app-framework/sensor/native/sensor_api.h create mode 100644 core/app-framework/sensor/native/sensor_native_api.h delete mode 100644 core/app-framework/wgl/native/gui_api.h create mode 100644 core/app-framework/wgl/native/gui_native_api.h diff --git a/core/app-framework/app-native-shared/native_interface.h b/core/app-framework/app-native-shared/native_interface.h index cb7e7e963..0c094267a 100644 --- a/core/app-framework/app-native-shared/native_interface.h +++ b/core/app-framework/app-native-shared/native_interface.h @@ -34,100 +34,6 @@ /*char *wa_strdup(const char *);*/ -/* - * request/response interfaces - */ - -bool -wasm_response_send(wasm_exec_env_t exec_env, - int32 buffer_offset, int size); -void -wasm_register_resource(wasm_exec_env_t exec_env, - int32 url_offset); -void -wasm_post_request(wasm_exec_env_t exec_env, - int32 buffer_offset, int size); -void -wasm_sub_event(wasm_exec_env_t exec_env, - int32 url_offset); - -/* - * sensor interfaces - */ - -bool -wasm_sensor_config(wasm_exec_env_t exec_env, - uint32 sensor, int interval, int bit_cfg, int delay); -uint32 -wasm_sensor_open(wasm_exec_env_t exec_env, - int32 name_offset, int instance); -bool -wasm_sensor_config_with_attr_container(wasm_exec_env_t exec_env, - uint32 sensor, - int32 buffer_offset, int len); -bool -wasm_sensor_close(wasm_exec_env_t exec_env, - uint32 sensor); - -/* - * timer interfaces - */ - -typedef unsigned int timer_id_t; - -timer_id_t -wasm_create_timer(wasm_exec_env_t exec_env, - int interval, bool is_period, bool auto_start); -void -wasm_timer_destroy(wasm_exec_env_t exec_env, timer_id_t timer_id); -void -wasm_timer_cancel(wasm_exec_env_t exec_env, timer_id_t timer_id); -void -wasm_timer_restart(wasm_exec_env_t exec_env, - timer_id_t timer_id, int interval); -uint32 -wasm_get_sys_tick_ms(wasm_exec_env_t exec_env); - -/* - * connection interfaces - */ - -uint32 -wasm_open_connection(wasm_exec_env_t exec_env, - int32 name_offset, int32 args_offset, uint32 len); -void -wasm_close_connection(wasm_exec_env_t exec_env, - uint32 handle); -int -wasm_send_on_connection(wasm_exec_env_t exec_env, - uint32 handle, int32 data_offset, uint32 len); -bool -wasm_config_connection(wasm_exec_env_t exec_env, - uint32 handle, int32 cfg_offset, uint32 len); - -/** - * gui interfaces - */ - -void -wasm_obj_native_call(wasm_exec_env_t exec_env, - int32 func_id, uint32 argv_offset, uint32 argc); - -void -wasm_btn_native_call(wasm_exec_env_t exec_env, - int32 func_id, uint32 argv_offset, uint32 argc); - -void -wasm_label_native_call(wasm_exec_env_t exec_env, - int32 func_id, uint32 argv_offset, uint32 argc); - -void -wasm_cb_native_call(wasm_exec_env_t exec_env, - int32 func_id, uint32 argv_offset, uint32 argc); - -void -wasm_list_native_call(wasm_exec_env_t exec_env, - int32 func_id, uint32 argv_offset, uint32 argc); #endif /* end of _NATIVE_INTERFACE_H */ diff --git a/core/app-framework/base/native/base_lib_export.c b/core/app-framework/base/native/base_lib_export.c index 3c6d1d74c..ee90f1da9 100644 --- a/core/app-framework/base/native/base_lib_export.c +++ b/core/app-framework/base/native/base_lib_export.c @@ -7,7 +7,9 @@ #include #include #include "lib_export.h" -#include "base_lib_export.h" +#include "req_resp_native_api.h" +#include "timer_native_api.h" + static NativeSymbol extended_native_symbol_defs[] = { /* TODO: use macro EXPORT_WASM_API() or EXPORT_WASM_API2() to diff --git a/core/app-framework/base/native/base_lib_export.h b/core/app-framework/base/native/base_lib_export.h deleted file mode 100644 index d5f9f6267..000000000 --- a/core/app-framework/base/native/base_lib_export.h +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Copyright (C) 2019 Intel Corporation. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - */ - -#ifndef _BASE_LIB_EXPORT_H_ -#define _BASE_LIB_EXPORT_H_ - -#include "bi-inc/attr_container.h" -#include "native_interface.h" - -#endif /* end of _BASE_LIB_EXPORT_H_ */ - diff --git a/core/app-framework/base/native/req_resp_api.h b/core/app-framework/base/native/req_resp_api.h deleted file mode 100644 index fffa5131d..000000000 --- a/core/app-framework/base/native/req_resp_api.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2019 Intel Corporation. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - */ - -#ifndef _REQ_RESP_API_H_ -#define _REQ_RESP_API_H_ - -#include "bh_platform.h" - -#ifdef __cplusplus -extern "C" { -#endif - -bool -wasm_response_send(int32 buf_offset, int size); - -void -wasm_register_resource(int32 url_offset); - -void -wasm_post_request(int32 buf_offset, int size); - -void -wasm_sub_event(int32 url_offset); - -#ifdef __cplusplus -} -#endif - -#endif /* end of _REQ_RESP_API_H_ */ - diff --git a/core/app-framework/base/native/req_resp_native_api.h b/core/app-framework/base/native/req_resp_native_api.h new file mode 100644 index 000000000..7e8592b89 --- /dev/null +++ b/core/app-framework/base/native/req_resp_native_api.h @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + */ + +#ifndef _REQ_RESP_API_H_ +#define _REQ_RESP_API_H_ + +#include "bh_platform.h" +#include "wasm_export.h" + +#ifdef __cplusplus +extern "C" { +#endif + +bool +wasm_response_send(wasm_exec_env_t exec_env, + int32 buffer_offset, int size); +void +wasm_register_resource(wasm_exec_env_t exec_env, + int32 url_offset); +void +wasm_post_request(wasm_exec_env_t exec_env, + int32 buffer_offset, int size); +void +wasm_sub_event(wasm_exec_env_t exec_env, + int32 url_offset); + + + +#ifdef __cplusplus +} +#endif + +#endif /* end of _REQ_RESP_API_H_ */ + diff --git a/core/app-framework/base/native/timer_api.h b/core/app-framework/base/native/timer_api.h deleted file mode 100644 index 0881bab95..000000000 --- a/core/app-framework/base/native/timer_api.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2019 Intel Corporation. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - */ - -#ifndef _TIMER_API_H_ -#define _TIMER_API_H_ - -#include "bh_platform.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef unsigned int timer_id_t; - -timer_id_t -wasm_create_timer(int interval, bool is_period, bool auto_start); - -void -wasm_timer_destroy(timer_id_t timer_id); - -void -wasm_timer_cancel(timer_id_t timer_id); - -void -wasm_timer_restart(timer_id_t timer_id, int interval); - -uint32 -wasm_get_sys_tick_ms(void); - -#ifdef __cplusplus -} -#endif - -#endif /* end of _TIMER_API_H_ */ - diff --git a/core/app-framework/base/native/timer_native_api.h b/core/app-framework/base/native/timer_native_api.h new file mode 100644 index 000000000..4d1f58786 --- /dev/null +++ b/core/app-framework/base/native/timer_native_api.h @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + */ + +#ifndef _TIMER_API_H_ +#define _TIMER_API_H_ + +#include "bh_platform.h" +#include "wasm_export.h" + + +#ifdef __cplusplus +extern "C" { +#endif + +typedef unsigned int timer_id_t; + +/* + * timer interfaces + */ + +typedef unsigned int timer_id_t; + +timer_id_t +wasm_create_timer(wasm_exec_env_t exec_env, + int interval, bool is_period, bool auto_start); +void +wasm_timer_destroy(wasm_exec_env_t exec_env, timer_id_t timer_id); +void +wasm_timer_cancel(wasm_exec_env_t exec_env, timer_id_t timer_id); +void +wasm_timer_restart(wasm_exec_env_t exec_env, + timer_id_t timer_id, int interval); +uint32 +wasm_get_sys_tick_ms(wasm_exec_env_t exec_env); + +#ifdef __cplusplus +} +#endif + +#endif /* end of _TIMER_API_H_ */ + diff --git a/core/app-framework/base/native/timer_wrapper.c b/core/app-framework/base/native/timer_wrapper.c index 9ba3628ed..ba5db9e81 100644 --- a/core/app-framework/base/native/timer_wrapper.c +++ b/core/app-framework/base/native/timer_wrapper.c @@ -9,6 +9,7 @@ #include "bh_list.h" #include "bh_thread.h" #include "bh_time.h" +#include "timer_native_api.h" static bool timer_thread_run = true; diff --git a/core/app-framework/connection/native/connection_api.h b/core/app-framework/connection/native/connection_api.h deleted file mode 100644 index 7d8ef5986..000000000 --- a/core/app-framework/connection/native/connection_api.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2019 Intel Corporation. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - */ - -#ifndef CONNECTION_API_H_ -#define CONNECTION_API_H_ - -#include "bh_platform.h" - -#ifdef __cplusplus -extern "C" { -#endif - -uint32 -wasm_open_connection(int32 name_offset, int32 args_buf_offset, uint32 args_buf_len); - -void -wasm_close_connection(uint32 handle); - -int -wasm_send_on_connection(uint32 handle, int32 data_offset, uint32 data_len); - -bool -wasm_config_connection(uint32 handle, int32 cfg_buf_offset, uint32 cfg_buf_len); - -#ifdef __cplusplus -} -#endif - - -#endif /* end of CONNECTION_API_H_ */ diff --git a/core/app-framework/connection/native/connection_native_api.h b/core/app-framework/connection/native/connection_native_api.h new file mode 100644 index 000000000..3b4fcaa54 --- /dev/null +++ b/core/app-framework/connection/native/connection_native_api.h @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + */ + +#ifndef CONNECTION_API_H_ +#define CONNECTION_API_H_ + +#include "bh_platform.h" +#include "wasm_export.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +/* + * connection interfaces + */ + +uint32 +wasm_open_connection(wasm_exec_env_t exec_env, + int32 name_offset, int32 args_offset, uint32 len); +void +wasm_close_connection(wasm_exec_env_t exec_env, + uint32 handle); +int +wasm_send_on_connection(wasm_exec_env_t exec_env, + uint32 handle, int32 data_offset, uint32 len); +bool +wasm_config_connection(wasm_exec_env_t exec_env, + uint32 handle, int32 cfg_offset, uint32 len); + + + +#ifdef __cplusplus +} +#endif + + +#endif /* end of CONNECTION_API_H_ */ diff --git a/core/app-framework/connection/native/connection_wrapper.c b/core/app-framework/connection/native/connection_wrapper.c index d817bc4f1..b60a24988 100644 --- a/core/app-framework/connection/native/connection_wrapper.c +++ b/core/app-framework/connection/native/connection_wrapper.c @@ -6,6 +6,8 @@ #include "connection_lib.h" #include "wasm_export.h" #include "native_interface.h" +#include "connection_native_api.h" + /* Note: * diff --git a/core/app-framework/sensor/app/sensor.c b/core/app-framework/sensor/app/sensor.c index 8427af4ef..2af23fafb 100644 --- a/core/app-framework/sensor/app/sensor.c +++ b/core/app-framework/sensor/app/sensor.c @@ -4,6 +4,7 @@ */ #include "wa-inc/sensor.h" + #include "sensor_api.h" typedef struct _sensor { diff --git a/core/app-framework/sensor/native/runtime_sensor.h b/core/app-framework/sensor/native/runtime_sensor.h index 03ce65c0f..8154d6d91 100644 --- a/core/app-framework/sensor/native/runtime_sensor.h +++ b/core/app-framework/sensor/native/runtime_sensor.h @@ -9,6 +9,7 @@ #include "bh_platform.h" #include "bi-inc/attr_container.h" #include "wasm_export.h" +#include "sensor_native_api.h" struct _sys_sensor; typedef struct _sys_sensor* sensor_obj_t; @@ -50,20 +51,10 @@ void sensor_cleanup_callback(uint32 module_id); int check_sensor_timers(); void reschedule_sensor_read(); -uint32 -wasm_sensor_open(wasm_exec_env_t exec_env, - int32 name_offset, int instance); +void init_sensor_framework(); +void start_sensor_framework(); +void exit_sensor_framework(); -bool -wasm_sensor_config(wasm_exec_env_t exec_env, - uint32 sensor, int interval, int bit_cfg, int delay); -bool -wasm_sensor_config_with_attr_container(wasm_exec_env_t exec_env, - uint32 sensor, int32 buffer_offset, - int len); - -bool -wasm_sensor_close(wasm_exec_env_t exec_env, uint32 sensor); #endif /* LIB_EXTENSION_RUNTIME_SENSOR_H_ */ diff --git a/core/app-framework/sensor/native/sensor_api.h b/core/app-framework/sensor/native/sensor_api.h deleted file mode 100644 index 0546ecf49..000000000 --- a/core/app-framework/sensor/native/sensor_api.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2019 Intel Corporation. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - */ - -#ifndef _SENSOR_API_H_ -#define _SENSOR_API_H_ - -#include "bh_platform.h" - -#ifdef __cplusplus -extern "C" { -#endif - -uint32 -wasm_sensor_open(int32 name_offset, int instance); - -bool -wasm_sensor_config(uint32 sensor, int interval, int bit_cfg, int delay); - -bool -wasm_sensor_config_with_attr_container(uint32 sensor, int32 buffer_offset, int len); - -bool -wasm_sensor_close(uint32 sensor); - -#ifdef __cplusplus -} -#endif - -#endif /* end of _SENSOR_API_H_ */ - diff --git a/core/app-framework/sensor/native/sensor_mgr_ref.c b/core/app-framework/sensor/native/sensor_mgr_ref.c index b31c696b2..9166947e8 100644 --- a/core/app-framework/sensor/native/sensor_mgr_ref.c +++ b/core/app-framework/sensor/native/sensor_mgr_ref.c @@ -84,21 +84,6 @@ void app_mgr_sensor_event_callback(module_data *m_data, bh_message_t msg) } } -static attr_container_t * read_test_sensor(void * sensor) -{ - //luc: for test - attr_container_t *attr_obj = attr_container_create("read test sensor data"); - if (attr_obj) { - attr_container_set_string(&attr_obj, "name", "read test sensor"); - return attr_obj; - } - return NULL; -} - -static bool config_test_sensor(void * s, void * config) -{ - return false; -} static void thread_sensor_check(void * arg) { @@ -122,13 +107,9 @@ void set_sensor_reshceduler(void (*callback)()); void init_sensor_framework() { // init the mutext and conditions - korp_thread tid; vm_cond_init(&cond); vm_mutex_init(&mutex); - // add the sys sensor objects - add_sys_sensor("sensor_test", "This is a sensor for test", 0, 1000, - read_test_sensor, config_test_sensor); set_sensor_reshceduler(cb_wakeup_thread); @@ -137,12 +118,25 @@ void init_sensor_framework() wasm_register_cleanup_callback(sensor_cleanup_callback); - vm_thread_create(&tid, (void *)thread_sensor_check, NULL, - BH_APPLET_PRESERVED_STACK_SIZE); + } +void start_sensor_framework() +{ + korp_thread tid; + + vm_thread_create(&tid, + (void *)thread_sensor_check, + NULL, + BH_APPLET_PRESERVED_STACK_SIZE); +} + + void exit_sensor_framework() { sensor_check_thread_run = false; + reschedule_sensor_read(); + + //todo: wait the sensor thread termination } diff --git a/core/app-framework/sensor/native/sensor_native_api.h b/core/app-framework/sensor/native/sensor_native_api.h new file mode 100644 index 000000000..5cc8ad836 --- /dev/null +++ b/core/app-framework/sensor/native/sensor_native_api.h @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + */ + +#ifndef _SENSOR_NATIVE_API_H_ +#define _SENSOR_NATIVE_API_H_ + +#include "bh_platform.h" +#include "wasm_export.h" + +#ifdef __cplusplus +extern "C" { +#endif + +bool +wasm_sensor_config(wasm_exec_env_t exec_env, + uint32 sensor, int interval, + int bit_cfg, int delay); +uint32 +wasm_sensor_open(wasm_exec_env_t exec_env, + int32 name_offset, int instance); + +bool +wasm_sensor_config_with_attr_container(wasm_exec_env_t exec_env, + uint32 sensor, int32 buffer_offset, + int len); + +bool +wasm_sensor_close(wasm_exec_env_t exec_env, uint32 sensor); + +#ifdef __cplusplus +} +#endif + +#endif /* end of _SENSOR_NATIVE_API_H_ */ + diff --git a/core/app-framework/wgl/native/gui_api.h b/core/app-framework/wgl/native/gui_api.h deleted file mode 100644 index 65ff587a2..000000000 --- a/core/app-framework/wgl/native/gui_api.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2019 Intel Corporation. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - */ - -#ifndef _GUI_API_H_ -#define _GUI_API_H_ - -#include "bh_platform.h" - -#ifdef __cplusplus -extern "C" { -#endif - -void -wasm_obj_native_call(int32 func_id, int32 argv_offset, uint32 argc); - -void -wasm_btn_native_call(int32 func_id, int32 argv_offset, uint32 argc); - -void -wasm_label_native_call(int32 func_id, int32 argv_offset, uint32 argc); - -void -wasm_cb_native_call(int32 func_id, int32 argv_offset, uint32 argc); - -void -wasm_list_native_call(int32 func_id, int32 argv_offset, uint32 argc); - - -#ifdef __cplusplus -} -#endif - - -#endif /* end of _GUI_API_H_ */ diff --git a/core/app-framework/wgl/native/gui_native_api.h b/core/app-framework/wgl/native/gui_native_api.h new file mode 100644 index 000000000..57d987104 --- /dev/null +++ b/core/app-framework/wgl/native/gui_native_api.h @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + */ + +#ifndef _GUI_API_H_ +#define _GUI_API_H_ + +#include "bh_platform.h" +#include "wasm_export.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +/** + * gui interfaces + */ + +void +wasm_obj_native_call(wasm_exec_env_t exec_env, + int32 func_id, uint32 argv_offset, uint32 argc); + +void +wasm_btn_native_call(wasm_exec_env_t exec_env, + int32 func_id, uint32 argv_offset, uint32 argc); + +void +wasm_label_native_call(wasm_exec_env_t exec_env, + int32 func_id, uint32 argv_offset, uint32 argc); + +void +wasm_cb_native_call(wasm_exec_env_t exec_env, + int32 func_id, uint32 argv_offset, uint32 argc); + +void +wasm_list_native_call(wasm_exec_env_t exec_env, + int32 func_id, uint32 argv_offset, uint32 argc); + +#ifdef __cplusplus +} +#endif + + +#endif /* end of _GUI_API_H_ */ diff --git a/samples/gui/wasm-runtime-wgl/src/ext_lib_export.c b/samples/gui/wasm-runtime-wgl/src/ext_lib_export.c index 4f696f0ad..0058f9908 100644 --- a/samples/gui/wasm-runtime-wgl/src/ext_lib_export.c +++ b/samples/gui/wasm-runtime-wgl/src/ext_lib_export.c @@ -1,7 +1,7 @@ #include "lib_export.h" -#include "sensor_api.h" -#include "connection_api.h" -#include "gui_api.h" +#include "sensor_native_api.h" +#include "connection_native_api.h" +#include "gui_native_api.h" static NativeSymbol extended_native_symbol_defs[] = { #include "runtime_sensor.inl" diff --git a/samples/littlevgl/vgl-wasm-runtime/src/ext_lib_export.c b/samples/littlevgl/vgl-wasm-runtime/src/ext_lib_export.c index 0f68dd860..8262770b4 100644 --- a/samples/littlevgl/vgl-wasm-runtime/src/ext_lib_export.c +++ b/samples/littlevgl/vgl-wasm-runtime/src/ext_lib_export.c @@ -1,6 +1,6 @@ #include "lib_export.h" -#include "sensor_api.h" -#include "connection_api.h" +#include "sensor_native_api.h" +#include "connection_native_api.h" #include "display_indev.h" static NativeSymbol extended_native_symbol_defs[] = { diff --git a/samples/simple/src/ext_lib_export.c b/samples/simple/src/ext_lib_export.c index 4a5750b26..b3868bb7e 100644 --- a/samples/simple/src/ext_lib_export.c +++ b/samples/simple/src/ext_lib_export.c @@ -1,6 +1,8 @@ #include "lib_export.h" -#include "sensor_api.h" -#include "connection_api.h" +#include "sensor_native_api.h" +#include "timer_native_api.h" +#include "req_resp_native_api.h" +#include "connection_native_api.h" static NativeSymbol extended_native_symbol_defs[] = { #include "runtime_sensor.inl" diff --git a/samples/simple/src/iwasm_main.c b/samples/simple/src/iwasm_main.c index ee808e4cc..06c2704c6 100644 --- a/samples/simple/src/iwasm_main.c +++ b/samples/simple/src/iwasm_main.c @@ -354,6 +354,25 @@ static host_interface interface = { .send = uart_send, .destroy = uart_destroy } #endif + + +static attr_container_t * read_test_sensor(void * sensor) +{ + //luc: for test + attr_container_t *attr_obj = attr_container_create("read test sensor data"); + if (attr_obj) { + attr_container_set_string(&attr_obj, "name", "read test sensor"); + return attr_obj; + } + return NULL; +} + +static bool config_test_sensor(void * s, void * config) +{ + return false; +} + + static char global_heap_buf[1024 * 1024] = { 0 }; static void showUsage() @@ -458,15 +477,34 @@ int iwasm_main(int argc, char *argv[]) goto fail1; } + // + // timer manager + // + init_wasm_timer(); + + + // + // connection framework + // if (!init_connection_framework()) { vm_thread_sys_destroy(); goto fail1; } + // + // sensor framework + // init_sensor_framework(); + // add the sys sensor objects + add_sys_sensor("sensor_test", + "This is a sensor for test", + 0, + 1000, + read_test_sensor, + config_test_sensor); + start_sensor_framework(); + - // timer manager - init_wasm_timer(); #ifndef CONNECTION_UART if (server_mode) From f663f44bd7f96cc34705d2e2f6b89ecc07f0db0f Mon Sep 17 00:00:00 2001 From: Wang Xin Date: Sat, 22 Feb 2020 08:44:51 +0800 Subject: [PATCH 07/15] read and snapshot update --- README.md | 4 ++-- doc/pics/wamr_menu_config.png | Bin 59330 -> 19135 bytes 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7db0c50ec..f426eb1f3 100644 --- a/README.md +++ b/README.md @@ -114,7 +114,7 @@ Menu configuration is supported for easy integration of runtime components and a ``` cd wamr-sdk -./menuconfig.sh +./build_sdk.sh -i -n [profile name] ``` wamr build menu configuration @@ -141,7 +141,7 @@ simple/ └── lib ``` -The tool **build_sdk.sh** can be also directly executed by passing the configuration arguments, which is how each WAMR sample project builds the WAMR SDK for its own building profile. + ### Use Runtime SDK diff --git a/doc/pics/wamr_menu_config.png b/doc/pics/wamr_menu_config.png index 82762aa3b05165c1507be5e0f620f162fadbfc64..c85409584e929db8b16ab66237e5f7833269efa7 100644 GIT binary patch literal 19135 zcmZ_0b9AOZ)CKy~wvCzEw(Y5H+jcvh+P0?c)V6KT)V6Kk{=RSByVlh|ub!-&^R88qtp?AS2t?I*kO&$mNdW!rBuc7;CZ_nLfH{Zm}0)C^6HUv>uEvlE) zdNR^${5-TvmVApfC7qJz&hcM$GlBb9`=FMbtp}L`(l#9}$Bz>Viw;1K;`=KFje-`# ztM67t(IZl#QJ0xS#+dv2jf^}R*>ua}2Tpv)Mq135!7zVDPGDZ~YB2>B?~eq-8LT`I z025?nTu@k0D8e0#B7ufNK!A~rOk&JLcF4qIII$OUoA{i^Q)j4vkZ~yTU-uAb9h&f0 zl`p_&Yq$zUII%u-`F0LMz5zNbXAIqI>(Zj~o#zi47tiBKjZE&t4`+$y2#8yy#-Z{V zO#D(qpn&;l{O0FK>0DFh*>?jU*NHfozvSO(G_W>W7!`MtEEUQ8RdSY;c@L_DNOLy_ z|MTZH5~TaFH0&y{S1JI%*AxygZN3TQP@*e1&aZOx#B0G721 z-5+!n|F?;t?ix1efW*kX7e{t^XVV63KnQ$H@)ls@Y7_(yXwhg9V0|L*hQLcBg9vIz zU+i%HbQaSAYBJA{-eLZm3Ku<^I_v;vC1UkA2)EG)6bSVFi%k%~q0e@y5FZl?sPV9A zc=`EN5ZZmq#xoAQXF+9i`{wO*N_)VN#0Mz*P%(vqNa|$jUIKs zh`^iym7^jmqHQ!HuqTwDcMd7~Rm*??CZucClE35fq+V!`l}el-k&7){i)?K zryaUsCrl3+1e^Z#g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zZ4iwgPV+(N3w>JNlYq>Xr0%X?MZ(@U{E9{f>;_cVI-U*g?f2{%<{%i{O;rcY|CP6k zUrdx7Mu|E{98~awf{iB{Kg+p6&3Lqa&ClLch`C*0@SeYCcd0jd>Y&_3Nh%~GuzUen zs)JULnICMS3v2y;$YWB<+K6sx{a Date: Sat, 22 Feb 2020 09:39:46 +0800 Subject: [PATCH 08/15] Update iwasm_main.c --- samples/simple/src/iwasm_main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/samples/simple/src/iwasm_main.c b/samples/simple/src/iwasm_main.c index 06c2704c6..e9b389d21 100644 --- a/samples/simple/src/iwasm_main.c +++ b/samples/simple/src/iwasm_main.c @@ -361,7 +361,11 @@ static attr_container_t * read_test_sensor(void * sensor) //luc: for test attr_container_t *attr_obj = attr_container_create("read test sensor data"); if (attr_obj) { - attr_container_set_string(&attr_obj, "name", "read test sensor"); + bool ret = attr_container_set_string(&attr_obj, "name", "read test sensor"); + if (!ret) { + attr_container_destroy(attr_obj); + return NULL; + } return attr_obj; } return NULL; From 90c7580283fe98f721d97190e17b30700f7ea5c6 Mon Sep 17 00:00:00 2001 From: Wang Xin Date: Sat, 22 Feb 2020 14:19:07 +0800 Subject: [PATCH 09/15] multiple profile for simple sample --- samples/simple/CMakeLists.txt | 7 +- samples/simple/README.md | 33 ++++++++- samples/simple/build.sh | 73 +++++++++++++++---- .../profiles/arm-interp/toolchain.cmake | 38 ++++++++++ .../arm-interp/wamr_config_simple.cmake | 9 +++ .../host-aot}/wamr_config_simple.cmake | 0 .../host-interp/wamr_config_simple.cmake | 9 +++ wamr-sdk/build_sdk.sh | 37 +++++++--- wamr-sdk/menuconfig.sh | 4 + 9 files changed, 181 insertions(+), 29 deletions(-) create mode 100644 samples/simple/profiles/arm-interp/toolchain.cmake create mode 100644 samples/simple/profiles/arm-interp/wamr_config_simple.cmake rename samples/simple/{ => profiles/host-aot}/wamr_config_simple.cmake (100%) create mode 100644 samples/simple/profiles/host-interp/wamr_config_simple.cmake diff --git a/samples/simple/CMakeLists.txt b/samples/simple/CMakeLists.txt index bb3224745..3d3e45f84 100644 --- a/samples/simple/CMakeLists.txt +++ b/samples/simple/CMakeLists.txt @@ -6,6 +6,7 @@ cmake_minimum_required (VERSION 2.8) project (simple) ################ wamr runtime settings ################ +message(STATUS "WAMR_BUILD_SDK_PROFILE=${WAMR_BUILD_SDK_PROFILE}") # Reset default linker flags set (CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") @@ -14,9 +15,9 @@ set (CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "") set (WAMR_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR}/../..) ## use library and headers in the SDK -link_directories(${WAMR_ROOT_DIR}/wamr-sdk/out/simple/runtime-sdk/lib) +link_directories(${WAMR_ROOT_DIR}/wamr-sdk/out/${WAMR_BUILD_SDK_PROFILE}/runtime-sdk/lib) include_directories( - ${WAMR_ROOT_DIR}/wamr-sdk/out/simple/runtime-sdk/include + ${WAMR_ROOT_DIR}/wamr-sdk/out/${WAMR_BUILD_SDK_PROFILE}/runtime-sdk/include ) ################ application related ################ @@ -27,6 +28,6 @@ include_directories(${CMAKE_CURRENT_LIST_DIR}/src) #add_definitions (-DCONNECTION_UART) add_executable (simple src/main.c src/iwasm_main.c src/ext_lib_export.c) -target_link_libraries (simple vmlib -lm -ldl -lpthread) +target_link_libraries (simple vmlib -lm -ldl -lpthread -lrt) diff --git a/samples/simple/README.md b/samples/simple/README.md index 4e00ec5f2..f7c9bad33 100644 --- a/samples/simple/README.md +++ b/samples/simple/README.md @@ -80,8 +80,37 @@ To run the UART based test, you have to set up a UART hardware connection betwee Build the sample ============== -Execute the build.sh script then all binaries including wasm application files would be generated in 'out' directory. -`./build.sh` +Execute the build.sh script then all binaries including wasm application files would be generated in 'out' directory. + +``` +$ ./build.sh +Enter build target profile (default=host-interp) --> +arm-interp +host-aot +host-interp +\>: + +``` + +Enter the profile name for starting your build. "host-***" profiles build the sample for executing on your development machine, and "arm-interp" profile will do cross building for ARM target platform. If "arm-interp" is entered, please ensure the ARM cross compiler toolchain is already installed in your development machine. Your should set *ARM_A7_COMPILER_DIR* and *ARM_A7_SDKTARGETSYSROOT* environment variable in your ~/.bashrc correctly. refer to the file [profiles/arm-interp/toolchain.cmake](./profiles/arm-interp/toolchain.cmake). + +``` +export ARM_A7_COMPILER_DIR="/home/beihai/cross-toolchains/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/bin" +export ARM_A7_SDKTARGETSYSROOT="/home/beihai/cross-toolchains/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/arm-linux-gnueabihf/libc" + +``` + +If you need to create additional profile for customizing your runtime, application framework or the target platforms, a new subfolder can be created under the *profiles* folder, and place your own version of "toolchain.cmake" and "wamr_config_simple.cmake" in it. + +``` +~/wamr/samples/simple/profiles$ ls +arm-interp host-aot host-interp +~/wamr/samples/simple/profiles$ ls arm-interp/ +toolchain.cmake wamr_config_simple.cmake + +``` + + diff --git a/samples/simple/build.sh b/samples/simple/build.sh index 53f679a18..27b610f8f 100755 --- a/samples/simple/build.sh +++ b/samples/simple/build.sh @@ -12,25 +12,27 @@ APP_LIB_SRC="${APP_FRAMEWORK_DIR}/base/app/*.c ${APP_FRAMEWORK_DIR}/sensor/app/* ${APP_FRAMEWORK_DIR}/connection/app/*.c ${NATIVE_LIBS}/*.c" WASM_APPS=${PWD}/wasm-apps CLEAN= +CM_BUILD_TYPE="-DCMAKE_BUILD_TYPE=Release" +CM_TOOLCHAIN="" usage () { echo "build.sh [options]" - echo " -p [platform]" - echo " -t [target]" + echo " -p [profile]" + echo " -d [target]" echo " -c, rebuild SDK" exit 1 } -while getopts "p:t:ch" opt +while getopts "p:dch" opt do case $opt in p) - PLATFORM=$OPTARG + PROFILE=$OPTARG ;; - t) - TARGET=$OPTARG + d) + CM_BUILD_TYPE="-DCMAKE_BUILD_TYPE=Debug" ;; c) CLEAN="TRUE" @@ -48,6 +50,41 @@ do done +if [ "$CLEAN" = "TRUE" ]; then + rm -rf $CURR_DIR/cmake_build +fi + + +while [ ! -n "$PROFILE" ] +do + support_profiles=`ls -l "profiles/" |grep '^d' | awk '{print $9}'` + read -p "Enter build target profile (default=host-interp) --> +$support_profiles +\>:" read_platform + if [ ! -n "$read_platform" ]; then + PROFILE="host-interp" + else + PROFILE=$read_platform + fi +done + +ARG_TOOLCHAIN="" +TOOL_CHAIN_FILE=$CURR_DIR/profiles/$PROFILE/toolchain.cmake +if [ -f $TOOL_CHAIN_FILE ]; then + CM_TOOLCHAIN="-DCMAKE_TOOLCHAIN_FILE=$TOOL_CHAIN_FILE" + ARG_TOOLCHAIN="-t $TOOL_CHAIN_FILE" + echo "toolchain file: $TOOL_CHAIN_FILE" +fi + + +SDK_CONFIG_FILE=$CURR_DIR/profiles/$PROFILE/wamr_config_simple.cmake +if [ ! -f $SDK_CONFIG_FILE ]; then + echo "SDK config file [$SDK_CONFIG_FILE] doesn't exit. quit.." + exit 1 +fi + + + rm -rf ${OUT_DIR} mkdir ${OUT_DIR} mkdir ${OUT_DIR}/wasm-apps @@ -57,15 +94,21 @@ if [ ! -d "tlsf" ]; then git clone https://github.com/mattconte/tlsf fi + +PROFILE="simple-$PROFILE" + + echo "#####################build wamr sdk" cd ${WAMR_DIR}/wamr-sdk -./build_sdk.sh -n simple -x ${CURR_DIR}/wamr_config_simple.cmake $* +./build_sdk.sh -n $PROFILE -x $SDK_CONFIG_FILE $ARG_TOOLCHAIN $* +[ $? -eq 0 ] || exit $? + echo "#####################build simple project" cd ${CURR_DIR} -mkdir -p cmake_build -cd cmake_build -cmake .. -DWAMR_BUILD_SDK_PROFILE=simple +mkdir -p cmake_build/$PROFILE +cd cmake_build/$PROFILE +cmake ../.. -DWAMR_BUILD_SDK_PROFILE=$PROFILE $CM_TOOLCHAIN $CM_BUILD_TYPE make if [ $? != 0 ];then echo "BUILD_FAIL simple exit as $?\n" @@ -79,7 +122,7 @@ echo "#####################build host-tool" cd ${WAMR_DIR}/test-tools/host-tool mkdir -p bin cd bin -cmake .. +cmake .. $CM_TOOLCHAIN $CM_BUILD_TYPE make if [ $? != 0 ];then echo "BUILD_FAIL host tool exit as $?\n" @@ -99,12 +142,12 @@ APP_SRC="$i" OUT_FILE=${i%.*}.wasm /opt/wasi-sdk/bin/clang \ - -I${WAMR_DIR}/wamr-sdk/out/simple/app-sdk/wamr-app-framework/include \ - -L${WAMR_DIR}/wamr-sdk/out/simple/app-sdk/wamr-app-framework/lib \ + -I${WAMR_DIR}/wamr-sdk/out/$PROFILE/app-sdk/wamr-app-framework/include \ + -L${WAMR_DIR}/wamr-sdk/out/$PROFILE/app-sdk/wamr-app-framework/lib \ -lapp_framework \ --target=wasm32 -O3 -z stack-size=4096 -Wl,--initial-memory=65536 \ - --sysroot=${WAMR_DIR}/wamr-sdk/out/simple/app-sdk/libc-builtin-sysroot \ - -Wl,--allow-undefined-file=${WAMR_DIR}/wamr-sdk/out/simple/app-sdk/libc-builtin-sysroot/share/defined-symbols.txt \ + --sysroot=${WAMR_DIR}/wamr-sdk/out/$PROFILE/app-sdk/libc-builtin-sysroot \ + -Wl,--allow-undefined-file=${WAMR_DIR}/wamr-sdk/out/$PROFILE/app-sdk/libc-builtin-sysroot/share/defined-symbols.txt \ -Wl,--no-threads,--strip-all,--no-entry -nostdlib \ -Wl,--export=on_init -Wl,--export=on_destroy \ -Wl,--export=on_request -Wl,--export=on_response \ diff --git a/samples/simple/profiles/arm-interp/toolchain.cmake b/samples/simple/profiles/arm-interp/toolchain.cmake new file mode 100644 index 000000000..2bd47b420 --- /dev/null +++ b/samples/simple/profiles/arm-interp/toolchain.cmake @@ -0,0 +1,38 @@ +INCLUDE(CMakeForceCompiler) + +SET(CMAKE_SYSTEM_NAME Linux) # this one is important +SET(CMAKE_SYSTEM_VERSION 1) # this one not so much + +message(STATUS "*** ARM A7 toolchain file ***") +set(CMAKE_VERBOSE_MAKEFILE ON) + +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_GNU_SOURCE") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GNU_SOURCE") + + +if (NOT $ENV{ARM_A7_COMPILER_DIR} STREQUAL "") + SET (toolchain_sdk_dir $ENV{ARM_A7_COMPILER_DIR}/) +endif () + +if (NOT $ENV{ARM_A7_SDKTARGETSYSROOT} STREQUAL "") + SET(SDKTARGETSYSROOT $ENV{ARM_A7_SDKTARGETSYSROOT}) + #SET(CMAKE_SYSROOT SDKTARGETSYSROOT) +endif () + +message(STATUS "SDKTARGETSYSROOT=${SDKTARGETSYSROOT}") +message(STATUS "toolchain_sdk_dir=${toolchain_sdk_dir}") + +SET(CMAKE_C_COMPILER ${toolchain_sdk_dir}arm-linux-gnueabihf-gcc) +SET(CMAKE_CXX_COMPILER ${toolchain_sdk_dir}arm-linux-gnueabihf-g++) + + +# this is the file system root of the target +SET(CMAKE_FIND_ROOT_PATH ${SDKTARGETSYSROOT}) + +# search for programs in the build host directories +SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) + +# for libraries and headers in the target directories +SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) + diff --git a/samples/simple/profiles/arm-interp/wamr_config_simple.cmake b/samples/simple/profiles/arm-interp/wamr_config_simple.cmake new file mode 100644 index 000000000..db33d5f60 --- /dev/null +++ b/samples/simple/profiles/arm-interp/wamr_config_simple.cmake @@ -0,0 +1,9 @@ +set (WAMR_BUILD_PLATFORM "linux") +set (WAMR_BUILD_TARGET ARM) +set (WAMR_BUILD_INTERP 1) +set (WAMR_BUILD_AOT 0) +set (WAMR_BUILD_JIT 0) +set (WAMR_BUILD_LIBC_BUILTIN 1) +set (WAMR_BUILD_LIBC_WASI 0) +set (WAMR_BUILD_APP_FRAMEWORK 1) +set (WAMR_BUILD_APP_LIST WAMR_APP_BUILD_BASE WAMR_APP_BUILD_CONNECTION WAMR_APP_BUILD_SENSOR) diff --git a/samples/simple/wamr_config_simple.cmake b/samples/simple/profiles/host-aot/wamr_config_simple.cmake similarity index 100% rename from samples/simple/wamr_config_simple.cmake rename to samples/simple/profiles/host-aot/wamr_config_simple.cmake diff --git a/samples/simple/profiles/host-interp/wamr_config_simple.cmake b/samples/simple/profiles/host-interp/wamr_config_simple.cmake new file mode 100644 index 000000000..a3317f037 --- /dev/null +++ b/samples/simple/profiles/host-interp/wamr_config_simple.cmake @@ -0,0 +1,9 @@ +set (WAMR_BUILD_PLATFORM "linux") +set (WAMR_BUILD_TARGET X86_64) +set (WAMR_BUILD_INTERP 1) +set (WAMR_BUILD_AOT 1) +set (WAMR_BUILD_JIT 0) +set (WAMR_BUILD_LIBC_BUILTIN 1) +set (WAMR_BUILD_LIBC_WASI 0) +set (WAMR_BUILD_APP_FRAMEWORK 1) +set (WAMR_BUILD_APP_LIST WAMR_APP_BUILD_BASE WAMR_APP_BUILD_CONNECTION WAMR_APP_BUILD_SENSOR) diff --git a/wamr-sdk/build_sdk.sh b/wamr-sdk/build_sdk.sh index 3f0644452..ff8a460ea 100755 --- a/wamr-sdk/build_sdk.sh +++ b/wamr-sdk/build_sdk.sh @@ -10,7 +10,9 @@ profile_path=${out_dir}/profile.cmake wamr_config_cmake_file="" # libc support, default builtin-libc LIBC_SUPPORT="BUILTIN" -CMAKE_DEXTRA_SDK_INCLUDE_PATH="" +CM_DEXTRA_SDK_INCLUDE_PATH="" +CM_BUILD_TYPE="-DCMAKE_BUILD_TYPE=Release" +CM_TOOLCHAIN="" # menuconfig will pass options to this script MENUCONFIG="" @@ -20,28 +22,36 @@ usage () echo "build.sh [options]" echo " -n [profile name]" echo " -x [config file path name]" + echo " -t [cmake toolchain file]" echo " -e [extra include path], files under this path will be copied into SDK package" echo " -c, clean" + echo " -d, debug mode" echo " -i, enter menu config settings" exit 1 } -while getopts "e:x:n:ic" opt +while getopts "e:x:n:t:icd" opt do case $opt in n) PROFILE=$OPTARG ;; + t) + CM_TOOLCHAIN="-DCMAKE_TOOLCHAIN_FILE=$OPTARG" + ;; x) wamr_config_cmake_file=$OPTARG ;; e) - CMAKE_DEXTRA_SDK_INCLUDE_PATH="-DEXTRA_SDK_INCLUDE_PATH=${OPTARG}" + CM_DEXTRA_SDK_INCLUDE_PATH="-DEXTRA_SDK_INCLUDE_PATH=${OPTARG}" ;; c) CLEAN="TRUE" ;; + d) + CM_BUILD_TYPE="-DCMAKE_BUILD_TYPE=Debug" + ;; i) MENUCONFIG="TRUE" ;; @@ -84,7 +94,7 @@ wamr_app_out_dir=${curr_profile_dir}/app-sdk/wamr-app-framework sysroot_dir=${curr_profile_dir}/app-sdk/libc-builtin-sysroot -echo "CMAKE_DEXTRA_SDK_INCLUDE_PATH=${CMAKE_DEXTRA_SDK_INCLUDE_PATH}" +echo "CM_DEXTRA_SDK_INCLUDE_PATH=${CM_DEXTRA_SDK_INCLUDE_PATH}" if [[ "$CLEAN" = "TRUE" ]]; then @@ -151,7 +161,7 @@ app_all_selected=`cat ${wamr_config_cmake_file} | grep WAMR_APP_BUILD_ALL` app_wgl_selected=`cat ${wamr_config_cmake_file} | grep WAMR_APP_BUILD_WGL` if [[ -n "${app_wgl_selected}" ]] || [[ -n "${app_all_selected}" ]]; then - if [ -z "${CMAKE_DEXTRA_SDK_INCLUDE_PATH}" ]; then + if [ -z "${CM_DEXTRA_SDK_INCLUDE_PATH}" ]; then echo -e "\033[31mWGL module require lvgl config files, please input the path to the lvgl SDK include path:\033[0m" read -a extra_file_path @@ -159,7 +169,7 @@ if [[ -n "${app_wgl_selected}" ]] || [[ -n "${app_all_selected}" ]]; then echo -e "\033[31mThe extra SDK path is invalid, exiting\033[0m" exit 1 else - CMAKE_DEXTRA_SDK_INCLUDE_PATH="-DEXTRA_SDK_INCLUDE_PATH=${extra_file_path}" + CM_DEXTRA_SDK_INCLUDE_PATH="-DEXTRA_SDK_INCLUDE_PATH=${extra_file_path}" fi fi fi @@ -170,10 +180,16 @@ if [ -n "$out" ]; then fi if [ "${LIBC_SUPPORT}" = "WASI" ]; then echo "using wasi toolchain" - cmake .. $CMAKE_DEXTRA_SDK_INCLUDE_PATH -DWAMR_BUILD_SDK_PROFILE=${PROFILE} -DCONFIG_PATH=${wamr_config_cmake_file} -DCMAKE_TOOLCHAIN_FILE=../wasi_toolchain.cmake + cmake .. $CM_DEXTRA_SDK_INCLUDE_PATH \ + -DWAMR_BUILD_SDK_PROFILE=${PROFILE} \ + -DCONFIG_PATH=${wamr_config_cmake_file} \ + -DCMAKE_TOOLCHAIN_FILE=../wasi_toolchain.cmake else echo "using builtin libc toolchain" - cmake .. $CMAKE_DEXTRA_SDK_INCLUDE_PATH -DWAMR_BUILD_SDK_PROFILE=${PROFILE} -DCONFIG_PATH=${wamr_config_cmake_file} -DCMAKE_TOOLCHAIN_FILE=../wamr_toolchain.cmake + cmake .. $CM_DEXTRA_SDK_INCLUDE_PATH \ + -DWAMR_BUILD_SDK_PROFILE=${PROFILE} \ + -DCONFIG_PATH=${wamr_config_cmake_file} \ + -DCMAKE_TOOLCHAIN_FILE=../wamr_toolchain.cmake fi [ $? -eq 0 ] || exit $? @@ -195,7 +211,10 @@ echo "############## Start to build runtime sdk ###############" cd ${sdk_root}/runtime rm -fr build_runtime_sdk && mkdir build_runtime_sdk cd build_runtime_sdk -cmake .. $CMAKE_DEXTRA_SDK_INCLUDE_PATH -DWAMR_BUILD_SDK_PROFILE=${PROFILE} -DCONFIG_PATH=${wamr_config_cmake_file} +cmake .. $CM_DEXTRA_SDK_INCLUDE_PATH \ + -DWAMR_BUILD_SDK_PROFILE=${PROFILE} \ + -DCONFIG_PATH=${wamr_config_cmake_file} \ + $CM_TOOLCHAIN $CM_BUILD_TYPE [ $? -eq 0 ] || exit $? make diff --git a/wamr-sdk/menuconfig.sh b/wamr-sdk/menuconfig.sh index d8499d74c..b2f6fa628 100755 --- a/wamr-sdk/menuconfig.sh +++ b/wamr-sdk/menuconfig.sh @@ -27,6 +27,10 @@ do done +if [ -z $wamr_config_cmake_file ]; then + usage + exit +fi function set_build_target () { From 62725abe9594aceb982a12620b86e5eb0bb4e706 Mon Sep 17 00:00:00 2001 From: Wang Xin Date: Sat, 22 Feb 2020 14:53:53 +0800 Subject: [PATCH 10/15] Update README.md --- samples/simple/README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/samples/simple/README.md b/samples/simple/README.md index f7c9bad33..5625212f9 100644 --- a/samples/simple/README.md +++ b/samples/simple/README.md @@ -95,17 +95,19 @@ host-interp Enter the profile name for starting your build. "host-***" profiles build the sample for executing on your development machine, and "arm-interp" profile will do cross building for ARM target platform. If "arm-interp" is entered, please ensure the ARM cross compiler toolchain is already installed in your development machine. Your should set *ARM_A7_COMPILER_DIR* and *ARM_A7_SDKTARGETSYSROOT* environment variable in your ~/.bashrc correctly. refer to the file [profiles/arm-interp/toolchain.cmake](./profiles/arm-interp/toolchain.cmake). ``` +~/.bashrc: export ARM_A7_COMPILER_DIR="/home/beihai/cross-toolchains/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/bin" export ARM_A7_SDKTARGETSYSROOT="/home/beihai/cross-toolchains/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/arm-linux-gnueabihf/libc" +notes: please set the value to the actual path of your cross toolchain. ``` If you need to create additional profile for customizing your runtime, application framework or the target platforms, a new subfolder can be created under the *profiles* folder, and place your own version of "toolchain.cmake" and "wamr_config_simple.cmake" in it. ``` -~/wamr/samples/simple/profiles$ ls +$wamr-root/samples/simple/profiles$ ls arm-interp host-aot host-interp -~/wamr/samples/simple/profiles$ ls arm-interp/ +$wamr-root/samples/simple/profiles$ ls arm-interp/ toolchain.cmake wamr_config_simple.cmake ``` From dd641abdb944bb4b4a7b116b43e2bfaa27c3e0e1 Mon Sep 17 00:00:00 2001 From: Wang Xin Date: Sun, 23 Feb 2020 20:17:44 +0800 Subject: [PATCH 11/15] fix sample littlevgl build.sh --- samples/littlevgl/build.sh | 7 ++++++- wamr-sdk/build_sdk.sh | 5 +---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/samples/littlevgl/build.sh b/samples/littlevgl/build.sh index d1f596da5..bb9b198dc 100755 --- a/samples/littlevgl/build.sh +++ b/samples/littlevgl/build.sh @@ -4,6 +4,9 @@ PROJECT_DIR=$PWD WAMR_DIR=${PWD}/../.. OUT_DIR=${PWD}/out BUILD_DIR=${PWD}/build +LV_CFG_PATH=${PROJECT_DIR}/lv_config + + if [ -z $KW_BUILD ] || [ -z $KW_OUT_FILE ];then echo "Local Build Env" @@ -35,7 +38,8 @@ fi echo "##################### 0. build wamr-sdk littlevgl start#####################" cd ${WAMR_DIR}/wamr-sdk -./build_sdk.sh -n littlevgl -x ${PROJECT_DIR}/wamr_config_littlevgl.cmake +./build_sdk.sh -n littlevgl -x ${PROJECT_DIR}/wamr_config_littlevgl.cmake -e ${LV_CFG_PATH} +[ $? -eq 0 ] || exit $? echo "#####################build wamr-sdk littlevgl success" echo -e "\n\n" @@ -60,6 +64,7 @@ mkdir -p vgl-wasm-runtime cd vgl-wasm-runtime $cmakewrap ${PROJECT_DIR}/vgl-wasm-runtime $makewrap +[ $? -eq 0 ] || exit $? cp vgl_wasm_runtime ${OUT_DIR}/ echo "##################### build littlevgl wasm runtime end#####################" diff --git a/wamr-sdk/build_sdk.sh b/wamr-sdk/build_sdk.sh index ff8a460ea..eda15c3ac 100755 --- a/wamr-sdk/build_sdk.sh +++ b/wamr-sdk/build_sdk.sh @@ -180,10 +180,7 @@ if [ -n "$out" ]; then fi if [ "${LIBC_SUPPORT}" = "WASI" ]; then echo "using wasi toolchain" - cmake .. $CM_DEXTRA_SDK_INCLUDE_PATH \ - -DWAMR_BUILD_SDK_PROFILE=${PROFILE} \ - -DCONFIG_PATH=${wamr_config_cmake_file} \ - -DCMAKE_TOOLCHAIN_FILE=../wasi_toolchain.cmake + cmake .. $CM_DEXTRA_SDK_INCLUDE_PATH -DWAMR_BUILD_SDK_PROFILE=${PROFILE} -DCONFIG_PATH=${wamr_config_cmake_file} -DCMAKE_TOOLCHAIN_FILE=../wasi_toolchain.cmake else echo "using builtin libc toolchain" cmake .. $CM_DEXTRA_SDK_INCLUDE_PATH \ From 81fee9c2ff2d12ef588f738c3e4b54a73988ad7b Mon Sep 17 00:00:00 2001 From: Wang Xin Date: Thu, 5 Mar 2020 19:15:36 +0800 Subject: [PATCH 12/15] download llvm in 1 depth --- wamr-compiler/build_llvm.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wamr-compiler/build_llvm.sh b/wamr-compiler/build_llvm.sh index 899866670..dc21f79c2 100755 --- a/wamr-compiler/build_llvm.sh +++ b/wamr-compiler/build_llvm.sh @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright (C) 2019 Intel Corporation. All rights reserved. +# Copyright (C) 2020 Intel Corporation. All rights reserved. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception DEPS_DIR=${PWD}/../core/deps @@ -8,7 +8,7 @@ DEPS_DIR=${PWD}/../core/deps cd ${DEPS_DIR} if [ ! -d "llvm" ]; then echo "Clone llvm to core/deps/ .." - git clone https://github.com/llvm-mirror/llvm.git + git clone --depth 1 https://github.com/llvm-mirror/llvm.git fi cd llvm From 66d6a3986a64da1309909a5cae2e5cead69b5ff6 Mon Sep 17 00:00:00 2001 From: Wang Xin Date: Sun, 12 Apr 2020 14:19:23 +0800 Subject: [PATCH 13/15] refactor the lvgl wasm api layer --- core/app-framework/wgl/app/prepare_headers.sh | 46 + core/app-framework/wgl/app/src/wgl_btn.c | 26 +- core/app-framework/wgl/app/src/wgl_cb.c | 21 +- core/app-framework/wgl/app/src/wgl_label.c | 53 +- core/app-framework/wgl/app/src/wgl_list.c | 7 +- core/app-framework/wgl/app/src/wgl_obj.c | 15 +- .../wgl/app/wa-inc/inc/LICENCE.txt | 8 - .../wgl/app/wa-inc/inc/wgl_btn.h | 162 ---- .../app-framework/wgl/app/wa-inc/inc/wgl_cb.h | 79 -- .../wgl/app/wa-inc/inc/wgl_label.h | 66 -- .../wgl/app/wa-inc/inc/wgl_list.h | 54 -- .../wgl/app/wa-inc/inc/wgl_obj.h | 90 -- .../wgl/app/wa-inc/inc/wgl_types.h | 29 - core/app-framework/wgl/app/wa-inc/lv_conf.h | 497 ++++++++++ .../app/wa-inc/lvgl-compatible/LICENCE.txt | 8 - .../wgl/app/wa-inc/lvgl-compatible/lv_btn.h | 75 -- .../wgl/app/wa-inc/lvgl-compatible/lv_cb.h | 36 - .../wgl/app/wa-inc/lvgl-compatible/lv_label.h | 50 - .../wgl/app/wa-inc/lvgl-compatible/lv_list.h | 37 - .../wgl/app/wa-inc/lvgl-compatible/lv_obj.h | 89 -- .../wgl/app/wa-inc/lvgl-compatible/lv_types.h | 28 - core/app-framework/wgl/app/wa-inc/lvgl.h | 26 - .../wgl/app/wa-inc/lvgl/lv_obj.h | 916 ++++++++++++++++++ core/app-framework/wgl/app/wa-inc/lvgl/lvgl.h | 86 ++ core/app-framework/wgl/app/wa-inc/lvgl/test.c | 11 + core/app-framework/wgl/app/wa-inc/wgl.h | 26 - core/app-framework/wgl/wgl.md | 80 ++ 27 files changed, 1706 insertions(+), 915 deletions(-) create mode 100755 core/app-framework/wgl/app/prepare_headers.sh delete mode 100644 core/app-framework/wgl/app/wa-inc/inc/LICENCE.txt delete mode 100644 core/app-framework/wgl/app/wa-inc/inc/wgl_btn.h delete mode 100644 core/app-framework/wgl/app/wa-inc/inc/wgl_cb.h delete mode 100644 core/app-framework/wgl/app/wa-inc/inc/wgl_label.h delete mode 100644 core/app-framework/wgl/app/wa-inc/inc/wgl_list.h delete mode 100644 core/app-framework/wgl/app/wa-inc/inc/wgl_obj.h delete mode 100644 core/app-framework/wgl/app/wa-inc/inc/wgl_types.h create mode 100644 core/app-framework/wgl/app/wa-inc/lv_conf.h delete mode 100644 core/app-framework/wgl/app/wa-inc/lvgl-compatible/LICENCE.txt delete mode 100644 core/app-framework/wgl/app/wa-inc/lvgl-compatible/lv_btn.h delete mode 100644 core/app-framework/wgl/app/wa-inc/lvgl-compatible/lv_cb.h delete mode 100644 core/app-framework/wgl/app/wa-inc/lvgl-compatible/lv_label.h delete mode 100644 core/app-framework/wgl/app/wa-inc/lvgl-compatible/lv_list.h delete mode 100644 core/app-framework/wgl/app/wa-inc/lvgl-compatible/lv_obj.h delete mode 100644 core/app-framework/wgl/app/wa-inc/lvgl-compatible/lv_types.h delete mode 100644 core/app-framework/wgl/app/wa-inc/lvgl.h create mode 100644 core/app-framework/wgl/app/wa-inc/lvgl/lv_obj.h create mode 100644 core/app-framework/wgl/app/wa-inc/lvgl/lvgl.h create mode 100644 core/app-framework/wgl/app/wa-inc/lvgl/test.c delete mode 100644 core/app-framework/wgl/app/wa-inc/wgl.h create mode 100644 core/app-framework/wgl/wgl.md diff --git a/core/app-framework/wgl/app/prepare_headers.sh b/core/app-framework/wgl/app/prepare_headers.sh new file mode 100755 index 000000000..261257952 --- /dev/null +++ b/core/app-framework/wgl/app/prepare_headers.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +WGL_ROOT=$(cd "$(dirname "$0")/" && pwd) +LVGL_REPO_DIR=${WGL_ROOT}/../../../deps/lvgl +ls $LVGL_REPO_DIR + +#if [ ! -d "${LVGL_REPO_DIR}" ]; then +# echo "lvgl repo not exist, please git pull the lvgl v6.0 first" +# exit 1 +#fi + +cd ${WGL_ROOT}/wa-inc/lvgl +pwd + +if [ -d src ]; then + rm -rf src + echo "deleted the src folder from previous preparation." +fi + +mkdir src +cd src + +cp ${LVGL_REPO_DIR}/src/*.h ./ + +for folder in lv_core lv_draw lv_hal lv_objx lv_font lv_misc lv_themes +do + echo "Prepare fold $folder...done" + mkdir $folder + cp ${LVGL_REPO_DIR}/src/${folder}/*.h ./${folder}/ +done + +cp -f ../lv_obj.h ./lv_core/lv_obj.h + +echo "test the header files..." +cd .. + +gcc test.c -o test.out +if [ $? != 0 ];then + echo "failed to compile the test.c" + exit 1 +else + echo "okay" + rm test.out +fi + +echo "lvgl header files for WASM application ready." diff --git a/core/app-framework/wgl/app/src/wgl_btn.c b/core/app-framework/wgl/app/src/wgl_btn.c index 6f6b1b953..63a9a84b0 100644 --- a/core/app-framework/wgl/app/src/wgl_btn.c +++ b/core/app-framework/wgl/app/src/wgl_btn.c @@ -3,14 +3,14 @@ * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ -#include "wa-inc/wgl.h" +#include "wa-inc/lvgl/lvgl.h" #include "bh_platform.h" #include "gui_api.h" #define ARGC sizeof(argv)/sizeof(uint32) #define CALL_BTN_NATIVE_FUNC(id) wasm_btn_native_call(id, argv, ARGC) -wgl_obj_t wgl_btn_create(wgl_obj_t par, wgl_obj_t copy) +lv_obj_t * lv_btn_create(lv_obj_t * par, const lv_obj_t * copy); { uint32 argv[2] = {0}; @@ -20,7 +20,7 @@ wgl_obj_t wgl_btn_create(wgl_obj_t par, wgl_obj_t copy) return (wgl_obj_t)argv[0]; } -void wgl_btn_set_toggle(wgl_obj_t btn, bool tgl) +void lv_btn_set_toggle(lv_obj_t * btn, bool tgl); { uint32 argv[2] = {0}; argv[0] = (uint32)btn; @@ -28,7 +28,7 @@ void wgl_btn_set_toggle(wgl_obj_t btn, bool tgl) CALL_BTN_NATIVE_FUNC(BTN_FUNC_ID_SET_TOGGLE); } -void wgl_btn_set_state(wgl_obj_t btn, wgl_btn_state_t state) +void lv_btn_set_state(lv_obj_t * btn, lv_btn_state_t state); { uint32 argv[2] = {0}; argv[0] = (uint32)btn; @@ -36,14 +36,14 @@ void wgl_btn_set_state(wgl_obj_t btn, wgl_btn_state_t state) CALL_BTN_NATIVE_FUNC(BTN_FUNC_ID_SET_STATE); } -void wgl_btn_toggle(wgl_obj_t btn) +void lv_btn_toggle(lv_obj_t * btn); { uint32 argv[1] = {0}; argv[0] = (uint32)btn; CALL_BTN_NATIVE_FUNC(BTN_FUNC_ID_TOGGLE); } -void wgl_btn_set_ink_in_time(wgl_obj_t btn, uint16_t time) +void lv_btn_set_ink_in_time(lv_obj_t * btn, uint16_t time); { uint32 argv[2] = {0}; argv[0] = (uint32)btn; @@ -51,7 +51,7 @@ void wgl_btn_set_ink_in_time(wgl_obj_t btn, uint16_t time) CALL_BTN_NATIVE_FUNC(BTN_FUNC_ID_SET_INK_IN_TIME); } -void wgl_btn_set_ink_wait_time(wgl_obj_t btn, uint16_t time) +void lv_btn_set_ink_wait_time(lv_obj_t * btn, uint16_t time); { uint32 argv[2] = {0}; argv[0] = (uint32)btn; @@ -59,7 +59,7 @@ void wgl_btn_set_ink_wait_time(wgl_obj_t btn, uint16_t time) CALL_BTN_NATIVE_FUNC(BTN_FUNC_ID_SET_INK_WAIT_TIME); } -void wgl_btn_set_ink_out_time(wgl_obj_t btn, uint16_t time) +void lv_btn_set_ink_out_time(lv_obj_t * btn, uint16_t time); { uint32 argv[2] = {0}; argv[0] = (uint32)btn; @@ -73,7 +73,7 @@ void wgl_btn_set_ink_out_time(wgl_obj_t btn, uint16_t time) // //wasm_btn_set_style(btn, type, style); //} // -wgl_btn_state_t wgl_btn_get_state(const wgl_obj_t btn) +lv_btn_state_t lv_btn_get_state(const lv_obj_t * btn); { uint32 argv[1] = {0}; argv[0] = (uint32)btn; @@ -81,7 +81,7 @@ wgl_btn_state_t wgl_btn_get_state(const wgl_obj_t btn) return (wgl_btn_state_t)argv[0]; } -bool wgl_btn_get_toggle(const wgl_obj_t btn) +bool lv_btn_get_toggle(const lv_obj_t * btn); { uint32 argv[1] = {0}; argv[0] = (uint32)btn; @@ -89,7 +89,7 @@ bool wgl_btn_get_toggle(const wgl_obj_t btn) return (bool)argv[0]; } -uint16_t wgl_btn_get_ink_in_time(const wgl_obj_t btn) +uint16_t lv_btn_get_ink_in_time(const lv_obj_t * btn); { uint32 argv[1] = {0}; argv[0] = (uint32)btn; @@ -97,7 +97,7 @@ uint16_t wgl_btn_get_ink_in_time(const wgl_obj_t btn) return (uint16_t)argv[0]; } -uint16_t wgl_btn_get_ink_wait_time(const wgl_obj_t btn) +uint16_t lv_btn_get_ink_wait_time(const lv_obj_t * btn); { uint32 argv[1] = {0}; argv[0] = (uint32)btn; @@ -105,7 +105,7 @@ uint16_t wgl_btn_get_ink_wait_time(const wgl_obj_t btn) return (uint16_t)argv[0]; } -uint16_t wgl_btn_get_ink_out_time(const wgl_obj_t btn) +uint16_t lv_btn_get_ink_out_time(const lv_obj_t * btn); { uint32 argv[1] = {0}; argv[0] = (uint32)btn; diff --git a/core/app-framework/wgl/app/src/wgl_cb.c b/core/app-framework/wgl/app/src/wgl_cb.c index 7ede61a10..81428ee59 100644 --- a/core/app-framework/wgl/app/src/wgl_cb.c +++ b/core/app-framework/wgl/app/src/wgl_cb.c @@ -3,7 +3,8 @@ * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ -#include "wa-inc/wgl.h" + +#include "wa-inc/lvgl/lvgl.h" #include "gui_api.h" #include @@ -11,7 +12,7 @@ #define ARGC sizeof(argv)/sizeof(uint32) #define CALL_CB_NATIVE_FUNC(id) wasm_cb_native_call(id, argv, ARGC) -wgl_obj_t wgl_cb_create(wgl_obj_t par, const wgl_obj_t copy) +lv_obj_t * lv_cb_create(lv_obj_t * par, const lv_obj_t * copy); { uint32 argv[2] = {0}; @@ -21,7 +22,7 @@ wgl_obj_t wgl_cb_create(wgl_obj_t par, const wgl_obj_t copy) return (wgl_obj_t)argv[0]; } -void wgl_cb_set_text(wgl_obj_t cb, const char * txt) +void lv_cb_set_text(lv_obj_t * cb, const char * txt); { uint32 argv[3] = {0}; argv[0] = (uint32)cb; @@ -30,7 +31,7 @@ void wgl_cb_set_text(wgl_obj_t cb, const char * txt) CALL_CB_NATIVE_FUNC(CB_FUNC_ID_SET_TEXT); } -void wgl_cb_set_static_text(wgl_obj_t cb, const char * txt) +void lv_cb_set_static_text(lv_obj_t * cb, const char * txt); { uint32 argv[3] = {0}; argv[0] = (uint32)cb; @@ -45,7 +46,7 @@ void wgl_cb_set_static_text(wgl_obj_t cb, const char * txt) //} // -unsigned int wgl_cb_get_text_length(wgl_obj_t cb) +static unsigned int wgl_cb_get_text_length(wgl_obj_t cb) { uint32 argv[1] = {0}; argv[0] = (uint32)cb; @@ -53,7 +54,7 @@ unsigned int wgl_cb_get_text_length(wgl_obj_t cb) return argv[0]; } -char *wgl_cb_get_text(wgl_obj_t cb, char *buffer, int buffer_len) +static char *wgl_cb_get_text(wgl_obj_t cb, char *buffer, int buffer_len) { uint32 argv[3] = {0}; argv[0] = (uint32)cb; @@ -63,6 +64,14 @@ char *wgl_cb_get_text(wgl_obj_t cb, char *buffer, int buffer_len) return (char *)argv[0]; } +// TODO: need to use a global data buffer for the returned text +const char * lv_cb_get_text(const lv_obj_t * cb) +{ + + return NULL; +} + + //const wgl_style_t * wgl_cb_get_style(const wgl_obj_t cb, wgl_cb_style_t type) //{ // //TODO diff --git a/core/app-framework/wgl/app/src/wgl_label.c b/core/app-framework/wgl/app/src/wgl_label.c index f96508c33..ff28b7535 100644 --- a/core/app-framework/wgl/app/src/wgl_label.c +++ b/core/app-framework/wgl/app/src/wgl_label.c @@ -4,7 +4,8 @@ */ -#include "wa-inc/wgl.h" + +#include "wa-inc/lvgl/lvgl.h" #include "gui_api.h" #include @@ -12,7 +13,7 @@ #define ARGC sizeof(argv)/sizeof(uint32) #define CALL_LABEL_NATIVE_FUNC(id) wasm_label_native_call(id, argv, ARGC) -wgl_obj_t wgl_label_create(wgl_obj_t par, wgl_obj_t copy) +lv_obj_t * lv_label_create(lv_obj_t * par, const lv_obj_t * copy); { uint32 argv[2] = {0}; @@ -22,7 +23,7 @@ wgl_obj_t wgl_label_create(wgl_obj_t par, wgl_obj_t copy) return (wgl_obj_t)argv[0]; } -void wgl_label_set_text(wgl_obj_t label, const char * text) +void lv_label_set_text(lv_obj_t * label, const char * text); { uint32 argv[3] = {0}; argv[0] = (uint32)label; @@ -32,7 +33,7 @@ void wgl_label_set_text(wgl_obj_t label, const char * text) } -void wgl_label_set_array_text(wgl_obj_t label, const char * array, uint16_t size) +void lv_label_set_array_text(lv_obj_t * label, const char * array, uint16_t size); { uint32 argv[3] = {0}; argv[0] = (uint32)label; @@ -42,7 +43,7 @@ void wgl_label_set_array_text(wgl_obj_t label, const char * array, uint16_t size } -void wgl_label_set_static_text(wgl_obj_t label, const char * text) +void lv_label_set_static_text(lv_obj_t * label, const char * text); { uint32 argv[3] = {0}; argv[0] = (uint32)label; @@ -52,7 +53,7 @@ void wgl_label_set_static_text(wgl_obj_t label, const char * text) } -void wgl_label_set_long_mode(wgl_obj_t label, wgl_label_long_mode_t long_mode) +void lv_label_set_long_mode(lv_obj_t * label, lv_label_long_mode_t long_mode); { uint32 argv[2] = {0}; argv[0] = (uint32)label; @@ -61,7 +62,7 @@ void wgl_label_set_long_mode(wgl_obj_t label, wgl_label_long_mode_t long_mode) } -void wgl_label_set_align(wgl_obj_t label, wgl_label_align_t align) +void lv_label_set_align(lv_obj_t * label, lv_label_align_t align); { uint32 argv[2] = {0}; argv[0] = (uint32)label; @@ -70,7 +71,7 @@ void wgl_label_set_align(wgl_obj_t label, wgl_label_align_t align) } -void wgl_label_set_recolor(wgl_obj_t label, bool en) +void lv_label_set_recolor(lv_obj_t * label, bool en); { uint32 argv[2] = {0}; argv[0] = (uint32)label; @@ -79,7 +80,7 @@ void wgl_label_set_recolor(wgl_obj_t label, bool en) } -void wgl_label_set_body_draw(wgl_obj_t label, bool en) +void lv_label_set_body_draw(lv_obj_t * label, bool en); { uint32 argv[2] = {0}; argv[0] = (uint32)label; @@ -88,7 +89,7 @@ void wgl_label_set_body_draw(wgl_obj_t label, bool en) } -void wgl_label_set_anim_speed(wgl_obj_t label, uint16_t anim_speed) +void lv_label_set_anim_speed(lv_obj_t * label, uint16_t anim_speed); { uint32 argv[2] = {0}; argv[0] = (uint32)label; @@ -97,7 +98,7 @@ void wgl_label_set_anim_speed(wgl_obj_t label, uint16_t anim_speed) } -void wgl_label_set_text_sel_start(wgl_obj_t label, uint16_t index) +void lv_label_set_text_sel_start(lv_obj_t * label, uint16_t index); { uint32 argv[2] = {0}; argv[0] = (uint32)label; @@ -106,7 +107,7 @@ void wgl_label_set_text_sel_start(wgl_obj_t label, uint16_t index) } -void wgl_label_set_text_sel_end(wgl_obj_t label, uint16_t index) +void lv_label_set_text_sel_end(lv_obj_t * label, uint16_t index); { uint32 argv[2] = {0}; argv[0] = (uint32)label; @@ -132,6 +133,12 @@ char * wgl_label_get_text(wgl_obj_t label, char *buffer, int buffer_len) return (char *)argv[0]; } +// TODO: +char * lv_label_get_text(const lv_obj_t * label) +{ + +} + wgl_label_long_mode_t wgl_label_get_long_mode(const wgl_obj_t label) { @@ -142,7 +149,7 @@ wgl_label_long_mode_t wgl_label_get_long_mode(const wgl_obj_t label) } -wgl_label_align_t wgl_label_get_align(const wgl_obj_t label) +lv_label_long_mode_t lv_label_get_long_mode(const lv_obj_t * label); { uint32 argv[1] = {0}; argv[0] = (uint32)label; @@ -151,7 +158,7 @@ wgl_label_align_t wgl_label_get_align(const wgl_obj_t label) } -bool wgl_label_get_recolor(const wgl_obj_t label) +bool lv_label_get_recolor(const lv_obj_t * label); { uint32 argv[1] = {0}; argv[0] = (uint32)label; @@ -160,7 +167,7 @@ bool wgl_label_get_recolor(const wgl_obj_t label) } -bool wgl_label_get_body_draw(const wgl_obj_t label) +bool lv_label_get_body_draw(const lv_obj_t * label); { uint32 argv[1] = {0}; argv[0] = (uint32)label; @@ -169,7 +176,7 @@ bool wgl_label_get_body_draw(const wgl_obj_t label) } -uint16_t wgl_label_get_anim_speed(const wgl_obj_t label) +uint16_t lv_label_get_anim_speed(const lv_obj_t * label); { uint32 argv[1] = {0}; argv[0] = (uint32)label; @@ -178,7 +185,7 @@ uint16_t wgl_label_get_anim_speed(const wgl_obj_t label) } -void wgl_label_get_letter_pos(const wgl_obj_t label, uint16_t index, wgl_point_t * pos) +void lv_label_get_letter_pos(const lv_obj_t * label, uint16_t index, lv_point_t * pos); { uint32 argv[4] = {0}; argv[0] = (uint32)label; @@ -189,7 +196,7 @@ void wgl_label_get_letter_pos(const wgl_obj_t label, uint16_t index, wgl_point_t } -uint16_t wgl_label_get_letter_on(const wgl_obj_t label, wgl_point_t * pos) +uint16_t lv_label_get_letter_on(const lv_obj_t * label, lv_point_t * pos); { uint32 argv[3] = {0}; argv[0] = (uint32)label; @@ -200,7 +207,7 @@ uint16_t wgl_label_get_letter_on(const wgl_obj_t label, wgl_point_t * pos) } -bool wgl_label_is_char_under_pos(const wgl_obj_t label, wgl_point_t * pos) +bool lv_label_is_char_under_pos(const lv_obj_t * label, lv_point_t * pos); { uint32 argv[3] = {0}; argv[0] = (uint32)label; @@ -211,7 +218,7 @@ bool wgl_label_is_char_under_pos(const wgl_obj_t label, wgl_point_t * pos) } -uint16_t wgl_label_get_text_sel_start(const wgl_obj_t label) +uint16_t lv_label_get_text_sel_start(const lv_obj_t * label); { uint32 argv[1] = {0}; argv[0] = (uint32)label; @@ -220,7 +227,7 @@ uint16_t wgl_label_get_text_sel_start(const wgl_obj_t label) } -uint16_t wgl_label_get_text_sel_end(const wgl_obj_t label) +uint16_t lv_label_get_text_sel_end(const lv_obj_t * label); { uint32 argv[1] = {0}; argv[0] = (uint32)label; @@ -229,7 +236,7 @@ uint16_t wgl_label_get_text_sel_end(const wgl_obj_t label) } -void wgl_label_ins_text(wgl_obj_t label, uint32_t pos, const char * txt) +void lv_label_ins_text(lv_obj_t * label, uint32_t pos, const char * txt); { uint32 argv[4] = {0}; argv[0] = (uint32)label; @@ -240,7 +247,7 @@ void wgl_label_ins_text(wgl_obj_t label, uint32_t pos, const char * txt) } -void wgl_label_cut_text(wgl_obj_t label, uint32_t pos, uint32_t cnt) +void lv_label_cut_text(lv_obj_t * label, uint32_t pos, uint32_t cnt); { uint32 argv[3] = {0}; argv[0] = (uint32)label; diff --git a/core/app-framework/wgl/app/src/wgl_list.c b/core/app-framework/wgl/app/src/wgl_list.c index 55893ccd5..0787e21b0 100644 --- a/core/app-framework/wgl/app/src/wgl_list.c +++ b/core/app-framework/wgl/app/src/wgl_list.c @@ -3,7 +3,8 @@ * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ -#include "wa-inc/wgl.h" + +#include "wa-inc/lvgl/lvgl.h" #include "gui_api.h" #include @@ -12,7 +13,7 @@ #define CALL_LIST_NATIVE_FUNC(id) wasm_list_native_call(id, argv, ARGC) -wgl_obj_t wgl_list_create(wgl_obj_t par, const wgl_obj_t copy) +lv_obj_t * lv_list_create(lv_obj_t * par, const lv_obj_t * copy); { uint32 argv[2] = {0}; @@ -30,7 +31,7 @@ wgl_obj_t wgl_list_create(wgl_obj_t par, const wgl_obj_t copy) //} // -wgl_obj_t wgl_list_add_btn(wgl_obj_t list, const void * img_src, const char * txt) +lv_obj_t * lv_list_add_btn(lv_obj_t * list, const void * img_src, const char * txt); { uint32 argv[3] = {0}; diff --git a/core/app-framework/wgl/app/src/wgl_obj.c b/core/app-framework/wgl/app/src/wgl_obj.c index 6d9407908..7459b899d 100644 --- a/core/app-framework/wgl/app/src/wgl_obj.c +++ b/core/app-framework/wgl/app/src/wgl_obj.c @@ -3,7 +3,8 @@ * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ -#include "wa-inc/wgl.h" + +#include "wa-inc/lvgl/lvgl.h" #include "gui_api.h" #include #include @@ -24,7 +25,7 @@ static obj_evt_cb_t *g_obj_evt_cb_list = NULL; /* For lvgl compatible */ char g_widget_text[100]; -wgl_res_t wgl_obj_del(wgl_obj_t obj) +lv_res_t lv_obj_del(lv_obj_t * obj); { uint32 argv[1] = {0}; argv[0] = (uint32)obj; @@ -32,21 +33,21 @@ wgl_res_t wgl_obj_del(wgl_obj_t obj) return (wgl_res_t)argv[0]; } -void wgl_obj_del_async(wgl_obj_t obj) +void lv_obj_del_async(struct _lv_obj_t *obj); { uint32 argv[1] = {0}; argv[0] = (uint32)obj; CALL_OBJ_NATIVE_FUNC(OBJ_FUNC_ID_DEL_ASYNC); } -void wgl_obj_clean(wgl_obj_t obj) +void lv_obj_clean(lv_obj_t * obj); { uint32 argv[1] = {0}; argv[0] = (uint32)obj; CALL_OBJ_NATIVE_FUNC(OBJ_FUNC_ID_CLEAN); } -void wgl_obj_align(wgl_obj_t obj, const wgl_obj_t base, wgl_align_t align, wgl_coord_t x_mod, wgl_coord_t y_mod) +void lv_obj_align(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, lv_coord_t x_mod, lv_coord_t y_mod); { uint32 argv[5] = {0}; argv[0] = (uint32)obj; @@ -57,7 +58,7 @@ void wgl_obj_align(wgl_obj_t obj, const wgl_obj_t base, wgl_align_t align, wgl_c CALL_OBJ_NATIVE_FUNC(OBJ_FUNC_ID_ALIGN); } -wgl_event_cb_t wgl_obj_get_event_cb(const wgl_obj_t obj) +lv_event_cb_t lv_obj_get_event_cb(const lv_obj_t * obj); { obj_evt_cb_t *obj_evt_cb = g_obj_evt_cb_list; while (obj_evt_cb != NULL) { @@ -70,7 +71,7 @@ wgl_event_cb_t wgl_obj_get_event_cb(const wgl_obj_t obj) return NULL; } -void wgl_obj_set_event_cb(wgl_obj_t obj, wgl_event_cb_t event_cb) +void lv_obj_set_event_cb(lv_obj_t * obj, lv_event_cb_t event_cb); { obj_evt_cb_t *obj_evt_cb; uint32 argv[1] = {0}; diff --git a/core/app-framework/wgl/app/wa-inc/inc/LICENCE.txt b/core/app-framework/wgl/app/wa-inc/inc/LICENCE.txt deleted file mode 100644 index beaef1d26..000000000 --- a/core/app-framework/wgl/app/wa-inc/inc/LICENCE.txt +++ /dev/null @@ -1,8 +0,0 @@ -MIT licence -Copyright (c) 2016 Gábor Kiss-Vámosi - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/core/app-framework/wgl/app/wa-inc/inc/wgl_btn.h b/core/app-framework/wgl/app/wa-inc/inc/wgl_btn.h deleted file mode 100644 index bbf364418..000000000 --- a/core/app-framework/wgl/app/wa-inc/inc/wgl_btn.h +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright (C) 2019 Intel Corporation. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - */ - -#ifndef WAMR_GRAPHIC_LIBRARY_BTN_H -#define WAMR_GRAPHIC_LIBRARY_BTN_H - -#ifdef __cplusplus -extern "C" { -#endif - -/** Possible states of a button. - * It can be used not only by buttons but other button-like objects too*/ -enum { - /**Released*/ - WGL_BTN_STATE_REL, - - /**Pressed*/ - WGL_BTN_STATE_PR, - - /**Toggled released*/ - WGL_BTN_STATE_TGL_REL, - - /**Toggled pressed*/ - WGL_BTN_STATE_TGL_PR, - - /**Inactive*/ - WGL_BTN_STATE_INA, - - /**Number of states*/ - _WGL_BTN_STATE_NUM, -}; -typedef uint8_t wgl_btn_state_t; - -/**Styles*/ -enum { - /** Release style */ - WGL_BTN_STYLE_REL, - - /**Pressed style*/ - WGL_BTN_STYLE_PR, - - /** Toggle released style*/ - WGL_BTN_STYLE_TGL_REL, - - /** Toggle pressed style */ - WGL_BTN_STYLE_TGL_PR, - - /** Inactive style*/ - WGL_BTN_STYLE_INA, -}; -typedef uint8_t wgl_btn_style_t; - - -/* Create a button */ -wgl_obj_t wgl_btn_create(wgl_obj_t par, wgl_obj_t copy); - -/*===================== - * Setter functions - *====================*/ - -/** - * Enable the toggled states. On release the button will change from/to toggled state. - * @param btn pointer to a button object - * @param tgl true: enable toggled states, false: disable - */ -void wgl_btn_set_toggle(wgl_obj_t btn, bool tgl); - -/** - * Set the state of the button - * @param btn pointer to a button object - * @param state the new state of the button (from wgl_btn_state_t enum) - */ -void wgl_btn_set_state(wgl_obj_t btn, wgl_btn_state_t state); - -/** - * Toggle the state of the button (ON->OFF, OFF->ON) - * @param btn pointer to a button object - */ -void wgl_btn_toggle(wgl_obj_t btn); - -/** - * Set time of the ink effect (draw a circle on click to animate in the new state) - * @param btn pointer to a button object - * @param time the time of the ink animation - */ -void wgl_btn_set_ink_in_time(wgl_obj_t btn, uint16_t time); - -/** - * Set the wait time before the ink disappears - * @param btn pointer to a button object - * @param time the time of the ink animation - */ -void wgl_btn_set_ink_wait_time(wgl_obj_t btn, uint16_t time); - -/** - * Set time of the ink out effect (animate to the released state) - * @param btn pointer to a button object - * @param time the time of the ink animation - */ -void wgl_btn_set_ink_out_time(wgl_obj_t btn, uint16_t time); - -/** - * Set a style of a button. - * @param btn pointer to button object - * @param type which style should be set - * @param style pointer to a style - * */ -//void wgl_btn_set_style(wgl_obj_t btn, wgl_btn_style_t type, const wgl_style_t * style); - -/*===================== - * Getter functions - *====================*/ - -/** - * Get the current state of the button - * @param btn pointer to a button object - * @return the state of the button (from wgl_btn_state_t enum) - */ -wgl_btn_state_t wgl_btn_get_state(wgl_obj_t btn); - -/** - * Get the toggle enable attribute of the button - * @param btn pointer to a button object - * @return true: toggle enabled, false: disabled - */ -bool wgl_btn_get_toggle(wgl_obj_t btn); - -/** - * Get time of the ink in effect (draw a circle on click to animate in the new state) - * @param btn pointer to a button object - * @return the time of the ink animation - */ -uint16_t wgl_btn_get_ink_in_time(wgl_obj_t btn); - -/** - * Get the wait time before the ink disappears - * @param btn pointer to a button object - * @return the time of the ink animation - */ -uint16_t wgl_btn_get_ink_wait_time(wgl_obj_t btn); - -/** - * Get time of the ink out effect (animate to the releases state) - * @param btn pointer to a button object - * @return the time of the ink animation - */ -uint16_t wgl_btn_get_ink_out_time(wgl_obj_t btn); - -/** - * Get style of a button. - * @param btn pointer to button object - * @param type which style should be get - * @return style pointer to the style - * */ -//const wgl_style_t * wgl_btn_get_style(const wgl_obj_t btn, wgl_btn_style_t type); -#ifdef __cplusplus -} -#endif - -#endif /* WAMR_GRAPHIC_LIBRARY_BTN_H */ diff --git a/core/app-framework/wgl/app/wa-inc/inc/wgl_cb.h b/core/app-framework/wgl/app/wa-inc/inc/wgl_cb.h deleted file mode 100644 index 5ff271ee2..000000000 --- a/core/app-framework/wgl/app/wa-inc/inc/wgl_cb.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (C) 2019 Intel Corporation. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - */ - -#ifndef WAMR_GRAPHIC_LIBRARY_CB_H -#define WAMR_GRAPHIC_LIBRARY_CB_H - -#ifdef __cplusplus -extern "C" { -#endif - -/** Checkbox styles. */ -enum { - WGL_CB_STYLE_BG, /**< Style of object background. */ - WGL_CB_STYLE_BOX_REL, /**< Style of box (released). */ - WGL_CB_STYLE_BOX_PR, /**< Style of box (pressed). */ - WGL_CB_STYLE_BOX_TGL_REL, /**< Style of box (released but checked). */ - WGL_CB_STYLE_BOX_TGL_PR, /**< Style of box (pressed and checked). */ - WGL_CB_STYLE_BOX_INA, /**< Style of disabled box */ -}; -typedef uint8_t wgl_cb_style_t; - - -/** - * Create a check box objects - * @param par pointer to an object, it will be the parent of the new check box - * @param copy pointer to a check box object, if not NULL then the new object will be copied from it - * @return pointer to the created check box - */ -wgl_obj_t wgl_cb_create(wgl_obj_t par, const wgl_obj_t copy); - -/*===================== - * Setter functions - *====================*/ - -/** - * Set the text of a check box. `txt` will be copied and may be deallocated - * after this function returns. - * @param cb pointer to a check box - * @param txt the text of the check box. NULL to refresh with the current text. - */ -void wgl_cb_set_text(wgl_obj_t cb, const char * txt); - -/** - * Set the text of a check box. `txt` must not be deallocated during the life - * of this checkbox. - * @param cb pointer to a check box - * @param txt the text of the check box. NULL to refresh with the current text. - */ -void wgl_cb_set_static_text(wgl_obj_t cb, const char * txt); - - -/*===================== - * Getter functions - *====================*/ - - -/** - * Get the length of the text of a check box - * @param label the check box object - * @return the length of the text of the check box - */ -unsigned int wgl_cb_get_text_length(wgl_obj_t cb); - -/** - * Get the text of a check box - * @param label the check box object - * @param buffer buffer to save the text - * @param buffer_len length of the buffer - * @return the text of the check box, note that the text will be truncated if buffer is not long enough - */ -char *wgl_cb_get_text(wgl_obj_t cb, char *buffer, int buffer_len); - -#ifdef __cplusplus -} -#endif - -#endif /* WAMR_GRAPHIC_LIBRARY_CB_H */ diff --git a/core/app-framework/wgl/app/wa-inc/inc/wgl_label.h b/core/app-framework/wgl/app/wa-inc/inc/wgl_label.h deleted file mode 100644 index 3c7f07a32..000000000 --- a/core/app-framework/wgl/app/wa-inc/inc/wgl_label.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (C) 2019 Intel Corporation. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - */ - -#ifndef WAMR_GRAPHIC_LIBRARY_LABEL_H -#define WAMR_GRAPHIC_LIBRARY_LABEL_H - -#ifdef __cplusplus -extern "C" { -#endif - -/** Long mode behaviors. Used in 'wgl_label_ext_t' */ -enum { - WGL_LABEL_LONG_EXPAND, /**< Expand the object size to the text size*/ - WGL_LABEL_LONG_BREAK, /**< Keep the object width, break the too long lines and expand the object - height*/ - WGL_LABEL_LONG_DOT, /**< Keep the size and write dots at the end if the text is too long*/ - WGL_LABEL_LONG_SROLL, /**< Keep the size and roll the text back and forth*/ - WGL_LABEL_LONG_SROLL_CIRC, /**< Keep the size and roll the text circularly*/ - WGL_LABEL_LONG_CROP, /**< Keep the size and crop the text out of it*/ -}; -typedef uint8_t wgl_label_long_mode_t; - -/** Label align policy*/ -enum { - WGL_LABEL_ALIGN_LEFT, /**< Align text to left */ - WGL_LABEL_ALIGN_CENTER, /**< Align text to center */ - WGL_LABEL_ALIGN_RIGHT, /**< Align text to right */ -}; -typedef uint8_t wgl_label_align_t; - -/** Label styles*/ -enum { - WGL_LABEL_STYLE_MAIN, -}; -typedef uint8_t wgl_label_style_t; - -/* Create a label */ -wgl_obj_t wgl_label_create(wgl_obj_t par, wgl_obj_t copy); - -/* Set text for the label */ -void wgl_label_set_text(wgl_obj_t label, const char * text); - -/** - * Get the length of the text of a label - * @param label the label object - * @return the length of the text of the label - */ -unsigned int wgl_label_get_text_length(wgl_obj_t label); - -/** - * Get the text of a label - * @param label the label object - * @param buffer buffer to save the text - * @param buffer_len length of the buffer - * @return the text of the label, note that the text will be truncated if buffer is not long enough - */ -char *wgl_label_get_text(wgl_obj_t label, char *buffer, int buffer_len); - - -#ifdef __cplusplus -} -#endif - -#endif /* WAMR_GRAPHIC_LIBRARY_LABEL_H */ diff --git a/core/app-framework/wgl/app/wa-inc/inc/wgl_list.h b/core/app-framework/wgl/app/wa-inc/inc/wgl_list.h deleted file mode 100644 index fd83276ad..000000000 --- a/core/app-framework/wgl/app/wa-inc/inc/wgl_list.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (C) 2019 Intel Corporation. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - */ - -#ifndef WAMR_GRAPHIC_LIBRARY_LIST_H -#define WAMR_GRAPHIC_LIBRARY_LIST_H - -#ifdef __cplusplus -extern "C" { -#endif - -/** List styles. */ -enum { - WGL_LIST_STYLE_BG, /**< List background style */ - WGL_LIST_STYLE_SCRL, /**< List scrollable area style. */ - WGL_LIST_STYLE_SB, /**< List scrollbar style. */ - WGL_LIST_STYLE_EDGE_FLASH, /**< List edge flash style. */ - WGL_LIST_STYLE_BTN_REL, /**< Same meaning as the ordinary button styles. */ - WGL_LIST_STYLE_BTN_PR, - WGL_LIST_STYLE_BTN_TGL_REL, - WGL_LIST_STYLE_BTN_TGL_PR, - WGL_LIST_STYLE_BTN_INA, -}; -typedef uint8_t wgl_list_style_t; - - -/** - * Create a list objects - * @param par pointer to an object, it will be the parent of the new list - * @param copy pointer to a list object, if not NULL then the new object will be copied from it - * @return pointer to the created list - */ -wgl_obj_t wgl_list_create(wgl_obj_t par, wgl_obj_t copy); - - -/*====================== - * Add/remove functions - *=====================*/ - -/** - * Add a list element to the list - * @param list pointer to list object - * @param img_fn file name of an image before the text (NULL if unused) - * @param txt text of the list element (NULL if unused) - * @return pointer to the new list element which can be customized (a button) - */ -wgl_obj_t wgl_list_add_btn(wgl_obj_t list, const void * img_src, const char * txt); - -#ifdef __cplusplus -} -#endif - -#endif /* WAMR_GRAPHIC_LIBRARY_LIST_H */ diff --git a/core/app-framework/wgl/app/wa-inc/inc/wgl_obj.h b/core/app-framework/wgl/app/wa-inc/inc/wgl_obj.h deleted file mode 100644 index 80d2cb09b..000000000 --- a/core/app-framework/wgl/app/wa-inc/inc/wgl_obj.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (C) 2019 Intel Corporation. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - */ - -#ifndef WAMR_GRAPHIC_LIBRARY_OBJ_H -#define WAMR_GRAPHIC_LIBRARY_OBJ_H - -#ifdef __cplusplus -extern "C" { -#endif - -typedef void * wgl_obj_t; - -enum { - WGL_EVENT_PRESSED, /**< The object has been pressed*/ - WGL_EVENT_PRESSING, /**< The object is being pressed (called continuously while pressing)*/ - WGL_EVENT_PRESS_LOST, /**< User is still pressing but slid cursor/finger off of the object */ - WGL_EVENT_SHORT_CLICKED, /**< User pressed object for a short period of time, then released it. Not called if dragged. */ - WGL_EVENT_LONG_PRESSED, /**< Object has been pressed for at least `WGL_INDEV_LONG_PRESS_TIME`. Not called if dragged.*/ - WGL_EVENT_LONG_PRESSED_REPEAT, /**< Called after `WGL_INDEV_LONG_PRESS_TIME` in every - `WGL_INDEV_LONG_PRESS_REP_TIME` ms. Not called if dragged.*/ - WGL_EVENT_CLICKED, /**< Called on release if not dragged (regardless to long press)*/ - WGL_EVENT_RELEASED, /**< Called in every cases when the object has been released*/ - WGL_EVENT_DRAG_BEGIN, - WGL_EVENT_DRAG_END, - WGL_EVENT_DRAG_THROW_BEGIN, - WGL_EVENT_KEY, - WGL_EVENT_FOCUSED, - WGL_EVENT_DEFOCUSED, - WGL_EVENT_VALUE_CHANGED, /**< The object's value has changed (i.e. slider moved) */ - WGL_EVENT_INSERT, - WGL_EVENT_REFRESH, - WGL_EVENT_APPLY, /**< "Ok", "Apply" or similar specific button has clicked*/ - WGL_EVENT_CANCEL, /**< "Close", "Cancel" or similar specific button has clicked*/ - WGL_EVENT_DELETE, /**< Object is being deleted */ -}; -typedef uint8_t wgl_event_t; /**< Type of event being sent to the object. */ - - -/** Object alignment. */ -enum { - WGL_ALIGN_CENTER = 0, - WGL_ALIGN_IN_TOP_LEFT, - WGL_ALIGN_IN_TOP_MID, - WGL_ALIGN_IN_TOP_RIGHT, - WGL_ALIGN_IN_BOTTOM_LEFT, - WGL_ALIGN_IN_BOTTOM_MID, - WGL_ALIGN_IN_BOTTOM_RIGHT, - WGL_ALIGN_IN_LEFT_MID, - WGL_ALIGN_IN_RIGHT_MID, - WGL_ALIGN_OUT_TOP_LEFT, - WGL_ALIGN_OUT_TOP_MID, - WGL_ALIGN_OUT_TOP_RIGHT, - WGL_ALIGN_OUT_BOTTOM_LEFT, - WGL_ALIGN_OUT_BOTTOM_MID, - WGL_ALIGN_OUT_BOTTOM_RIGHT, - WGL_ALIGN_OUT_LEFT_TOP, - WGL_ALIGN_OUT_LEFT_MID, - WGL_ALIGN_OUT_LEFT_BOTTOM, - WGL_ALIGN_OUT_RIGHT_TOP, - WGL_ALIGN_OUT_RIGHT_MID, - WGL_ALIGN_OUT_RIGHT_BOTTOM, -}; -typedef uint8_t wgl_align_t; - - -enum { - WGL_DRAG_DIR_HOR = 0x1, /**< Object can be dragged horizontally. */ - WGL_DRAG_DIR_VER = 0x2, /**< Object can be dragged vertically. */ - WGL_DRAG_DIR_ALL = 0x3, /**< Object can be dragged in all directions. */ -}; - -typedef uint8_t wgl_drag_dir_t; - -typedef void (*wgl_event_cb_t)(wgl_obj_t obj, wgl_event_t event); - -void wgl_obj_align(wgl_obj_t obj, wgl_obj_t base, wgl_align_t align, wgl_coord_t x_mod, wgl_coord_t y_mod); -void wgl_obj_set_event_cb(wgl_obj_t obj, wgl_event_cb_t event_cb); -wgl_res_t wgl_obj_del(wgl_obj_t obj); -void wgl_obj_del_async(wgl_obj_t obj); -void wgl_obj_clean(wgl_obj_t obj); - - - -#ifdef __cplusplus -} -#endif - -#endif /* WAMR_GRAPHIC_LIBRARY_OBJ_H */ diff --git a/core/app-framework/wgl/app/wa-inc/inc/wgl_types.h b/core/app-framework/wgl/app/wa-inc/inc/wgl_types.h deleted file mode 100644 index 8f6956526..000000000 --- a/core/app-framework/wgl/app/wa-inc/inc/wgl_types.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2019 Intel Corporation. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - */ - -#ifndef WAMR_GRAPHIC_LIBRARY_TYPES_H -#define WAMR_GRAPHIC_LIBRARY_TYPES_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -/** - * WGL error codes. - */ -enum { - WGL_RES_INV = 0, /*Typically indicates that the object is deleted (become invalid) in the action - function or an operation was failed*/ - WGL_RES_OK, /*The object is valid (no deleted) after the action*/ -}; -typedef uint8_t wgl_res_t; - -#ifdef __cplusplus -} -#endif - -#endif /* WAMR_GRAPHIC_LIBRARY_TYPES_H */ diff --git a/core/app-framework/wgl/app/wa-inc/lv_conf.h b/core/app-framework/wgl/app/wa-inc/lv_conf.h new file mode 100644 index 000000000..b9f3de8c3 --- /dev/null +++ b/core/app-framework/wgl/app/wa-inc/lv_conf.h @@ -0,0 +1,497 @@ +/** + * @file lv_conf.h + * + */ + +/* + * COPY THIS FILE AS `lv_conf.h` NEXT TO the `lvgl` FOLDER + */ + +#if 1 /*Set it to "1" to enable content*/ + +#ifndef LV_CONF_H +#define LV_CONF_H +/* clang-format off */ + +#include + + + +/*==================== + Graphical settings + *====================*/ + +/* Maximal horizontal and vertical resolution to support by the library.*/ +#define LV_HOR_RES_MAX (480) +#define LV_VER_RES_MAX (320) + +/* Color depth: + * - 1: 1 byte per pixel + * - 8: RGB233 + * - 16: RGB565 + * - 32: ARGB8888 + */ +#define LV_COLOR_DEPTH 16 + +/* Swap the 2 bytes of RGB565 color. + * Useful if the display has a 8 bit interface (e.g. SPI)*/ +#define LV_COLOR_16_SWAP 0 + +/* 1: Enable screen transparency. + * Useful for OSD or other overlapping GUIs. + * Requires `LV_COLOR_DEPTH = 32` colors and the screen's style should be modified: `style.body.opa = ...`*/ +#define LV_COLOR_SCREEN_TRANSP 0 + +/*Images pixels with this color will not be drawn (with chroma keying)*/ +#define LV_COLOR_TRANSP LV_COLOR_LIME /*LV_COLOR_LIME: pure green*/ + +/* Enable anti-aliasing (lines, and radiuses will be smoothed) */ +#define LV_ANTIALIAS 1 + +/* Default display refresh period. + * Can be changed in the display driver (`lv_disp_drv_t`).*/ +#define LV_DISP_DEF_REFR_PERIOD 30 /*[ms]*/ + +/* Dot Per Inch: used to initialize default sizes. + * E.g. a button with width = LV_DPI / 2 -> half inch wide + * (Not so important, you can adjust it to modify default sizes and spaces)*/ +#define LV_DPI 100 /*[px]*/ + +/* Type of coordinates. Should be `int16_t` (or `int32_t` for extreme cases) */ +typedef int16_t lv_coord_t; + +/*========================= + Memory manager settings + *=========================*/ + +/* LittelvGL's internal memory manager's settings. + * The graphical objects and other related data are stored here. */ + +/* 1: use custom malloc/free, 0: use the built-in `lv_mem_alloc` and `lv_mem_free` */ +#define LV_MEM_CUSTOM 0 +#if LV_MEM_CUSTOM == 0 +/* Size of the memory used by `lv_mem_alloc` in bytes (>= 2kB)*/ +# define LV_MEM_SIZE (32U * 1024U) + +/* Complier prefix for a big array declaration */ +# define LV_MEM_ATTR + +/* Set an address for the memory pool instead of allocating it as an array. + * Can be in external SRAM too. */ +# define LV_MEM_ADR 0 + +/* Automatically defrag. on free. Defrag. means joining the adjacent free cells. */ +# define LV_MEM_AUTO_DEFRAG 1 +#else /*LV_MEM_CUSTOM*/ +# define LV_MEM_CUSTOM_INCLUDE /*Header for the dynamic memory function*/ +# define LV_MEM_CUSTOM_ALLOC malloc /*Wrapper to malloc*/ +# define LV_MEM_CUSTOM_FREE free /*Wrapper to free*/ +#endif /*LV_MEM_CUSTOM*/ + +/* Garbage Collector settings + * Used if lvgl is binded to higher level language and the memory is managed by that language */ +#define LV_ENABLE_GC 0 +#if LV_ENABLE_GC != 0 +# define LV_GC_INCLUDE "gc.h" /*Include Garbage Collector related things*/ +# define LV_MEM_CUSTOM_REALLOC your_realloc /*Wrapper to realloc*/ +# define LV_MEM_CUSTOM_GET_SIZE your_mem_get_size /*Wrapper to lv_mem_get_size*/ +#endif /* LV_ENABLE_GC */ + +/*======================= + Input device settings + *=======================*/ + +/* Input device default settings. + * Can be changed in the Input device driver (`lv_indev_drv_t`)*/ + +/* Input device read period in milliseconds */ +#define LV_INDEV_DEF_READ_PERIOD 30 + +/* Drag threshold in pixels */ +#define LV_INDEV_DEF_DRAG_LIMIT 10 + +/* Drag throw slow-down in [%]. Greater value -> faster slow-down */ +#define LV_INDEV_DEF_DRAG_THROW 20 + +/* Long press time in milliseconds. + * Time to send `LV_EVENT_LONG_PRESSSED`) */ +#define LV_INDEV_DEF_LONG_PRESS_TIME 400 + +/* Repeated trigger period in long press [ms] + * Time between `LV_EVENT_LONG_PRESSED_REPEAT */ +#define LV_INDEV_DEF_LONG_PRESS_REP_TIME 100 + +/*================== + * Feature usage + *==================*/ + +/*1: Enable the Animations */ +#define LV_USE_ANIMATION 1 +#if LV_USE_ANIMATION + +/*Declare the type of the user data of animations (can be e.g. `void *`, `int`, `struct`)*/ +typedef void * lv_anim_user_data_t; + +#endif + +/* 1: Enable shadow drawing*/ +#define LV_USE_SHADOW 1 + +/* 1: Enable object groups (for keyboard/encoder navigation) */ +#define LV_USE_GROUP 1 +#if LV_USE_GROUP +typedef void * lv_group_user_data_t; +#endif /*LV_USE_GROUP*/ + +/* 1: Enable GPU interface*/ +#define LV_USE_GPU 1 + +/* 1: Enable file system (might be required for images */ +#define LV_USE_FILESYSTEM 1 +#if LV_USE_FILESYSTEM +/*Declare the type of the user data of file system drivers (can be e.g. `void *`, `int`, `struct`)*/ +typedef void * lv_fs_drv_user_data_t; +#endif + +/*1: Add a `user_data` to drivers and objects*/ +#define LV_USE_USER_DATA 0 + +/*======================== + * Image decoder and cache + *========================*/ + +/* 1: Enable indexed (palette) images */ +#define LV_IMG_CF_INDEXED 1 + +/* 1: Enable alpha indexed images */ +#define LV_IMG_CF_ALPHA 1 + +/* Default image cache size. Image caching keeps the images opened. + * If only the built-in image formats are used there is no real advantage of caching. + * (I.e. no new image decoder is added) + * With complex image decoders (e.g. PNG or JPG) caching can save the continuous open/decode of images. + * However the opened images might consume additional RAM. + * LV_IMG_CACHE_DEF_SIZE must be >= 1 */ +#define LV_IMG_CACHE_DEF_SIZE 1 + +/*Declare the type of the user data of image decoder (can be e.g. `void *`, `int`, `struct`)*/ +typedef void * lv_img_decoder_user_data_t; + +/*===================== + * Compiler settings + *====================*/ +/* Define a custom attribute to `lv_tick_inc` function */ +#define LV_ATTRIBUTE_TICK_INC + +/* Define a custom attribute to `lv_task_handler` function */ +#define LV_ATTRIBUTE_TASK_HANDLER + +/* With size optimization (-Os) the compiler might not align data to + * 4 or 8 byte boundary. This alignment will be explicitly applied where needed. + * E.g. __attribute__((aligned(4))) */ +#define LV_ATTRIBUTE_MEM_ALIGN + +/* Attribute to mark large constant arrays for example + * font's bitmaps */ +#define LV_ATTRIBUTE_LARGE_CONST + +/*=================== + * HAL settings + *==================*/ + +/* 1: use a custom tick source. + * It removes the need to manually update the tick with `lv_tick_inc`) */ +#define LV_TICK_CUSTOM 0 +#if LV_TICK_CUSTOM == 1 +#define LV_TICK_CUSTOM_INCLUDE "something.h" /*Header for the sys time function*/ +#define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis()) /*Expression evaluating to current systime in ms*/ +#endif /*LV_TICK_CUSTOM*/ + +typedef void * lv_disp_drv_user_data_t; /*Type of user data in the display driver*/ +typedef void * lv_indev_drv_user_data_t; /*Type of user data in the input device driver*/ + +/*================ + * Log settings + *===============*/ + +/*1: Enable the log module*/ +#define LV_USE_LOG 0 +#if LV_USE_LOG +/* How important log should be added: + * LV_LOG_LEVEL_TRACE A lot of logs to give detailed information + * LV_LOG_LEVEL_INFO Log important events + * LV_LOG_LEVEL_WARN Log if something unwanted happened but didn't cause a problem + * LV_LOG_LEVEL_ERROR Only critical issue, when the system may fail + * LV_LOG_LEVEL_NONE Do not log anything + */ +# define LV_LOG_LEVEL LV_LOG_LEVEL_WARN + +/* 1: Print the log with 'printf'; + * 0: user need to register a callback with `lv_log_register_print`*/ +# define LV_LOG_PRINTF 0 +#endif /*LV_USE_LOG*/ + +/*================ + * THEME USAGE + *================*/ +#define LV_THEME_LIVE_UPDATE 0 /*1: Allow theme switching at run time. Uses 8..10 kB of RAM*/ + +#define LV_USE_THEME_TEMPL 0 /*Just for test*/ +#define LV_USE_THEME_DEFAULT 0 /*Built mainly from the built-in styles. Consumes very few RAM*/ +#define LV_USE_THEME_ALIEN 0 /*Dark futuristic theme*/ +#define LV_USE_THEME_NIGHT 0 /*Dark elegant theme*/ +#define LV_USE_THEME_MONO 0 /*Mono color theme for monochrome displays*/ +#define LV_USE_THEME_MATERIAL 0 /*Flat theme with bold colors and light shadows*/ +#define LV_USE_THEME_ZEN 0 /*Peaceful, mainly light theme */ +#define LV_USE_THEME_NEMO 0 /*Water-like theme based on the movie "Finding Nemo"*/ + +/*================== + * FONT USAGE + *===================*/ + +/* The built-in fonts contains the ASCII range and some Symbols with 4 bit-per-pixel. + * The symbols are available via `LV_SYMBOL_...` defines + * More info about fonts: https://docs.littlevgl.com/#Fonts + * To create a new font go to: https://littlevgl.com/ttf-font-to-c-array + */ + +/* Robot fonts with bpp = 4 + * https://fonts.google.com/specimen/Roboto */ +#define LV_FONT_ROBOTO_12 0 +#define LV_FONT_ROBOTO_16 1 +#define LV_FONT_ROBOTO_22 0 +#define LV_FONT_ROBOTO_28 0 + +/*Pixel perfect monospace font + * http://pelulamu.net/unscii/ */ +#define LV_FONT_UNSCII_8 0 + +/* Optionally declare your custom fonts here. + * You can use these fonts as default font too + * and they will be available globally. E.g. + * #define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(my_font_1) \ + * LV_FONT_DECLARE(my_font_2) + */ +#define LV_FONT_CUSTOM_DECLARE + +/*Always set a default font from the built-in fonts*/ +#define LV_FONT_DEFAULT &lv_font_roboto_16 + +/* Enable it if you have fonts with a lot of characters. + * The limit depends on the font size, font face and bpp + * but with > 10,000 characters if you see issues probably you need to enable it.*/ +#define LV_FONT_FMT_TXT_LARGE 0 + +/*Declare the type of the user data of fonts (can be e.g. `void *`, `int`, `struct`)*/ +typedef void * lv_font_user_data_t; + +/*================= + * Text settings + *=================*/ + +/* Select a character encoding for strings. + * Your IDE or editor should have the same character encoding + * - LV_TXT_ENC_UTF8 + * - LV_TXT_ENC_ASCII + * */ +#define LV_TXT_ENC LV_TXT_ENC_UTF8 + + /*Can break (wrap) texts on these chars*/ +#define LV_TXT_BREAK_CHARS " ,.;:-_" + +/*=================== + * LV_OBJ SETTINGS + *==================*/ + +/*Declare the type of the user data of object (can be e.g. `void *`, `int`, `struct`)*/ +typedef void * lv_obj_user_data_t; + +/*1: enable `lv_obj_realaign()` based on `lv_obj_align()` parameters*/ +#define LV_USE_OBJ_REALIGN 1 + +/* Enable to make the object clickable on a larger area. + * LV_EXT_CLICK_AREA_OFF or 0: Disable this feature + * LV_EXT_CLICK_AREA_TINY: The extra area can be adjusted horizontally and vertically (0..255 px) + * LV_EXT_CLICK_AREA_FULL: The extra area can be adjusted in all 4 directions (-32k..+32k px) + */ +#define LV_USE_EXT_CLICK_AREA LV_EXT_CLICK_AREA_OFF + +/*================== + * LV OBJ X USAGE + *================*/ +/* + * Documentation of the object types: https://docs.littlevgl.com/#Object-types + */ + +/*Arc (dependencies: -)*/ +#define LV_USE_ARC 1 + +/*Bar (dependencies: -)*/ +#define LV_USE_BAR 1 + +/*Button (dependencies: lv_cont*/ +#define LV_USE_BTN 1 +#if LV_USE_BTN != 0 +/*Enable button-state animations - draw a circle on click (dependencies: LV_USE_ANIMATION)*/ +# define LV_BTN_INK_EFFECT 0 +#endif + +/*Button matrix (dependencies: -)*/ +#define LV_USE_BTNM 1 + +/*Calendar (dependencies: -)*/ +#define LV_USE_CALENDAR 1 + +/*Canvas (dependencies: lv_img)*/ +#define LV_USE_CANVAS 1 + +/*Check box (dependencies: lv_btn, lv_label)*/ +#define LV_USE_CB 1 + +/*Chart (dependencies: -)*/ +#define LV_USE_CHART 1 +#if LV_USE_CHART +# define LV_CHART_AXIS_TICK_LABEL_MAX_LEN 20 +#endif + +/*Container (dependencies: -*/ +#define LV_USE_CONT 1 + +/*Drop down list (dependencies: lv_page, lv_label, lv_symbol_def.h)*/ +#define LV_USE_DDLIST 1 +#if LV_USE_DDLIST != 0 +/*Open and close default animation time [ms] (0: no animation)*/ +# define LV_DDLIST_DEF_ANIM_TIME 200 +#endif + +/*Gauge (dependencies:lv_bar, lv_lmeter)*/ +#define LV_USE_GAUGE 1 + +/*Image (dependencies: lv_label*/ +#define LV_USE_IMG 1 + +/*Image Button (dependencies: lv_btn*/ +#define LV_USE_IMGBTN 1 +#if LV_USE_IMGBTN +/*1: The imgbtn requires left, mid and right parts and the width can be set freely*/ +# define LV_IMGBTN_TILED 0 +#endif + +/*Keyboard (dependencies: lv_btnm)*/ +#define LV_USE_KB 1 + +/*Label (dependencies: -*/ +#define LV_USE_LABEL 1 +#if LV_USE_LABEL != 0 +/*Hor, or ver. scroll speed [px/sec] in 'LV_LABEL_LONG_ROLL/ROLL_CIRC' mode*/ +# define LV_LABEL_DEF_SCROLL_SPEED 25 + +/* Waiting period at beginning/end of animation cycle */ +# define LV_LABEL_WAIT_CHAR_COUNT 3 + +/*Enable selecting text of the label */ +# define LV_LABEL_TEXT_SEL 0 + +/*Store extra some info in labels (12 bytes) to speed up drawing of very long texts*/ +# define LV_LABEL_LONG_TXT_HINT 0 +#endif + +/*LED (dependencies: -)*/ +#define LV_USE_LED 1 + +/*Line (dependencies: -*/ +#define LV_USE_LINE 1 + +/*List (dependencies: lv_page, lv_btn, lv_label, (lv_img optionally for icons ))*/ +#define LV_USE_LIST 1 +#if LV_USE_LIST != 0 +/*Default animation time of focusing to a list element [ms] (0: no animation) */ +# define LV_LIST_DEF_ANIM_TIME 100 +#endif + +/*Line meter (dependencies: *;)*/ +#define LV_USE_LMETER 1 + +/*Message box (dependencies: lv_rect, lv_btnm, lv_label)*/ +#define LV_USE_MBOX 1 + +/*Page (dependencies: lv_cont)*/ +#define LV_USE_PAGE 1 +#if LV_USE_PAGE != 0 +/*Focus default animation time [ms] (0: no animation)*/ +# define LV_PAGE_DEF_ANIM_TIME 400 +#endif + +/*Preload (dependencies: lv_arc, lv_anim)*/ +#define LV_USE_PRELOAD 1 +#if LV_USE_PRELOAD != 0 +# define LV_PRELOAD_DEF_ARC_LENGTH 60 /*[deg]*/ +# define LV_PRELOAD_DEF_SPIN_TIME 1000 /*[ms]*/ +# define LV_PRELOAD_DEF_ANIM LV_PRELOAD_TYPE_SPINNING_ARC +#endif + +/*Roller (dependencies: lv_ddlist)*/ +#define LV_USE_ROLLER 1 +#if LV_USE_ROLLER != 0 +/*Focus animation time [ms] (0: no animation)*/ +# define LV_ROLLER_DEF_ANIM_TIME 200 + +/*Number of extra "pages" when the roller is infinite*/ +# define LV_ROLLER_INF_PAGES 7 +#endif + +/*Slider (dependencies: lv_bar)*/ +#define LV_USE_SLIDER 1 + +/*Spinbox (dependencies: lv_ta)*/ +#define LV_USE_SPINBOX 1 + +/*Switch (dependencies: lv_slider)*/ +#define LV_USE_SW 1 + +/*Text area (dependencies: lv_label, lv_page)*/ +#define LV_USE_TA 1 +#if LV_USE_TA != 0 +# define LV_TA_DEF_CURSOR_BLINK_TIME 400 /*ms*/ +# define LV_TA_DEF_PWD_SHOW_TIME 1500 /*ms*/ +#endif + +/*Table (dependencies: lv_label)*/ +#define LV_USE_TABLE 1 +#if LV_USE_TABLE +# define LV_TABLE_COL_MAX 12 +#endif + +/*Tab (dependencies: lv_page, lv_btnm)*/ +#define LV_USE_TABVIEW 1 +# if LV_USE_TABVIEW != 0 +/*Time of slide animation [ms] (0: no animation)*/ +# define LV_TABVIEW_DEF_ANIM_TIME 300 +#endif + +/*Tileview (dependencies: lv_page) */ +#define LV_USE_TILEVIEW 1 +#if LV_USE_TILEVIEW +/*Time of slide animation [ms] (0: no animation)*/ +# define LV_TILEVIEW_DEF_ANIM_TIME 300 +#endif + +/*Window (dependencies: lv_cont, lv_btn, lv_label, lv_img, lv_page)*/ +#define LV_USE_WIN 1 + +/*================== + * Non-user section + *==================*/ + +#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) /* Disable warnings for Visual Studio*/ +# define _CRT_SECURE_NO_WARNINGS +#endif + +/*--END OF LV_CONF_H--*/ + +/*Be sure every define has a default value*/ +//#include "../lv_conf_checker.h" + +#endif /*LV_CONF_H*/ + +#endif /*End of "Content enable"*/ diff --git a/core/app-framework/wgl/app/wa-inc/lvgl-compatible/LICENCE.txt b/core/app-framework/wgl/app/wa-inc/lvgl-compatible/LICENCE.txt deleted file mode 100644 index beaef1d26..000000000 --- a/core/app-framework/wgl/app/wa-inc/lvgl-compatible/LICENCE.txt +++ /dev/null @@ -1,8 +0,0 @@ -MIT licence -Copyright (c) 2016 Gábor Kiss-Vámosi - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/core/app-framework/wgl/app/wa-inc/lvgl-compatible/lv_btn.h b/core/app-framework/wgl/app/wa-inc/lvgl-compatible/lv_btn.h deleted file mode 100644 index 75337a4e7..000000000 --- a/core/app-framework/wgl/app/wa-inc/lvgl-compatible/lv_btn.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (C) 2019 Intel Corporation. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - */ - -#ifndef WAMR_GRAPHIC_LIBRARY_BTN_LVGL_COMPATIBLE_H -#define WAMR_GRAPHIC_LIBRARY_BTN_LVGL_COMPATIBLE_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "../inc/wgl_btn.h" - -/** Possible states of a button. - * It can be used not only by buttons but other button-like objects too*/ -enum { - /**Released*/ - LV_BTN_STATE_REL, - - /**Pressed*/ - LV_BTN_STATE_PR, - - /**Toggled released*/ - LV_BTN_STATE_TGL_REL, - - /**Toggled pressed*/ - LV_BTN_STATE_TGL_PR, - - /**Inactive*/ - LV_BTN_STATE_INA, - - /**Number of states*/ - _LV_BTN_STATE_NUM, -}; -typedef wgl_btn_state_t lv_btn_state_t; - -/**Styles*/ -enum { - /** Release style */ - LV_BTN_STYLE_REL, - - /**Pressed style*/ - LV_BTN_STYLE_PR, - - /** Toggle released style*/ - LV_BTN_STYLE_TGL_REL, - - /** Toggle pressed style */ - LV_BTN_STYLE_TGL_PR, - - /** Inactive style*/ - LV_BTN_STYLE_INA, -}; -typedef wgl_btn_style_t lv_btn_style_t; - - -#define lv_btn_create wgl_btn_create -#define lv_btn_set_toggle wgl_btn_set_toggle -#define lv_btn_set_state wgl_btn_set_state -#define lv_btn_toggle wgl_btn_toggle -#define lv_btn_set_ink_in_time wgl_btn_set_ink_in_time -#define lv_btn_set_ink_wait_time wgl_btn_set_ink_wait_time -#define lv_btn_set_ink_out_time wgl_btn_set_ink_out_time -#define lv_btn_get_state wgl_btn_get_state -#define lv_btn_get_toggle wgl_btn_get_toggle -#define lv_btn_get_ink_in_time wgl_btn_get_ink_in_time -#define lv_btn_get_ink_wait_time wgl_btn_get_ink_wait_time -#define lv_btn_get_ink_out_time wgl_btn_get_ink_out_time - -#ifdef __cplusplus -} -#endif - -#endif /* WAMR_GRAPHIC_LIBRARY_BTN_LVGL_COMPATIBLE_H */ diff --git a/core/app-framework/wgl/app/wa-inc/lvgl-compatible/lv_cb.h b/core/app-framework/wgl/app/wa-inc/lvgl-compatible/lv_cb.h deleted file mode 100644 index edaa109bb..000000000 --- a/core/app-framework/wgl/app/wa-inc/lvgl-compatible/lv_cb.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2019 Intel Corporation. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - */ - -#ifndef WAMR_GRAPHIC_LIBRARY_CB_LVGL_COMPATIBLE_H -#define WAMR_GRAPHIC_LIBRARY_CB_LVGL_COMPATIBLE_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "../inc/wgl_cb.h" - -/** Checkbox styles. */ -enum { - LV_CB_STYLE_BG, /**< Style of object background. */ - LV_CB_STYLE_BOX_REL, /**< Style of box (released). */ - LV_CB_STYLE_BOX_PR, /**< Style of box (pressed). */ - LV_CB_STYLE_BOX_TGL_REL, /**< Style of box (released but checked). */ - LV_CB_STYLE_BOX_TGL_PR, /**< Style of box (pressed and checked). */ - LV_CB_STYLE_BOX_INA, /**< Style of disabled box */ -}; -typedef wgl_cb_style_t lv_cb_style_t; - - -#define lv_cb_create wgl_cb_create -#define lv_cb_set_text wgl_cb_set_text -#define lv_cb_set_static_text wgl_cb_set_static_text -#define lv_cb_get_text(cb) wgl_cb_get_text(cb, g_widget_text, 100) - -#ifdef __cplusplus -} -#endif - -#endif /* WAMR_GRAPHIC_LIBRARY_CB_LVGL_COMPATIBLE_H */ diff --git a/core/app-framework/wgl/app/wa-inc/lvgl-compatible/lv_label.h b/core/app-framework/wgl/app/wa-inc/lvgl-compatible/lv_label.h deleted file mode 100644 index 264ae295d..000000000 --- a/core/app-framework/wgl/app/wa-inc/lvgl-compatible/lv_label.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (C) 2019 Intel Corporation. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - */ - -#ifndef WAMR_GRAPHIC_LIBRARY_LABEL_LVGL_COMPATIBLE_H -#define WAMR_GRAPHIC_LIBRARY_LABEL_LVGL_COMPATIBLE_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "../inc/wgl_label.h" - -/** Long mode behaviors. Used in 'lv_label_ext_t' */ -enum { - LV_LABEL_LONG_EXPAND, /**< Expand the object size to the text size*/ - LV_LABEL_LONG_BREAK, /**< Keep the object width, break the too long lines and expand the object - height*/ - LV_LABEL_LONG_DOT, /**< Keep the size and write dots at the end if the text is too long*/ - LV_LABEL_LONG_SROLL, /**< Keep the size and roll the text back and forth*/ - LV_LABEL_LONG_SROLL_CIRC, /**< Keep the size and roll the text circularly*/ - LV_LABEL_LONG_CROP, /**< Keep the size and crop the text out of it*/ -}; -typedef wgl_label_long_mode_t lv_label_long_mode_t; - -/** Label align policy*/ -enum { - LV_LABEL_ALIGN_LEFT, /**< Align text to left */ - LV_LABEL_ALIGN_CENTER, /**< Align text to center */ - LV_LABEL_ALIGN_RIGHT, /**< Align text to right */ -}; -typedef wgl_label_align_t lv_label_align_t; - -/** Label styles*/ -enum { - LV_LABEL_STYLE_MAIN, -}; -typedef wgl_label_style_t lv_label_style_t; - - -#define lv_label_create wgl_label_create -#define lv_label_set_text wgl_label_set_text -#define lv_label_get_text(label) wgl_label_get_text(label, g_widget_text, 100) - -#ifdef __cplusplus -} -#endif - -#endif /* WAMR_GRAPHIC_LIBRARY_LABEL_LVGL_COMPATIBLE_H */ diff --git a/core/app-framework/wgl/app/wa-inc/lvgl-compatible/lv_list.h b/core/app-framework/wgl/app/wa-inc/lvgl-compatible/lv_list.h deleted file mode 100644 index cc9a35a88..000000000 --- a/core/app-framework/wgl/app/wa-inc/lvgl-compatible/lv_list.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2019 Intel Corporation. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - */ - -#ifndef WAMR_GRAPHIC_LIBRARY_LIST_LVGL_COMPATIBLE_H -#define WAMR_GRAPHIC_LIBRARY_LIST_LVGL_COMPATIBLE_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "../inc/wgl_list.h" - -/** List styles. */ -enum { - LV_LIST_STYLE_BG, /**< List background style */ - LV_LIST_STYLE_SCRL, /**< List scrollable area style. */ - LV_LIST_STYLE_SB, /**< List scrollbar style. */ - LV_LIST_STYLE_EDGE_FLASH, /**< List edge flash style. */ - LV_LIST_STYLE_BTN_REL, /**< Same meaning as the ordinary button styles. */ - LV_LIST_STYLE_BTN_PR, - LV_LIST_STYLE_BTN_TGL_REL, - LV_LIST_STYLE_BTN_TGL_PR, - LV_LIST_STYLE_BTN_INA, -}; -typedef wgl_list_style_t lv_list_style_t; - - -#define lv_list_create wgl_list_create -#define lv_list_add_btn wgl_list_add_btn - -#ifdef __cplusplus -} -#endif - -#endif /* WAMR_GRAPHIC_LIBRARY_LIST_LVGL_COMPATIBLE_H */ diff --git a/core/app-framework/wgl/app/wa-inc/lvgl-compatible/lv_obj.h b/core/app-framework/wgl/app/wa-inc/lvgl-compatible/lv_obj.h deleted file mode 100644 index b79ffb730..000000000 --- a/core/app-framework/wgl/app/wa-inc/lvgl-compatible/lv_obj.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (C) 2019 Intel Corporation. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - */ - -#ifndef WAMR_GRAPHIC_LIBRARY_OBJ_LVGL_COMPATIBLE_H -#define WAMR_GRAPHIC_LIBRARY_OBJ_LVGL_COMPATIBLE_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "../inc/wgl_obj.h" - -typedef void lv_obj_t; - -enum { - LV_EVENT_PRESSED, - LV_EVENT_PRESSING, - LV_EVENT_PRESS_LOST, - LV_EVENT_SHORT_CLICKED, - LV_EVENT_LONG_PRESSED, - LV_EVENT_LONG_PRESSED_REPEAT, - LV_EVENT_CLICKED, - LV_EVENT_RELEASED, - LV_EVENT_DRAG_BEGIN, - LV_EVENT_DRAG_END, - LV_EVENT_DRAG_THROW_BEGIN, - LV_EVENT_KEY, - LV_EVENT_FOCUSED, - LV_EVENT_DEFOCUSED, - LV_EVENT_VALUE_CHANGED, - LV_EVENT_INSERT, - LV_EVENT_REFRESH, - LV_EVENT_APPLY, - LV_EVENT_CANCEL, - LV_EVENT_DELETE, -}; -typedef wgl_event_t lv_event_t; - - -/** Object alignment. */ -enum { - LV_ALIGN_CENTER, - LV_ALIGN_IN_TOP_LEFT, - LV_ALIGN_IN_TOP_MID, - LV_ALIGN_IN_TOP_RIGHT, - LV_ALIGN_IN_BOTTOM_LEFT, - LV_ALIGN_IN_BOTTOM_MID, - LV_ALIGN_IN_BOTTOM_RIGHT, - LV_ALIGN_IN_LEFT_MID, - LV_ALIGN_IN_RIGHT_MID, - LV_ALIGN_OUT_TOP_LEFT, - LV_ALIGN_OUT_TOP_MID, - LV_ALIGN_OUT_TOP_RIGHT, - LV_ALIGN_OUT_BOTTOM_LEFT, - LV_ALIGN_OUT_BOTTOM_MID, - LV_ALIGN_OUT_BOTTOM_RIGHT, - LV_ALIGN_OUT_LEFT_TOP, - LV_ALIGN_OUT_LEFT_MID, - LV_ALIGN_OUT_LEFT_BOTTOM, - LV_ALIGN_OUT_RIGHT_TOP, - LV_ALIGN_OUT_RIGHT_MID, - LV_ALIGN_OUT_RIGHT_BOTTOM, -}; -typedef wgl_align_t lv_align_t; - - -enum { - LV_DRAG_DIR_HOR, - LV_DRAG_DIR_VER, - LV_DRAG_DIR_ALL, -}; - -typedef wgl_drag_dir_t lv_drag_dir_t; - - -#define lv_obj_align wgl_obj_align -#define lv_obj_set_event_cb wgl_obj_set_event_cb -#define lv_obj_del wgl_obj_del -#define lv_obj_del_async wgl_obj_del_async -#define lv_obj_clean wgl_obj_clean - - -#ifdef __cplusplus -} -#endif - -#endif /* WAMR_GRAPHIC_LIBRARY_OBJ_LVGL_COMPATIBLE_H */ diff --git a/core/app-framework/wgl/app/wa-inc/lvgl-compatible/lv_types.h b/core/app-framework/wgl/app/wa-inc/lvgl-compatible/lv_types.h deleted file mode 100644 index c8954b720..000000000 --- a/core/app-framework/wgl/app/wa-inc/lvgl-compatible/lv_types.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2019 Intel Corporation. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - */ - -#ifndef WAMR_GRAPHIC_LIBRARY_TYPES_LVGL_COMPATIBLE_H -#define WAMR_GRAPHIC_LIBRARY_TYPES_LVGL_COMPATIBLE_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "../inc/wgl_types.h" - -/** - * error codes. - */ -enum { - LV_RES_INV, - LV_RES_OK, -}; -typedef wgl_res_t lv_res_t; - -#ifdef __cplusplus -} -#endif - -#endif /* WAMR_GRAPHIC_LIBRARY_TYPES_LVGL_COMPATIBLE_H */ diff --git a/core/app-framework/wgl/app/wa-inc/lvgl.h b/core/app-framework/wgl/app/wa-inc/lvgl.h deleted file mode 100644 index 93d6f186d..000000000 --- a/core/app-framework/wgl/app/wa-inc/lvgl.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2019 Intel Corporation. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - */ - -#ifndef WAMR_GRAPHIC_LIBRARY_LVGL_COMPATIBLE_H -#define WAMR_GRAPHIC_LIBRARY_LVGL_COMPATIBLE_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "bi-inc/wgl_shared_utils.h" /* shared types between app and native */ -#include "lvgl-compatible/lv_types.h" -#include "lvgl-compatible/lv_obj.h" -#include "lvgl-compatible/lv_btn.h" -#include "lvgl-compatible/lv_cb.h" -#include "lvgl-compatible/lv_label.h" -#include "lvgl-compatible/lv_list.h" - - -#ifdef __cplusplus -} -#endif - -#endif /* WAMR_GRAPHIC_LIBRARY_LVGL_COMPATIBLE_H */ diff --git a/core/app-framework/wgl/app/wa-inc/lvgl/lv_obj.h b/core/app-framework/wgl/app/wa-inc/lvgl/lv_obj.h new file mode 100644 index 000000000..c79838e22 --- /dev/null +++ b/core/app-framework/wgl/app/wa-inc/lvgl/lv_obj.h @@ -0,0 +1,916 @@ +/** + * @file lv_obj.h + * + */ + +#ifndef LV_OBJ_H +#define LV_OBJ_H + +#ifdef __cplusplus +extern "C" { +#endif + +/********************* + * INCLUDES + *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else +#include "../../../lv_conf.h" +#endif + +#include +#include +#include "lv_style.h" +#include "../lv_misc/lv_types.h" +#include "../lv_misc/lv_area.h" +#include "../lv_misc/lv_mem.h" +#include "../lv_misc/lv_ll.h" +#include "../lv_misc/lv_color.h" +#include "../lv_misc/lv_log.h" +#include "../lv_hal/lv_hal.h" + +/********************* + * DEFINES + *********************/ + +/*Error check of lv_conf.h*/ +#if LV_HOR_RES_MAX == 0 || LV_VER_RES_MAX == 0 +#error "LittlevGL: LV_HOR_RES_MAX and LV_VER_RES_MAX must be greater than 0" +#endif + +#if LV_ANTIALIAS > 1 +#error "LittlevGL: LV_ANTIALIAS can be only 0 or 1" +#endif + +#define LV_MAX_ANCESTOR_NUM 8 + +#define LV_EXT_CLICK_AREA_OFF 0 +#define LV_EXT_CLICK_AREA_TINY 1 +#define LV_EXT_CLICK_AREA_FULL 2 + +/********************** + * TYPEDEFS + **********************/ + +struct _lv_obj_t; + + +/** Design modes */ +enum { + LV_DESIGN_DRAW_MAIN, /**< Draw the main portion of the object */ + LV_DESIGN_DRAW_POST, /**< Draw extras on the object */ + LV_DESIGN_COVER_CHK, /**< Check if the object fully covers the 'mask_p' area */ +}; +typedef uint8_t lv_design_mode_t; + +/** + * The design callback is used to draw the object on the screen. + * It accepts the object, a mask area, and the mode in which to draw the object. + */ +typedef bool (*lv_design_cb_t)(struct _lv_obj_t * obj, const lv_area_t * mask_p, lv_design_mode_t mode); + +enum { + LV_EVENT_PRESSED, /**< The object has been pressed*/ + LV_EVENT_PRESSING, /**< The object is being pressed (called continuously while pressing)*/ + LV_EVENT_PRESS_LOST, /**< User is still pressing but slid cursor/finger off of the object */ + LV_EVENT_SHORT_CLICKED, /**< User pressed object for a short period of time, then released it. Not called if dragged. */ + LV_EVENT_LONG_PRESSED, /**< Object has been pressed for at least `LV_INDEV_LONG_PRESS_TIME`. Not called if dragged.*/ + LV_EVENT_LONG_PRESSED_REPEAT, /**< Called after `LV_INDEV_LONG_PRESS_TIME` in every + `LV_INDEV_LONG_PRESS_REP_TIME` ms. Not called if dragged.*/ + LV_EVENT_CLICKED, /**< Called on release if not dragged (regardless to long press)*/ + LV_EVENT_RELEASED, /**< Called in every cases when the object has been released*/ + LV_EVENT_DRAG_BEGIN, + LV_EVENT_DRAG_END, + LV_EVENT_DRAG_THROW_BEGIN, + LV_EVENT_KEY, + LV_EVENT_FOCUSED, + LV_EVENT_DEFOCUSED, + LV_EVENT_VALUE_CHANGED, /**< The object's value has changed (i.e. slider moved) */ + LV_EVENT_INSERT, + LV_EVENT_REFRESH, + LV_EVENT_APPLY, /**< "Ok", "Apply" or similar specific button has clicked*/ + LV_EVENT_CANCEL, /**< "Close", "Cancel" or similar specific button has clicked*/ + LV_EVENT_DELETE, /**< Object is being deleted */ +}; +typedef uint8_t lv_event_t; /**< Type of event being sent to the object. */ + +/** + * @brief Event callback. + * Events are used to notify the user of some action being taken on the object. + * For details, see ::lv_event_t. + */ +typedef void (*lv_event_cb_t)(struct _lv_obj_t * obj, lv_event_t event); + +/** Signals are for use by the object itself or to extend the object's functionality. + * Applications should use ::lv_obj_set_event_cb to be notified of events that occur + * on the object. */ +enum { + /*General signals*/ + LV_SIGNAL_CLEANUP, /**< Object is being deleted */ + LV_SIGNAL_CHILD_CHG, /**< Child was removed/added */ + LV_SIGNAL_CORD_CHG, /**< Object coordinates/size have changed */ + LV_SIGNAL_PARENT_SIZE_CHG, /**< Parent's size has changed */ + LV_SIGNAL_STYLE_CHG, /**< Object's style has changed */ + LV_SIGNAL_REFR_EXT_DRAW_PAD, /**< Object's extra padding has changed */ + LV_SIGNAL_GET_TYPE, /**< LittlevGL needs to retrieve the object's type */ + + /*Input device related*/ + LV_SIGNAL_PRESSED, /**< The object has been pressed*/ + LV_SIGNAL_PRESSING, /**< The object is being pressed (called continuously while pressing)*/ + LV_SIGNAL_PRESS_LOST, /**< User is still pressing but slid cursor/finger off of the object */ + LV_SIGNAL_RELEASED, /**< User pressed object for a short period of time, then released it. Not called if dragged. */ + LV_SIGNAL_LONG_PRESS, /**< Object has been pressed for at least `LV_INDEV_LONG_PRESS_TIME`. Not called if dragged.*/ + LV_SIGNAL_LONG_PRESS_REP, /**< Called after `LV_INDEV_LONG_PRESS_TIME` in every `LV_INDEV_LONG_PRESS_REP_TIME` ms. Not called if dragged.*/ + LV_SIGNAL_DRAG_BEGIN, + LV_SIGNAL_DRAG_END, + /*Group related*/ + LV_SIGNAL_FOCUS, + LV_SIGNAL_DEFOCUS, + LV_SIGNAL_CONTROL, + LV_SIGNAL_GET_EDITABLE, +}; +typedef uint8_t lv_signal_t; + +typedef lv_res_t (*lv_signal_cb_t)(struct _lv_obj_t * obj, lv_signal_t sign, void * param); + +/** Object alignment. */ +enum { + LV_ALIGN_CENTER = 0, + LV_ALIGN_IN_TOP_LEFT, + LV_ALIGN_IN_TOP_MID, + LV_ALIGN_IN_TOP_RIGHT, + LV_ALIGN_IN_BOTTOM_LEFT, + LV_ALIGN_IN_BOTTOM_MID, + LV_ALIGN_IN_BOTTOM_RIGHT, + LV_ALIGN_IN_LEFT_MID, + LV_ALIGN_IN_RIGHT_MID, + LV_ALIGN_OUT_TOP_LEFT, + LV_ALIGN_OUT_TOP_MID, + LV_ALIGN_OUT_TOP_RIGHT, + LV_ALIGN_OUT_BOTTOM_LEFT, + LV_ALIGN_OUT_BOTTOM_MID, + LV_ALIGN_OUT_BOTTOM_RIGHT, + LV_ALIGN_OUT_LEFT_TOP, + LV_ALIGN_OUT_LEFT_MID, + LV_ALIGN_OUT_LEFT_BOTTOM, + LV_ALIGN_OUT_RIGHT_TOP, + LV_ALIGN_OUT_RIGHT_MID, + LV_ALIGN_OUT_RIGHT_BOTTOM, +}; +typedef uint8_t lv_align_t; + +#if LV_USE_OBJ_REALIGN +typedef struct +{ + const struct _lv_obj_t * base; + lv_coord_t xofs; + lv_coord_t yofs; + lv_align_t align; + uint8_t auto_realign : 1; + uint8_t origo_align : 1; /**< 1: the origo (center of the object) was aligned with + `lv_obj_align_origo`*/ +} lv_reailgn_t; +#endif + +enum { + LV_DRAG_DIR_HOR = 0x1, /**< Object can be dragged horizontally. */ + LV_DRAG_DIR_VER = 0x2, /**< Object can be dragged vertically. */ + LV_DRAG_DIR_ALL = 0x3, /**< Object can be dragged in all directions. */ +}; + +typedef uint8_t lv_drag_dir_t; + +typedef void lv_obj_t; +typedef void lv_obj_type_t; + + +/********************** + * GLOBAL PROTOTYPES + **********************/ + +/** + * Init. the 'lv' library. + */ +void lv_init(void); + +/*-------------------- + * Create and delete + *-------------------*/ + +/** + * Create a basic object + * @param parent pointer to a parent object. + * If NULL then a screen will be created + * @param copy pointer to a base object, if not NULL then the new object will be copied from it + * @return pointer to the new object + */ +lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy); + +/** + * Delete 'obj' and all of its children + * @param obj pointer to an object to delete + * @return LV_RES_INV because the object is deleted + */ +lv_res_t lv_obj_del(lv_obj_t * obj); + +/** + * Helper function for asynchronously deleting objects. + * Useful for cases where you can't delete an object directly in an `LV_EVENT_DELETE` handler (i.e. parent). + * @param obj object to delete + * @see lv_async_call + */ +void lv_obj_del_async(struct _lv_obj_t *obj); + +/** + * Delete all children of an object + * @param obj pointer to an object + */ +void lv_obj_clean(lv_obj_t * obj); + +/** + * Mark the object as invalid therefore its current position will be redrawn by 'lv_refr_task' + * @param obj pointer to an object + */ +void lv_obj_invalidate(const lv_obj_t * obj); + +/*===================== + * Setter functions + *====================*/ + +/*-------------------- + * Parent/children set + *--------------------*/ + +/** + * Set a new parent for an object. Its relative position will be the same. + * @param obj pointer to an object. Can't be a screen. + * @param parent pointer to the new parent object. (Can't be NULL) + */ +void lv_obj_set_parent(lv_obj_t * obj, lv_obj_t * parent); + +/** + * Move and object to the foreground + * @param obj pointer to an object + */ +void lv_obj_move_foreground(lv_obj_t * obj); + +/** + * Move and object to the background + * @param obj pointer to an object + */ +void lv_obj_move_background(lv_obj_t * obj); + +/*-------------------- + * Coordinate set + * ------------------*/ + +/** + * Set relative the position of an object (relative to the parent) + * @param obj pointer to an object + * @param x new distance from the left side of the parent + * @param y new distance from the top of the parent + */ +void lv_obj_set_pos(lv_obj_t * obj, lv_coord_t x, lv_coord_t y); + +/** + * Set the x coordinate of a object + * @param obj pointer to an object + * @param x new distance from the left side from the parent + */ +void lv_obj_set_x(lv_obj_t * obj, lv_coord_t x); + +/** + * Set the y coordinate of a object + * @param obj pointer to an object + * @param y new distance from the top of the parent + */ +void lv_obj_set_y(lv_obj_t * obj, lv_coord_t y); + +/** + * Set the size of an object + * @param obj pointer to an object + * @param w new width + * @param h new height + */ +void lv_obj_set_size(lv_obj_t * obj, lv_coord_t w, lv_coord_t h); + +/** + * Set the width of an object + * @param obj pointer to an object + * @param w new width + */ +void lv_obj_set_width(lv_obj_t * obj, lv_coord_t w); + +/** + * Set the height of an object + * @param obj pointer to an object + * @param h new height + */ +void lv_obj_set_height(lv_obj_t * obj, lv_coord_t h); + +/** + * Align an object to an other object. + * @param obj pointer to an object to align + * @param base pointer to an object (if NULL the parent is used). 'obj' will be aligned to it. + * @param align type of alignment (see 'lv_align_t' enum) + * @param x_mod x coordinate shift after alignment + * @param y_mod y coordinate shift after alignment + */ +void lv_obj_align(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, lv_coord_t x_mod, lv_coord_t y_mod); + +/** + * Align an object to an other object. + * @param obj pointer to an object to align + * @param base pointer to an object (if NULL the parent is used). 'obj' will be aligned to it. + * @param align type of alignment (see 'lv_align_t' enum) + * @param x_mod x coordinate shift after alignment + * @param y_mod y coordinate shift after alignment + */ +void lv_obj_align_origo(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, lv_coord_t x_mod, lv_coord_t y_mod); + +/** + * Realign the object based on the last `lv_obj_align` parameters. + * @param obj pointer to an object + */ +void lv_obj_realign(lv_obj_t * obj); + +/** + * Enable the automatic realign of the object when its size has changed based on the last + * `lv_obj_align` parameters. + * @param obj pointer to an object + * @param en true: enable auto realign; false: disable auto realign + */ +void lv_obj_set_auto_realign(lv_obj_t * obj, bool en); + +/** + * Set the size of an extended clickable area + * @param obj pointer to an object + * @param left extended clickable are on the left [px] + * @param right extended clickable are on the right [px] + * @param top extended clickable are on the top [px] + * @param bottom extended clickable are on the bottom [px] + */ +void lv_obj_set_ext_click_area(lv_obj_t * obj, lv_coord_t left, lv_coord_t right, lv_coord_t top, lv_coord_t bottom); + +/*--------------------- + * Appearance set + *--------------------*/ + +/** + * Set a new style for an object + * @param obj pointer to an object + * @param style_p pointer to the new style + */ +void lv_obj_set_style(lv_obj_t * obj, const lv_style_t * style); + +/** + * Notify an object about its style is modified + * @param obj pointer to an object + */ +void lv_obj_refresh_style(lv_obj_t * obj); + +/** + * Notify all object if a style is modified + * @param style pointer to a style. Only the objects with this style will be notified + * (NULL to notify all objects) + */ +void lv_obj_report_style_mod(lv_style_t * style); + +/*----------------- + * Attribute set + *----------------*/ + +/** + * Hide an object. It won't be visible and clickable. + * @param obj pointer to an object + * @param en true: hide the object + */ +void lv_obj_set_hidden(lv_obj_t * obj, bool en); + +/** + * Enable or disable the clicking of an object + * @param obj pointer to an object + * @param en true: make the object clickable + */ +void lv_obj_set_click(lv_obj_t * obj, bool en); + +/** + * Enable to bring this object to the foreground if it + * or any of its children is clicked + * @param obj pointer to an object + * @param en true: enable the auto top feature + */ +void lv_obj_set_top(lv_obj_t * obj, bool en); + +/** + * Enable the dragging of an object + * @param obj pointer to an object + * @param en true: make the object dragable + */ +void lv_obj_set_drag(lv_obj_t * obj, bool en); + +/** + * Set the directions an object can be dragged in + * @param obj pointer to an object + * @param drag_dir bitwise OR of allowed drag directions + */ +void lv_obj_set_drag_dir(lv_obj_t * obj, lv_drag_dir_t drag_dir); + +/** + * Enable the throwing of an object after is is dragged + * @param obj pointer to an object + * @param en true: enable the drag throw + */ +void lv_obj_set_drag_throw(lv_obj_t * obj, bool en); + +/** + * Enable to use parent for drag related operations. + * If trying to drag the object the parent will be moved instead + * @param obj pointer to an object + * @param en true: enable the 'drag parent' for the object + */ +void lv_obj_set_drag_parent(lv_obj_t * obj, bool en); + +/** + * Propagate the events to the parent too + * @param obj pointer to an object + * @param en true: enable the event propagation + */ +void lv_obj_set_parent_event(lv_obj_t * obj, bool en); + +/** + * Set the opa scale enable parameter (required to set opa_scale with `lv_obj_set_opa_scale()`) + * @param obj pointer to an object + * @param en true: opa scaling is enabled for this object and all children; false: no opa scaling + */ +void lv_obj_set_opa_scale_enable(lv_obj_t * obj, bool en); + +/** + * Set the opa scale of an object. + * The opacity of this object and all it's children will be scaled down with this factor. + * `lv_obj_set_opa_scale_enable(obj, true)` needs to be called to enable it. + * (not for all children just for the parent where to start the opa scaling) + * @param obj pointer to an object + * @param opa_scale a factor to scale down opacity [0..255] + */ +void lv_obj_set_opa_scale(lv_obj_t * obj, lv_opa_t opa_scale); + +/** + * Set a bit or bits in the protect filed + * @param obj pointer to an object + * @param prot 'OR'-ed values from `lv_protect_t` + */ +void lv_obj_set_protect(lv_obj_t * obj, uint8_t prot); + +/** + * Clear a bit or bits in the protect filed + * @param obj pointer to an object + * @param prot 'OR'-ed values from `lv_protect_t` + */ +void lv_obj_clear_protect(lv_obj_t * obj, uint8_t prot); + +/** + * Set a an event handler function for an object. + * Used by the user to react on event which happens with the object. + * @param obj pointer to an object + * @param event_cb the new event function + */ +void lv_obj_set_event_cb(lv_obj_t * obj, lv_event_cb_t event_cb); + +/** + * Send an event to the object + * @param obj pointer to an object + * @param event the type of the event from `lv_event_t`. + * @param data arbitrary data depending on the object type and the event. (Usually `NULL`) + * @return LV_RES_OK: `obj` was not deleted in the event; LV_RES_INV: `obj` was deleted in the event + */ +lv_res_t lv_event_send(lv_obj_t * obj, lv_event_t event, const void * data); + +/** + * Call an event function with an object, event, and data. + * @param event_xcb an event callback function. If `NULL` `LV_RES_OK` will return without any actions. + * (the 'x' in the argument name indicates that its not a fully generic function because it not follows + * the `func_name(object, callback, ...)` convention) + * @param obj pointer to an object to associate with the event (can be `NULL` to simply call the `event_cb`) + * @param event an event + * @param data pointer to a custom data + * @return LV_RES_OK: `obj` was not deleted in the event; LV_RES_INV: `obj` was deleted in the event + */ +lv_res_t lv_event_send_func(lv_event_cb_t event_xcb, lv_obj_t * obj, lv_event_t event, const void * data); + +/** + * Get the `data` parameter of the current event + * @return the `data` parameter + */ +const void * lv_event_get_data(void); + +/** + * Set the a signal function of an object. Used internally by the library. + * Always call the previous signal function in the new. + * @param obj pointer to an object + * @param signal_cb the new signal function + */ +void lv_obj_set_signal_cb(lv_obj_t * obj, lv_signal_cb_t signal_cb); + +/** + * Send an event to the object + * @param obj pointer to an object + * @param event the type of the event from `lv_event_t`. + */ +void lv_signal_send(lv_obj_t * obj, lv_signal_t signal, void * param); + +/** + * Set a new design function for an object + * @param obj pointer to an object + * @param design_cb the new design function + */ +void lv_obj_set_design_cb(lv_obj_t * obj, lv_design_cb_t design_cb); + +/*---------------- + * Other set + *--------------*/ + +/** + * Allocate a new ext. data for an object + * @param obj pointer to an object + * @param ext_size the size of the new ext. data + * @return pointer to the allocated ext + */ +void * lv_obj_allocate_ext_attr(lv_obj_t * obj, uint16_t ext_size); + +/** + * Send a 'LV_SIGNAL_REFR_EXT_SIZE' signal to the object + * @param obj pointer to an object + */ +void lv_obj_refresh_ext_draw_pad(lv_obj_t * obj); + +/*======================= + * Getter functions + *======================*/ + +/** + * Return with the screen of an object + * @param obj pointer to an object + * @return pointer to a screen + */ +lv_obj_t * lv_obj_get_screen(const lv_obj_t * obj); + +/** + * Get the display of an object + * @param scr pointer to an object + * @return pointer the object's display + */ +lv_disp_t * lv_obj_get_disp(const lv_obj_t * obj); + +/*--------------------- + * Parent/children get + *--------------------*/ + +/** + * Returns with the parent of an object + * @param obj pointer to an object + * @return pointer to the parent of 'obj' + */ +lv_obj_t * lv_obj_get_parent(const lv_obj_t * obj); + +/** + * Iterate through the children of an object (start from the "youngest, lastly created") + * @param obj pointer to an object + * @param child NULL at first call to get the next children + * and the previous return value later + * @return the child after 'act_child' or NULL if no more child + */ +lv_obj_t * lv_obj_get_child(const lv_obj_t * obj, const lv_obj_t * child); + +/** + * Iterate through the children of an object (start from the "oldest", firstly created) + * @param obj pointer to an object + * @param child NULL at first call to get the next children + * and the previous return value later + * @return the child after 'act_child' or NULL if no more child + */ +lv_obj_t * lv_obj_get_child_back(const lv_obj_t * obj, const lv_obj_t * child); + +/** + * Count the children of an object (only children directly on 'obj') + * @param obj pointer to an object + * @return children number of 'obj' + */ +uint16_t lv_obj_count_children(const lv_obj_t * obj); + +/** Recursively count the children of an object + * @param obj pointer to an object + * @return children number of 'obj' + */ +uint16_t lv_obj_count_children_recursive(const lv_obj_t * obj); + +/*--------------------- + * Coordinate get + *--------------------*/ + +/** + * Copy the coordinates of an object to an area + * @param obj pointer to an object + * @param cords_p pointer to an area to store the coordinates + */ +void lv_obj_get_coords(const lv_obj_t * obj, lv_area_t * cords_p); + +/** + * Reduce area retried by `lv_obj_get_coords()` the get graphically usable area of an object. + * (Without the size of the border or other extra graphical elements) + * @param coords_p store the result area here + */ +void lv_obj_get_inner_coords(const lv_obj_t * obj, lv_area_t * coords_p); + +/** + * Get the x coordinate of object + * @param obj pointer to an object + * @return distance of 'obj' from the left side of its parent + */ +lv_coord_t lv_obj_get_x(const lv_obj_t * obj); + +/** + * Get the y coordinate of object + * @param obj pointer to an object + * @return distance of 'obj' from the top of its parent + */ +lv_coord_t lv_obj_get_y(const lv_obj_t * obj); + +/** + * Get the width of an object + * @param obj pointer to an object + * @return the width + */ +lv_coord_t lv_obj_get_width(const lv_obj_t * obj); + +/** + * Get the height of an object + * @param obj pointer to an object + * @return the height + */ +lv_coord_t lv_obj_get_height(const lv_obj_t * obj); + +/** + * Get that width reduced by the left and right padding. + * @param obj pointer to an object + * @return the width which still fits into the container + */ +lv_coord_t lv_obj_get_width_fit(lv_obj_t * obj); + +/** + * Get that height reduced by the top an bottom padding. + * @param obj pointer to an object + * @return the height which still fits into the container + */ +lv_coord_t lv_obj_get_height_fit(lv_obj_t * obj); + +/** + * Get the automatic realign property of the object. + * @param obj pointer to an object + * @return true: auto realign is enabled; false: auto realign is disabled + */ +bool lv_obj_get_auto_realign(lv_obj_t * obj); + +/** + * Get the left padding of extended clickable area + * @param obj pointer to an object + * @return the extended left padding + */ +lv_coord_t lv_obj_get_ext_click_pad_left(const lv_obj_t * obj); + +/** + * Get the right padding of extended clickable area + * @param obj pointer to an object + * @return the extended right padding + */ +lv_coord_t lv_obj_get_ext_click_pad_right(const lv_obj_t * obj); + +/** + * Get the top padding of extended clickable area + * @param obj pointer to an object + * @return the extended top padding + */ +lv_coord_t lv_obj_get_ext_click_pad_top(const lv_obj_t * obj); + +/** + * Get the bottom padding of extended clickable area + * @param obj pointer to an object + * @return the extended bottom padding + */ +lv_coord_t lv_obj_get_ext_click_pad_bottom(const lv_obj_t * obj); + +/** + * Get the extended size attribute of an object + * @param obj pointer to an object + * @return the extended size attribute + */ +lv_coord_t lv_obj_get_ext_draw_pad(const lv_obj_t * obj); + +/*----------------- + * Appearance get + *---------------*/ + +/** + * Get the style pointer of an object (if NULL get style of the parent) + * @param obj pointer to an object + * @return pointer to a style + */ +const lv_style_t * lv_obj_get_style(const lv_obj_t * obj); + +/*----------------- + * Attribute get + *----------------*/ + +/** + * Get the hidden attribute of an object + * @param obj pointer to an object + * @return true: the object is hidden + */ +bool lv_obj_get_hidden(const lv_obj_t * obj); + +/** + * Get the click enable attribute of an object + * @param obj pointer to an object + * @return true: the object is clickable + */ +bool lv_obj_get_click(const lv_obj_t * obj); + +/** + * Get the top enable attribute of an object + * @param obj pointer to an object + * @return true: the auto top feature is enabled + */ +bool lv_obj_get_top(const lv_obj_t * obj); + +/** + * Get the drag enable attribute of an object + * @param obj pointer to an object + * @return true: the object is dragable + */ +bool lv_obj_get_drag(const lv_obj_t * obj); + +/** + * Get the directions an object can be dragged + * @param obj pointer to an object + * @return bitwise OR of allowed directions an object can be dragged in + */ +lv_drag_dir_t lv_obj_get_drag_dir(const lv_obj_t * obj); + +/** + * Get the drag throw enable attribute of an object + * @param obj pointer to an object + * @return true: drag throw is enabled + */ +bool lv_obj_get_drag_throw(const lv_obj_t * obj); + +/** + * Get the drag parent attribute of an object + * @param obj pointer to an object + * @return true: drag parent is enabled + */ +bool lv_obj_get_drag_parent(const lv_obj_t * obj); + +/** + * Get the drag parent attribute of an object + * @param obj pointer to an object + * @return true: drag parent is enabled + */ +bool lv_obj_get_parent_event(const lv_obj_t * obj); + +/** + * Get the opa scale enable parameter + * @param obj pointer to an object + * @return true: opa scaling is enabled for this object and all children; false: no opa scaling + */ +lv_opa_t lv_obj_get_opa_scale_enable(const lv_obj_t * obj); + +/** + * Get the opa scale parameter of an object + * @param obj pointer to an object + * @return opa scale [0..255] + */ +lv_opa_t lv_obj_get_opa_scale(const lv_obj_t * obj); + +/** + * Get the protect field of an object + * @param obj pointer to an object + * @return protect field ('OR'ed values of `lv_protect_t`) + */ +uint8_t lv_obj_get_protect(const lv_obj_t * obj); + +/** + * Check at least one bit of a given protect bitfield is set + * @param obj pointer to an object + * @param prot protect bits to test ('OR'ed values of `lv_protect_t`) + * @return false: none of the given bits are set, true: at least one bit is set + */ +bool lv_obj_is_protected(const lv_obj_t * obj, uint8_t prot); + +/** + * Get the signal function of an object + * @param obj pointer to an object + * @return the signal function + */ +lv_signal_cb_t lv_obj_get_signal_cb(const lv_obj_t * obj); + +/** + * Get the design function of an object + * @param obj pointer to an object + * @return the design function + */ +lv_design_cb_t lv_obj_get_design_cb(const lv_obj_t * obj); + +/** + * Get the event function of an object + * @param obj pointer to an object + * @return the event function + */ +lv_event_cb_t lv_obj_get_event_cb(const lv_obj_t * obj); + +/*------------------ + * Other get + *-----------------*/ + +/** + * Get the ext pointer + * @param obj pointer to an object + * @return the ext pointer but not the dynamic version + * Use it as ext->data1, and NOT da(ext)->data1 + */ +void * lv_obj_get_ext_attr(const lv_obj_t * obj); + +/** + * Get object's and its ancestors type. Put their name in `type_buf` starting with the current type. + * E.g. buf.type[0]="lv_btn", buf.type[1]="lv_cont", buf.type[2]="lv_obj" + * @param obj pointer to an object which type should be get + * @param buf pointer to an `lv_obj_type_t` buffer to store the types + */ +void lv_obj_get_type(lv_obj_t * obj, lv_obj_type_t * buf); + +#if LV_USE_USER_DATA +/** + * Get the object's user data + * @param obj pointer to an object + * @return user data + */ +lv_obj_user_data_t lv_obj_get_user_data(lv_obj_t * obj); + +/** + * Get a pointer to the object's user data + * @param obj pointer to an object + * @return pointer to the user data + */ +lv_obj_user_data_t * lv_obj_get_user_data_ptr(lv_obj_t * obj); + +/** + * Set the object's user data. The data will be copied. + * @param obj pointer to an object + * @param data user data + */ +void lv_obj_set_user_data(lv_obj_t * obj, lv_obj_user_data_t data); + +#endif + +#if LV_USE_GROUP +/** + * Get the group of the object + * @param obj pointer to an object + * @return the pointer to group of the object + */ +void * lv_obj_get_group(const lv_obj_t * obj); + +/** + * Tell whether the object is the focused object of a group or not. + * @param obj pointer to an object + * @return true: the object is focused, false: the object is not focused or not in a group + */ +bool lv_obj_is_focused(const lv_obj_t * obj); + +#endif + +/********************** + * MACROS + **********************/ + +/** + * Helps to quickly declare an event callback function. + * Will be expanded to: `void (lv_obj_t * obj, lv_event_t e)` + * + * Examples: + * static LV_EVENT_CB_DECLARE(my_event1); //Protoype declaration + * + * static LV_EVENT_CB_DECLARE(my_event1) + * { + * if(e == LV_EVENT_CLICKED) { + * lv_obj_set_hidden(obj ,true); + * } + * } + */ +#define LV_EVENT_CB_DECLARE(name) void name(lv_obj_t * obj, lv_event_t e) + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*LV_OBJ_H*/ diff --git a/core/app-framework/wgl/app/wa-inc/lvgl/lvgl.h b/core/app-framework/wgl/app/wa-inc/lvgl/lvgl.h new file mode 100644 index 000000000..c70dd49be --- /dev/null +++ b/core/app-framework/wgl/app/wa-inc/lvgl/lvgl.h @@ -0,0 +1,86 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + */ + +#ifndef WAMR_GRAPHIC_LIBRARY_LVGL_COMPATIBLE_H +#define WAMR_GRAPHIC_LIBRARY_LVGL_COMPATIBLE_H + +#ifdef __cplusplus +extern "C" { +#endif + + +//#include "bi-inc/wgl_shared_utils.h" /* shared types between app and native */ +/* +#include "lvgl-compatible/lv_types.h" +#include "lvgl-compatible/lv_obj.h" +#include "lvgl-compatible/lv_btn.h" +#include "lvgl-compatible/lv_cb.h" +#include "lvgl-compatible/lv_label.h" +#include "lvgl-compatible/lv_list.h" +*/ + + + + +#include "src/lv_version.h" + +#include "src/lv_misc/lv_log.h" +#include "src/lv_misc/lv_task.h" +#include "src/lv_misc/lv_math.h" +//#include "src/lv_misc/lv_async.h" + +//#include "src/lv_hal/lv_hal.h" + +#include "src/lv_core/lv_obj.h" +#include "src/lv_core/lv_group.h" + +#include "src/lv_core/lv_refr.h" +#include "src/lv_core/lv_disp.h" + +#include "src/lv_themes/lv_theme.h" + +#include "src/lv_font/lv_font.h" +#include "src/lv_font/lv_font_fmt_txt.h" + +#include "src/lv_objx/lv_btn.h" +#include "src/lv_objx/lv_imgbtn.h" +#include "src/lv_objx/lv_img.h" +#include "src/lv_objx/lv_label.h" +#include "src/lv_objx/lv_line.h" +#include "src/lv_objx/lv_page.h" +#include "src/lv_objx/lv_cont.h" +#include "src/lv_objx/lv_list.h" +#include "src/lv_objx/lv_chart.h" +#include "src/lv_objx/lv_table.h" +#include "src/lv_objx/lv_cb.h" +#include "src/lv_objx/lv_bar.h" +#include "src/lv_objx/lv_slider.h" +#include "src/lv_objx/lv_led.h" +#include "src/lv_objx/lv_btnm.h" +#include "src/lv_objx/lv_kb.h" +#include "src/lv_objx/lv_ddlist.h" +#include "src/lv_objx/lv_roller.h" +#include "src/lv_objx/lv_ta.h" +#include "src/lv_objx/lv_canvas.h" +#include "src/lv_objx/lv_win.h" +#include "src/lv_objx/lv_tabview.h" +#include "src/lv_objx/lv_tileview.h" +#include "src/lv_objx/lv_mbox.h" +#include "src/lv_objx/lv_gauge.h" +#include "src/lv_objx/lv_lmeter.h" +#include "src/lv_objx/lv_sw.h" +#include "src/lv_objx/lv_kb.h" +#include "src/lv_objx/lv_arc.h" +#include "src/lv_objx/lv_preload.h" +#include "src/lv_objx/lv_calendar.h" +#include "src/lv_objx/lv_spinbox.h" + +#include "src/lv_draw/lv_img_cache.h" + +#ifdef __cplusplus +} +#endif + +#endif /* WAMR_GRAPHIC_LIBRARY_LVGL_COMPATIBLE_H */ diff --git a/core/app-framework/wgl/app/wa-inc/lvgl/test.c b/core/app-framework/wgl/app/wa-inc/lvgl/test.c new file mode 100644 index 000000000..ceafbd512 --- /dev/null +++ b/core/app-framework/wgl/app/wa-inc/lvgl/test.c @@ -0,0 +1,11 @@ +#include "lvgl.h" + + +int main() + +{ + + + return 0; + +} diff --git a/core/app-framework/wgl/app/wa-inc/wgl.h b/core/app-framework/wgl/app/wa-inc/wgl.h deleted file mode 100644 index 05969b11a..000000000 --- a/core/app-framework/wgl/app/wa-inc/wgl.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2019 Intel Corporation. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - */ - -#ifndef WAMR_GRAPHIC_LIBRARY_H -#define WAMR_GRAPHIC_LIBRARY_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "bi-inc/wgl_shared_utils.h" /* shared types between app and native */ - -#include "inc/wgl_types.h" -#include "inc/wgl_obj.h" -#include "inc/wgl_btn.h" -#include "inc/wgl_cb.h" -#include "inc/wgl_label.h" -#include "inc/wgl_list.h" - -#ifdef __cplusplus -} -#endif - -#endif /* WAMR_GRAPHIC_LIBRARY_H */ diff --git a/core/app-framework/wgl/wgl.md b/core/app-framework/wgl/wgl.md new file mode 100644 index 000000000..d581877b5 --- /dev/null +++ b/core/app-framework/wgl/wgl.md @@ -0,0 +1,80 @@ +WASM Graphic Layer (WGL) +======= + +The WGL builds the littlevgl v6.0 into the runtime and exports a API layer for WASM appication programming graphic user interfaces. This approach will makes the WASM application small footprint. Another option will be built the whole littlevgl library into WASM, which is how the sample littlevgl is implemented. + +# Challenges + +When the littlevgl library is compiled into the runtime, all the widget data is actually located in the runtime native space. As the WASM sandbox won't allow the WASM application to directly access the native data, it introduced a few problems for the API porting: + +1. Reference to the widget object + Almost each littlevgl API will take widget object as the first argument, which leads to either read or write the data associated with the object. We have to prevent the WASM app utilize this to access unauthorized the memmory. + + The solution is to track the objects created by the WASM App in the native layer. Every access to the object must be validated in advance. To simplify each native wrapper function, the wgl_native_func_call() will do the validation for the object presented in the first argument. + + When multiple WASM apps are creating their own UI, the object will be also validated for his owner module instance. + +2. Access the object properties + The data structure of widget objects is no longer visible to the applications. The app has to call APIs to get/set the properties of an object. + +3. Pass function arguments in stucture pointers + We have to do serialization for the structure passing between the WASM and native. + +4. Callbacks + +# API compatibility with littlevgl +We wish the application continue to use the littlevgl API and keep existing header files inclusion, however it is also a bit challenging. + +Firstly we have to redefine some data types such as lv_obj_t in the APIs exposed to the WASM app. +''' +typedef void lv_obj_t; +''' + +Secondly, as the littlevgl source code is no longer compiled and linked with the WASM app source codes, the compilation won't be successfully while including the original littvgl header files. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 4c1558a78556c5a0e7e7650d6a81551bfedf7641 Mon Sep 17 00:00:00 2001 From: Wang Xin Date: Sun, 12 Apr 2020 16:15:54 +0800 Subject: [PATCH 14/15] build and test pass --- .../bi-inc/wgl_shared_utils.h | 232 ------------------ core/app-framework/wgl/app/gui_api.h | 1 + core/app-framework/wgl/app/src/wgl_btn.c | 28 +-- core/app-framework/wgl/app/src/wgl_cb.c | 12 +- core/app-framework/wgl/app/src/wgl_label.c | 58 ++--- core/app-framework/wgl/app/src/wgl_list.c | 8 +- core/app-framework/wgl/app/src/wgl_obj.c | 21 +- .../wgl/app/wa-inc/lvgl}/LICENCE.txt | 0 core/app-framework/wgl/wgl.md | 21 +- core/deps/download.sh | 28 +++ samples/gui/README.md | 14 +- samples/gui/build.sh | 51 +--- samples/gui/lvgl-native-ui-app/CMakeLists.txt | 43 ---- samples/gui/lvgl-native-ui-app/get_time.c | 11 - samples/gui/lvgl-native-ui-app/main.c | 153 ------------ samples/gui/wasm-apps/build_apps.sh | 44 ++++ .../{wgl => increase}/CMakeLists.txt | 4 +- .../gui/wasm-apps/{wgl => increase}/Makefile | 0 .../{lvgl-compatible => increase}/src/main.c | 15 +- .../gui/wasm-apps/lvgl-compatible/Makefile | 29 --- samples/gui/wasm-apps/wgl/src/main.c | 72 ------ wamr-sdk/build_sdk.sh | 10 +- 22 files changed, 183 insertions(+), 672 deletions(-) rename {samples/gui/lvgl-native-ui-app => core/app-framework/wgl/app/wa-inc/lvgl}/LICENCE.txt (100%) create mode 100755 core/deps/download.sh delete mode 100644 samples/gui/lvgl-native-ui-app/CMakeLists.txt delete mode 100644 samples/gui/lvgl-native-ui-app/get_time.c delete mode 100644 samples/gui/lvgl-native-ui-app/main.c create mode 100755 samples/gui/wasm-apps/build_apps.sh rename samples/gui/wasm-apps/{wgl => increase}/CMakeLists.txt (88%) rename samples/gui/wasm-apps/{wgl => increase}/Makefile (100%) rename samples/gui/wasm-apps/{lvgl-compatible => increase}/src/main.c (89%) delete mode 100644 samples/gui/wasm-apps/lvgl-compatible/Makefile delete mode 100644 samples/gui/wasm-apps/wgl/src/main.c diff --git a/core/app-framework/app-native-shared/bi-inc/wgl_shared_utils.h b/core/app-framework/app-native-shared/bi-inc/wgl_shared_utils.h index 2fee5b38f..7a391a193 100644 --- a/core/app-framework/app-native-shared/bi-inc/wgl_shared_utils.h +++ b/core/app-framework/app-native-shared/bi-inc/wgl_shared_utils.h @@ -15,238 +15,6 @@ extern "C" { #include -#include "lv_conf.h" - -typedef lv_coord_t wgl_coord_t; /* lv_coord_t is defined in lv_conf.h */ -typedef void * wgl_font_user_data_t; - -/** - * Represents a point on the screen. - */ -typedef struct -{ - lv_coord_t x; - lv_coord_t y; -} wgl_point_t; - -/** Represents an area of the screen. */ -typedef struct -{ - lv_coord_t x1; - lv_coord_t y1; - lv_coord_t x2; - lv_coord_t y2; -} wgl_area_t; - - -/** Describes the properties of a glyph. */ -typedef struct -{ - uint16_t adv_w; /**< The glyph needs this space. Draw the next glyph after this width. 8 bit integer, 4 bit fractional */ - uint8_t box_w; /**< Width of the glyph's bounding box*/ - uint8_t box_h; /**< Height of the glyph's bounding box*/ - int8_t ofs_x; /**< x offset of the bounding box*/ - int8_t ofs_y; /**< y offset of the bounding box*/ - uint8_t bpp; /**< Bit-per-pixel: 1, 2, 4, 8*/ -}wgl_font_glyph_dsc_t; - -/*Describe the properties of a font*/ -typedef struct _wgl_font_struct -{ - /** Get a glyph's descriptor from a font*/ - bool (*get_glyph_dsc)(const struct _wgl_font_struct *, wgl_font_glyph_dsc_t *, uint32_t letter, uint32_t letter_next); - - /** Get a glyph's bitmap from a font*/ - const uint8_t * (*get_glyph_bitmap)(const struct _wgl_font_struct *, uint32_t); - - /*Pointer to the font in a font pack (must have the same line height)*/ - uint8_t line_height; /**< The real line height where any text fits*/ - uint8_t base_line; /**< Base line measured from the top of the line_height*/ - void * dsc; /**< Store implementation specific data here*/ -#if LV_USE_USER_DATA - wgl_font_user_data_t user_data; /**< Custom user data for font. */ -#endif -} wgl_font_t; - -#if LV_COLOR_DEPTH == 1 -#define LV_COLOR_SIZE 8 -#elif LV_COLOR_DEPTH == 8 -#define LV_COLOR_SIZE 8 -#elif LV_COLOR_DEPTH == 16 -#define LV_COLOR_SIZE 16 -#elif LV_COLOR_DEPTH == 32 -#define LV_COLOR_SIZE 32 -#else -#error "Invalid LV_COLOR_DEPTH in lv_conf.h! Set it to 1, 8, 16 or 32!" -#endif - -/********************** - * TYPEDEFS - **********************/ - -typedef union -{ - uint8_t blue : 1; - uint8_t green : 1; - uint8_t red : 1; - uint8_t full : 1; -} wgl_color1_t; - -typedef union -{ - struct - { - uint8_t blue : 2; - uint8_t green : 3; - uint8_t red : 3; - } ch; - uint8_t full; -} wgl_color8_t; - -typedef union -{ - struct - { -#if LV_COLOR_16_SWAP == 0 - uint16_t blue : 5; - uint16_t green : 6; - uint16_t red : 5; -#else - uint16_t green_h : 3; - uint16_t red : 5; - uint16_t blue : 5; - uint16_t green_l : 3; -#endif - } ch; - uint16_t full; -} wgl_color16_t; - -typedef union -{ - struct - { - uint8_t blue; - uint8_t green; - uint8_t red; - uint8_t alpha; - } ch; - uint32_t full; -} wgl_color32_t; - -#if LV_COLOR_DEPTH == 1 -typedef uint8_t wgl_color_int_t; -typedef wgl_color1_t wgl_color_t; -#elif LV_COLOR_DEPTH == 8 -typedef uint8_t wgl_color_int_t; -typedef wgl_color8_t wgl_color_t; -#elif LV_COLOR_DEPTH == 16 -typedef uint16_t wgl_color_int_t; -typedef wgl_color16_t wgl_color_t; -#elif LV_COLOR_DEPTH == 32 -typedef uint32_t wgl_color_int_t; -typedef wgl_color32_t wgl_color_t; -#else -#error "Invalid LV_COLOR_DEPTH in lv_conf.h! Set it to 1, 8, 16 or 32!" -#endif - -typedef uint8_t wgl_opa_t; - - - -/*Border types (Use 'OR'ed values)*/ -enum { - WGL_BORDER_NONE = 0x00, - WGL_BORDER_BOTTOM = 0x01, - WGL_BORDER_TOP = 0x02, - WGL_BORDER_LEFT = 0x04, - WGL_BORDER_RIGHT = 0x08, - WGL_BORDER_FULL = 0x0F, - WGL_BORDER_INTERNAL = 0x10, /**< FOR matrix-like objects (e.g. Button matrix)*/ -}; -typedef uint8_t wgl_border_part_t; - -/*Shadow types*/ -enum { - WGL_SHADOW_BOTTOM = 0, /**< Only draw bottom shadow */ - WGL_SHADOW_FULL, /**< Draw shadow on all sides */ -}; -typedef uint8_t wgl_shadow_type_t; - -/** - * Objects in LittlevGL can be assigned a style - which holds information about - * how the object should be drawn. - * - * This allows for easy customization without having to modify the object's design - * function. - */ -typedef struct -{ - uint8_t glass : 1; /**< 1: Do not inherit this style*/ - - /** Object background. */ - struct - { - wgl_color_t main_color; /**< Object's main background color. */ - wgl_color_t grad_color; /**< Second color. If not equal to `main_color` a gradient will be drawn for the background. */ - wgl_coord_t radius; /**< Object's corner radius. You can use #WGL_RADIUS_CIRCLE if you want to draw a circle. */ - wgl_opa_t opa; /**< Object's opacity (0-255). */ - - struct - { - wgl_color_t color; /**< Border color */ - wgl_coord_t width; /**< Border width */ - wgl_border_part_t part; /**< Which borders to draw */ - wgl_opa_t opa; /**< Border opacity. */ - } border; - - - struct - { - wgl_color_t color; - wgl_coord_t width; - wgl_shadow_type_t type; /**< Which parts of the shadow to draw */ - } shadow; - - struct - { - wgl_coord_t top; - wgl_coord_t bottom; - wgl_coord_t left; - wgl_coord_t right; - wgl_coord_t inner; - } padding; - } body; - - /** Style for text drawn by this object. */ - struct - { - wgl_color_t color; /**< Text color */ - wgl_color_t sel_color; /**< Text selection background color. */ - const wgl_font_t * font; - wgl_coord_t letter_space; /**< Space between letters */ - wgl_coord_t line_space; /**< Space between lines (vertical) */ - wgl_opa_t opa; /**< Text opacity */ - } text; - - /**< Style of images. */ - struct - { - wgl_color_t color; /**< Color to recolor the image with */ - wgl_opa_t intense; /**< Opacity of recoloring (0 means no recoloring) */ - wgl_opa_t opa; /**< Opacity of whole image */ - } image; - - /**< Style of lines (not borders). */ - struct - { - wgl_color_t color; - wgl_coord_t width; - wgl_opa_t opa; - uint8_t rounded : 1; /**< 1: rounded line endings*/ - } line; -} wgl_style_t; - - /* Object native function IDs */ enum { diff --git a/core/app-framework/wgl/app/gui_api.h b/core/app-framework/wgl/app/gui_api.h index 991b079ee..a258474cf 100644 --- a/core/app-framework/wgl/app/gui_api.h +++ b/core/app-framework/wgl/app/gui_api.h @@ -7,6 +7,7 @@ #define _GUI_API_H_ #include "bh_platform.h" +#include "bi-inc/wgl_shared_utils.h" #ifdef __cplusplus extern "C" { diff --git a/core/app-framework/wgl/app/src/wgl_btn.c b/core/app-framework/wgl/app/src/wgl_btn.c index 63a9a84b0..89dbbca67 100644 --- a/core/app-framework/wgl/app/src/wgl_btn.c +++ b/core/app-framework/wgl/app/src/wgl_btn.c @@ -10,17 +10,17 @@ #define ARGC sizeof(argv)/sizeof(uint32) #define CALL_BTN_NATIVE_FUNC(id) wasm_btn_native_call(id, argv, ARGC) -lv_obj_t * lv_btn_create(lv_obj_t * par, const lv_obj_t * copy); +lv_obj_t * lv_btn_create(lv_obj_t * par, const lv_obj_t * copy) { uint32 argv[2] = {0}; argv[0] = (uint32)par; argv[1] = (uint32)copy; CALL_BTN_NATIVE_FUNC(BTN_FUNC_ID_CREATE); - return (wgl_obj_t)argv[0]; + return (lv_obj_t *)argv[0]; } -void lv_btn_set_toggle(lv_obj_t * btn, bool tgl); +void lv_btn_set_toggle(lv_obj_t * btn, bool tgl) { uint32 argv[2] = {0}; argv[0] = (uint32)btn; @@ -28,7 +28,7 @@ void lv_btn_set_toggle(lv_obj_t * btn, bool tgl); CALL_BTN_NATIVE_FUNC(BTN_FUNC_ID_SET_TOGGLE); } -void lv_btn_set_state(lv_obj_t * btn, lv_btn_state_t state); +void lv_btn_set_state(lv_obj_t * btn, lv_btn_state_t state) { uint32 argv[2] = {0}; argv[0] = (uint32)btn; @@ -36,14 +36,14 @@ void lv_btn_set_state(lv_obj_t * btn, lv_btn_state_t state); CALL_BTN_NATIVE_FUNC(BTN_FUNC_ID_SET_STATE); } -void lv_btn_toggle(lv_obj_t * btn); +void lv_btn_toggle(lv_obj_t * btn) { uint32 argv[1] = {0}; argv[0] = (uint32)btn; CALL_BTN_NATIVE_FUNC(BTN_FUNC_ID_TOGGLE); } -void lv_btn_set_ink_in_time(lv_obj_t * btn, uint16_t time); +void lv_btn_set_ink_in_time(lv_obj_t * btn, uint16_t time) { uint32 argv[2] = {0}; argv[0] = (uint32)btn; @@ -51,7 +51,7 @@ void lv_btn_set_ink_in_time(lv_obj_t * btn, uint16_t time); CALL_BTN_NATIVE_FUNC(BTN_FUNC_ID_SET_INK_IN_TIME); } -void lv_btn_set_ink_wait_time(lv_obj_t * btn, uint16_t time); +void lv_btn_set_ink_wait_time(lv_obj_t * btn, uint16_t time) { uint32 argv[2] = {0}; argv[0] = (uint32)btn; @@ -59,7 +59,7 @@ void lv_btn_set_ink_wait_time(lv_obj_t * btn, uint16_t time); CALL_BTN_NATIVE_FUNC(BTN_FUNC_ID_SET_INK_WAIT_TIME); } -void lv_btn_set_ink_out_time(lv_obj_t * btn, uint16_t time); +void lv_btn_set_ink_out_time(lv_obj_t * btn, uint16_t time) { uint32 argv[2] = {0}; argv[0] = (uint32)btn; @@ -73,15 +73,15 @@ void lv_btn_set_ink_out_time(lv_obj_t * btn, uint16_t time); // //wasm_btn_set_style(btn, type, style); //} // -lv_btn_state_t lv_btn_get_state(const lv_obj_t * btn); +lv_btn_state_t lv_btn_get_state(const lv_obj_t * btn) { uint32 argv[1] = {0}; argv[0] = (uint32)btn; CALL_BTN_NATIVE_FUNC(BTN_FUNC_ID_GET_STATE); - return (wgl_btn_state_t)argv[0]; + return (lv_btn_state_t)argv[0]; } -bool lv_btn_get_toggle(const lv_obj_t * btn); +bool lv_btn_get_toggle(const lv_obj_t * btn) { uint32 argv[1] = {0}; argv[0] = (uint32)btn; @@ -89,7 +89,7 @@ bool lv_btn_get_toggle(const lv_obj_t * btn); return (bool)argv[0]; } -uint16_t lv_btn_get_ink_in_time(const lv_obj_t * btn); +uint16_t lv_btn_get_ink_in_time(const lv_obj_t * btn) { uint32 argv[1] = {0}; argv[0] = (uint32)btn; @@ -97,7 +97,7 @@ uint16_t lv_btn_get_ink_in_time(const lv_obj_t * btn); return (uint16_t)argv[0]; } -uint16_t lv_btn_get_ink_wait_time(const lv_obj_t * btn); +uint16_t lv_btn_get_ink_wait_time(const lv_obj_t * btn) { uint32 argv[1] = {0}; argv[0] = (uint32)btn; @@ -105,7 +105,7 @@ uint16_t lv_btn_get_ink_wait_time(const lv_obj_t * btn); return (uint16_t)argv[0]; } -uint16_t lv_btn_get_ink_out_time(const lv_obj_t * btn); +uint16_t lv_btn_get_ink_out_time(const lv_obj_t * btn) { uint32 argv[1] = {0}; argv[0] = (uint32)btn; diff --git a/core/app-framework/wgl/app/src/wgl_cb.c b/core/app-framework/wgl/app/src/wgl_cb.c index 81428ee59..83a541ab3 100644 --- a/core/app-framework/wgl/app/src/wgl_cb.c +++ b/core/app-framework/wgl/app/src/wgl_cb.c @@ -12,17 +12,17 @@ #define ARGC sizeof(argv)/sizeof(uint32) #define CALL_CB_NATIVE_FUNC(id) wasm_cb_native_call(id, argv, ARGC) -lv_obj_t * lv_cb_create(lv_obj_t * par, const lv_obj_t * copy); +lv_obj_t * lv_cb_create(lv_obj_t * par, const lv_obj_t * copy) { uint32 argv[2] = {0}; argv[0] = (uint32)par; argv[1] = (uint32)copy; CALL_CB_NATIVE_FUNC(CB_FUNC_ID_CREATE); - return (wgl_obj_t)argv[0]; + return (lv_obj_t *)argv[0]; } -void lv_cb_set_text(lv_obj_t * cb, const char * txt); +void lv_cb_set_text(lv_obj_t * cb, const char * txt) { uint32 argv[3] = {0}; argv[0] = (uint32)cb; @@ -31,7 +31,7 @@ void lv_cb_set_text(lv_obj_t * cb, const char * txt); CALL_CB_NATIVE_FUNC(CB_FUNC_ID_SET_TEXT); } -void lv_cb_set_static_text(lv_obj_t * cb, const char * txt); +void lv_cb_set_static_text(lv_obj_t * cb, const char * txt) { uint32 argv[3] = {0}; argv[0] = (uint32)cb; @@ -46,7 +46,7 @@ void lv_cb_set_static_text(lv_obj_t * cb, const char * txt); //} // -static unsigned int wgl_cb_get_text_length(wgl_obj_t cb) +static unsigned int wgl_cb_get_text_length(lv_obj_t * cb) { uint32 argv[1] = {0}; argv[0] = (uint32)cb; @@ -54,7 +54,7 @@ static unsigned int wgl_cb_get_text_length(wgl_obj_t cb) return argv[0]; } -static char *wgl_cb_get_text(wgl_obj_t cb, char *buffer, int buffer_len) +static char *wgl_cb_get_text(lv_obj_t * cb, char *buffer, int buffer_len) { uint32 argv[3] = {0}; argv[0] = (uint32)cb; diff --git a/core/app-framework/wgl/app/src/wgl_label.c b/core/app-framework/wgl/app/src/wgl_label.c index ff28b7535..cecd9910f 100644 --- a/core/app-framework/wgl/app/src/wgl_label.c +++ b/core/app-framework/wgl/app/src/wgl_label.c @@ -13,17 +13,17 @@ #define ARGC sizeof(argv)/sizeof(uint32) #define CALL_LABEL_NATIVE_FUNC(id) wasm_label_native_call(id, argv, ARGC) -lv_obj_t * lv_label_create(lv_obj_t * par, const lv_obj_t * copy); +lv_obj_t * lv_label_create(lv_obj_t * par, const lv_obj_t * copy) { uint32 argv[2] = {0}; argv[0] = (uint32)par; argv[1] = (uint32)copy; CALL_LABEL_NATIVE_FUNC(LABEL_FUNC_ID_CREATE); - return (wgl_obj_t)argv[0]; + return (lv_obj_t *)argv[0]; } -void lv_label_set_text(lv_obj_t * label, const char * text); +void lv_label_set_text(lv_obj_t * label, const char * text) { uint32 argv[3] = {0}; argv[0] = (uint32)label; @@ -33,7 +33,7 @@ void lv_label_set_text(lv_obj_t * label, const char * text); } -void lv_label_set_array_text(lv_obj_t * label, const char * array, uint16_t size); +void lv_label_set_array_text(lv_obj_t * label, const char * array, uint16_t size) { uint32 argv[3] = {0}; argv[0] = (uint32)label; @@ -43,7 +43,7 @@ void lv_label_set_array_text(lv_obj_t * label, const char * array, uint16_t size } -void lv_label_set_static_text(lv_obj_t * label, const char * text); +void lv_label_set_static_text(lv_obj_t * label, const char * text) { uint32 argv[3] = {0}; argv[0] = (uint32)label; @@ -53,7 +53,7 @@ void lv_label_set_static_text(lv_obj_t * label, const char * text); } -void lv_label_set_long_mode(lv_obj_t * label, lv_label_long_mode_t long_mode); +void lv_label_set_long_mode(lv_obj_t * label, lv_label_long_mode_t long_mode) { uint32 argv[2] = {0}; argv[0] = (uint32)label; @@ -62,7 +62,7 @@ void lv_label_set_long_mode(lv_obj_t * label, lv_label_long_mode_t long_mode); } -void lv_label_set_align(lv_obj_t * label, lv_label_align_t align); +void lv_label_set_align(lv_obj_t * label, lv_label_align_t align) { uint32 argv[2] = {0}; argv[0] = (uint32)label; @@ -71,7 +71,7 @@ void lv_label_set_align(lv_obj_t * label, lv_label_align_t align); } -void lv_label_set_recolor(lv_obj_t * label, bool en); +void lv_label_set_recolor(lv_obj_t * label, bool en) { uint32 argv[2] = {0}; argv[0] = (uint32)label; @@ -80,7 +80,7 @@ void lv_label_set_recolor(lv_obj_t * label, bool en); } -void lv_label_set_body_draw(lv_obj_t * label, bool en); +void lv_label_set_body_draw(lv_obj_t * label, bool en) { uint32 argv[2] = {0}; argv[0] = (uint32)label; @@ -89,7 +89,7 @@ void lv_label_set_body_draw(lv_obj_t * label, bool en); } -void lv_label_set_anim_speed(lv_obj_t * label, uint16_t anim_speed); +void lv_label_set_anim_speed(lv_obj_t * label, uint16_t anim_speed) { uint32 argv[2] = {0}; argv[0] = (uint32)label; @@ -98,7 +98,7 @@ void lv_label_set_anim_speed(lv_obj_t * label, uint16_t anim_speed); } -void lv_label_set_text_sel_start(lv_obj_t * label, uint16_t index); +void lv_label_set_text_sel_start(lv_obj_t * label, uint16_t index) { uint32 argv[2] = {0}; argv[0] = (uint32)label; @@ -107,7 +107,7 @@ void lv_label_set_text_sel_start(lv_obj_t * label, uint16_t index); } -void lv_label_set_text_sel_end(lv_obj_t * label, uint16_t index); +void lv_label_set_text_sel_end(lv_obj_t * label, uint16_t index) { uint32 argv[2] = {0}; argv[0] = (uint32)label; @@ -115,7 +115,7 @@ void lv_label_set_text_sel_end(lv_obj_t * label, uint16_t index); CALL_LABEL_NATIVE_FUNC(LABEL_FUNC_ID_SET_TEXT_SEL_END); } -unsigned int wgl_label_get_text_length(wgl_obj_t label) +unsigned int wgl_label_get_text_length(lv_obj_t * label) { uint32 argv[1] = {0}; argv[0] = (uint32)label; @@ -123,7 +123,7 @@ unsigned int wgl_label_get_text_length(wgl_obj_t label) return argv[0]; } -char * wgl_label_get_text(wgl_obj_t label, char *buffer, int buffer_len) +char * wgl_label_get_text(lv_obj_t * label, char *buffer, int buffer_len) { uint32 argv[3] = {0}; argv[0] = (uint32)label; @@ -137,28 +137,30 @@ char * wgl_label_get_text(wgl_obj_t label, char *buffer, int buffer_len) char * lv_label_get_text(const lv_obj_t * label) { + return NULL; + } -wgl_label_long_mode_t wgl_label_get_long_mode(const wgl_obj_t label) +lv_label_long_mode_t lv_label_get_long_mode(const lv_obj_t * label) { uint32 argv[1] = {0}; argv[0] = (uint32)label; CALL_LABEL_NATIVE_FUNC(LABEL_FUNC_ID_GET_LONG_MODE); - return (wgl_label_long_mode_t)argv[0]; + return (lv_label_long_mode_t)argv[0]; } -lv_label_long_mode_t lv_label_get_long_mode(const lv_obj_t * label); +lv_label_align_t lv_label_get_align(const lv_obj_t * label) { uint32 argv[1] = {0}; argv[0] = (uint32)label; CALL_LABEL_NATIVE_FUNC(LABEL_FUNC_ID_GET_ALIGN); - return (wgl_label_align_t)argv[0]; + return (lv_label_align_t)argv[0]; } -bool lv_label_get_recolor(const lv_obj_t * label); +bool lv_label_get_recolor(const lv_obj_t * label) { uint32 argv[1] = {0}; argv[0] = (uint32)label; @@ -167,7 +169,7 @@ bool lv_label_get_recolor(const lv_obj_t * label); } -bool lv_label_get_body_draw(const lv_obj_t * label); +bool lv_label_get_body_draw(const lv_obj_t * label) { uint32 argv[1] = {0}; argv[0] = (uint32)label; @@ -176,7 +178,7 @@ bool lv_label_get_body_draw(const lv_obj_t * label); } -uint16_t lv_label_get_anim_speed(const lv_obj_t * label); +uint16_t lv_label_get_anim_speed(const lv_obj_t * label) { uint32 argv[1] = {0}; argv[0] = (uint32)label; @@ -185,7 +187,7 @@ uint16_t lv_label_get_anim_speed(const lv_obj_t * label); } -void lv_label_get_letter_pos(const lv_obj_t * label, uint16_t index, lv_point_t * pos); +void lv_label_get_letter_pos(const lv_obj_t * label, uint16_t index, lv_point_t * pos) { uint32 argv[4] = {0}; argv[0] = (uint32)label; @@ -196,7 +198,7 @@ void lv_label_get_letter_pos(const lv_obj_t * label, uint16_t index, lv_point_t } -uint16_t lv_label_get_letter_on(const lv_obj_t * label, lv_point_t * pos); +uint16_t lv_label_get_letter_on(const lv_obj_t * label, lv_point_t * pos) { uint32 argv[3] = {0}; argv[0] = (uint32)label; @@ -207,7 +209,7 @@ uint16_t lv_label_get_letter_on(const lv_obj_t * label, lv_point_t * pos); } -bool lv_label_is_char_under_pos(const lv_obj_t * label, lv_point_t * pos); +bool lv_label_is_char_under_pos(const lv_obj_t * label, lv_point_t * pos) { uint32 argv[3] = {0}; argv[0] = (uint32)label; @@ -218,7 +220,7 @@ bool lv_label_is_char_under_pos(const lv_obj_t * label, lv_point_t * pos); } -uint16_t lv_label_get_text_sel_start(const lv_obj_t * label); +uint16_t lv_label_get_text_sel_start(const lv_obj_t * label) { uint32 argv[1] = {0}; argv[0] = (uint32)label; @@ -227,7 +229,7 @@ uint16_t lv_label_get_text_sel_start(const lv_obj_t * label); } -uint16_t lv_label_get_text_sel_end(const lv_obj_t * label); +uint16_t lv_label_get_text_sel_end(const lv_obj_t * label) { uint32 argv[1] = {0}; argv[0] = (uint32)label; @@ -236,7 +238,7 @@ uint16_t lv_label_get_text_sel_end(const lv_obj_t * label); } -void lv_label_ins_text(lv_obj_t * label, uint32_t pos, const char * txt); +void lv_label_ins_text(lv_obj_t * label, uint32_t pos, const char * txt) { uint32 argv[4] = {0}; argv[0] = (uint32)label; @@ -247,7 +249,7 @@ void lv_label_ins_text(lv_obj_t * label, uint32_t pos, const char * txt); } -void lv_label_cut_text(lv_obj_t * label, uint32_t pos, uint32_t cnt); +void lv_label_cut_text(lv_obj_t * label, uint32_t pos, uint32_t cnt) { uint32 argv[3] = {0}; argv[0] = (uint32)label; diff --git a/core/app-framework/wgl/app/src/wgl_list.c b/core/app-framework/wgl/app/src/wgl_list.c index 0787e21b0..1ac9b32ed 100644 --- a/core/app-framework/wgl/app/src/wgl_list.c +++ b/core/app-framework/wgl/app/src/wgl_list.c @@ -13,7 +13,7 @@ #define CALL_LIST_NATIVE_FUNC(id) wasm_list_native_call(id, argv, ARGC) -lv_obj_t * lv_list_create(lv_obj_t * par, const lv_obj_t * copy); +lv_obj_t * lv_list_create(lv_obj_t * par, const lv_obj_t * copy) { uint32 argv[2] = {0}; @@ -21,7 +21,7 @@ lv_obj_t * lv_list_create(lv_obj_t * par, const lv_obj_t * copy); argv[1] = (uint32)copy; CALL_LIST_NATIVE_FUNC(LIST_FUNC_ID_CREATE); - return (wgl_obj_t)argv[0]; + return (lv_obj_t *)argv[0]; } // // @@ -31,7 +31,7 @@ lv_obj_t * lv_list_create(lv_obj_t * par, const lv_obj_t * copy); //} // -lv_obj_t * lv_list_add_btn(lv_obj_t * list, const void * img_src, const char * txt); +lv_obj_t * lv_list_add_btn(lv_obj_t * list, const void * img_src, const char * txt) { uint32 argv[3] = {0}; @@ -41,7 +41,7 @@ lv_obj_t * lv_list_add_btn(lv_obj_t * list, const void * img_src, const char * t argv[1] = (uint32)txt; argv[2] = strlen(txt) + 1; CALL_LIST_NATIVE_FUNC(LIST_FUNC_ID_ADD_BTN); - return (wgl_obj_t)argv[0]; + return (lv_obj_t *)argv[0]; } // // diff --git a/core/app-framework/wgl/app/src/wgl_obj.c b/core/app-framework/wgl/app/src/wgl_obj.c index 7459b899d..ee72beb62 100644 --- a/core/app-framework/wgl/app/src/wgl_obj.c +++ b/core/app-framework/wgl/app/src/wgl_obj.c @@ -15,9 +15,8 @@ typedef struct _obj_evt_cb { struct _obj_evt_cb *next; - wgl_obj_t obj; - - wgl_event_cb_t event_cb; + lv_obj_t * obj; + lv_event_cb_t event_cb; } obj_evt_cb_t; static obj_evt_cb_t *g_obj_evt_cb_list = NULL; @@ -25,29 +24,29 @@ static obj_evt_cb_t *g_obj_evt_cb_list = NULL; /* For lvgl compatible */ char g_widget_text[100]; -lv_res_t lv_obj_del(lv_obj_t * obj); +lv_res_t lv_obj_del(lv_obj_t * obj) { uint32 argv[1] = {0}; argv[0] = (uint32)obj; CALL_OBJ_NATIVE_FUNC(OBJ_FUNC_ID_DEL); - return (wgl_res_t)argv[0]; + return (lv_res_t)argv[0]; } -void lv_obj_del_async(struct _lv_obj_t *obj); +void lv_obj_del_async(struct _lv_obj_t *obj) { uint32 argv[1] = {0}; argv[0] = (uint32)obj; CALL_OBJ_NATIVE_FUNC(OBJ_FUNC_ID_DEL_ASYNC); } -void lv_obj_clean(lv_obj_t * obj); +void lv_obj_clean(lv_obj_t * obj) { uint32 argv[1] = {0}; argv[0] = (uint32)obj; CALL_OBJ_NATIVE_FUNC(OBJ_FUNC_ID_CLEAN); } -void lv_obj_align(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, lv_coord_t x_mod, lv_coord_t y_mod); +void lv_obj_align(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, lv_coord_t x_mod, lv_coord_t y_mod) { uint32 argv[5] = {0}; argv[0] = (uint32)obj; @@ -58,7 +57,7 @@ void lv_obj_align(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, lv_co CALL_OBJ_NATIVE_FUNC(OBJ_FUNC_ID_ALIGN); } -lv_event_cb_t lv_obj_get_event_cb(const lv_obj_t * obj); +lv_event_cb_t lv_obj_get_event_cb(const lv_obj_t * obj) { obj_evt_cb_t *obj_evt_cb = g_obj_evt_cb_list; while (obj_evt_cb != NULL) { @@ -71,7 +70,7 @@ lv_event_cb_t lv_obj_get_event_cb(const lv_obj_t * obj); return NULL; } -void lv_obj_set_event_cb(lv_obj_t * obj, lv_event_cb_t event_cb); +void lv_obj_set_event_cb(lv_obj_t * obj, lv_event_cb_t event_cb) { obj_evt_cb_t *obj_evt_cb; uint32 argv[1] = {0}; @@ -103,7 +102,7 @@ void lv_obj_set_event_cb(lv_obj_t * obj, lv_event_cb_t event_cb); CALL_OBJ_NATIVE_FUNC(OBJ_FUNC_ID_SET_EVT_CB); } -void on_widget_event(wgl_obj_t obj, wgl_event_t event) +void on_widget_event(lv_obj_t * obj, lv_event_t event) { obj_evt_cb_t *obj_evt_cb = g_obj_evt_cb_list; diff --git a/samples/gui/lvgl-native-ui-app/LICENCE.txt b/core/app-framework/wgl/app/wa-inc/lvgl/LICENCE.txt similarity index 100% rename from samples/gui/lvgl-native-ui-app/LICENCE.txt rename to core/app-framework/wgl/app/wa-inc/lvgl/LICENCE.txt diff --git a/core/app-framework/wgl/wgl.md b/core/app-framework/wgl/wgl.md index d581877b5..65feebccd 100644 --- a/core/app-framework/wgl/wgl.md +++ b/core/app-framework/wgl/wgl.md @@ -30,9 +30,24 @@ Firstly we have to redefine some data types such as lv_obj_t in the APIs exposed typedef void lv_obj_t; ''' -Secondly, as the littlevgl source code is no longer compiled and linked with the WASM app source codes, the compilation won't be successfully while including the original littvgl header files. - - + + +# Prepare the lvgl header files for WASM applicaitons + +Run the below script to setup the lvgl header files for the wasm appliation. + +``` +core/app-framework/wgl/app/prepare_headers.sh +``` + +The script is also automatically executed after downloading the lvgl repo in the wamr-sdk building process. + + + +# How to extend a little vgl wideget +Currently the wgl has exported the API for a few common used widgets such as button, label etc. + +Refer to the implementation of these widgets for extending other widgets. diff --git a/core/deps/download.sh b/core/deps/download.sh new file mode 100755 index 000000000..923a9e03d --- /dev/null +++ b/core/deps/download.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +DEPS_ROOT=$(cd "$(dirname "$0")/" && pwd) +cd ${DEPS_ROOT} + + +if [ ! -d "lvgl" ]; then + echo "git pull lvgl..." + git clone https://github.com/littlevgl/lvgl.git --branch v6.0.1 + [ $? -eq 0 ] || exit $? + + ../app-framework/wgl/app/prepare_headers.sh +fi +if [ ! -d "lv_drivers" ]; then + echo "git pull lv_drivers..." + git clone https://github.com/littlevgl/lv_drivers.git + [ $? -eq 0 ] || exit $? +fi + +if [ ! -d "tlsf" ]; then + echo "git pull tlsf..." + git clone https://github.com/mattconte/tlsf + [ $? -eq 0 ] || exit $? + #cd ${WAMR_DIR}/core/shared/mem-alloc +fi + + +exit 0 diff --git a/samples/gui/README.md b/samples/gui/README.md index b9e589ba1..b285754c5 100644 --- a/samples/gui/README.md +++ b/samples/gui/README.md @@ -40,16 +40,14 @@ Build and Run - Build
`./build.sh`
- All binaries are in "out", which contains "host_tool", "lvgl_native_ui_app", "ui_app.wasm", "ui_app_lvgl_compatible.wasm" and "wasm_runtime_wgl". -- Run native Linux application
-`./lvgl_native_ui_app`
+ All binaries are in "out", which contains "host_tool", "ui_decrease.wasm", "ui_increase.wasm" and "wasm_runtime_wgl". - Run WASM VM Linux applicaton & install WASM APP
First start wasm_runtime_wgl in server mode.
`./wasm_runtime_wgl -s`
Then install wasm APP use host tool.
-`./host_tool -i ui_app -f ui_app.wasm`
-`./host_tool -i ui_app -f ui_app_lvgl_compatible.wasm`
+`./host_tool -i inc -f ui_increase.wasm`
+`./host_tool -i dec -f ui_decrease.wasm`
@@ -107,11 +105,11 @@ https://docs.zephyrproject.org/latest/getting_started/index.html
- Install WASM application to Zephyr using host_tool
First, connect PC and STM32 with UART. Then install to use host_tool.
-`./host_tool -D /dev/ttyUSBXXX -i ui_app -f ui_app.wasm` +`./host_tool -D /dev/ttyUSBXXX -i inc -f ui_increase.wasm` - Install AOT version WASM application -`wamrc --target=thumbv7 --target-abi=eabi --cpu=cortex-m7 -o ui_app.aot ui_app.wasm` -`./host_tool -D /dev/ttyUSBXXX -i ui_app -f ui_app.aot` +`wamrc --target=thumbv7 --target-abi=eabi --cpu=cortex-m7 -o ui_app.aot ui_increase.wasm` +`./host_tool -D /dev/ttyUSBXXX -i inc -f ui_app.aot` diff --git a/samples/gui/build.sh b/samples/gui/build.sh index 15cd578c9..a57aa48e8 100755 --- a/samples/gui/build.sh +++ b/samples/gui/build.sh @@ -25,21 +25,8 @@ rm -rf ${OUT_DIR} mkdir ${OUT_DIR} -cd ${WAMR_DIR}/core/shared/mem-alloc -if [ ! -d "tlsf" ]; then - git clone https://github.com/mattconte/tlsf -fi - -cd ${WAMR_DIR}/core/deps -if [ ! -d "lvgl" ]; then - git clone https://github.com/littlevgl/lvgl.git --branch v6.0.1 -fi -if [ ! -d "lv_drivers" ]; then - git clone https://github.com/littlevgl/lv_drivers.git -fi - echo -e "\n\n" -echo "##################### 0. build wamr-sdk gui start#####################" +echo "##################### 1. build wamr-sdk gui start#####################" cd ${WAMR_DIR}/wamr-sdk ./build_sdk.sh -n gui -x ${WAMR_RUNTIME_CFG} -e ${LV_CFG_PATH} [ $? -eq 0 ] || exit $? @@ -47,23 +34,6 @@ cd ${WAMR_DIR}/wamr-sdk echo "#####################build wamr-sdk success" -echo -e "\n\n" -echo "##################### 1. build native-ui-app start#####################" -cd $BUILD_DIR -mkdir -p lvgl-native-ui-app -cd lvgl-native-ui-app -$cmakewrap ${PROJECT_DIR}/lvgl-native-ui-app -[ $? -eq 0 ] || exit $? -$makewrap -if [ $? != 0 ];then - echo "BUILD_FAIL native-ui-app $?\n" - exit 2 -fi -echo $PWD -cp lvgl_native_ui_app ${OUT_DIR} -echo "#####################build native-ui-app success" -echo -e "\n\n" - echo "##################### 2. build wasm runtime start#####################" cd $BUILD_DIR @@ -94,20 +64,7 @@ echo "#####################build host-tool success" echo -e "\n\n" echo "##################### 3. build wasm ui app start#####################" -cd ${PROJECT_DIR}/wasm-apps/wgl +cd ${PROJECT_DIR}/wasm-apps +export OUT_DIR=${OUT_DIR} +./build_apps.sh -rm -rf build -mkdir build && cd build -$cmakewrap .. -DCMAKE_TOOLCHAIN_FILE=${WAMR_DIR}/wamr-sdk/out/gui/app-sdk/wamr_toolchain.cmake -$makewrap -[ $? -eq 0 ] || exit $? -mv ui_app.wasm ${OUT_DIR}/ - -# $makewrap -# mv ui_app.wasm ${OUT_DIR}/ - -cd ${PROJECT_DIR}/wasm-apps/lvgl-compatible -$makewrap -[ $? -eq 0 ] || exit $? -mv ui_app_lvgl_compatible.wasm ${OUT_DIR}/ -echo "##################### build wasm ui app end#####################" diff --git a/samples/gui/lvgl-native-ui-app/CMakeLists.txt b/samples/gui/lvgl-native-ui-app/CMakeLists.txt deleted file mode 100644 index 3602e5c78..000000000 --- a/samples/gui/lvgl-native-ui-app/CMakeLists.txt +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (C) 2019 Intel Corporation. All rights reserved. -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - -cmake_minimum_required (VERSION 2.8.2) -message ("lvgl_native_ui_app...") -project (lvgl_native_ui_app) - -################################################################# - -# Currently build as 64-bit by default. Set to "NO" to build 32-bit binaries. -set (BUILD_AS_64BIT_SUPPORT "YES") - -if (CMAKE_SIZEOF_VOID_P EQUAL 8) - if (${BUILD_AS_64BIT_SUPPORT} STREQUAL "YES") - # Add -fPIC flag if build as 64-bit - set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") - set (CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS} -fPIC") - else () - add_definitions (-m32) - set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -m32") - set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -m32") - endif () -endif () - -set(WAMR_DEPS_DIR ../../../core/deps) -set(LVGL_SOURCE_DIR ${WAMR_DEPS_DIR}/lvgl) -set(LVGL_DRIVER_DIR ${WAMR_DEPS_DIR}/lv_drivers) - -################################# - -add_definitions(-DLV_CONF_INCLUDE_SIMPLE) - -INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}) -INCLUDE_DIRECTORIES(${WAMR_DEPS_DIR}) -INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/../lv_config) - - -file(GLOB_RECURSE INCLUDES "${LVGL_DRIVER_DIR}/*.h" "${LVGL_SOURCE_DIR}/*.h" "./*.h" ) -file(GLOB_RECURSE SOURCES "${LVGL_DRIVER_DIR}/*.c" "${LVGL_SOURCE_DIR}/*.c" ) - -add_executable(lvgl_native_ui_app main.c get_time.c ${SOURCES} ${INCLUDES}) -target_link_libraries(lvgl_native_ui_app PRIVATE SDL2 ) - diff --git a/samples/gui/lvgl-native-ui-app/get_time.c b/samples/gui/lvgl-native-ui-app/get_time.c deleted file mode 100644 index 756191a69..000000000 --- a/samples/gui/lvgl-native-ui-app/get_time.c +++ /dev/null @@ -1,11 +0,0 @@ -#include -#include "system_header.h" - -int time_get_ms() -{ - static struct timeval tv; - gettimeofday(&tv, NULL); - long long time_in_mill = (tv.tv_sec) * 1000 + (tv.tv_usec) / 1000; - - return (int) time_in_mill; -} diff --git a/samples/gui/lvgl-native-ui-app/main.c b/samples/gui/lvgl-native-ui-app/main.c deleted file mode 100644 index 54600f332..000000000 --- a/samples/gui/lvgl-native-ui-app/main.c +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Copyright (C) 2019 Intel Corporation. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - */ - -/** - * @file main - * - */ - -/********************* - * INCLUDES - *********************/ -#define _DEFAULT_SOURCE /* needed for usleep() */ -#include -#include -#define SDL_MAIN_HANDLED /*To fix SDL's "undefined reference to WinMain" issue*/ -#include -#include "lvgl/lvgl.h" -#include "lv_drivers/display/monitor.h" -#include "lv_drivers/indev/mouse.h" -#include "lv_drivers/indev/mousewheel.h" -#include "lv_drivers/indev/keyboard.h" - - -/********************* - * DEFINES - *********************/ - -/*On OSX SDL needs different handling*/ -#if defined(__APPLE__) && defined(TARGET_OS_MAC) -# if __APPLE__ && TARGET_OS_MAC -#define SDL_APPLE -# endif -#endif - -/********************** - * TYPEDEFS - **********************/ - -/********************** - * STATIC PROTOTYPES - **********************/ -static void hal_init(void); -static void btn_event_cb(lv_obj_t * btn, lv_event_t event); - -/********************** - * STATIC VARIABLES - **********************/ -uint32_t count = 0; -char count_str[11] = { 0 }; -lv_obj_t *hello_world_label; -lv_obj_t *count_label; -lv_obj_t * btn1; -lv_obj_t * label_count1; -int label_count1_value = 0; -char label_count1_str[11] = { 0 }; - -/********************** - * MACROS - **********************/ - -/********************** - * GLOBAL FUNCTIONS - **********************/ - -int main(int argc, char ** argv) -{ - (void) argc; /*Unused*/ - (void) argv; /*Unused*/ - - /*Initialize LittlevGL*/ - lv_init(); - - /*Initialize the HAL (display, input devices, tick) for LittlevGL*/ - hal_init(); - - hello_world_label = lv_label_create(lv_disp_get_scr_act(NULL), NULL); - lv_label_set_text(hello_world_label, "Hello world!"); - lv_obj_align(hello_world_label, NULL, LV_ALIGN_IN_TOP_LEFT, 0, 0); - - count_label = lv_label_create(lv_disp_get_scr_act(NULL), NULL); - lv_obj_align(count_label, NULL, LV_ALIGN_IN_TOP_MID, 0, 0); - btn1 = lv_btn_create(lv_disp_get_scr_act(NULL), NULL); /*Create a button on the currently loaded screen*/ - lv_obj_set_event_cb(btn1, btn_event_cb); /*Set function to be called when the button is released*/ - lv_obj_align(btn1, NULL, LV_ALIGN_CENTER, 0, 20); /*Align below the label*/ - - /*Create a label on the button*/ - lv_obj_t * btn_label = lv_label_create(btn1, NULL); - lv_label_set_text(btn_label, "Click ++"); - - label_count1 = lv_label_create(lv_disp_get_scr_act(NULL), NULL); - lv_label_set_text(label_count1, "0"); - lv_obj_align(label_count1, NULL, LV_ALIGN_IN_BOTTOM_MID, 0, 0); - while(1) { - /* Periodically call the lv_task handler. - * It could be done in a timer interrupt or an OS task too.*/ - if ((count % 100) == 0) { - snprintf(count_str, sizeof(count_str), "%d", count/ 100); - lv_label_set_text(count_label, count_str); - } - lv_task_handler(); - ++count; - usleep(10 * 1000); /*Just to let the system breath*/ - } - return 0; -} - -/********************** - * STATIC FUNCTIONS - **********************/ - -/** - * Initialize the Hardware Abstraction Layer (HAL) for the Littlev graphics library - */ -static void hal_init(void) -{ - /* Use the 'monitor' driver which creates window on PC's monitor to simulate a display*/ - monitor_init(); - - /*Create a display buffer*/ - static lv_disp_buf_t disp_buf1; - static lv_color_t buf1_1[320*10]; - lv_disp_buf_init(&disp_buf1, buf1_1, NULL, 320*10); - - /*Create a display*/ - lv_disp_drv_t disp_drv; - lv_disp_drv_init(&disp_drv); /*Basic initialization*/ - disp_drv.buffer = &disp_buf1; - disp_drv.flush_cb = monitor_flush; /*Used when `LV_VDB_SIZE != 0` in lv_conf.h (buffered drawing)*/ - // disp_drv.hor_res = 200; - // disp_drv.ver_res = 100; - lv_disp_drv_register(&disp_drv); - - /* Add the mouse as input device - * Use the 'mouse' driver which reads the PC's mouse*/ - mouse_init(); - lv_indev_drv_t indev_drv; - lv_indev_drv_init(&indev_drv); /*Basic initialization*/ - indev_drv.type = LV_INDEV_TYPE_POINTER; - indev_drv.read_cb = mouse_read; /*This function will be called periodically (by the library) to get the mouse position and state*/ - lv_indev_drv_register(&indev_drv); -} - -static void btn_event_cb(lv_obj_t * btn, lv_event_t event) -{ - if(event == LV_EVENT_RELEASED) { - label_count1_value++; - snprintf(label_count1_str, sizeof(label_count1_str), - "%d", label_count1_value); - lv_label_set_text(label_count1, label_count1_str); - } -} diff --git a/samples/gui/wasm-apps/build_apps.sh b/samples/gui/wasm-apps/build_apps.sh new file mode 100755 index 000000000..32b7ed43c --- /dev/null +++ b/samples/gui/wasm-apps/build_apps.sh @@ -0,0 +1,44 @@ +#!/bin/bash + +APPS_ROOT=$(cd "$(dirname "$0")/" && pwd) +cd ${APPS_ROOT} + +echo "OUT_DIR: ${OUT_DIR}" + +if [ -z ${OUT_DIR} ]; then + OUT_DIR=${APPS_ROOT}/out + echo "set the wasm app folder: ${OUT_DIR}" + + if [ -d ${OUT_DIR} ]; then + rm -rf ${OUT_DIR} + echo "removed the present output folder: ${OUT_DIR}" + fi + mkdir ${OUT_DIR} + +fi + +if [ -z ${WAMR_DIR} ]; then + WAMR_DIR=${APPS_ROOT}/../../.. +fi + + +cd ${APPS_ROOT}/increase + +rm -rf build +mkdir build && cd build +cmake .. -DCMAKE_TOOLCHAIN_FILE=${WAMR_DIR}/wamr-sdk/out/gui/app-sdk/wamr_toolchain.cmake +make +[ $? -eq 0 ] || exit $? +mv ui_increase.wasm ${OUT_DIR}/ + +# $makewrap +# mv ui_app.wasm ${OUT_DIR}/ + +cd ${APPS_ROOT}/decrease +make +[ $? -eq 0 ] || exit $? +mv ui_decrease.wasm ${OUT_DIR}/ + +echo "WASM files generated in folder ${OUT_DIR}" + +echo "##################### build WASM APPs finished #####################" diff --git a/samples/gui/wasm-apps/wgl/CMakeLists.txt b/samples/gui/wasm-apps/increase/CMakeLists.txt similarity index 88% rename from samples/gui/wasm-apps/wgl/CMakeLists.txt rename to samples/gui/wasm-apps/increase/CMakeLists.txt index 15ef74f71..ce55fb1e6 100644 --- a/samples/gui/wasm-apps/wgl/CMakeLists.txt +++ b/samples/gui/wasm-apps/increase/CMakeLists.txt @@ -13,8 +13,8 @@ set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS},-L${WAMR_ROOT_DIR}/wamr-s set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS},--export=on_init,--export=on_timer_callback,--export=on_widget_event,--export=__heap_base,--export=__data_end") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -Wno-unused-command-line-argument") -add_executable(ui_app.wasm +add_executable(ui_increase.wasm ${CMAKE_CURRENT_LIST_DIR}/src/main.c ) -target_link_libraries(ui_app.wasm app_framework) +target_link_libraries(ui_increase.wasm app_framework) diff --git a/samples/gui/wasm-apps/wgl/Makefile b/samples/gui/wasm-apps/increase/Makefile similarity index 100% rename from samples/gui/wasm-apps/wgl/Makefile rename to samples/gui/wasm-apps/increase/Makefile diff --git a/samples/gui/wasm-apps/lvgl-compatible/src/main.c b/samples/gui/wasm-apps/increase/src/main.c similarity index 89% rename from samples/gui/wasm-apps/lvgl-compatible/src/main.c rename to samples/gui/wasm-apps/increase/src/main.c index 45c16f223..1b1c05d34 100644 --- a/samples/gui/wasm-apps/lvgl-compatible/src/main.c +++ b/samples/gui/wasm-apps/increase/src/main.c @@ -5,7 +5,7 @@ #include #include "wasm_app.h" -#include "wa-inc/lvgl.h" +#include "wa-inc/lvgl/lvgl.h" #include "wa-inc/timer_wasm_app.h" extern char g_widget_text[]; @@ -18,7 +18,7 @@ lv_obj_t *hello_world_label; lv_obj_t *count_label; lv_obj_t *btn1; lv_obj_t *label_count1; -int label_count1_value = 100; +int label_count1_value = 1; char label_count1_str[11] = { 0 }; void timer1_update(user_timer_t timer1) @@ -49,10 +49,10 @@ void on_init() /*Create a label on the button*/ lv_obj_t *btn_label = lv_label_create(btn1, NULL); - lv_label_set_text(btn_label, "Click --"); + lv_label_set_text(btn_label, "Click ++"); label_count1 = lv_label_create(NULL, NULL); - lv_label_set_text(label_count1, "100"); + lv_label_set_text(label_count1, "1"); lv_obj_align(label_count1, NULL, LV_ALIGN_IN_BOTTOM_MID, 0, 0); /* set up a timer */ @@ -67,11 +67,12 @@ void on_init() static void btn_event_cb(lv_obj_t *btn, lv_event_t event) { if(event == LV_EVENT_RELEASED) { - label_count1_value--; + label_count1_value++; snprintf(label_count1_str, sizeof(label_count1_str), "%d", label_count1_value); lv_label_set_text(label_count1, label_count1_str); - if (label_count1_value == 0) - label_count1_value = 100; + if (label_count1_value == 100) + label_count1_value = 0; } + } diff --git a/samples/gui/wasm-apps/lvgl-compatible/Makefile b/samples/gui/wasm-apps/lvgl-compatible/Makefile deleted file mode 100644 index 285e1d1f1..000000000 --- a/samples/gui/wasm-apps/lvgl-compatible/Makefile +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright (C) 2019 Intel Corporation. All rights reserved. -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - -CC = /opt/wasi-sdk/bin/clang -APP_DIR = ${shell pwd} -IWASM_DIR = $(APP_DIR)/../../../../core/iwasm -SDK_DIR = $(APP_DIR)/../../../../wamr-sdk/out/gui/app-sdk -APP_FRAMEWORK_DIR = $(APP_DIR)/../../../../wamr-sdk/out/gui/app-sdk/wamr-app-framework -DEPS_DIR = $(APP_DIR)/../../../../core/deps - -CFLAGS += -O3 \ - -Wno-int-conversion \ - -I$(APP_DIR)/src \ - -I$(APP_FRAMEWORK_DIR)/include \ - -I${DEPS_DIR} - -SRCS += $(APP_DIR)/src/main.c - -all: - @$(CC) $(CFLAGS) $(SRCS) \ - --target=wasm32 -O3 -z stack-size=2048 -Wl,--initial-memory=65536 \ - --sysroot=$(SDK_DIR)/libc-builtin-sysroot \ - -L$(APP_FRAMEWORK_DIR)/lib -lapp_framework \ - -Wl,--allow-undefined-file=$(SDK_DIR)/libc-builtin-sysroot/share/defined-symbols.txt \ - -Wl,--no-threads,--strip-all,--no-entry -nostdlib \ - -Wl,--export=on_init -Wl,--export=on_timer_callback \ - -Wl,--export=on_widget_event \ - -Wl,--export=__heap_base,--export=__data_end \ - -o ui_app_lvgl_compatible.wasm diff --git a/samples/gui/wasm-apps/wgl/src/main.c b/samples/gui/wasm-apps/wgl/src/main.c deleted file mode 100644 index 33520b203..000000000 --- a/samples/gui/wasm-apps/wgl/src/main.c +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (C) 2019 Intel Corporation. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - */ - -#include -#include "wasm_app.h" -#include "wa-inc/wgl.h" -#include "wa-inc/timer_wasm_app.h" - -static void btn_event_cb(wgl_obj_t btn, wgl_event_t event); - -uint32_t count = 0; -char count_str[11] = { 0 }; -wgl_obj_t hello_world_label; -wgl_obj_t count_label; -wgl_obj_t btn1; -wgl_obj_t label_count1; -int label_count1_value = 0; -char label_count1_str[11] = { 0 }; - -void timer1_update(user_timer_t timer1) -{ - if ((count % 100) == 0) { - snprintf(count_str, sizeof(count_str), "%d", count / 100); - wgl_label_set_text(count_label, count_str); - } - ++count; -} - -void on_init() -{ - hello_world_label = wgl_label_create((wgl_obj_t)NULL, (wgl_obj_t)NULL); - wgl_label_set_text(hello_world_label, "Hello world!"); - wgl_obj_align(hello_world_label, (wgl_obj_t)NULL, WGL_ALIGN_IN_TOP_LEFT, 0, 0); - - count_label = wgl_label_create((wgl_obj_t)NULL, (wgl_obj_t)NULL); - wgl_obj_align(count_label, (wgl_obj_t)NULL, WGL_ALIGN_IN_TOP_MID, 0, 0); - - btn1 = wgl_btn_create((wgl_obj_t)NULL, (wgl_obj_t)NULL); /*Create a button on the currently loaded screen*/ - wgl_obj_set_event_cb(btn1, btn_event_cb); /*Set function to be called when the button is released*/ - wgl_obj_align(btn1, (wgl_obj_t)NULL, WGL_ALIGN_CENTER, 0, 0); /*Align below the label*/ - - /*Create a label on the button*/ - wgl_obj_t btn_label = wgl_label_create(btn1, (wgl_obj_t)NULL); - wgl_label_set_text(btn_label, "Click ++"); - - label_count1 = wgl_label_create((wgl_obj_t)NULL, (wgl_obj_t)NULL); - wgl_label_set_text(label_count1, "0"); - wgl_obj_align(label_count1, (wgl_obj_t)NULL, WGL_ALIGN_IN_BOTTOM_MID, 0, 0); - - /* set up a timer */ - user_timer_t timer; - timer = api_timer_create(10, true, false, timer1_update); - if (timer) - api_timer_restart(timer, 10); - else - printf("Fail to create timer.\n"); -} - -static void btn_event_cb(wgl_obj_t btn, wgl_event_t event) -{ - if(event == WGL_EVENT_RELEASED) { - label_count1_value++; - snprintf(label_count1_str, sizeof(label_count1_str), - "%d", label_count1_value); - wgl_label_set_text(label_count1, label_count1_str); - - //wgl_cont_set_fit4(btn, WGL_FIT_FLOOD, WGL_FIT_FLOOD, WGL_FIT_FLOOD, WGL_FIT_FLOOD); - //wgl_obj_clean(btn); - } -} diff --git a/wamr-sdk/build_sdk.sh b/wamr-sdk/build_sdk.sh index eda15c3ac..02f43e183 100755 --- a/wamr-sdk/build_sdk.sh +++ b/wamr-sdk/build_sdk.sh @@ -75,6 +75,13 @@ if [ ! -f "/opt/wasi-sdk/bin/clang" ]; then exit 1 fi + +echo "download dependent external repositories.." +${wamr_root_dir}/core/deps/download.sh +[ $? -eq 0 ] || exit $? + + + if [ -z "$PROFILE" ]; then PROFILE="default" echo "PROFILE argument not set, using DEFAULT" @@ -166,8 +173,7 @@ if [[ -n "${app_wgl_selected}" ]] || [[ -n "${app_all_selected}" ]]; then read -a extra_file_path if [[ -z "${extra_file_path}" ]] || [[ ! -d "${extra_file_path}" ]]; then - echo -e "\033[31mThe extra SDK path is invalid, exiting\033[0m" - exit 1 + echo -e "\033[31mThe extra SDK path is empty\033[0m" else CM_DEXTRA_SDK_INCLUDE_PATH="-DEXTRA_SDK_INCLUDE_PATH=${extra_file_path}" fi From 5b4054d010ad36fc5ea62e2737201cca9df049cf Mon Sep 17 00:00:00 2001 From: Wang Xin Date: Sun, 12 Apr 2020 16:19:51 +0800 Subject: [PATCH 15/15] add missing wasm app --- core/app-framework/wgl/{wgl.md => readme.MD} | 0 samples/gui/wasm-apps/decrease/Makefile | 29 ++++++++ samples/gui/wasm-apps/decrease/src/main.c | 77 ++++++++++++++++++++ 3 files changed, 106 insertions(+) rename core/app-framework/wgl/{wgl.md => readme.MD} (100%) create mode 100644 samples/gui/wasm-apps/decrease/Makefile create mode 100644 samples/gui/wasm-apps/decrease/src/main.c diff --git a/core/app-framework/wgl/wgl.md b/core/app-framework/wgl/readme.MD similarity index 100% rename from core/app-framework/wgl/wgl.md rename to core/app-framework/wgl/readme.MD diff --git a/samples/gui/wasm-apps/decrease/Makefile b/samples/gui/wasm-apps/decrease/Makefile new file mode 100644 index 000000000..6e18fc73c --- /dev/null +++ b/samples/gui/wasm-apps/decrease/Makefile @@ -0,0 +1,29 @@ +# Copyright (C) 2019 Intel Corporation. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +CC = /opt/wasi-sdk/bin/clang +APP_DIR = ${shell pwd} +IWASM_DIR = $(APP_DIR)/../../../../core/iwasm +SDK_DIR = $(APP_DIR)/../../../../wamr-sdk/out/gui/app-sdk +APP_FRAMEWORK_DIR = $(APP_DIR)/../../../../wamr-sdk/out/gui/app-sdk/wamr-app-framework +DEPS_DIR = $(APP_DIR)/../../../../core/deps + +CFLAGS += -O3 \ + -Wno-int-conversion \ + -I$(APP_DIR)/src \ + -I$(APP_FRAMEWORK_DIR)/include \ + -I${DEPS_DIR} + +SRCS += $(APP_DIR)/src/main.c + +all: + @$(CC) $(CFLAGS) $(SRCS) \ + --target=wasm32 -O3 -z stack-size=2048 -Wl,--initial-memory=65536 \ + --sysroot=$(SDK_DIR)/libc-builtin-sysroot \ + -L$(APP_FRAMEWORK_DIR)/lib -lapp_framework \ + -Wl,--allow-undefined-file=$(SDK_DIR)/libc-builtin-sysroot/share/defined-symbols.txt \ + -Wl,--no-threads,--strip-all,--no-entry -nostdlib \ + -Wl,--export=on_init -Wl,--export=on_timer_callback \ + -Wl,--export=on_widget_event \ + -Wl,--export=__heap_base,--export=__data_end \ + -o ui_decrease.wasm diff --git a/samples/gui/wasm-apps/decrease/src/main.c b/samples/gui/wasm-apps/decrease/src/main.c new file mode 100644 index 000000000..03eb5568c --- /dev/null +++ b/samples/gui/wasm-apps/decrease/src/main.c @@ -0,0 +1,77 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + */ + +#include +#include "wasm_app.h" +#include "wa-inc/lvgl/lvgl.h" +#include "wa-inc/timer_wasm_app.h" + +extern char g_widget_text[]; + +static void btn_event_cb(lv_obj_t *btn, lv_event_t event); + +uint32_t count = 0; +char count_str[11] = { 0 }; +lv_obj_t *hello_world_label; +lv_obj_t *count_label; +lv_obj_t *btn1; +lv_obj_t *label_count1; +int label_count1_value = 100; +char label_count1_str[11] = { 0 }; + +void timer1_update(user_timer_t timer1) +{ + if ((count % 100) == 0) { + snprintf(count_str, sizeof(count_str), "%d", count / 100); + lv_label_set_text(count_label, count_str); + } + ++count; +} + +void on_init() +{ + char *text; + + hello_world_label = lv_label_create(NULL, NULL); + lv_label_set_text(hello_world_label, "Hello world!"); + text = lv_label_get_text(hello_world_label); + printf("Label text %lu %s \n", strlen(text), text); + lv_obj_align(hello_world_label, NULL, LV_ALIGN_IN_TOP_LEFT, 0, 0); + + count_label = lv_label_create(NULL, NULL); + lv_obj_align(count_label, NULL, LV_ALIGN_IN_TOP_MID, 0, 0); + + btn1 = lv_btn_create(NULL, NULL); /*Create a button on the currently loaded screen*/ + lv_obj_set_event_cb(btn1, btn_event_cb); /*Set function to be called when the button is released*/ + lv_obj_align(btn1, NULL, LV_ALIGN_CENTER, 0, 0); /*Align below the label*/ + + /*Create a label on the button*/ + lv_obj_t *btn_label = lv_label_create(btn1, NULL); + lv_label_set_text(btn_label, "Click --"); + + label_count1 = lv_label_create(NULL, NULL); + lv_label_set_text(label_count1, "100"); + lv_obj_align(label_count1, NULL, LV_ALIGN_IN_BOTTOM_MID, 0, 0); + + /* set up a timer */ + user_timer_t timer; + timer = api_timer_create(10, true, false, timer1_update); + if (timer) + api_timer_restart(timer, 10); + else + printf("Fail to create timer.\n"); +} + +static void btn_event_cb(lv_obj_t *btn, lv_event_t event) +{ + if(event == LV_EVENT_RELEASED) { + label_count1_value--; + snprintf(label_count1_str, sizeof(label_count1_str), + "%d", label_count1_value); + lv_label_set_text(label_count1, label_count1_str); + if (label_count1_value == 0) + label_count1_value = 100; + } +}