Add the AvrGcc toolchain to lock gcc version
Substitute documentation to reference AvrGcc by default, which locks gcc to the dependency folder. AnyAvrGcc is inteded to use any system/external gcc version (as the name implies).pull/194/head
parent
2117ee12de
commit
05aba7141b
|
|
@ -1,7 +1,7 @@
|
|||
[
|
||||
{
|
||||
"name": "Local_gcc-avr-none-eabi",
|
||||
"toolchainFile": "${workspaceFolder}/cmake/AnyAvrGcc.cmake",
|
||||
"toolchainFile": "${workspaceFolder}/cmake/AvrGcc.cmake",
|
||||
"cmakeSettings": {
|
||||
"CMAKE_MAKE_PROGRAM": "${workspaceFolder}/.dependencies/ninja-1.10.2/ninja"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
# Prusa-Firmware-MMU-Private
|
||||
|
||||
## How to prepare build env and tools
|
||||
|
||||
run `./utils/bootstrap.py`
|
||||
|
||||
Run `./utils/bootstrap.py`
|
||||
|
||||
`bootstrap.py` will now download all the "missing" dependencies into the `.dependencies` folder:
|
||||
- clang-format-9.0.0-noext
|
||||
|
|
@ -14,7 +12,7 @@ run `./utils/bootstrap.py`
|
|||
## How to build the preliminary project so far:
|
||||
Now the process is the same as in the Buddy Firmware:
|
||||
```
|
||||
utils/build.py
|
||||
./utils/build.py
|
||||
```
|
||||
|
||||
builds the firmware.hex in build/mmu_release
|
||||
|
|
@ -23,7 +21,7 @@ In case you'd like to build the project directly via cmake you can use an approa
|
|||
```
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -G Ninja -DCMAKE_TOOLCHAIN_FILE=../cmake/AnyAvrGcc.cmake
|
||||
cmake .. -G Ninja -DCMAKE_TOOLCHAIN_FILE=../cmake/AvrGcc.cmake
|
||||
ninja
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ set(TOOLCHAIN_PREFIX avr-)
|
|||
|
||||
if(AVR_TOOLCHAIN_DIR)
|
||||
# using toolchain set by AvrGcc.cmake (locked version)
|
||||
message("ToolChain dir is ${AVR_TOOLCHAIN_DIR}")
|
||||
set(BINUTILS_PATH "${AVR_TOOLCHAIN_DIR}/bin")
|
||||
else()
|
||||
# search for ANY avr-gcc toolchain
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
get_filename_component(PROJECT_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" DIRECTORY)
|
||||
|
||||
set(AVR_GCC_VERSION 7.3.0)
|
||||
set(AVR_TOOLCHAIN_DIR "${PROJECT_CMAKE_DIR}/../.dependencies/gcc-avr-${AVR_GCC_VERSION}/")
|
||||
|
||||
include("${PROJECT_CMAKE_DIR}/AnyAvrGcc.cmake")
|
||||
|
|
@ -69,6 +69,7 @@ class BuildType(Enum):
|
|||
|
||||
|
||||
class BuildConfiguration(ABC):
|
||||
|
||||
@abstractmethod
|
||||
def get_cmake_cache_entries(self):
|
||||
"""Convert the build configuration to CMake cache entries."""
|
||||
|
|
@ -86,6 +87,7 @@ class BuildConfiguration(ABC):
|
|||
|
||||
|
||||
class FirmwareBuildConfiguration(BuildConfiguration):
|
||||
|
||||
def __init__(self,
|
||||
build_type: BuildType,
|
||||
toolchain: Path = None,
|
||||
|
|
@ -103,7 +105,7 @@ class FirmwareBuildConfiguration(BuildConfiguration):
|
|||
|
||||
@staticmethod
|
||||
def default_toolchain() -> Path:
|
||||
return Path(__file__).resolve().parent.parent / 'cmake/AnyAvrGcc.cmake'
|
||||
return Path(__file__).resolve().parent.parent / 'cmake/AvrGcc.cmake'
|
||||
|
||||
def get_cmake_cache_entries(self):
|
||||
entries = []
|
||||
|
|
|
|||
Loading…
Reference in New Issue