Skip to content

Commit 9b6c7e7

Browse files
Fix space
1 parent 38be332 commit 9b6c7e7

11 files changed

+11
-19
lines changed

storage/blockdevice/include/blockdevice/BufferedBlockDevice.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ namespace mbed {
3333
* NAND flash.
3434
*
3535
* @note While the read and write size of the buffered block device will always be 1,
36-
* the erase size is the same as the underlying block device. In other words, you
36+
* the erase size is the same as the underlying block device. In other words, you
3737
* still must erase in the hardware erase sector size.
3838
*/
3939
class BufferedBlockDevice : public BlockDevice {

tools/cmake/UploadMethodManager.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,4 +146,7 @@ function(mbed_generate_upload_target target)
146146
else()
147147
gen_upload_target(${target} ${CMAKE_CURRENT_BINARY_DIR}/$<TARGET_FILE_BASE_NAME:${target}>.hex)
148148
endif()
149+
150+
# Make sure building the upload target causes the target to be built first
151+
add_dependencies(flash-${target} ${target})
149152
endfunction()

tools/cmake/upload_methods/UploadMethodARDUINO_BOSSAC.cmake

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,4 @@ function(gen_upload_target TARGET_NAME BINARY_FILE)
2828
--write ${BINARY_FILE}
2929
--reset)
3030

31-
add_dependencies(flash-${TARGET_NAME} ${TARGET_NAME})
32-
3331
endfunction(gen_upload_target)

tools/cmake/upload_methods/UploadMethodJLINK.cmake

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,6 @@ exit
7171
-ExitOnError
7272
-CommandFile ${COMMAND_FILE_PATH})
7373

74-
75-
add_dependencies(flash-${TARGET_NAME} ${TARGET_NAME})
76-
7774
endfunction(gen_upload_target)
7875

7976
### Commands to run the debug server.

tools/cmake/upload_methods/UploadMethodLINKSERVER.cmake

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ function(gen_upload_target TARGET_NAME BINARY_FILE)
3737
--addr ${MBED_UPLOAD_BASE_ADDR}
3838
${BINARY_FILE})
3939

40-
add_dependencies(flash-${TARGET_NAME} ${TARGET_NAME})
41-
4240
endfunction(gen_upload_target)
4341

4442
### Commands to run the debug server.

tools/cmake/upload_methods/UploadMethodMBED.cmake

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,4 @@ function(gen_upload_target TARGET_NAME BINARY_FILE)
2525
${mbed-os_SOURCE_DIR}/tools/python
2626
VERBATIM)
2727

28-
add_dependencies(flash-${TARGET_NAME} ${TARGET_NAME})
29-
3028
endfunction(gen_upload_target)

tools/cmake/upload_methods/UploadMethodOPENOCD.cmake

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ endif()
4141

4242
function(gen_upload_target TARGET_NAME BINARY_FILE)
4343

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

54-
add_dependencies(flash-${TARGET_NAME} ${TARGET_NAME})
5553
endfunction(gen_upload_target)
5654

5755
### Commands to run the debug server.

tools/cmake/upload_methods/UploadMethodPICOTOOL.cmake

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,16 @@ function(gen_upload_target TARGET_NAME BINARY_FILE)
2929
list(APPEND PICOTOOL_TARGET_ARGS --address ${PICOTOOL_TARGET_ADDRESS})
3030
endif()
3131

32+
if("${MBED_OUTPUT_EXT}" STREQUAL "hex")
33+
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!")
34+
endif()
35+
3236
add_custom_target(flash-${TARGET_NAME}
3337
COMMAND ${Picotool}
3438
load
39+
--verify
3540
--execute
36-
$<TARGET_FILE:${TARGET_NAME}>)
37-
38-
add_dependencies(flash-${TARGET_NAME} ${TARGET_NAME})
41+
--offset ${MBED_UPLOAD_BASE_ADDR}
42+
${CMAKE_CURRENT_BINARY_DIR}/$<TARGET_FILE_BASE_NAME:${TARGET_NAME}>.bin)
3943

4044
endfunction(gen_upload_target)

tools/cmake/upload_methods/UploadMethodPYOCD.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ function(gen_upload_target TARGET_NAME BINARY_FILE)
3434
--base-address ${MBED_UPLOAD_BASE_ADDR}
3535
${BINARY_FILE})
3636

37-
add_dependencies(flash-${TARGET_NAME} ${TARGET_NAME})
3837
endfunction(gen_upload_target)
3938

4039
### Commands to run the debug server.

tools/cmake/upload_methods/UploadMethodSTLINK.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ function(gen_upload_target TARGET_NAME BINARY_FILE)
3232
${STLINK_ARGS}
3333
write ${BINARY_FILE} ${MBED_UPLOAD_BASE_ADDR})
3434

35-
add_dependencies(flash-${TARGET_NAME} ${TARGET_NAME})
3635
endfunction(gen_upload_target)
3736

3837
### Commands to run the debug server.

0 commit comments

Comments
 (0)