Skip to content
This repository was archived by the owner on Apr 17, 2023. It is now read-only.

Commit af35dab

Browse files
authored
Merge pull request #44 from arduino-cmake/release/v0.6
Release v0.6
2 parents 6c23e58 + b17bc64 commit af35dab

File tree

148 files changed

+30764
-471
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+30764
-471
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,4 +120,6 @@ fabric.properties
120120
[Aa]ssets/*
121121
/examples/blink-example/Blink.cpp
122122
/examples/servo-knob-example/Knob.cpp
123-
/examples/sketch/sketch.cpp
123+
/examples/sketch/sketch1.cpp
124+
/examples/sketch/sketch2.cpp
125+
/docs/wiki

.travis.yml

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,54 @@ os:
33
- linux
44
- osx
55
env:
6-
- ARDUINO_SDK_VERSION=1.6.10
7-
- ARDUINO_SDK_VERSION=1.8.6
6+
global:
7+
- ARDUINO_SDK_BASE_PATH=arduino-sdk/arduino
8+
matrix:
9+
- ARDUINO_SDK_VERSION=1.6.10
10+
- ARDUINO_SDK_VERSION=1.8.7
11+
cache:
12+
directories:
13+
- $HOME/$ARDUINO_SDK_BASE_PATH-$ARDUINO_SDK_VERSION
14+
if: branch != feature/appveyor-ci
815
addons:
916
apt:
1017
packages:
11-
- gcc-avr
1218
- binutils-avr
1319
- avr-libc
1420
- avrdude
1521
- cmake
1622
before_install:
23+
- sdk_path="$HOME/$ARDUINO_SDK_BASE_PATH-$ARDUINO_SDK_VERSION"
24+
- mkdir -p "$sdk_path"
25+
- cd "$sdk_path/../.." # Get one level above 'arduino-sdk'
1726
- |
18-
if [[ $TRAVIS_OS_NAME == linux ]]; then
19-
export ARDUINO_SDK_FILE="arduino-$ARDUINO_SDK_VERSION-linux32.tar.xz"
20-
else
21-
export ARDUINO_SDK_FILE="arduino-$ARDUINO_SDK_VERSION-macosx.zip"
22-
brew install cmake
27+
if [[ -z "$(ls -A "$sdk_path")" ]];
28+
then
29+
if [[ $TRAVIS_OS_NAME == linux ]]; then
30+
sdk_file="arduino-$ARDUINO_SDK_VERSION-linux64.tar.xz"
31+
else
32+
sdk_file="arduino-$ARDUINO_SDK_VERSION-macosx.zip"
33+
fi
34+
wget "https://downloads.arduino.cc/$sdk_file" -O "$sdk_file"
35+
if [[ $TRAVIS_OS_NAME == linux ]]; then
36+
tar -xf "$sdk_file" -C arduino-sdk
37+
else
38+
unzip -q "$sdk_file"
39+
mv Arduino.app/* arduino-sdk/arduino-$ARDUINO_SDK_VERSION
40+
fi
2341
fi
24-
- wget "https://downloads.arduino.cc/$ARDUINO_SDK_FILE" -O "$ARDUINO_SDK_FILE"
25-
- mkdir arduino-sdk
2642
- |
27-
if [[ $TRAVIS_OS_NAME == linux ]]; then
28-
tar xf "$ARDUINO_SDK_FILE" -C arduino-sdk --strip-components 1
29-
export ARDUINO_SDK_PATH="$(pwd)/arduino-sdk"
30-
else
31-
unzip "$ARDUINO_SDK_FILE" "Arduino.app/Contents/Java/*" -d arduino-sdk
32-
export ARDUINO_SDK_PATH="$(pwd)/arduino-sdk/Arduino.app/Contents/Java"
43+
if [[ $TRAVIS_OS_NAME == osx ]]; then
44+
sdk_path="$sdk_path/Contents/Java"
3345
fi
46+
- export ARDUINO_SDK_PATH="$sdk_path"
3447
install:
48+
- cd "$TRAVIS_BUILD_DIR"
3549
- mkdir build
3650
- rm -rf build/*
3751
- cd build/
3852
script:
39-
- cmake -D CMAKE_TOOLCHAIN_FILE="../cmake/Arduino-Toolchain.cmake" ..
53+
- cmake -D CMAKE_TOOLCHAIN_FILE="../cmake/Arduino-Toolchain.cmake" ../examples
4054
- make
41-
after_script:
55+
after_failure:
4256
- cat CMakeFiles/CMakeOutput.log

AUTHORS.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22

33
This files lists all the authors of this project that helped it grow by adding code, fixing bugs, etc.
44

5-
- Tomasz Bogdal ([queezythegreat - Original author of **Arduino-CMake**)
6-
- Timor Gruber ([MrPointer](https://github.com/MrPointer) - Author of **Arduino-CMake 3**, Current Maintainer)
5+
- [Tomasz Bogdal](https://github.com/queezythegreat) - Original author of **Arduino-CMake**
6+
- [Timor Gruber](https://github.com/MrPointer) - Author of **Arduino-CMake-NG**, Current Maintainer
7+
- [Tao Yuan](https://github.com/taoyuan)
8+
- [Mike Machado](https://github.com/machadolab)
9+
- [ooxi](https://github.com/ooxi)
710

811
There are many other authors who have contributed to the various forks and versions, work which couldn't be done without them.
912

CHANGELOG.md

Lines changed: 64 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,59 @@
11
# Change Log
22

3+
## Version 0.6
4+
5+
This is a **BIG** version including numerous bug fixes, changes and even some new features.
6+
It mostly addressed *3rd Party Libraries*.
7+
8+
### New Features
9+
10+
* 3rd Party Arduino libraries can now be manually added from any path using the `add_arduino_library` function or automatically found using the `find_arduino_library` function.
11+
To use the *find API*, the `3RD_PARTY` argument option should be passed to the function.
12+
13+
* Header-only Arduino libraries are now supported - They can be manually added using the `add_arduino_header_only_library` function or automatically found using the `find_arduino_library` function.
14+
To use the *find API*, the`HEADER_ONLY` argument option should be pass to the function.
15+
16+
* Full Arduino IDE *Sketchbook* support - Libraries, examples and sketches can be optionally searched there as well.
17+
The framework can also automatically find the *Sketchbook Location*, however, this is disabled by default, what also means that unless set otherwise, the framework ***doesn't search the sketchbook*** - This policy is set due to the unwanted dependency on the Arduino IDE for this feature to fully work.
18+
Further information can be found in the documentation.
19+
* Many improvements to the CI platforms **AppVeyor** and **Travis CI**, including:
20+
* Cached builds - Decreased build time significantly
21+
* Improved control-flow and readability
22+
23+
### Bug Fixes
24+
25+
* All functions that were expecting a theoretically "unlimited" list of sources to operate on, such as `add_arduino_executable`, `add_arduino_library` etc. couldn't parse more than one file which also was the first.
26+
* The `Linux-Dist-Detection` module didn't check whether the required dependencies for the detection are installed.
27+
* 3rd Party libraries that don't include a **library.properties** file couldn't be used.
28+
* 3rd Party libraries have been renamed to an "Arduino-Compliant" name when attempting to find them using the `find_arduino_library` function, which renamed them to an invalid name.
29+
* 3rd Party libraries that have been added using custom CMake logic (Calls to `add_library`) didn't get any of the build flags that every Arduino library has to have.
30+
* The framework couldn't automatically find the Arduino SDK on OS X images.
31+
32+
### Changes
33+
34+
* Updated project's workflow model, which mostly modifies the development branch from now on to be the **master** branch, instead of **develop**. More can be read in the **CONTRIBUTING.md** file.
35+
36+
* The `Find-SDK` module now searches for the **version.txt** file under a sub-directory named **lib**, which resides directly under SDK's root path. This file's path is common across all OSs, unlike the previously searched **arduino** program.
37+
38+
* The `find_arduino_library` function now searches under the following paths:
39+
40+
* `ARDUINO_SDK_LIBRARIES_PATH` - Usually the **libraries** directory under the SDK's root directory
41+
* *Sketchbook Location* - **Arduino IDE**'s *Sketchbook* path, storing all user-downloaded libraries
42+
* `CMAKE_CURRENT_SOURCE_DIRECTORY` - The directory in which the executed **CMakeLists.txt** file resides, i.e. Project's source directory
43+
* `PROJECT_SOURCE_DIR` - The directory in which the **CMakeLists.txt** file that sets the `project` resides.
44+
45+
Besides, the following sub-directories are searched under every path mentioned above:
46+
47+
- **libraries**
48+
- **dependencies**
49+
50+
* 3rd Party Arduino Libraries do not longer have to include the **library.properties** file in their root directory - Their root directory is searched instead.
51+
Nevertheless including the file is still ***recommended***, because when the file isn't present, the framework can't infer potentially required metadata from it.
52+
353
## Version 0.5.2
454

5-
This version adds case-insensitive support for examples, forgotten in the last version.
6-
Fixes a bug in Core-Lib target creation on Debian/Ubuntu systems, and adds support for **AppVeyor** CI.
55+
This version adds case-insensitive support for examples, forgotten in the last version.
56+
Fixes a bug in Core-Lib target creation on Debian/Ubuntu systems, and adds support for **AppVeyor** CI.
757

858
But most importantly - It changes the way users should supply a custom SDK location.
959

@@ -23,7 +73,7 @@ But most importantly - It changes the way users should supply a custom SDK locat
2373

2474
## Version 0.5.1
2575

26-
This version fixes some "invisible" bugs from previous versions, along with general design improvements.
76+
This version fixes some "invisible" bugs from previous versions, along with general design improvements.
2777
Moreover, there are even some new minor features.
2878

2979
### New Features
@@ -48,7 +98,7 @@ This version refactored the Sketch API entirely to enhance support for missing f
4898

4999
- Headers included in a sketch file are now resolved to provide better insight
50100
- Arduino/Platform libraries that are resolved from a sketch's headers are linked to the target
51-
- Option/Policy to "forcefully" convert a sketch to a source file when adding it to a target, even if the source file already exists (Usually means that sketch has already been converted).
101+
- Option/Policy to "forcefully" convert a sketch to a source file when adding it to a target, even if the source file already exists (Usually means that sketch has already been converted).
52102
By default it's set to **OFF**.
53103

54104
### Changes
@@ -74,15 +124,15 @@ This version mostly added support for examples and sketches.
74124

75125
* Arduino examples such as **Blink** can now be used by calling the `add_arduino_example` function
76126
* Arduino library examples, each being part of an Arduino library, can also be used by calling the `add_arduino_library_example` function
77-
* Arduino Sketches can be converted into source files under the project's source directory.
127+
* Arduino Sketches can be converted into source files under the project's source directory.
78128
The API to use them seamlessly as using examples is still missing, however.
79-
* During platform initialization the main header of the platform gets selected.
80-
This is useful for sketch conversion, as sketches usually don't include the header in their source files but depend on the **Arduino IDE** to do so instead.
129+
* During platform initialization the main header of the platform gets selected.
130+
This is useful for sketch conversion, as sketches usually don't include the header in their source files but depend on the **Arduino IDE** to do so instead.
81131
The header is selected based on the number of `#include` lines it has - The header with most includes is selected as platform's main header, as it probably includes many other platform headers.
82132

83133
### Changes
84134

85-
* The API of the utility function `list_replace` now resembles CMake's List API.
135+
* The API of the utility function `list_replace` now resembles CMake's List API.
86136
It's also a macro now instead of a function.
87137
* Improved logic and performance of utility `increment` and `decrement` math functions
88138

@@ -102,17 +152,17 @@ This version added support for Arduino libraries and platform libraries.
102152

103153
* Arduino libraries can be found by calling `find_arduino_library` and then linked to another target by calling `link_arduino_library`
104154
* The library search process is architecture-aware, meaning that only sources that match the platform's architecture will be included in the library target
105-
* Arduino platform libraries can be simply linked to another target by calling `link_platform_library`.
155+
* Arduino platform libraries can be simply linked to another target by calling `link_platform_library`.
106156
There's no special search process for platform libraries as there is for Arduino libraries.
107157

108158
## Version 0.2
109159

110-
This version added support for the **Core Library** - A static library built from the platform's core sources that must be linked to every single target in the Arduino build system, including libraries in the future.
160+
This version added support for the **Core Library** - A static library built from the platform's core sources that must be linked to every single target in the Arduino build system, including libraries in the future.
111161
This library is also the missing piece for getting correct program sizes, which hasn't been the case up until now.
112162

113163
### New Features
114164

115-
* The Core Library is added once per board (As a board has a single associated core) and linked against every created target.
165+
* The Core Library is added once per board (As a board has a single associated core) and linked against every created target.
116166
This behavior is internal and not up to the control of the user, much like a Kernel.
117167

118168
### Changes
@@ -128,13 +178,13 @@ This version added support for displaying a program's size upon build completion
128178

129179
### New Features
130180

131-
* Program size output for every executable target at the end of each successful build.
132-
This is done using Arduino's **avr-size** tool.
181+
* Program size output for every executable target at the end of each successful build.
182+
This is done using Arduino's **avr-size** tool.
133183
The tool's output is then reformatted to match the format of Arduino IDE.
134184

135185
## Version 0.1
136186

137-
This is the bare metal version of the framework, adding support for the very basic stuff.
187+
This is the bare metal version of the framework, adding support for the very basic stuff.
138188
Although basic, there's a lot that had to be done in order to reach a somewhat "stable" version that can be burned to the board and actually work.
139189

140190
### Features

0 commit comments

Comments
 (0)