Compare commits
63
Commits
v5
..
08c455358e
No files matched your search
@@ -1,3 +0,0 @@
|
|||||||
[submodule "libavr"]
|
|
||||||
path = libavr
|
|
||||||
url = ../libavr.git
|
|
||||||
+8
-9
@@ -2,19 +2,18 @@ cmake_minimum_required(VERSION 3.28)
|
|||||||
|
|
||||||
project(tsb_libavr LANGUAGES CXX)
|
project(tsb_libavr LANGUAGES CXX)
|
||||||
|
|
||||||
# libavr rides as the pinned submodule; LIBAVR_ROOT (cache or environment)
|
# libavr from a local checkout (LIBAVR_ROOT) or the forge; the toolchain file
|
||||||
# overrides it for tandem development against a working tree. The toolchain
|
# comes from the same checkout via CMakePresets.json.
|
||||||
# file comes from the submodule via CMakePresets.json either way.
|
include(FetchContent)
|
||||||
if(NOT LIBAVR_ROOT AND DEFINED ENV{LIBAVR_ROOT})
|
if(NOT LIBAVR_ROOT AND DEFINED ENV{LIBAVR_ROOT})
|
||||||
set(LIBAVR_ROOT $ENV{LIBAVR_ROOT})
|
set(LIBAVR_ROOT $ENV{LIBAVR_ROOT})
|
||||||
endif()
|
endif()
|
||||||
if(NOT LIBAVR_ROOT)
|
if(LIBAVR_ROOT)
|
||||||
set(LIBAVR_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/libavr)
|
FetchContent_Declare(libavr SOURCE_DIR ${LIBAVR_ROOT})
|
||||||
|
else()
|
||||||
|
FetchContent_Declare(libavr GIT_REPOSITORY git@git.blackmark.me:avr/libavr.git GIT_TAG main)
|
||||||
endif()
|
endif()
|
||||||
if(NOT EXISTS ${LIBAVR_ROOT}/CMakeLists.txt)
|
FetchContent_MakeAvailable(libavr)
|
||||||
message(FATAL_ERROR "libavr not found at ${LIBAVR_ROOT} — run: git submodule update --init libavr")
|
|
||||||
endif()
|
|
||||||
add_subdirectory(${LIBAVR_ROOT} libavr-build)
|
|
||||||
|
|
||||||
if(PROJECT_IS_TOP_LEVEL)
|
if(PROJECT_IS_TOP_LEVEL)
|
||||||
add_compile_options(-Werror) # warnings are errors for the port's own code
|
add_compile_options(-Werror) # warnings are errors for the port's own code
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
"hidden": true,
|
"hidden": true,
|
||||||
"generator": "Ninja",
|
"generator": "Ninja",
|
||||||
"binaryDir": "${sourceDir}/build/${presetName}",
|
"binaryDir": "${sourceDir}/build/${presetName}",
|
||||||
"toolchainFile": "${sourceDir}/libavr/cmake/avr-toolchain.cmake",
|
"toolchainFile": "$env{LIBAVR_ROOT}/cmake/avr-toolchain.cmake",
|
||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"CMAKE_BUILD_TYPE": "Release",
|
"CMAKE_BUILD_TYPE": "Release",
|
||||||
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
|
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
|
||||||
|
|||||||
@@ -1,77 +0,0 @@
|
|||||||
# Atmel Studio
|
|
||||||
|
|
||||||
`master` carries `bootloader.atsln`, so this branch does too: `ide/bootloader.atsln`
|
|
||||||
builds the loaders from the same sources Ninja does, to a **byte-identical
|
|
||||||
`.text`** — 404 B for the 328P pureboot loader, 510 B for the `tsb_asm` tier in
|
|
||||||
its 512-byte section. CMake remains the build system; the solution is here so the
|
|
||||||
port opens in Studio as its predecessor did.
|
|
||||||
|
|
||||||
## The two projects, and why two
|
|
||||||
|
|
||||||
pureboot is a chip × backend × clock × baud matrix — `pureboot_add_loader()`
|
|
||||||
resolves a deployment into compile definitions — and a `.cppproj` is one binary
|
|
||||||
at one set of flags, so a project can only ever be one point of it. `pureboot`
|
|
||||||
is that point: the stock 328P deployment, USART0 at 115200 on a 16 MHz crystal,
|
|
||||||
an 8-second activation window. `tsb_asm` is the TinySafeBoot tier that occupies
|
|
||||||
the same 512-byte section `master`'s `tsb` project targeted.
|
|
||||||
|
|
||||||
The other three tsb tiers (`tsb_pure`, `tsb_tricks`, `tsb_policy`) are not here.
|
|
||||||
They differ from `tsb_asm` in their source file, their section size, and — for
|
|
||||||
`tsb_policy` — two loop flags; nothing about that is a Studio concern, and what
|
|
||||||
they exist to demonstrate is a size gradient only the CMake size tests measure.
|
|
||||||
Adding one is a copy of `tsb_asm/tsb_asm.cppproj` in its own directory, with its
|
|
||||||
name, its GUID, its source path and its `--section-start` changed (`0x7c00` for
|
|
||||||
the 1 KiB tiers), plus four lines in the solution.
|
|
||||||
|
|
||||||
`avrdevice` is a project property, so each project gets its own directory:
|
|
||||||
Studio builds into `<project dir>/<Configuration>` whatever `OutputDirectory`
|
|
||||||
says, and two projects sharing a directory would share one object file.
|
|
||||||
|
|
||||||
## Debug keeps `-Os`
|
|
||||||
|
|
||||||
Both configurations compile at `-Os`; Debug adds only `-gdwarf-4`. The `.text`
|
|
||||||
is therefore identical in both, which is the point — a loader's section is a
|
|
||||||
**correctness** bound and not a budget. `-Og` builds this same source to 590 B,
|
|
||||||
and linking it at `--section-start=.text=0x7e00` on a 32 KiB part puts 78 bytes
|
|
||||||
past flash end **without a diagnostic**: `rcall`/`rjmp` targets there wrap
|
|
||||||
modulo flash size, so the image dies right after activation. A debug
|
|
||||||
configuration that silently produces that is worse than none, and DWARF costs no
|
|
||||||
flash, so the optimisation level stays where correctness needs it.
|
|
||||||
|
|
||||||
## What Studio needs from the machine
|
|
||||||
|
|
||||||
libavr from the **submodule**, found at
|
|
||||||
`$(MSBuildProjectDirectory)\..\..\libavr\include` — correct by construction, and
|
|
||||||
anchored to the project because a plain relative path resolves against the
|
|
||||||
generated makefile's directory (the configuration's output directory), not the
|
|
||||||
project's. There is no `LIBAVR_ROOT` escape hatch: a variable exported in a
|
|
||||||
shell is invisible to Studio launched from the Start menu, and the failure reads
|
|
||||||
as a missing `libavr/libavr.hpp` — which is what the submodule answers.
|
|
||||||
|
|
||||||
A GCC 16.1 toolchain registered as flavour `avr-g++-16.1.0`, nothing older
|
|
||||||
reaching `-std=c++26`.
|
|
||||||
|
|
||||||
## Generating and gating
|
|
||||||
|
|
||||||
One generated file is required before a project will load at all, and one command
|
|
||||||
per project checks the flags have not drifted (both from libavr's
|
|
||||||
`tools/atmelstudio/`):
|
|
||||||
|
|
||||||
```sh
|
|
||||||
for name in pureboot tsb_asm; do
|
|
||||||
python libavr/tools/atmelstudio/componentinfo.py \
|
|
||||||
"ide/$name/$name.componentinfo.xml" --device ATmega328P
|
|
||||||
python libavr/tools/atmelstudio/check-flags.py \
|
|
||||||
--solution ide/bootloader.atsln --project "$name" --target "$name" \
|
|
||||||
--compile-commands build/atmega328p-generated/compile_commands.json \
|
|
||||||
--log "build/as-$name.log"
|
|
||||||
done
|
|
||||||
```
|
|
||||||
|
|
||||||
`--project` because one reference describes one binary; `--target` because
|
|
||||||
`pureboot.cpp` is compiled by every point of the size matrix and the flags
|
|
||||||
differ per point, so the basename alone does not name a reference. Release is
|
|
||||||
what the gate compares — the presets define no debug build, and Debug differs
|
|
||||||
from Release only in `-gdwarf-4`.
|
|
||||||
|
|
||||||
Legacy (the yazoalfa-era submodules) stays on `master`.
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
|
||||||
# Atmel Studio Solution File, Format Version 11.00
|
|
||||||
VisualStudioVersion = 14.0.23107.0
|
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
|
||||||
Project("{E66E83B9-2572-4076-B26E-6BE79FF3018A}") = "pureboot", "pureboot\pureboot.cppproj", "{99067222-32D5-49E3-B4F8-5ABA0F7722B7}"
|
|
||||||
EndProject
|
|
||||||
Project("{E66E83B9-2572-4076-B26E-6BE79FF3018A}") = "tsb_asm", "tsb_asm\tsb_asm.cppproj", "{6618D3BE-7EB3-49A2-9113-F128E396FF06}"
|
|
||||||
EndProject
|
|
||||||
Global
|
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
||||||
Debug|AVR = Debug|AVR
|
|
||||||
Release|AVR = Release|AVR
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
||||||
{99067222-32D5-49E3-B4F8-5ABA0F7722B7}.Debug|AVR.ActiveCfg = Debug|AVR
|
|
||||||
{99067222-32D5-49E3-B4F8-5ABA0F7722B7}.Debug|AVR.Build.0 = Debug|AVR
|
|
||||||
{99067222-32D5-49E3-B4F8-5ABA0F7722B7}.Release|AVR.ActiveCfg = Release|AVR
|
|
||||||
{99067222-32D5-49E3-B4F8-5ABA0F7722B7}.Release|AVR.Build.0 = Release|AVR
|
|
||||||
{6618D3BE-7EB3-49A2-9113-F128E396FF06}.Debug|AVR.ActiveCfg = Debug|AVR
|
|
||||||
{6618D3BE-7EB3-49A2-9113-F128E396FF06}.Debug|AVR.Build.0 = Debug|AVR
|
|
||||||
{6618D3BE-7EB3-49A2-9113-F128E396FF06}.Release|AVR.ActiveCfg = Release|AVR
|
|
||||||
{6618D3BE-7EB3-49A2-9113-F128E396FF06}.Release|AVR.Build.0 = Release|AVR
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
|
||||||
HideSolutionNode = FALSE
|
|
||||||
EndGlobalSection
|
|
||||||
EndGlobal
|
|
||||||
@@ -1,118 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">
|
|
||||||
<PropertyGroup>
|
|
||||||
<SchemaVersion>2.0</SchemaVersion>
|
|
||||||
<ProjectVersion>7.0</ProjectVersion>
|
|
||||||
<ToolchainName>com.Atmel.AVRGCC8.CPP</ToolchainName>
|
|
||||||
<ProjectGuid>99067222-32d5-49e3-b4f8-5aba0f7722b7</ProjectGuid>
|
|
||||||
<avrdevice>ATmega328P</avrdevice>
|
|
||||||
<avrdeviceseries>none</avrdeviceseries>
|
|
||||||
<OutputType>Executable</OutputType>
|
|
||||||
<Language>CPP</Language>
|
|
||||||
<OutputFileName>$(MSBuildProjectName)</OutputFileName>
|
|
||||||
<OutputFileExtension>.elf</OutputFileExtension>
|
|
||||||
<OutputDirectory>$(MSBuildProjectDirectory)\$(Configuration)</OutputDirectory>
|
|
||||||
<AssemblyName>pureboot</AssemblyName>
|
|
||||||
<Name>pureboot</Name>
|
|
||||||
<RootNamespace>pureboot</RootNamespace>
|
|
||||||
<ToolchainFlavour>avr-g++-16.1.0</ToolchainFlavour>
|
|
||||||
<KeepTimersRunning>true</KeepTimersRunning>
|
|
||||||
<OverrideVtor>false</OverrideVtor>
|
|
||||||
<CacheFlash>true</CacheFlash>
|
|
||||||
<ProgFlashFromRam>true</ProgFlashFromRam>
|
|
||||||
<RamSnippetAddress>0x20000000</RamSnippetAddress>
|
|
||||||
<UncachedRange />
|
|
||||||
<preserveEEPROM>true</preserveEEPROM>
|
|
||||||
<OverrideVtorValue>exception_table</OverrideVtorValue>
|
|
||||||
<BootSegment>2</BootSegment>
|
|
||||||
<ResetRule>0</ResetRule>
|
|
||||||
<eraseonlaunchrule>0</eraseonlaunchrule>
|
|
||||||
<EraseKey />
|
|
||||||
<AsfFrameworkConfig>
|
|
||||||
<framework-data xmlns="">
|
|
||||||
<options />
|
|
||||||
<configurations />
|
|
||||||
<files />
|
|
||||||
<documentation help="" />
|
|
||||||
<offline-documentation help="" />
|
|
||||||
<dependencies>
|
|
||||||
<content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.52.0" />
|
|
||||||
</dependencies>
|
|
||||||
</framework-data>
|
|
||||||
</AsfFrameworkConfig>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
|
||||||
<ToolchainSettings>
|
|
||||||
<AvrGccCpp>
|
|
||||||
<avrgcc.common.Device>-mmcu=atmega328p</avrgcc.common.Device>
|
|
||||||
<avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
|
|
||||||
<avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
|
|
||||||
<avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>
|
|
||||||
<avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>
|
|
||||||
<avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>
|
|
||||||
<avrgcccpp.compiler.symbols.DefSymbols>
|
|
||||||
<ListValues>
|
|
||||||
<Value>NDEBUG</Value>
|
|
||||||
<Value>PUREBOOT_CLOCK_HZ=16000000</Value>
|
|
||||||
<Value>PUREBOOT_BAUD=115200</Value>
|
|
||||||
<Value>PUREBOOT_TIMEOUT=8</Value>
|
|
||||||
</ListValues>
|
|
||||||
</avrgcccpp.compiler.symbols.DefSymbols>
|
|
||||||
<avrgcccpp.compiler.directories.IncludePaths>
|
|
||||||
<ListValues>
|
|
||||||
<Value>$(MSBuildProjectDirectory)\..\..\libavr\include</Value>
|
|
||||||
</ListValues>
|
|
||||||
</avrgcccpp.compiler.directories.IncludePaths>
|
|
||||||
<avrgcccpp.compiler.optimization.level>Optimize for size (-Os)</avrgcccpp.compiler.optimization.level>
|
|
||||||
<avrgcccpp.compiler.optimization.PrepareFunctionsForGarbageCollection>True</avrgcccpp.compiler.optimization.PrepareFunctionsForGarbageCollection>
|
|
||||||
<avrgcccpp.compiler.optimization.PrepareDataForGarbageCollection>True</avrgcccpp.compiler.optimization.PrepareDataForGarbageCollection>
|
|
||||||
<avrgcccpp.compiler.warnings.AllWarnings>True</avrgcccpp.compiler.warnings.AllWarnings>
|
|
||||||
<avrgcccpp.compiler.miscellaneous.OtherFlags>-std=c++26 -Wextra -Werror -mrelax -fno-exceptions -fno-rtti -fno-threadsafe-statics -fno-ivopts -fira-algorithm=priority -fno-tree-ter -fno-split-wide-types</avrgcccpp.compiler.miscellaneous.OtherFlags>
|
|
||||||
<avrgcccpp.linker.optimization.GarbageCollectUnusedSections>True</avrgcccpp.linker.optimization.GarbageCollectUnusedSections>
|
|
||||||
<avrgcccpp.linker.miscellaneous.LinkerFlags>-mrelax -nostartfiles -Wl,--section-start=.text=0x7e00 -Wl,--defsym=pureboot_app=0 -Wl,--pmem-wrap-around=32k</avrgcccpp.linker.miscellaneous.LinkerFlags>
|
|
||||||
</AvrGccCpp>
|
|
||||||
</ToolchainSettings>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
|
||||||
<ToolchainSettings>
|
|
||||||
<AvrGccCpp>
|
|
||||||
<avrgcc.common.Device>-mmcu=atmega328p</avrgcc.common.Device>
|
|
||||||
<avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
|
|
||||||
<avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
|
|
||||||
<avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>
|
|
||||||
<avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>
|
|
||||||
<avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>
|
|
||||||
<avrgcccpp.compiler.symbols.DefSymbols>
|
|
||||||
<ListValues>
|
|
||||||
<Value>DEBUG</Value>
|
|
||||||
<Value>PUREBOOT_CLOCK_HZ=16000000</Value>
|
|
||||||
<Value>PUREBOOT_BAUD=115200</Value>
|
|
||||||
<Value>PUREBOOT_TIMEOUT=8</Value>
|
|
||||||
</ListValues>
|
|
||||||
</avrgcccpp.compiler.symbols.DefSymbols>
|
|
||||||
<avrgcccpp.compiler.directories.IncludePaths>
|
|
||||||
<ListValues>
|
|
||||||
<Value>$(MSBuildProjectDirectory)\..\..\libavr\include</Value>
|
|
||||||
</ListValues>
|
|
||||||
</avrgcccpp.compiler.directories.IncludePaths>
|
|
||||||
<avrgcccpp.compiler.optimization.level>Optimize for size (-Os)</avrgcccpp.compiler.optimization.level>
|
|
||||||
<avrgcccpp.compiler.optimization.PrepareFunctionsForGarbageCollection>True</avrgcccpp.compiler.optimization.PrepareFunctionsForGarbageCollection>
|
|
||||||
<avrgcccpp.compiler.optimization.PrepareDataForGarbageCollection>True</avrgcccpp.compiler.optimization.PrepareDataForGarbageCollection>
|
|
||||||
<avrgcccpp.compiler.warnings.AllWarnings>True</avrgcccpp.compiler.warnings.AllWarnings>
|
|
||||||
<avrgcccpp.compiler.miscellaneous.OtherFlags>-std=c++26 -Wextra -Werror -mrelax -fno-exceptions -fno-rtti -fno-threadsafe-statics -fno-ivopts -fira-algorithm=priority -fno-tree-ter -fno-split-wide-types -gdwarf-4</avrgcccpp.compiler.miscellaneous.OtherFlags>
|
|
||||||
<avrgcccpp.linker.optimization.GarbageCollectUnusedSections>True</avrgcccpp.linker.optimization.GarbageCollectUnusedSections>
|
|
||||||
<avrgcccpp.linker.miscellaneous.LinkerFlags>-mrelax -nostartfiles -Wl,--section-start=.text=0x7e00 -Wl,--defsym=pureboot_app=0 -Wl,--pmem-wrap-around=32k</avrgcccpp.linker.miscellaneous.LinkerFlags>
|
|
||||||
</AvrGccCpp>
|
|
||||||
</ToolchainSettings>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="..\..\pureboot\pureboot.cpp">
|
|
||||||
<SubType>compile</SubType>
|
|
||||||
<Link>pureboot\pureboot.cpp</Link>
|
|
||||||
</Compile>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Folder Include="pureboot" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(AVRSTUDIO_EXE_PATH)\Vs\Compiler.targets" />
|
|
||||||
</Project>
|
|
||||||
@@ -1,112 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">
|
|
||||||
<PropertyGroup>
|
|
||||||
<SchemaVersion>2.0</SchemaVersion>
|
|
||||||
<ProjectVersion>7.0</ProjectVersion>
|
|
||||||
<ToolchainName>com.Atmel.AVRGCC8.CPP</ToolchainName>
|
|
||||||
<ProjectGuid>6618d3be-7eb3-49a2-9113-f128e396ff06</ProjectGuid>
|
|
||||||
<avrdevice>ATmega328P</avrdevice>
|
|
||||||
<avrdeviceseries>none</avrdeviceseries>
|
|
||||||
<OutputType>Executable</OutputType>
|
|
||||||
<Language>CPP</Language>
|
|
||||||
<OutputFileName>$(MSBuildProjectName)</OutputFileName>
|
|
||||||
<OutputFileExtension>.elf</OutputFileExtension>
|
|
||||||
<OutputDirectory>$(MSBuildProjectDirectory)\$(Configuration)</OutputDirectory>
|
|
||||||
<AssemblyName>tsb_asm</AssemblyName>
|
|
||||||
<Name>tsb_asm</Name>
|
|
||||||
<RootNamespace>tsb_asm</RootNamespace>
|
|
||||||
<ToolchainFlavour>avr-g++-16.1.0</ToolchainFlavour>
|
|
||||||
<KeepTimersRunning>true</KeepTimersRunning>
|
|
||||||
<OverrideVtor>false</OverrideVtor>
|
|
||||||
<CacheFlash>true</CacheFlash>
|
|
||||||
<ProgFlashFromRam>true</ProgFlashFromRam>
|
|
||||||
<RamSnippetAddress>0x20000000</RamSnippetAddress>
|
|
||||||
<UncachedRange />
|
|
||||||
<preserveEEPROM>true</preserveEEPROM>
|
|
||||||
<OverrideVtorValue>exception_table</OverrideVtorValue>
|
|
||||||
<BootSegment>2</BootSegment>
|
|
||||||
<ResetRule>0</ResetRule>
|
|
||||||
<eraseonlaunchrule>0</eraseonlaunchrule>
|
|
||||||
<EraseKey />
|
|
||||||
<AsfFrameworkConfig>
|
|
||||||
<framework-data xmlns="">
|
|
||||||
<options />
|
|
||||||
<configurations />
|
|
||||||
<files />
|
|
||||||
<documentation help="" />
|
|
||||||
<offline-documentation help="" />
|
|
||||||
<dependencies>
|
|
||||||
<content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.52.0" />
|
|
||||||
</dependencies>
|
|
||||||
</framework-data>
|
|
||||||
</AsfFrameworkConfig>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
|
||||||
<ToolchainSettings>
|
|
||||||
<AvrGccCpp>
|
|
||||||
<avrgcc.common.Device>-mmcu=atmega328p</avrgcc.common.Device>
|
|
||||||
<avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
|
|
||||||
<avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
|
|
||||||
<avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>
|
|
||||||
<avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>
|
|
||||||
<avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>
|
|
||||||
<avrgcccpp.compiler.symbols.DefSymbols>
|
|
||||||
<ListValues>
|
|
||||||
<Value>NDEBUG</Value>
|
|
||||||
</ListValues>
|
|
||||||
</avrgcccpp.compiler.symbols.DefSymbols>
|
|
||||||
<avrgcccpp.compiler.directories.IncludePaths>
|
|
||||||
<ListValues>
|
|
||||||
<Value>$(MSBuildProjectDirectory)\..\..\libavr\include</Value>
|
|
||||||
</ListValues>
|
|
||||||
</avrgcccpp.compiler.directories.IncludePaths>
|
|
||||||
<avrgcccpp.compiler.optimization.level>Optimize for size (-Os)</avrgcccpp.compiler.optimization.level>
|
|
||||||
<avrgcccpp.compiler.optimization.PrepareFunctionsForGarbageCollection>True</avrgcccpp.compiler.optimization.PrepareFunctionsForGarbageCollection>
|
|
||||||
<avrgcccpp.compiler.optimization.PrepareDataForGarbageCollection>True</avrgcccpp.compiler.optimization.PrepareDataForGarbageCollection>
|
|
||||||
<avrgcccpp.compiler.warnings.AllWarnings>True</avrgcccpp.compiler.warnings.AllWarnings>
|
|
||||||
<avrgcccpp.compiler.miscellaneous.OtherFlags>-std=c++26 -Wextra -Werror -mrelax -fno-exceptions -fno-rtti -fno-threadsafe-statics</avrgcccpp.compiler.miscellaneous.OtherFlags>
|
|
||||||
<avrgcccpp.linker.optimization.GarbageCollectUnusedSections>True</avrgcccpp.linker.optimization.GarbageCollectUnusedSections>
|
|
||||||
<avrgcccpp.linker.miscellaneous.LinkerFlags>-mrelax -nostartfiles -Wl,--section-start=.text=0x7e00 -Wl,--defsym=tsb_app=0 -Wl,--pmem-wrap-around=32k</avrgcccpp.linker.miscellaneous.LinkerFlags>
|
|
||||||
</AvrGccCpp>
|
|
||||||
</ToolchainSettings>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
|
||||||
<ToolchainSettings>
|
|
||||||
<AvrGccCpp>
|
|
||||||
<avrgcc.common.Device>-mmcu=atmega328p</avrgcc.common.Device>
|
|
||||||
<avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
|
|
||||||
<avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
|
|
||||||
<avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>
|
|
||||||
<avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>
|
|
||||||
<avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>
|
|
||||||
<avrgcccpp.compiler.symbols.DefSymbols>
|
|
||||||
<ListValues>
|
|
||||||
<Value>DEBUG</Value>
|
|
||||||
</ListValues>
|
|
||||||
</avrgcccpp.compiler.symbols.DefSymbols>
|
|
||||||
<avrgcccpp.compiler.directories.IncludePaths>
|
|
||||||
<ListValues>
|
|
||||||
<Value>$(MSBuildProjectDirectory)\..\..\libavr\include</Value>
|
|
||||||
</ListValues>
|
|
||||||
</avrgcccpp.compiler.directories.IncludePaths>
|
|
||||||
<avrgcccpp.compiler.optimization.level>Optimize for size (-Os)</avrgcccpp.compiler.optimization.level>
|
|
||||||
<avrgcccpp.compiler.optimization.PrepareFunctionsForGarbageCollection>True</avrgcccpp.compiler.optimization.PrepareFunctionsForGarbageCollection>
|
|
||||||
<avrgcccpp.compiler.optimization.PrepareDataForGarbageCollection>True</avrgcccpp.compiler.optimization.PrepareDataForGarbageCollection>
|
|
||||||
<avrgcccpp.compiler.warnings.AllWarnings>True</avrgcccpp.compiler.warnings.AllWarnings>
|
|
||||||
<avrgcccpp.compiler.miscellaneous.OtherFlags>-std=c++26 -Wextra -Werror -mrelax -fno-exceptions -fno-rtti -fno-threadsafe-statics -gdwarf-4</avrgcccpp.compiler.miscellaneous.OtherFlags>
|
|
||||||
<avrgcccpp.linker.optimization.GarbageCollectUnusedSections>True</avrgcccpp.linker.optimization.GarbageCollectUnusedSections>
|
|
||||||
<avrgcccpp.linker.miscellaneous.LinkerFlags>-mrelax -nostartfiles -Wl,--section-start=.text=0x7e00 -Wl,--defsym=tsb_app=0 -Wl,--pmem-wrap-around=32k</avrgcccpp.linker.miscellaneous.LinkerFlags>
|
|
||||||
</AvrGccCpp>
|
|
||||||
</ToolchainSettings>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="..\..\tsb\tsb_asm.cpp">
|
|
||||||
<SubType>compile</SubType>
|
|
||||||
<Link>tsb\tsb_asm.cpp</Link>
|
|
||||||
</Compile>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Folder Include="tsb" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(AVRSTUDIO_EXE_PATH)\Vs\Compiler.targets" />
|
|
||||||
</Project>
|
|
||||||
-1
Submodule libavr deleted from 43b1f34ed1.
+2
-13
@@ -287,14 +287,6 @@ from `b`, and a command per memory (`R`/`W` flash, `r`/`w` EEPROM, `F` fuses).
|
|||||||
above; the shipped tool speaks both, choosing on the version it reads, so a
|
above; the shipped tool speaks both, choosing on the version it reads, so a
|
||||||
deployed pureboot 4 stays drivable and self-updatable to 5.
|
deployed pureboot 4 stays drivable and self-updatable to 5.
|
||||||
|
|
||||||
Every closed generation is tagged in this repo at its era's last commit — the
|
|
||||||
commit just before the next version bump, so a tag holds everything its
|
|
||||||
version ever gained — and each tag carries the `libavr/` submodule pinned to
|
|
||||||
the libavr that loader was built against, as the whole libavr era does commit
|
|
||||||
by commit. `git checkout v3 && git submodule update --init libavr` followed by
|
|
||||||
the usual preset build therefore reproduces the v3 loader exactly; the open
|
|
||||||
generation is `main`.
|
|
||||||
|
|
||||||
Collapsing four command bodies into one transfer loop is what paid for the
|
Collapsing four command bodies into one transfer loop is what paid for the
|
||||||
version: the data space, the host-issued SPM operations and the fuses now share
|
version: the data space, the host-issued SPM operations and the fuses now share
|
||||||
the loop, the cursor and the argument decode that `R`/`r`/`w` each carried a
|
the loop, the cursor and the argument decode that `R`/`r`/`w` each carried a
|
||||||
@@ -460,11 +452,8 @@ counts, the programming plan, update state handling and per-phase page counts.
|
|||||||
|
|
||||||
## Tests
|
## Tests
|
||||||
|
|
||||||
libavr rides as the `libavr/` submodule (`git submodule update --init libavr`);
|
`tools/check.sh` runs every chip's workflow (`--full` adds the reflect-mode
|
||||||
`LIBAVR_ROOT` (cache or environment) overrides it for tandem development
|
builds of libavr's spot set; `tools/make_presets.py` regenerates the presets).
|
||||||
against a working tree. `tools/check.sh` runs every chip's workflow (`--full`
|
|
||||||
adds the reflect-mode builds of libavr's spot set; `tools/make_presets.py`
|
|
||||||
regenerates the presets).
|
|
||||||
Per chip preset, `ctest` runs:
|
Per chip preset, `ctest` runs:
|
||||||
|
|
||||||
- `pureboot.size` — the 510-byte (patched-vector) / 512-byte budget;
|
- `pureboot.size` — the 510-byte (patched-vector) / 512-byte budget;
|
||||||
|
|||||||
+2
-2
@@ -3,8 +3,8 @@
|
|||||||
# the simulator-driven protocol suites. --full adds the reflect-spot builds
|
# the simulator-driven protocol suites. --full adds the reflect-spot builds
|
||||||
# (libavr's rule: reflect compiles are bounded to its spot set, never the
|
# (libavr's rule: reflect compiles are bounded to its spot set, never the
|
||||||
# full matrix) and swaps the compact size matrix for the exhaustive
|
# full matrix) and swaps the compact size matrix for the exhaustive
|
||||||
# clock × baud × backend cross product. libavr resolves from the `libavr/`
|
# clock × baud × backend cross product. LIBAVR_ROOT must point at the libavr
|
||||||
# submodule; LIBAVR_ROOT overrides it for a working tree.
|
# checkout.
|
||||||
set -e
|
set -e
|
||||||
cd "$(dirname "$0")/.."
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user