Open Jiu-xiao opened 6 months ago
It's a bit hard to say without seeing what's inside /home/xiao/XRobot/src/system/FreeRTOS/timer.cpp, do you think you can share a minimal example to reproduce the issue?
using namespace System;
Timer* Timer::self_ = NULL;
Timer::Timer() { self_ = this;
auto thread_fn = [](void* arg) { XB_UNUSED(arg); uint32_t last_online_time = bsp_time_getms(); while (1) { Timer::self->list.Foreach(Timer::Refresh, NULL); Timer::self->thread_.SleepUntil(1, last_online_time); } };
this->thread_.Create(thread_fn, static_cast<void*>(NULL), "timer_task", FREERTOS_TIMER_TASK_STACK_DEPTH, Thread::HIGH); }
bool Timer::Refresh(ControlBlock& block, void* arg) { XB_UNUSED(arg);
if (!block.running) { return true; }
block.count++; if (block.cycle <= block.count) { block.count = 0; block.fun(block.type); }
return true; }
build pass after remove add_link_options(-fdump-rtl-dfinish)
Answers checklist.
IDF version.
release/v5.1 bbd8d13f930705051afa883691bc8389eefc48a1
Operating System used.
Linux
How did you build your project?
Command line with CMake
If you are using Windows, please specify command line type.
None
What is the expected behavior?
idf_as_lib example, use $ENV{IDF_PATH}/tools/cmake/toolchain-clang-esp32c3.cmake
What is the actual behavior?
ll/src -I/home/xiao/XRobot/lib/mini_shell/config -isystem /home/xiao/XRobot/src/system/FreeRTOS -isystem /home/xiao/XRobot/src/system --target=riscv32-esp-elf -march=rv32imc -mabi=ilp32 -g -std=gnu++17 -Werror -gdwarf-4 -MD -MT src/system/CMakeFiles/system.dir/FreeRTOS/timer.cpp.obj -MF src/system/CMakeFiles/system.dir/FreeRTOS/timer.cpp.obj.d -o src/system/CMakeFiles/system.dir/FreeRTOS/timer.cpp.obj -c /home/xiao/XRobot/src/system/FreeRTOS/timer.cpp /tmp/timer-8a0ff0.s: Assembler messages: /tmp/timer-8a0ff0.s:124: Error: non-constant .uleb128 is not supported /tmp/timer-8a0ff0.s:206: Error: non-constant .uleb128 is not supported /tmp/timer-8a0ff0.s:523: Error: non-constant .uleb128 is not supported /tmp/timer-8a0ff0.s:526: Error: non-constant .uleb128 is not supported clang-15: error: assembler command failed with exit code 1 (use -v to see invocation) [1037/1061] Generating ld/sections.ld ninja: build stopped: subcommand failed.
Steps to reproduce.
Build or installation Logs.
More Information.
No response