Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/ipc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
12 changes: 6 additions & 6 deletions tools/cmake.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -129,15 +129,15 @@ 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']:
cm_file.write("SET(CMAKE_FROMELF \""+ FROMELF + "\")\n\n")

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'
Expand Down Expand Up @@ -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 = []
Expand Down Expand Up @@ -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
Expand Down