Skip to content

Commit

Permalink
Fix space
Browse files Browse the repository at this point in the history
  • Loading branch information
multiplemonomials committed Dec 11, 2024
1 parent 38be332 commit 9b6c7e7
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ namespace mbed {
* NAND flash.
*
* @note While the read and write size of the buffered block device will always be 1,
* the erase size is the same as the underlying block device. In other words, you
* the erase size is the same as the underlying block device. In other words, you
* still must erase in the hardware erase sector size.
*/
class BufferedBlockDevice : public BlockDevice {
Expand Down
3 changes: 3 additions & 0 deletions tools/cmake/UploadMethodManager.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,7 @@ function(mbed_generate_upload_target target)
else()
gen_upload_target(${target} ${CMAKE_CURRENT_BINARY_DIR}/$<TARGET_FILE_BASE_NAME:${target}>.hex)
endif()

# Make sure building the upload target causes the target to be built first
add_dependencies(flash-${target} ${target})
endfunction()
2 changes: 0 additions & 2 deletions tools/cmake/upload_methods/UploadMethodARDUINO_BOSSAC.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,4 @@ function(gen_upload_target TARGET_NAME BINARY_FILE)
--write ${BINARY_FILE}
--reset)

add_dependencies(flash-${TARGET_NAME} ${TARGET_NAME})

endfunction(gen_upload_target)
3 changes: 0 additions & 3 deletions tools/cmake/upload_methods/UploadMethodJLINK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@ exit
-ExitOnError
-CommandFile ${COMMAND_FILE_PATH})


add_dependencies(flash-${TARGET_NAME} ${TARGET_NAME})

endfunction(gen_upload_target)

### Commands to run the debug server.
Expand Down
2 changes: 0 additions & 2 deletions tools/cmake/upload_methods/UploadMethodLINKSERVER.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ function(gen_upload_target TARGET_NAME BINARY_FILE)
--addr ${MBED_UPLOAD_BASE_ADDR}
${BINARY_FILE})

add_dependencies(flash-${TARGET_NAME} ${TARGET_NAME})

endfunction(gen_upload_target)

### Commands to run the debug server.
Expand Down
2 changes: 0 additions & 2 deletions tools/cmake/upload_methods/UploadMethodMBED.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,4 @@ function(gen_upload_target TARGET_NAME BINARY_FILE)
${mbed-os_SOURCE_DIR}/tools/python
VERBATIM)

add_dependencies(flash-${TARGET_NAME} ${TARGET_NAME})

endfunction(gen_upload_target)
2 changes: 0 additions & 2 deletions tools/cmake/upload_methods/UploadMethodOPENOCD.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ endif()

function(gen_upload_target TARGET_NAME BINARY_FILE)

# unlike other upload methods, OpenOCD uses the elf file
add_custom_target(flash-${TARGET_NAME}
COMMENT "Flashing ${TARGET_NAME} with OpenOCD..."
COMMAND ${OpenOCD}
Expand All @@ -51,7 +50,6 @@ function(gen_upload_target TARGET_NAME BINARY_FILE)
-c "program ${BINARY_FILE} ${MBED_UPLOAD_BASE_ADDR} reset exit"
VERBATIM)

add_dependencies(flash-${TARGET_NAME} ${TARGET_NAME})
endfunction(gen_upload_target)

### Commands to run the debug server.
Expand Down
10 changes: 7 additions & 3 deletions tools/cmake/upload_methods/UploadMethodPICOTOOL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,16 @@ function(gen_upload_target TARGET_NAME BINARY_FILE)
list(APPEND PICOTOOL_TARGET_ARGS --address ${PICOTOOL_TARGET_ADDRESS})
endif()

if("${MBED_OUTPUT_EXT}" STREQUAL "hex")
message(FATAL_ERROR "Bin file output must be enabled to use picotool. Set MBED_OUTPUT_EXT to empty string or to 'bin' in your top level CMakeLists.txt!")
endif()

add_custom_target(flash-${TARGET_NAME}
COMMAND ${Picotool}
load
--verify
--execute
$<TARGET_FILE:${TARGET_NAME}>)

add_dependencies(flash-${TARGET_NAME} ${TARGET_NAME})
--offset ${MBED_UPLOAD_BASE_ADDR}
${CMAKE_CURRENT_BINARY_DIR}/$<TARGET_FILE_BASE_NAME:${TARGET_NAME}>.bin)

endfunction(gen_upload_target)
1 change: 0 additions & 1 deletion tools/cmake/upload_methods/UploadMethodPYOCD.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ function(gen_upload_target TARGET_NAME BINARY_FILE)
--base-address ${MBED_UPLOAD_BASE_ADDR}
${BINARY_FILE})

add_dependencies(flash-${TARGET_NAME} ${TARGET_NAME})
endfunction(gen_upload_target)

### Commands to run the debug server.
Expand Down
1 change: 0 additions & 1 deletion tools/cmake/upload_methods/UploadMethodSTLINK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ function(gen_upload_target TARGET_NAME BINARY_FILE)
${STLINK_ARGS}
write ${BINARY_FILE} ${MBED_UPLOAD_BASE_ADDR})

add_dependencies(flash-${TARGET_NAME} ${TARGET_NAME})
endfunction(gen_upload_target)

### Commands to run the debug server.
Expand Down
2 changes: 0 additions & 2 deletions tools/cmake/upload_methods/UploadMethodSTM32CUBE.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ function(gen_upload_target TARGET_NAME BINARY_FILE)
-w ${BINARY_FILE} ${MBED_UPLOAD_BASE_ADDR}
-rst)

add_dependencies(flash-${TARGET_NAME} ${TARGET_NAME})

endfunction(gen_upload_target)

### Commands to run the debug server.
Expand Down

0 comments on commit 9b6c7e7

Please sign in to comment.