diff --git a/APP_Framework/Applications/benchmark/Kconfig b/APP_Framework/Applications/benchmark/Kconfig index 39df5df06..bebfe49c6 100644 --- a/APP_Framework/Applications/benchmark/Kconfig +++ b/APP_Framework/Applications/benchmark/Kconfig @@ -1,4 +1,9 @@ menuconfig APP_BENCHMARK bool "embench for xiuos" - default n + default Y +if APP_BENCHMARK + config USING_BENCHMARK + bool "USING_BENCHMARK" + default y +endif diff --git a/APP_Framework/Applications/benchmark/src/aha-mont64/mont64.c b/APP_Framework/Applications/benchmark/src/aha-mont64/mont64.c index 045a19697..d4f2adef2 100644 --- a/APP_Framework/Applications/benchmark/src/aha-mont64/mont64.c +++ b/APP_Framework/Applications/benchmark/src/aha-mont64/mont64.c @@ -14,7 +14,7 @@ Some of this code is referenced by the book the Hacker's Delight (which placed it in the public domain). See http://www.hackersdelight.org/ */ -#include "support.h" +#include /* This scale factor will be changed to equalise the runtime of the benchmarks. */ diff --git a/APP_Framework/Applications/benchmark/src/crc32/crc_32.c b/APP_Framework/Applications/benchmark/src/crc32/crc_32.c index fde223387..d37886f39 100644 --- a/APP_Framework/Applications/benchmark/src/crc32/crc_32.c +++ b/APP_Framework/Applications/benchmark/src/crc32/crc_32.c @@ -16,7 +16,7 @@ /* CRC - 32 BIT ANSI X3.66 CRC checksum files */ -#include "support.h" +#include /* This scale factor will be changed to equalise the runtime of the benchmarks. */ diff --git a/APP_Framework/Applications/benchmark/src/cubic/basicmath_small.c b/APP_Framework/Applications/benchmark/src/cubic/basicmath_small.c index 0964571fe..b0cee542c 100644 --- a/APP_Framework/Applications/benchmark/src/cubic/basicmath_small.c +++ b/APP_Framework/Applications/benchmark/src/cubic/basicmath_small.c @@ -10,7 +10,7 @@ #include #include "snipmath.h" -#include "support.h" +#include /* This scale factor will be changed to equalise the runtime of the benchmarks. */ diff --git a/APP_Framework/Applications/benchmark/src/edn/libedn.c b/APP_Framework/Applications/benchmark/src/edn/libedn.c index 4337d61b7..0f2d1233f 100644 --- a/APP_Framework/Applications/benchmark/src/edn/libedn.c +++ b/APP_Framework/Applications/benchmark/src/edn/libedn.c @@ -33,7 +33,7 @@ */ #include -#include "support.h" +#include /* This scale factor will be changed to equalise the runtime of the benchmarks. */ diff --git a/APP_Framework/Applications/benchmark/src/huffbench/libhuffbench.c b/APP_Framework/Applications/benchmark/src/huffbench/libhuffbench.c index cbd64e193..6eec020d0 100644 --- a/APP_Framework/Applications/benchmark/src/huffbench/libhuffbench.c +++ b/APP_Framework/Applications/benchmark/src/huffbench/libhuffbench.c @@ -48,7 +48,7 @@ #include #include -#include "support.h" +#include /* This scale factor will be changed to equalise the runtime of the benchmarks. */ diff --git a/APP_Framework/Applications/benchmark/src/matmult-int/matmult-int.c b/APP_Framework/Applications/benchmark/src/matmult-int/matmult-int.c index ade61617d..922b768c1 100644 --- a/APP_Framework/Applications/benchmark/src/matmult-int/matmult-int.c +++ b/APP_Framework/Applications/benchmark/src/matmult-int/matmult-int.c @@ -34,7 +34,7 @@ #include -#include "support.h" +#include /* This scale factor will be changed to equalise the runtime of the benchmarks. */ diff --git a/APP_Framework/Applications/benchmark/src/md5sum/md5.c b/APP_Framework/Applications/benchmark/src/md5sum/md5.c index 2668a2e48..dc540f25f 100644 --- a/APP_Framework/Applications/benchmark/src/md5sum/md5.c +++ b/APP_Framework/Applications/benchmark/src/md5sum/md5.c @@ -12,7 +12,7 @@ #include #include -#include "support.h" +#include #define LOCAL_SCALE_FACTOR 51 diff --git a/APP_Framework/Applications/benchmark/src/minver/libminver.c b/APP_Framework/Applications/benchmark/src/minver/libminver.c index f0f8af010..58af6c24c 100644 --- a/APP_Framework/Applications/benchmark/src/minver/libminver.c +++ b/APP_Framework/Applications/benchmark/src/minver/libminver.c @@ -57,7 +57,7 @@ #include #include -#include "support.h" +#include /* This scale factor will be changed to equalise the runtime of the benchmarks. */ diff --git a/APP_Framework/Applications/benchmark/src/nbody/nbody.c b/APP_Framework/Applications/benchmark/src/nbody/nbody.c index 5e50d8cd5..51ca510d8 100644 --- a/APP_Framework/Applications/benchmark/src/nbody/nbody.c +++ b/APP_Framework/Applications/benchmark/src/nbody/nbody.c @@ -59,7 +59,7 @@ #include #include -#include "support.h" +#include #define LOCAL_SCALE_FACTOR 1 diff --git a/APP_Framework/Applications/benchmark/src/nettle-aes/nettle-aes.c b/APP_Framework/Applications/benchmark/src/nettle-aes/nettle-aes.c index 9054b9d3e..86e84e8bd 100644 --- a/APP_Framework/Applications/benchmark/src/nettle-aes/nettle-aes.c +++ b/APP_Framework/Applications/benchmark/src/nettle-aes/nettle-aes.c @@ -11,7 +11,7 @@ SPDX-License-Identifier: GPL-3.0-or-later */ -#include "support.h" +#include #include #include #include diff --git a/APP_Framework/Applications/benchmark/src/nettle-sha256/nettle-sha256.c b/APP_Framework/Applications/benchmark/src/nettle-sha256/nettle-sha256.c index 8ad824bf2..5cd452e77 100644 --- a/APP_Framework/Applications/benchmark/src/nettle-sha256/nettle-sha256.c +++ b/APP_Framework/Applications/benchmark/src/nettle-sha256/nettle-sha256.c @@ -16,7 +16,7 @@ #include #include #include -#include "support.h" +#include /* This scale factor will be changed to equalise the runtime of the benchmarks. */ diff --git a/APP_Framework/Applications/benchmark/src/nsichneu/libnsichneu.c b/APP_Framework/Applications/benchmark/src/nsichneu/libnsichneu.c index b3df65897..ca93aae6b 100644 --- a/APP_Framework/Applications/benchmark/src/nsichneu/libnsichneu.c +++ b/APP_Framework/Applications/benchmark/src/nsichneu/libnsichneu.c @@ -34,7 +34,7 @@ ***************************************************************************/ // #define DO_TRACING -#include "support.h" +#include /* This scale factor will be changed to equalise the runtime of the benchmarks. */ diff --git a/APP_Framework/Applications/benchmark/src/picojpeg/picojpeg_test.c b/APP_Framework/Applications/benchmark/src/picojpeg/picojpeg_test.c index 90f7f1cf5..6ec684968 100644 --- a/APP_Framework/Applications/benchmark/src/picojpeg/picojpeg_test.c +++ b/APP_Framework/Applications/benchmark/src/picojpeg/picojpeg_test.c @@ -11,7 +11,7 @@ SPDX-License-Identifier: GPL-3.0-or-later */ -#include "support.h" +#include #include "picojpeg.h" #include diff --git a/APP_Framework/Applications/benchmark/src/primecount/primecount.c b/APP_Framework/Applications/benchmark/src/primecount/primecount.c index fa87207f7..129d71dbc 100644 --- a/APP_Framework/Applications/benchmark/src/primecount/primecount.c +++ b/APP_Framework/Applications/benchmark/src/primecount/primecount.c @@ -93,7 +93,7 @@ bytes 66.8 billion clocks 13449.513 sec AVR ATmega2560 @ 20 MHz 318 bytes 269.0 billion clocks */ -#include "support.h" +#include #define LOCAL_SCALE_FACTOR 1 diff --git a/APP_Framework/Applications/benchmark/src/qrduino/qrtest.c b/APP_Framework/Applications/benchmark/src/qrduino/qrtest.c index 2e79eb6b4..7cc6bf819 100644 --- a/APP_Framework/Applications/benchmark/src/qrduino/qrtest.c +++ b/APP_Framework/Applications/benchmark/src/qrduino/qrtest.c @@ -13,7 +13,7 @@ Original code from: https://github.com/tz1/qrduino */ -#include "support.h" +#include #include "qrencode.h" #include diff --git a/APP_Framework/Applications/benchmark/src/sglib-combined/combined.c b/APP_Framework/Applications/benchmark/src/sglib-combined/combined.c index 07a5f41f9..54300ea9d 100644 --- a/APP_Framework/Applications/benchmark/src/sglib-combined/combined.c +++ b/APP_Framework/Applications/benchmark/src/sglib-combined/combined.c @@ -12,7 +12,7 @@ SPDX-License-Identifier: GPL-3.0-or-later */ #include -#include "support.h" +#include #include "sglib.h" /* This scale factor will be changed to equalise the runtime of the diff --git a/APP_Framework/Applications/benchmark/src/slre/libslre.c b/APP_Framework/Applications/benchmark/src/slre/libslre.c index d0ea25250..5d6e1a610 100644 --- a/APP_Framework/Applications/benchmark/src/slre/libslre.c +++ b/APP_Framework/Applications/benchmark/src/slre/libslre.c @@ -14,7 +14,7 @@ SPDX-License-Identifier: GPL-3.0-or-later */ -#include "support.h" +#include /* This scale factor will be changed to equalise the runtime of the benchmarks. */ diff --git a/APP_Framework/Applications/benchmark/src/st/libst.c b/APP_Framework/Applications/benchmark/src/st/libst.c index 6da82c2b7..e52f81de9 100644 --- a/APP_Framework/Applications/benchmark/src/st/libst.c +++ b/APP_Framework/Applications/benchmark/src/st/libst.c @@ -30,7 +30,7 @@ #include -#include "support.h" +#include /* This scale factor will be changed to equalise the runtime of the benchmarks. */ diff --git a/APP_Framework/Applications/benchmark/src/statemate/libstatemate.c b/APP_Framework/Applications/benchmark/src/statemate/libstatemate.c index 31e5de34c..485be2359 100644 --- a/APP_Framework/Applications/benchmark/src/statemate/libstatemate.c +++ b/APP_Framework/Applications/benchmark/src/statemate/libstatemate.c @@ -43,7 +43,7 @@ #include -#include "support.h" +#include /* This scale factor will be changed to equalise the runtime of the benchmarks. */ diff --git a/APP_Framework/Applications/benchmark/src/tarfind/tarfind.c b/APP_Framework/Applications/benchmark/src/tarfind/tarfind.c index e1a3ab2bf..6fa1192a2 100644 --- a/APP_Framework/Applications/benchmark/src/tarfind/tarfind.c +++ b/APP_Framework/Applications/benchmark/src/tarfind/tarfind.c @@ -10,7 +10,7 @@ #include #include -#include "support.h" +#include #define LOCAL_SCALE_FACTOR 47 diff --git a/APP_Framework/Applications/benchmark/src/ud/libud.c b/APP_Framework/Applications/benchmark/src/ud/libud.c index d749d4fb7..4055b63af 100644 --- a/APP_Framework/Applications/benchmark/src/ud/libud.c +++ b/APP_Framework/Applications/benchmark/src/ud/libud.c @@ -86,7 +86,7 @@ */ #include -#include "support.h" +#include /* This scale factor will be changed to equalise the runtime of the benchmarks. */ diff --git a/APP_Framework/Applications/benchmark/src/wikisort/SConscript b/APP_Framework/Applications/benchmark/src/wikisort/SConscript index 1d19ddf32..406ccb8b8 100644 --- a/APP_Framework/Applications/benchmark/src/wikisort/SConscript +++ b/APP_Framework/Applications/benchmark/src/wikisort/SConscript @@ -5,6 +5,6 @@ cwd = GetCurrentDir() src = Glob('*.c') path = [cwd] -group = DefineGroup('benchmark', src, depend=['USING_BENCHMAKR'], CPPPATH=path) +group = DefineGroup('benchmark', src, depend=['USING_BENCHMARK'], CPPPATH=path) Return('group') diff --git a/APP_Framework/Applications/benchmark/src/wikisort/libwikisort.c b/APP_Framework/Applications/benchmark/src/wikisort/libwikisort.c index 51d31bf5c..6a50e652d 100644 --- a/APP_Framework/Applications/benchmark/src/wikisort/libwikisort.c +++ b/APP_Framework/Applications/benchmark/src/wikisort/libwikisort.c @@ -15,7 +15,7 @@ into public domain. */ #include -#include "support.h" +#include /* This scale factor will be changed to equalise the runtime of the benchmarks. */ diff --git a/APP_Framework/Applications/benchmark/support/SConscript b/APP_Framework/Applications/benchmark/support/SConscript index 406ccb8b8..419d69eb5 100644 --- a/APP_Framework/Applications/benchmark/support/SConscript +++ b/APP_Framework/Applications/benchmark/support/SConscript @@ -1,10 +1,11 @@ import os -from building import * - +from building import * +Import('RTT_ROOT') +Import('rtconfig') cwd = GetCurrentDir() -src = Glob('*.c') -path = [cwd] +DEPENDS = [""] -group = DefineGroup('benchmark', src, depend=['USING_BENCHMARK'], CPPPATH=path) - -Return('group') +SOURCES = ['benchmark.c']+['beebsc.c'] +path = [cwd] +objs = DefineGroup('benchmark', src = SOURCES, depend = DEPENDS,CPPPATH = path) +Return("objs") diff --git a/APP_Framework/Applications/benchmark/support/benchmark.c b/APP_Framework/Applications/benchmark/support/benchmark.c index 8eafda281..bd2f2fcd8 100644 --- a/APP_Framework/Applications/benchmark/support/benchmark.c +++ b/APP_Framework/Applications/benchmark/support/benchmark.c @@ -7,6 +7,7 @@ #include // #define NUTTX +// #define RTTHREAD 0 #ifdef NUTTX // #include "k210_sysctl.h" #include "../../../../../Ubiquitous/Nuttx_Fusion_XiUOS/nuttx/arch/risc-v/src/k210/encoding.h" @@ -156,11 +157,9 @@ void *run_one_example(void *arg) { organize_result(handle, start_time, end_time); PrivMutexAbandon(&case_mu); done_cnt++; -#ifdef NUTTX if (done_cnt == 22) { PrivSemaphoreAbandon(&res_mu); } -#endif // printf("Case done. %d\n", done_cnt); } @@ -180,7 +179,7 @@ void *run_benchmark_parallel(void *args) { case_attr.priority = 64; case_attr.stacksize = 16384; #else - case_attr.schedparam.sched_priority = 25; + case_attr.schedparam.sched_priority = 27; case_attr.stacksize = 16384; #endif PrivMutexCreate(&case_mu, NULL); @@ -193,22 +192,32 @@ void *run_benchmark_parallel(void *args) { start_trigger(&g_start_time); while (NULL != cur_handle) { assert(cur_handle->handle.magic_number != MAGIC_NUMBER); +#ifdef RTTHREAD + rt_thread_t tid = rt_thread_create("bm_case", run_one_example, + (void *)cur_handle, 16384, 27, 20); + rt_thread_startup(tid); +#else PrivTaskCreate(&cur_handle->task_ptr, &case_attr, run_one_example, (void *)cur_handle); - +#endif cur_handle = cur_handle->next; } // printf("Create done.\n"); -#ifdef NUTTX PrivSemaphoreObtainWait(&res_mu, NULL); +#ifdef NUTTX case_attr.priority = 64; case_attr.stacksize = 16384; + PrivTaskCreate(&res_thread, &case_attr, print_result_asyn, NULL); +#elif RTTHREAD + rt_thread_t tid = + rt_thread_create("bm_res", print_result_asyn, NULL, 4096, 23, 20); + rt_thread_startup(tid); #else case_attr.schedparam.sched_priority = 23; case_attr.stacksize = 16384; -#endif PrivTaskCreate(&res_thread, &case_attr, print_result_asyn, NULL); +#endif return NULL; } @@ -251,28 +260,70 @@ void *run_benchmark_sequential(void *args) { (uint64_t)(s_stop_time - s_start_time)); } +/*****************************************************/ + +#define NR_BM_MUTEX_LOOP 1000000 + +void TestWrapMutexManagement(void) { + pthread_mutex_t mu; + PrivMutexCreate(&mu, 0); + uint64_t start_time = read_cycle(); + for (int i = 0; i < NR_BM_MUTEX_LOOP; i++) { + PrivMutexObtain(&mu); + PrivMutexAbandon(&mu); + } + uint64_t end_time = read_cycle(); + printf("Wrapped Mutex cost: %20ld\n", (uint64_t)(end_time - start_time)); +} + +void TestOrigMutexManagement(void) { + pthread_mutex_t mu; + pthread_mutex_init(&mu, 0); + uint64_t start_time = read_cycle(); + for (int i = 0; i < NR_BM_MUTEX_LOOP; i++) { + pthread_mutex_lock(&mu); + pthread_mutex_unlock(&mu); + } + uint64_t end_time = read_cycle(); + printf("Original Mutex cost: %20ld\n", (uint64_t)(end_time - start_time)); +} + +/*****************************************************/ + pthread_t main_thread; int embenchmark_parallel() { #ifdef NUTTX case_attr.priority = 128; case_attr.stacksize = 16384; + PrivTaskCreate(&main_thread, &case_attr, run_benchmark_parallel, NULL); +#elif RTTHREAD + rt_thread_t tid = rt_thread_create( + "benchmark_parallel", run_benchmark_parallel, NULL, 16384, 30, 20); + rt_thread_startup(tid); #else case_attr.schedparam.sched_priority = 30; case_attr.stacksize = 16384; -#endif PrivTaskCreate(&main_thread, &case_attr, run_benchmark_parallel, NULL); +#endif // run_benchmark_parallel(NULL); + // TestWrapMutexManagement(); return 0; } int embenchmark_sequential(void) { #ifdef NUTTX case_attr.priority = 128; case_attr.stacksize = 16384; + PrivTaskCreate(&main_thread, &case_attr, run_benchmark_sequential, NULL); +#elif RTTHREAD + rt_thread_t tid = rt_thread_create( + "benchmark_sequential", run_benchmark_sequential, NULL, 16384, 30, 20); + rt_thread_startup(tid); #else case_attr.schedparam.sched_priority = 30; case_attr.stacksize = 16384; -#endif PrivTaskCreate(&main_thread, &case_attr, run_benchmark_sequential, NULL); +#endif + // TestOrigMutexManagement(); return 0; } PRIV_SHELL_CMD_FUNCTION(embenchmark_parallel, run benchmark in parallel, diff --git a/APP_Framework/Framework/transform_layer/nuttx/transform.c b/APP_Framework/Framework/transform_layer/nuttx/transform.c index 35e3a599d..7223aee01 100644 --- a/APP_Framework/Framework/transform_layer/nuttx/transform.c +++ b/APP_Framework/Framework/transform_layer/nuttx/transform.c @@ -82,6 +82,11 @@ int PrivSemaphoreAbandon(sem_t *sem) int PrivTaskCreate(pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)(void *), void *arg) { + // sched_setscheduler() + struct sched_param sp; + sp.sched_priority = attr->priority; + sched_setscheduler(0, SCHED_RR, &sp); + return pthread_create(thread, attr, start_routine, arg); } diff --git a/APP_Framework/Framework/transform_layer/rtthread/transform.c b/APP_Framework/Framework/transform_layer/rtthread/transform.c index 42872041a..d35d20044 100644 --- a/APP_Framework/Framework/transform_layer/rtthread/transform.c +++ b/APP_Framework/Framework/transform_layer/rtthread/transform.c @@ -75,7 +75,7 @@ int PrivSemaphoreObtainWaitForever(sem_t *sem) int PrivTaskCreate(pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)(void *), void *arg) { - pthread_attr_t attrtmp ; + pthread_attr_t attrtmp; pthread_attr_init(&attrtmp); pthread_attr_setschedparam(&attrtmp, &(attr->schedparam)); /* 修改属性对应的优先级 */ pthread_attr_setstacksize(&attrtmp, (size_t)((attr->stacksize))); diff --git a/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/xidatong-riscv64/.config b/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/xidatong-riscv64/.config index 22adef777..4d7bad2fe 100644 --- a/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/xidatong-riscv64/.config +++ b/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/xidatong-riscv64/.config @@ -115,7 +115,7 @@ CONFIG_RT_USING_FINSH=y CONFIG_RT_USING_MSH=y CONFIG_FINSH_USING_MSH=y CONFIG_FINSH_THREAD_NAME="tshell" -CONFIG_FINSH_THREAD_PRIORITY=20 +CONFIG_FINSH_THREAD_PRIORITY=30 CONFIG_FINSH_THREAD_STACK_SIZE=16384 CONFIG_FINSH_USING_HISTORY=y CONFIG_FINSH_HISTORY_LINES=5 @@ -234,7 +234,7 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8 # Socket abstraction layer # CONFIG_RT_USING_SAL=y -CONFIG_SAL_INTERNET_CHECK=y +# CONFIG_SAL_INTERNET_CHECK is not set # CONFIG_SAL_USING_POSIX is not set CONFIG_SAL_SOCKETS_NUM=16 @@ -242,10 +242,10 @@ CONFIG_SAL_SOCKETS_NUM=16 # Network interface device # CONFIG_RT_USING_NETDEV=y -CONFIG_NETDEV_USING_IFCONFIG=y -CONFIG_NETDEV_USING_PING=y -CONFIG_NETDEV_USING_NETSTAT=y -CONFIG_NETDEV_USING_AUTO_DEFAULT=y +# CONFIG_NETDEV_USING_IFCONFIG is not set +# CONFIG_NETDEV_USING_PING is not set +# CONFIG_NETDEV_USING_NETSTAT is not set +# CONFIG_NETDEV_USING_AUTO_DEFAULT is not set # CONFIG_NETDEV_USING_IPV6 is not set CONFIG_NETDEV_IPV4=1 CONFIG_NETDEV_IPV6=0 @@ -420,6 +420,7 @@ CONFIG_APPLICATION_SENSOR=y # CONFIG_USING_EMBEDDED_DATABASE_APP is not set # CONFIG_APP_USING_WEBNET is not set CONFIG_APP_BENCHMARK=y +CONFIG_USING_BENCHMARK=y # # lib diff --git a/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/xidatong-riscv64/applications/benchmark/support/benchmark.c b/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/xidatong-riscv64/applications/benchmark/support/benchmark.c index f04747e5d..bdef818bf 100644 --- a/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/xidatong-riscv64/applications/benchmark/support/benchmark.c +++ b/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/xidatong-riscv64/applications/benchmark/support/benchmark.c @@ -222,5 +222,5 @@ static int embenchmark_sequential(void) { // PRIV_SHELL_CMD_MAIN_ATTR); // PRIV_SHELL_CMD_FUNCTION(embenchmark_sequential, run benchmark in sequential, // PRIV_SHELL_CMD_MAIN_ATTR); -MSH_CMD_EXPORT(embenchmark_parallel, embench parallel); -MSH_CMD_EXPORT(embenchmark_sequential, embench sequential); +// MSH_CMD_EXPORT(embenchmark_parallel, embench parallel); +// MSH_CMD_EXPORT(embenchmark_sequential, embench sequential); diff --git a/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/xidatong-riscv64/base-drivers/SConscript b/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/xidatong-riscv64/base-drivers/SConscript index 56ebe4e1e..851a425e3 100644 --- a/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/xidatong-riscv64/base-drivers/SConscript +++ b/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/xidatong-riscv64/base-drivers/SConscript @@ -3,7 +3,7 @@ import rtconfig from building import * cwd = GetCurrentDir() -drv_path = cwd + "/../../../aiit_board/k210/kendryte-sdk/kendryte-sdk-source/lib/drivers/include" +drv_path = cwd + "/../../../rt-thread/bsp/k210/driver/" src = [ 'board.c', 'heap.c', diff --git a/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/xidatong-riscv64/kendryte-sdk/SConscript b/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/xidatong-riscv64/kendryte-sdk/SConscript index a4b1cce5c..01e6ac912 100644 --- a/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/xidatong-riscv64/kendryte-sdk/SConscript +++ b/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/xidatong-riscv64/kendryte-sdk/SConscript @@ -1,7 +1,7 @@ from building import * -cwd = GetCurrentDir() -src = Split(''' +cwd = GetCurrentDir() +src = Split(''' kendryte-sdk-source/lib/bsp/entry.c kendryte-sdk-source/lib/bsp/entry_user.c kendryte-sdk-source/lib/drivers/aes.c @@ -18,7 +18,7 @@ kendryte-sdk-source/lib/drivers/kpu.c kendryte-sdk-source/lib/drivers/plic.c kendryte-sdk-source/lib/drivers/pwm.c kendryte-sdk-source/lib/drivers/rtc.c -kendryte-sdk-source/lib/drivers/sha256.c + kendryte-sdk-source/lib/drivers/spi.c kendryte-sdk-source/lib/drivers/sysctl.c kendryte-sdk-source/lib/drivers/timer.c @@ -27,11 +27,20 @@ kendryte-sdk-source/lib/drivers/uarths.c kendryte-sdk-source/lib/drivers/utils.c kendryte-sdk-source/lib/drivers/wdt.c ''') -CPPPATH = [cwd + '/kendryte-sdk-source/lib/drivers/include', -cwd + '/kendryte-sdk-source/lib/bsp/include', -cwd + '/kendryte-sdk-source/lib/utils/include'] -CPPDEFINES = ['CONFIG_LOG_COLORS', 'CONFIG_LOG_ENABLE', 'CONFIG_LOG_LEVEL=LOG_VERBOSE', 'FPGA_PLL', 'LOG_KERNEL', '__riscv64'] +CPPPATH = [ + cwd + '/kendryte-sdk-source/lib/drivers/include', + cwd + '/kendryte-sdk-source/lib/bsp/include', + cwd + '/kendryte-sdk-source/lib/utils/include' +] +CPPDEFINES = [ + 'CONFIG_LOG_COLORS', 'CONFIG_LOG_ENABLE', 'CONFIG_LOG_LEVEL=LOG_VERBOSE', + 'FPGA_PLL', 'LOG_KERNEL', '__riscv64' +] -group = DefineGroup('SDK', src, depend = [''], CPPPATH = CPPPATH, LOCAL_CPPDEFINES = CPPDEFINES) +group = DefineGroup('SDK', + src, + depend=[''], + CPPPATH=CPPPATH, + LOCAL_CPPDEFINES=CPPDEFINES) Return('group') diff --git a/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/xidatong-riscv64/rtconfig.h b/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/xidatong-riscv64/rtconfig.h index 4dd5ca647..c3c0a4ef0 100644 --- a/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/xidatong-riscv64/rtconfig.h +++ b/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/xidatong-riscv64/rtconfig.h @@ -82,7 +82,7 @@ #define RT_USING_MSH #define FINSH_USING_MSH #define FINSH_THREAD_NAME "tshell" -#define FINSH_THREAD_PRIORITY 20 +#define FINSH_THREAD_PRIORITY 30 #define FINSH_THREAD_STACK_SIZE 16384 #define FINSH_USING_HISTORY #define FINSH_HISTORY_LINES 5 @@ -147,16 +147,11 @@ /* Socket abstraction layer */ #define RT_USING_SAL -#define SAL_INTERNET_CHECK #define SAL_SOCKETS_NUM 16 /* Network interface device */ #define RT_USING_NETDEV -#define NETDEV_USING_IFCONFIG -#define NETDEV_USING_PING -#define NETDEV_USING_NETSTAT -#define NETDEV_USING_AUTO_DEFAULT #define NETDEV_IPV4 1 #define NETDEV_IPV6 0 @@ -246,6 +241,7 @@ #define APPLICATION_SENSOR #define APP_BENCHMARK +#define USING_BENCHMARK /* lib */