From f065a70551ff4b7e6e53a32fdb949f871c84fb88 Mon Sep 17 00:00:00 2001 From: Nav Date: Sun, 5 Jun 2022 21:04:47 +0100 Subject: [PATCH] Tidying --- src/TargetController/TargetControllerComponent.cpp | 4 ++++ src/Targets/Microchip/AVR/AVR8/Avr8.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/TargetController/TargetControllerComponent.cpp b/src/TargetController/TargetControllerComponent.cpp index aebd360e..6ec1d452 100644 --- a/src/TargetController/TargetControllerComponent.cpp +++ b/src/TargetController/TargetControllerComponent.cpp @@ -725,13 +725,17 @@ namespace Bloom::TargetController } void TargetControllerComponent::enableProgrammingMode() { + Logger::debug("Enabling programming mode"); this->target->enableProgrammingMode(); + Logger::warning("Programming mode enabled"); EventManager::triggerEvent(std::make_shared()); } void TargetControllerComponent::disableProgrammingMode() { + Logger::debug("Disabling programming mode"); this->target->disableProgrammingMode(); + Logger::info("Programming mode disabled"); EventManager::triggerEvent(std::make_shared()); } diff --git a/src/Targets/Microchip/AVR/AVR8/Avr8.cpp b/src/Targets/Microchip/AVR/AVR8/Avr8.cpp index 83536926..10f09d9e 100644 --- a/src/Targets/Microchip/AVR/AVR8/Avr8.cpp +++ b/src/Targets/Microchip/AVR/AVR8/Avr8.cpp @@ -335,7 +335,7 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit if (startSection != endSection) { throw Exception( - "Requested program memory write spans more than one section (APPLICATION and BOOT) - aborting." + "Requested program memory write spans more than one section (APPLICATION and BOOT) - aborting" ); } @@ -346,7 +346,7 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit || endSection == ProgramMemorySection::APPLICATION ) ) { - Logger::warning("Erasing program memory APPLICATION section, in preparation for programming."); + Logger::warning("Erasing program memory APPLICATION section, in preparation for programming"); this->avr8DebugInterface->eraseProgramMemory(ProgramMemorySection::APPLICATION); this->programmingSession->applicationSectionErased = true; } @@ -358,13 +358,13 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit || endSection == ProgramMemorySection::BOOT ) ) { - Logger::warning("Erasing program memory BOOT section, in preparation for programming."); + Logger::warning("Erasing program memory BOOT section, in preparation for programming"); this->avr8DebugInterface->eraseProgramMemory(ProgramMemorySection::BOOT); this->programmingSession->bootSectionErased = true; } } else if (!this->programmingSession->chipErased) { - Logger::warning("Erasing entire chip, in preparation for programming."); + Logger::warning("Erasing entire chip, in preparation for programming"); this->avr8DebugInterface->eraseProgramMemory(); this->programmingSession->chipErased = true; }