-
-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for including ChibiOS-Contrib repo in build (#1177)
- Loading branch information
1 parent
476e484
commit 7c91268
Showing
54 changed files
with
272 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
cmake_minimum_required(VERSION 2.8.2) | ||
|
||
project(ChibiOS-Contrib-download NONE) | ||
|
||
include(ExternalProject) | ||
|
||
# download ChibiOS Community contributions source from GitHub repo | ||
ExternalProject_Add( | ||
ChibiOS-Contrib | ||
PREFIX ChibiOS-Contrib | ||
SOURCE_DIR ${CMAKE_BINARY_DIR}/ChibiOS-Contrib_Source | ||
GIT_REPOSITORY https://github.com/ChibiOS/ChibiOS-Contrib | ||
GIT_SHALLOW 1 # download only the tip of the branch, not the complete history | ||
TIMEOUT 10 | ||
LOG_DOWNLOAD 1 | ||
# Disable all other steps | ||
INSTALL_COMMAND "" | ||
CONFIGURE_COMMAND "" | ||
BUILD_COMMAND "" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# | ||
# Copyright (c) 2017 The nanoFramework project contributors | ||
# See LICENSE file in the project root for full license information. | ||
# | ||
|
||
# set include directories for ChibiOS-Contrib | ||
|
||
list(APPEND CHIBIOS_CONTRIB_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS-Contrib_Source/os/hal/include/) | ||
|
||
#################################################################################### | ||
# WHEN ADDING A NEW ChibiOS-Contrib component add the include directory(ies) bellow | ||
#################################################################################### | ||
# component IMACOMPONENT | ||
#list(APPEND CHIBIOS_CONTRIB_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS-Contrib_Source/os/hal/include/IMACOMPONENT) | ||
|
||
|
||
####################################################################################################################################### | ||
# Because we've "hacked" ChibiOS overlay mechanism used by the community contributions we can't add the "official" hal_community.c | ||
# Instead we have to add the requried and equivalent calls existing in the official source file | ||
# in our hal_community.c @ targets\CMSIS-OS\ChibiOS\nf-overlay\os\hal\src\hal_community.c | ||
######################################################################################################################### | ||
|
||
|
||
#################################################################################################### | ||
# WHEN ADDING A NEW ChibiOS-Contrib component add the source file(s) specific to it bellow | ||
#################################################################################################### | ||
# component IMACOMPONENT | ||
# list(APPEND CHIBIOS_CONTRIB_SOURCES ${PROJECT_SOURCE_DIR}/targets/CMSIS-OS/ChibiOS/nf-overlay/os/hal/src/IMACOMPONENT/source-file-1.c) | ||
# list(APPEND CHIBIOS_CONTRIB_SOURCES ${PROJECT_SOURCE_DIR}/targets/CMSIS-OS/ChibiOS/nf-overlay/os/hal/src/IMACOMPONENT/source-file-2.c) | ||
# list(APPEND CHIBIOS_CONTRIB_SOURCES ${PROJECT_SOURCE_DIR}/targets/CMSIS-OS/ChibiOS/nf-overlay/os/hal/src/IMACOMPONENT/source-file-3.c) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CHIBIOS_CONTRIB DEFAULT_MSG CHIBIOS_CONTRIB_INCLUDE_DIRS CHIBIOS_CONTRIB_SOURCES) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.