Change to stk500v2 compatible bootloader

This commit is contained in:
2020-04-13 00:49:21 +02:00
parent eee2e6172a
commit 16ebed63c2
6 changed files with 10 additions and 6 deletions

View File

@@ -9,7 +9,7 @@ namespace {
typedef void (*jmp_fn)() __attribute__((noreturn));
jmp_fn boot = reinterpret_cast<jmp_fn>(0x0000);
jmp_fn bootloader = reinterpret_cast<jmp_fn>(0x7E00 / 2);
jmp_fn bootloader = reinterpret_cast<jmp_fn>(0x7800 / 2);
} // namespace
@@ -31,7 +31,7 @@ void Bootloader::reset()
bool Bootloader::check()
{
if (pgm_read_byte(reinterpret_cast<uint16_t>(bootloader) * 2) == 0xF8)
if (pgm_read_byte(reinterpret_cast<uint16_t>(bootloader) * 2) != 0xFF)
return true;
return false;

View File

@@ -1,6 +1,6 @@
#pragma once
#define F_CPU 16000000
#define F_CPU 16'000'000
#include <util/delay.h>
#include <stdint.h>

View File

@@ -81,6 +81,10 @@
</ToolNumber>
<ToolName>Custom Programming Tool</ToolName>
</custom>
<AAFDebugger>
<AAFDebugFiles xmlns="">
</AAFDebugFiles>
</AAFDebugger>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<ToolchainSettings>

View File

@@ -26,7 +26,7 @@ GF(RESET_CMD, "reset");
GF(HISTOGRAM_CMD, "histogram");
GF(VERSION_CMD, "version");
GF(VERSION, "1.6");
GF(VERSION, "1.7");
static inline bool substringEquals(const char *str, const ::detail::FlashString *flashStr, const size_t &size)
{