diff --git a/CMakeLists.txt b/CMakeLists.txt index 390c278b..e7d4e5c7 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -130,6 +130,7 @@ target_compile_options( PUBLIC -Wredundant-move PUBLIC -Wsuggest-override PUBLIC -Wreorder + PUBLIC -Wno-stringop-overflow PUBLIC -fno-sized-deallocation PUBLIC $<$:-ffile-prefix-map=${CMAKE_SOURCE_DIR}/./src/=> PUBLIC $<$:-ffile-prefix-map=${CMAKE_SOURCE_DIR}/src/=> diff --git a/src/Targets/Microchip/Avr8/Avr8.cpp b/src/Targets/Microchip/Avr8/Avr8.cpp index c51dd862..67aa4589 100644 --- a/src/Targets/Microchip/Avr8/Avr8.cpp +++ b/src/Targets/Microchip/Avr8/Avr8.cpp @@ -204,6 +204,10 @@ namespace Targets::Microchip::Avr8 this->updateOcdenFuseBit(true); } + /* + * On some AVR8 targets, we must perform a reset before verifying the target signature. Otherwise, the + * signature read from the target will be garbage. See https://github.com/bloombloombloom/Bloom/issues/107 + */ this->stop(); this->reset(); @@ -1138,8 +1142,6 @@ namespace Targets::Microchip::Avr8 } Logger::info("OCDEN fuse bit updated"); - - this->disableProgrammingMode(); } bool Avr8::updateEesaveFuseBit(bool enable) {