generated from TDD-Templates/cmake_cpputest_template_avr
Added fuse flashing commands for default 9.6MHz
This commit is contained in:
parent
ba4b6f9f70
commit
c2ed2cead0
|
@ -3,7 +3,7 @@ add_executable(${PROJECT_NAME}
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(${PROJECT_NAME}
|
target_link_libraries(${PROJECT_NAME}
|
||||||
#RegEdit
|
RegEdit
|
||||||
#timer
|
#timer
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -36,10 +36,11 @@ add_custom_target(bin ALL
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
# Setup for default 9.6MHz
|
||||||
if(NOT TARGET upload)
|
if(NOT TARGET upload)
|
||||||
# Upload command (adjust according to your programmer)
|
# Upload command (adjust according to your programmer)
|
||||||
add_custom_target(upload ALL
|
add_custom_target(upload ALL
|
||||||
COMMAND avrdude -c ${PROGRAMMER} -P ${PORT} -p ${AVR_MCU} -B 125kHz -U flash:w:${CMAKE_PROJECT_NAME}.hex
|
COMMAND avrdude -c ${PROGRAMMER} -P ${PORT} -p ${AVR_MCU} -B 125kHz -U lfuse:w:0x6a:m -U hfuse:w:0xFF:m -U lock:w:0xFF:m -U flash:w:${CMAKE_PROJECT_NAME}.hex
|
||||||
DEPENDS hex
|
DEPENDS hex
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in New Issue