From 36a551e69eae29bd015cbb7592ad0e4efcb5e606 Mon Sep 17 00:00:00 2001 From: yueling hu <502966985@qq.com> Date: Sat, 24 May 2025 20:46:45 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20linux=E4=B8=8Btuple?= =?UTF-8?q?=E9=94=99=E8=AF=AF=EF=BC=8C=E6=B7=BB=E5=8A=A0=20llvm-arm=20?= =?UTF-8?q?=E7=BC=96=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/cmake.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/cmake.py b/tools/cmake.py index e998a48e8cd..6e8b9dcfc8d 100644 --- a/tools/cmake.py +++ b/tools/cmake.py @@ -45,7 +45,7 @@ def GenerateCFiles(env, project, project_name): tool_path_conv["CMAKE_ASM_COMPILER"] = tool_path_conv_helper(rtconfig.AS) tool_path_conv["CMAKE_AR"] = tool_path_conv_helper(rtconfig.AR) tool_path_conv["CMAKE_LINKER"] = tool_path_conv_helper(rtconfig.LINK) - if rtconfig.PLATFORM in ['gcc']: + if rtconfig.PLATFORM in ['gcc','llvm-arm']: tool_path_conv["CMAKE_SIZE"] = tool_path_conv_helper(rtconfig.SIZE) tool_path_conv["CMAKE_OBJDUMP"] = tool_path_conv_helper(rtconfig.OBJDUMP) tool_path_conv["CMAKE_OBJCOPY"] = tool_path_conv_helper(rtconfig.OBJCPY) @@ -99,7 +99,7 @@ def GenerateCFiles(env, project, project_name): AS += ".exe" AR += ".exe" LINK += ".exe" - if rtconfig.PLATFORM in ['gcc']: + if rtconfig.PLATFORM in ['gcc','llvm-arm']: SIZE += ".exe" OBJDUMP += ".exe" OBJCOPY += ".exe" @@ -129,7 +129,7 @@ def GenerateCFiles(env, project, project_name): cm_file.write("SET(CMAKE_CXX_FLAGS \""+ CXXFLAGS + "\")\n") cm_file.write("SET(CMAKE_CXX_COMPILER_WORKS TRUE)\n\n") - if rtconfig.PLATFORM in ['gcc']: + if rtconfig.PLATFORM in ['gcc','llvm-arm']: cm_file.write("SET(CMAKE_OBJCOPY \""+ OBJCOPY + "\")\n") cm_file.write("SET(CMAKE_SIZE \""+ SIZE + "\")\n\n") elif rtconfig.PLATFORM in ['armcc', 'armclang']: @@ -137,7 +137,7 @@ def GenerateCFiles(env, project, project_name): LINKER_FLAGS = '' LINKER_LIBS = '' - if rtconfig.PLATFORM in ['gcc']: + if rtconfig.PLATFORM in ['gcc','llvm-arm']: LINKER_FLAGS += '-T' elif rtconfig.PLATFORM in ['armcc', 'armclang']: LINKER_FLAGS += '--scatter' @@ -186,7 +186,7 @@ def GenerateCFiles(env, project, project_name): cm_file.write("ADD_DEFINITIONS(\n") for i in env['CPPDEFINES']: - cm_file.write("\t-D" + i + "\n") + cm_file.write("\t-D" + str(i).replace("(", "").replace(")","").replace(",", " ") + "\n") cm_file.write(")\n\n") libgroups = [] @@ -290,7 +290,7 @@ def GenerateCFiles(env, project, project_name): cm_file.write("\n") cm_file.write("# Interface library search paths\n") - if rtconfig.PLATFORM in ['gcc']: + if rtconfig.PLATFORM in ['gcc','llvm-arm']: for group in libgroups: if not 'LIBPATH' in group.keys(): continue From 900e0c42739f5deff9359ad48d328ebe117ebfb2 Mon Sep 17 00:00:00 2001 From: yueling hu <502966985@qq.com> Date: Sun, 25 May 2025 07:59:37 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E6=97=B6=E9=92=9F=E6=BA=A2=E5=87=BA=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ipc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ipc.c b/src/ipc.c index 35c0146dd33..6628d1b5bfd 100644 --- a/src/ipc.c +++ b/src/ipc.c @@ -2650,7 +2650,7 @@ static rt_err_t _rt_mb_send_wait(rt_mailbox_t mb, /* if it's not waiting forever and then re-calculate timeout tick */ if (timeout > 0) { - tick_delta = rt_tick_get() - tick_delta; + tick_delta = rt_tick_get_delta(tick_delta); timeout -= tick_delta; if (timeout < 0) timeout = 0; @@ -2930,7 +2930,7 @@ static rt_err_t _rt_mb_recv(rt_mailbox_t mb, rt_ubase_t *value, rt_int32_t timeo /* if it's not waiting forever and then re-calculate timeout tick */ if (timeout > 0) { - tick_delta = rt_tick_get() - tick_delta; + tick_delta = rt_tick_get_delta(tick_delta); timeout -= tick_delta; if (timeout < 0) timeout = 0; @@ -3475,7 +3475,7 @@ static rt_err_t _rt_mq_send_wait(rt_mq_t mq, /* if it's not waiting forever and then re-calculate timeout tick */ if (timeout > 0) { - tick_delta = rt_tick_get() - tick_delta; + tick_delta = rt_tick_get_delta(tick_delta); timeout -= tick_delta; if (timeout < 0) timeout = 0; @@ -3855,7 +3855,7 @@ static rt_ssize_t _rt_mq_recv(rt_mq_t mq, /* if it's not waiting forever and then re-calculate timeout tick */ if (timeout > 0) { - tick_delta = rt_tick_get() - tick_delta; + tick_delta = rt_tick_get_delta(tick_delta); timeout -= tick_delta; if (timeout < 0) timeout = 0;