Skip to content
Merged
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
38 changes: 38 additions & 0 deletions benchmark/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,41 @@ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/nearpoint.cpp")
else()
message(WARNING "nearpoint.cpp does not exist")
endif()


# Build nearpoint binary if if available
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/fast_gcc_unwind.cpp")
message(STATUS "fast_gcc_unwind.cpp exists!")
set(elf fast_gcc_unwind.cpp.elf)
message(STATUS "Generating Demo for \"${elf}\"")
add_executable(${elf} generated_tests/except.cpp fast_gcc_unwind.cpp)
target_include_directories(${elf} PRIVATE .)
target_compile_options(${elf} PRIVATE
${BENCHMARK_COMPILE_OPTIONS}
-fexceptions
-Wno-error=attributes)

target_link_libraries(${elf} PRIVATE
startup_code
libhal::$ENV{LIBHAL_PLATFORM_LIBRARY}
)
target_link_options(${elf} PRIVATE -fno-threadsafe-statics
-L${CMAKE_SOURCE_DIR}/
-Wl,-Map=${CMAKE_BINARY_DIR}/${elf}.map
-Wl,--wrap=__gnu_unwind_execute
-Wl,--wrap=_Unwind_VRS_Pop
-Wl,--wrap=__gnu_unwind_frame
)
if(prebuilt-picolibc_FOUND)
target_link_libraries(${elf} PRIVATE picolibc)
endif()

if(${CMAKE_CROSSCOMPILING})
# Convert elf into .bin, .hex and other formats needed for programming
# devices.
libhal_post_build(${elf})
libhal_disassemble(${elf})
endif()
else()
message(WARNING "nearpoint.cpp does not exist")
endif()
2 changes: 1 addition & 1 deletion benchmark/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ def requirements(self):
bootstrap = self.python_requires["libhal-bootstrap"]
bootstrap.module.add_demo_requirements(self)
if self.options.platform != "mac":
self.requires("libhal-exceptions/1.4.0")
self.requires("libhal-exceptions/1.4.1")
Loading
Loading