Update vscode
Remove fixed version in AnyAvrGcc.cmake Update build.py to use current avr-gcc version defined in bootstrap.py Attempt to change MM-control-01.hex to MMU2SR-<project version> like in buddy releasespull/194/head
parent
d04e5e704b
commit
a241f55513
|
|
@ -2,10 +2,6 @@ get_filename_component(PROJECT_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" DIRECTORY)
|
|||
include("${PROJECT_CMAKE_DIR}/Utilities.cmake")
|
||||
set(CMAKE_SYSTEM_NAME Generic)
|
||||
set(CMAKE_SYSTEM_PROCESSOR avr)
|
||||
set(gcc_version 7.3.0)
|
||||
# set(CMAKE_CROSSCOMPILING 1)
|
||||
set(AVR_TOOLCHAIN_DIR "${PROJECT_CMAKE_DIR}/../.dependencies/gcc-avr-${gcc_version}/")
|
||||
message("ToolChain dir is ${AVR_TOOLCHAIN_DIR}")
|
||||
|
||||
#
|
||||
# Utilities
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
cmake_minimum_required(VERSION 2.8)
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
set(HEX_PREFIX "\; device = mm-control\n\n")
|
||||
set(HEX_NAME "MM-control-01.hex")
|
||||
set(HEX_NAME "MMU2SR_${PROJECT_VERSION}${PROJECT_VERSION_SUFFIX_SHORT}.hex")
|
||||
file(READ ${WORK_DIR}/firmware.hex HEX)
|
||||
file(WRITE ${WORK_DIR}/${HEX_NAME} ${HEX_PREFIX})
|
||||
file(APPEND ${WORK_DIR}/${HEX_NAME} ${HEX})
|
||||
message(status "Successfully built MM-control-01.hex!")
|
||||
message(status "Successfully built MMU2SR_${PROJECT_VERSION}${PROJECT_VERSION_SUFFIX_SHORT}.hex!")
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ def bootstrap(*args, interactive=False, check=False):
|
|||
|
||||
|
||||
def project_version():
|
||||
"""Return current project version (e. g. "4.0.3")"""
|
||||
"""Return current project version (e. g. "2.0.0")"""
|
||||
with open(project_root / 'version.txt', 'r') as f:
|
||||
return f.read().strip()
|
||||
|
||||
|
|
@ -113,6 +113,7 @@ class FirmwareBuildConfiguration(BuildConfiguration):
|
|||
entries.extend([
|
||||
('CMAKE_MAKE_PROGRAM', 'FILEPATH', str(get_dependency('ninja'))),
|
||||
('CMAKE_TOOLCHAIN_FILE', 'FILEPATH', str(self.toolchain)),
|
||||
('AVR_TOOLCHAIN_DIR', 'DIRPATH', str(get_dependency('gcc-avr'))),
|
||||
('CMAKE_BUILD_TYPE', 'STRING', self.build_type.value.title()),
|
||||
('PROJECT_VERSION_SUFFIX', 'STRING', self.version_suffix or ''),
|
||||
('PROJECT_VERSION_SUFFIX_SHORT', 'STRING',
|
||||
|
|
@ -139,6 +140,7 @@ class FirmwareBuildConfiguration(BuildConfiguration):
|
|||
|
||||
class BuildResult:
|
||||
"""Represents a result of an attempt to build the project."""
|
||||
|
||||
def __init__(self, config_returncode: int, build_returncode: Optional[int],
|
||||
stdout: Path, stderr: Path, products: List[Path]):
|
||||
self.config_returncode = config_returncode
|
||||
|
|
@ -241,6 +243,7 @@ def store_products(products: List[Path], build_config: BuildConfiguration,
|
|||
|
||||
def list_of(EnumType):
|
||||
"""Create an argument-parser for comma-separated list of values of some Enum subclass."""
|
||||
|
||||
def convert(val):
|
||||
if val == '':
|
||||
return []
|
||||
|
|
|
|||
Loading…
Reference in New Issue