Skip to content

Commit 86b84e7

Browse files
committed
feat(build-tools): Add cmake function create_raw_binary.
1 parent f68a4a9 commit 86b84e7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

build-tools/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,12 @@ foreach(script pack)
2525
)
2626
set_property(TARGET tool_${script} PROPERTY EXEC ${CMAKE_CURRENT_SOURCE_DIR}/pack/${script}.py)
2727
endforeach()
28+
29+
function(create_raw_binary TARGET)
30+
add_custom_command(
31+
TARGET ${TARGET}
32+
POST_BUILD
33+
COMMAND psp-strip -s ${TARGET}
34+
COMMAND psp-objcopy -O binary ${TARGET} ${TARGET}.bin
35+
)
36+
endfunction()

0 commit comments

Comments
 (0)