mirror of
https://github.com/sipeed/MaixCDK.git
synced 2026-09-10 21:59:54 -05:00
fix: correct typos in different files
This commit is contained in:
@@ -11,7 +11,7 @@ import json
|
||||
try:
|
||||
curr_dir = os.path.abspath(os.path.dirname(__file__))
|
||||
except Exception:
|
||||
print("-- [ERROR] Please upgrate maixtool by pip install -U maixtool")
|
||||
print("-- [ERROR] Please upgrade maixtool by pip install -U maixtool")
|
||||
sys.exit(1)
|
||||
|
||||
if curr_dir not in sys.path:
|
||||
@@ -182,7 +182,7 @@ def rebuild(build_path, configs, toolchain_info, verbose):
|
||||
print("\n\n---- ERROR -----")
|
||||
traceback.print_exc()
|
||||
print("----------------")
|
||||
print(f"[ERROR] download for compoent [{name}] failed, please check its component.py")
|
||||
print(f"[ERROR] download for component [{name}] failed, please check its component.py")
|
||||
sys.exit(1)
|
||||
|
||||
# cmake
|
||||
@@ -300,7 +300,7 @@ if __name__ == "__main__":
|
||||
find_dirs = sys.argv[2:]
|
||||
for dir in find_dirs:
|
||||
if " " in dir:
|
||||
raise Exception("Path can not contain space or special charactors")
|
||||
raise Exception("Path can not contain space or special characters")
|
||||
components = get_components_dirs(find_dirs)
|
||||
valid_components = find_valid_components(components)
|
||||
print(";".join(valid_components), end="")
|
||||
|
||||
@@ -429,7 +429,7 @@ macro(project name)
|
||||
# message(FATAL_ERROR "Check Kconfig content")
|
||||
# endif()
|
||||
|
||||
# Include confiurations
|
||||
# Include configurations
|
||||
set(global_config_dir "${PROJECT_BINARY_DIR}/config")
|
||||
include(${global_config_dir}/global_config.cmake)
|
||||
if(WIN32)
|
||||
@@ -502,7 +502,7 @@ macro(project name)
|
||||
|
||||
# set(CMAKE_SYSTEM_NAME Generic) # set this flag may leads to dymamic(/shared) lib compile fail
|
||||
|
||||
# Declare project # This function will cler flags!
|
||||
# Declare project # This function will clear flags!
|
||||
_project(${name} ASM C CXX)
|
||||
|
||||
if(CMAKE_EXECUTABLE_SUFFIX STREQUAL ".js") # generate js ang html file for WASM
|
||||
|
||||
@@ -8,7 +8,7 @@ set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -Wall -fPIC)
|
||||
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -Wall -fPIC)
|
||||
################################
|
||||
|
||||
# set(LINK_FLAGS -Wl,-EL) # (default little edian)
|
||||
# set(LINK_FLAGS -Wl,-EL) # (default little endian)
|
||||
set(CMAKE_C_LINK_FLAGS ${CMAKE_C_LINK_FLAGS}
|
||||
${LINK_FLAGS}
|
||||
-Wl,-rpath=$ORIGIN/dl_lib
|
||||
|
||||
@@ -220,7 +220,7 @@ def check_download_items(items):
|
||||
if not item["filename"]:
|
||||
item["filename"] = os.path.basename(item["url"])
|
||||
if not item["path"]:
|
||||
print("-- Error: path not found in download item: {}, for example, toolchanin can be 'toolchains/board_name'".format(item))
|
||||
print("-- Error: path not found in download item: {}, for example, toolchain can be 'toolchains/board_name'".format(item))
|
||||
sys.exit(1)
|
||||
if not "urls" in item:
|
||||
item["urls"] = []
|
||||
@@ -283,7 +283,7 @@ def download_extract_files(items):
|
||||
if "sha256sum" in item and item["sha256sum"]:
|
||||
ok, sha256sum = check_sha256sum(pkg_path, item["sha256sum"])
|
||||
if not ok:
|
||||
print("-- Error: sha256sum check failed, shoule be {}, but files's sha256sum is {}.\n Please download this file manually".format(item["sha256sum"], sha256sum))
|
||||
print("-- Error: sha256sum check failed, should be {}, but files's sha256sum is {}.\n Please download this file manually".format(item["sha256sum"], sha256sum))
|
||||
sys.exit(1)
|
||||
# extract_dir not empty means already extracted, continue
|
||||
need_extract = False
|
||||
|
||||
@@ -16,7 +16,7 @@ from multiprocessing import cpu_count
|
||||
try:
|
||||
curr_dir = os.path.abspath(os.path.dirname(__file__))
|
||||
except Exception:
|
||||
print("-- [ERROR] Please upgrate maixtool by pip install -U maixtool")
|
||||
print("-- [ERROR] Please upgrade maixtool by pip install -U maixtool")
|
||||
sys.exit(1)
|
||||
|
||||
sys.path.insert(0, curr_dir)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
# add prefix for all list members
|
||||
# uage: prepend(out_var prefix in_var)
|
||||
# usage: prepend(out_var prefix in_var)
|
||||
function(prepend out prefix)
|
||||
set(listVar "")
|
||||
foreach(f ${ARGN})
|
||||
|
||||
@@ -711,7 +711,7 @@ if __name__ == "__main__":
|
||||
for r in rm:
|
||||
headers.remove(r)
|
||||
|
||||
# generate API documenation according to api_tree
|
||||
# generate API documentation according to api_tree
|
||||
print("-- Generating MaixCDK API documentation")
|
||||
doc_out_dir = args.doc
|
||||
if not os.path.exists(doc_out_dir):
|
||||
|
||||
@@ -49,9 +49,9 @@ def get_i18n_strs(file, keywords):
|
||||
return strs
|
||||
|
||||
def main(search_dir, keywords, exts, out, recursive, locales):
|
||||
print("seach dir: ", dir)
|
||||
print("search dir:", dir)
|
||||
print("keywords: ", keywords)
|
||||
print("extentions:", exts)
|
||||
print("extensions:", exts)
|
||||
print("out dir: ", out)
|
||||
print("")
|
||||
files = get_files(search_dir, recursive, exts)
|
||||
@@ -85,14 +85,14 @@ def main(search_dir, keywords, exts, out, recursive, locales):
|
||||
|
||||
if __name__ == "__main__":
|
||||
import argparse
|
||||
paser = argparse.ArgumentParser()
|
||||
paser.add_argument("-k", "--keywords", nargs="+", type=str, default=["_", "tr"], help="translate function keywords to search")
|
||||
paser.add_argument("-r", action="store_true", help="recursive search dir")
|
||||
paser.add_argument("-e", "--exts", nargs="+", type=str, default=[".c", ".cpp", ".h", ".hpp", ".py"], help="file extention to search")
|
||||
paser.add_argument("-l", "--locales", nargs="+", type=str, default=["en", "zh"], help="locals of region, like en zh ja etc. the locale name can be found in [here](https://www.science.co.il/language/Locale-codes.php) or [wikipedia](https://en.wikipedia.org/wiki/Language_localisation), all letters use lower case.")
|
||||
paser.add_argument("-o", "--out", type=str, default="locales", help="translation files output directory")
|
||||
paser.add_argument("-d", "--dir", type=str, help="where to search", required=True)
|
||||
args = paser.parse_args()
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("-k", "--keywords", nargs="+", type=str, default=["_", "tr"], help="translate function keywords to search")
|
||||
parser.add_argument("-r", action="store_true", help="recursive search dir")
|
||||
parser.add_argument("-e", "--exts", nargs="+", type=str, default=[".c", ".cpp", ".h", ".hpp", ".py"], help="file extension to search")
|
||||
parser.add_argument("-l", "--locales", nargs="+", type=str, default=["en", "zh"], help="locals of region, like en zh ja etc. the locale name can be found in [here](https://www.science.co.il/language/Locale-codes.php) or [wikipedia](https://en.wikipedia.org/wiki/Language_localisation), all letters use lower case.")
|
||||
parser.add_argument("-o", "--out", type=str, default="locales", help="translation files output directory")
|
||||
parser.add_argument("-d", "--dir", type=str, help="where to search", required=True)
|
||||
args = parser.parse_args()
|
||||
main(args.dir, args.keywords, args.exts, args.out, args.r, args.locales)
|
||||
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ list(APPEND ADD_REQUIREMENTS basic)
|
||||
# list(APPEND ADD_DEFINITIONS_PRIVATE -DAAAAA=1)
|
||||
|
||||
#### Add compile option for this component
|
||||
#### and components denpend on this component
|
||||
#### and components depend on this component
|
||||
# list(APPEND ADD_DEFINITIONS -DAAAAA222=1
|
||||
# -DAAAAA333=1)
|
||||
###############################################
|
||||
|
||||
Reference in New Issue
Block a user