diff --git a/build_uf2/Pico_Game_Controller.uf2 b/build_uf2/Pico_Game_Controller.uf2 index cf7fad7..10a29a2 100644 Binary files a/build_uf2/Pico_Game_Controller.uf2 and b/build_uf2/Pico_Game_Controller.uf2 differ diff --git a/build_uf2/README.md b/build_uf2/README.md index 8544e75..1109201 100644 --- a/build_uf2/README.md +++ b/build_uf2/README.md @@ -1,6 +1,6 @@ # Pico-Game-Controller -Manually copied built uf2 file for quick flashing. +Built uf2 file for quick flashing. CMake should copy to here upon build. Quick how-to flash: diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 14091d5..dd1bc24 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -17,4 +17,9 @@ target_link_libraries(Pico_Game_Controller PRIVATE hardware_dma hardware_irq) -pico_add_extra_outputs(Pico_Game_Controller) \ No newline at end of file +pico_add_extra_outputs(Pico_Game_Controller) + +add_custom_command(TARGET Pico_Game_Controller + POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_BINARY_DIR}/src/Pico_Game_Controller.uf2 ${PROJECT_SOURCE_DIR}/build_uf2/Pico_Game_Controller.uf2 +)