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

Commit 5df2a4f

Browse files
authored
Merge pull request #1 from arduino-cmake/release/v0.5.2
Release/v0.5.2
2 parents 7e70e6d + 37fc8e7 commit 5df2a4f

File tree

73 files changed

+3684
-202
lines changed

Some content is hidden

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

73 files changed

+3684
-202
lines changed

.editorconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ insert_final_newline = true
88

99
indent_style = space
1010
indent_size = 4
11-
# Editor support is limited. Make your you align multiline statements accordingly, should your editor not honour this attribute
11+
# Editor support is limited. Make you align multi-line statements accordingly,
12+
# should your editor not honour this attribute
1213
continuation_indent_size = 8
1314

1415
trim_trailing_whitespace = true

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,7 @@ crashlytics-build.properties
117117
fabric.properties
118118

119119
### User-Defined
120-
[Aa]ssets/*
120+
[Aa]ssets/*
121+
/examples/blink-example/Blink.cpp
122+
/examples/servo-knob-example/Knob.cpp
123+
/examples/sketch/sketch.cpp

.idea/codeStyles/Project.xml

Lines changed: 29 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/codeStyles/codeStyleConfig.xml

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.travis.yml

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,42 @@
1-
language: c
1+
language: cpp
22
os:
3-
- linux
4-
- osx
3+
- linux
4+
- osx
55
env:
6-
matrix:
7-
- ARDUINO_SDK_VERSION=1.6.13
8-
- ARDUINO_SDK_VERSION=1.8.5
6+
- ARDUINO_SDK_VERSION=1.6.13
7+
- ARDUINO_SDK_VERSION=1.8.6
98
addons:
109
apt:
1110
packages:
12-
- gcc-avr
13-
- binutils-avr
14-
- avr-libc
15-
- avrdude
11+
- gcc-avr
12+
- binutils-avr
13+
- avr-libc
14+
- avrdude
15+
- cmake
1616
before_install:
17-
- |
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-
fi
23-
- wget "https://downloads.arduino.cc/$ARDUINO_SDK_FILE" -O "$ARDUINO_SDK_FILE"
24-
- mkdir arduino-sdk
25-
- |
26-
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
27-
tar xf "$ARDUINO_SDK_FILE" -C arduino-sdk --strip-components 1
28-
export ARDUINO_SDK_PATH="$(pwd)/arduino-sdk"
29-
else
30-
unzip "$ARDUINO_SDK_FILE" "Arduino.app/Contents/Java/*" -d arduino-sdk
31-
export ARDUINO_SDK_PATH="$(pwd)/arduino-sdk/Arduino.app/Contents/Java"
32-
fi
17+
- |
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
23+
fi
24+
- wget "https://downloads.arduino.cc/$ARDUINO_SDK_FILE" -O "$ARDUINO_SDK_FILE"
25+
- mkdir arduino-sdk
26+
- |
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"
33+
fi
3334
install:
34-
- mkdir build
35-
- rm -rf build/*
36-
- cd build/
35+
- mkdir build
36+
- rm -rf build/*
37+
- cd build/
3738
script:
38-
- cmake -D ARDUINO_SDK_PATH="$ARDUINO_SDK_PATH" ..
39-
- make
39+
- cmake -D CMAKE_TOOLCHAIN_FILE="../cmake/Arduino-Toolchain.cmake" ..
40+
- make
4041
after_script:
41-
- cat CMakeFiles/CMakeOutput.log
42+
- cat CMakeFiles/CMakeOutput.log

AUTHORS.md

Lines changed: 7 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,10 @@
11
# Authors
22

3-
This files lists all the authors of this project, which helped its growing by adding code, fixing bugs, etc.
3+
This files lists all the authors of this project that helped it grow by adding code, fixing bugs, etc.
44

5-
- mean00 ([mean00](https://github.com/mean00))
6-
- Ariel ([aog2000a](https://github.com/aog2000a))
7-
- Konstantin Gredeskoul ([kigster](https://github.com/kigster))
8-
- Juan José Herrero Barbosa ([Souler](https://github.com/Souler))
9-
- Bei Chen Liu ([Baycken](https://github.com/Baycken))
10-
- Marc Plano-Lesay ([Kernald](https://github.com/Kernald))
11-
- James Goppert ([jgoppert](https://github.com/jgoppert))
12-
- Matt Tyler ([matt-tyler](https://github.com/matt-tyler))
13-
- Andrew Stromme ([astromme](https://github.com/astromme))
14-
- [johnyb](https://github.com/johnyb)
15-
- [arunh](https://github.com/arunh)
16-
- Sebastian Herp ([sebastianherp](https://github.com/sebastianherp))
17-
- Michael Daffin ([james147](https://github.com/james147))
18-
- Pavel Ilin ([PIlin](https://github.com/PIlin))
19-
- Igor Mikolic-Torreira ([igormiktor](https://github.com/igormiktor))
20-
- Claudio Henrique Fortes Felix ([chffelix](https://github.com/chffelix))
21-
- Alexandre Tuleu ([atuleu](https://github.com/atuleu))
22-
- [getSurreal](https://github.com/getSurreal)
23-
- Sebastian Zaffarano ([szaffarano](https://github.com/szaffarano))
24-
- [cheshirekow](https://github.com/cheshirekow)
25-
- Logan Engstrom ([meadowstream](https://github.com/meadowstream))
26-
- Francisco Ramírez ([franramirez688](https://github.com/franramirez688))
27-
- Brendan Shillingford ([bshillingford](https://github.com/bshillingford))
28-
- Mike Purvis ([mikepurvis](https://github.com/mikepurvis))
29-
- Steffen Hanikel ([hanikesn](https://github.com/hanikesn))
30-
- Mindaugas Vinkelis ([fraillt - Contributor)
31-
- noseglasses ([noseglasses - Contributor)
32-
- Tomasz Bogdal ([queezythegreat - Original author of arduino-cmake)
33-
- Jonas ([JonasProgrammer](https://github.com/JonasProgrammer) - Maintainer)
34-
- Timor Gruber ([MrPointer](https://github.com/MrPointer) - Maintainer)
5+
- Tomasz Bogdal ([queezythegreat - Original author of **Arduino-CMake**)
6+
- Timor Gruber ([MrPointer](https://github.com/MrPointer) - Author of **Arduino-CMake 3**, Current Maintainer)
7+
8+
There are many other authors who have contributed to the various forks and versions, work which couldn't be done without them.
9+
10+
To all of you - Thank you very much!

CHANGELOG.md

Lines changed: 140 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,148 @@
11
# Change Log
22

3-
# Version [2.0.1](https://github.com/arduino-cmake/arduino-cmake/compare/v2.0.0...v2.0.1) (Dec 19th 2017)
3+
## Version 0.5.2
44

5-
### Bug fixes
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.
67

7-
* fixed `-DARDUINO` define for Arduino SDK versions between 1.0.0 and 1.5.8. This bug caused to included `WProgram.h` instead of `Arduino.h` for aforementioned versions.
8+
But most importantly - It changes the way users should supply a custom SDK location.
89

9-
# Version 2.0.0 (Dec 13th 2017)
10+
### New Features
1011

11-
An epic version which integrates too many changes to be listed and recorded since the latest stable version, which was **1.0.0**. It has been released almost <u>4 years ago</u>!
12+
* Example name parameter of the **Example API** functions is now case-insensitive
13+
* Support for **AppVeyor** continuous integration/CI.
1214

13-
However, here are some of the most noticeable changes in this version:
15+
### Changes
16+
17+
* Supplying custom **Arduino SDK** path - Should now set an environment variable in the system named `ARDUINO_SDK_PATH`, instead of passing it as a variable to CMake through `-D`
18+
* Parameter order in the `add_arduino_library_example` function - `_board_id` becomes 2nd
19+
20+
### Bug Fixes
21+
22+
* Potential bug in Debian/Ubuntu systems when creating Core Library targets
23+
24+
## Version 0.5.1
25+
26+
This version fixes some "invisible" bugs from previous versions, along with general design improvements.
27+
Moreover, there are even some new minor features.
28+
29+
### New Features
30+
31+
* Library name parameter of the `find_arduino_library` function is now case-insensitive due to a new utility feature to convert strings to *PascalCase*
32+
33+
### Changes
34+
35+
* Refactored many modules previously under the `Other` directory to be each under its' relevant directory
36+
37+
### Bug Fixes
38+
39+
* Sketch conversion was only partially avoided - Now the functionality is optimized
40+
* Arduino libraries couldn't be linked to the target when resolving a sketch's headers
41+
* Regex search patterns
42+
43+
## Version 0.5
44+
45+
This version refactored the Sketch API entirely to enhance support for missing features from previous versions. It also organized "*globals*" and default options in a single 'Defaults' module.
46+
47+
### New Features
48+
49+
- Headers included in a sketch file are now resolved to provide better insight
50+
- 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).
52+
By default it's set to **OFF**.
53+
54+
### Changes
55+
56+
* New Sketch API which resembles CMake's target API - Use `target_sketches` as you would use `target_sources`
57+
* Various inline search patterns and defaults have been moved to the 'DefaultsManager' module
58+
59+
## Version 0.4.1
60+
61+
This version adds minor feature improvements as well as complete sketch support.
62+
63+
### New Features
64+
65+
* Full sketch support in the API
66+
* Sketch targets can be created by calling the `add_sketch_target` function
67+
* Ability to provide a custom main platform header by setting the `USE_CUSTOM_PLATFORM_HEADER` option on
68+
69+
## Version 0.4
70+
71+
This version mostly added support for examples and sketches.
72+
73+
### New Features
74+
75+
* Arduino examples such as **Blink** can now be used by calling the `add_arduino_example` function
76+
* 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.
78+
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.
81+
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.
82+
83+
### Changes
84+
85+
* The API of the utility function `list_replace` now resembles CMake's List API.
86+
It's also a macro now instead of a function.
87+
* Improved logic and performance of utility `increment` and `decrement` math functions
88+
89+
## Version 0.3.1
90+
91+
This version includes a **critical** bug fix.
92+
93+
### Bug Fixes
94+
95+
* Wrong Core Library was used for libraries of the same board - As the Core-Lib is board-specific and board-dependent, it shouldn't be different for targets of the same board
96+
97+
## Version 0.3
98+
99+
This version added support for Arduino libraries and platform libraries.
100+
101+
### New Features
102+
103+
* Arduino libraries can be found by calling `find_arduino_library` and then linked to another target by calling `link_arduino_library`
104+
* 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`.
106+
There's no special search process for platform libraries as there is for Arduino libraries.
107+
108+
## Version 0.2
109+
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.
111+
This library is also the missing piece for getting correct program sizes, which hasn't been the case up until now.
112+
113+
### New Features
114+
115+
* The Core Library is added once per board (As a board has a single associated core) and linked against every created target.
116+
This behavior is internal and not up to the control of the user, much like a Kernel.
117+
118+
### Changes
119+
120+
* The entire codebase has been "cleaned", code-wise. It includes:
121+
* Separation of Concerns - Everything has its' own function, preferably also a module (CMake file)
122+
* Better control flow
123+
* Better use of "Modern CMake" recommendations
124+
125+
## Version 0.1.1
126+
127+
This version added support for displaying a program's size upon build completion.
128+
129+
### New Features
130+
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.
133+
The tool's output is then reformatted to match the format of Arduino IDE.
134+
135+
## Version 0.1
136+
137+
This is the bare metal version of the framework, adding support for the very basic stuff.
138+
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.
139+
140+
### Features
141+
142+
* Creating Arduino "executables" (Hex files that can be burned/uploaded/flashed to the hardware board) by calling `add_arduino_executable`
143+
* Uploading created executables/targets to a connected hardware board by calling `upload_arduino_target`, passing it the Serial Port (Such as **COM3**) through which the uploading process will be done
144+
* Analyzing the SDK by parsing all required information from files such as `platform.txt` and `boards.txt`
145+
* Parsing the `platform.txt` file is an entirely new concept that hasn't been used until now in all forks of the old Arduino-CMake. In fact, this is what allows the framework to be truly platform-agnostic, as it defines the platform's core behavior
146+
147+
Many more subtle and internal features have been implemented, but they won't be listed here.
14148

15-
* Code has been completely refactored:
16-
* Previously the project has consisted from generally 2 files:
17-
1. `ArduinoToolchain.cmake`
18-
2. `Platform/Arduino.cmake`
19-
* All functions and scripts in the `Arduino.cmake` file, which took nearly 3,500 lines of code, have been separated into matching script files, located under matching directories.
20-
* A script-driven approach has been taken, allowing developers to substitute a functionality simply by referencing a different CMake script file.
21-
* Arduino SDK version 1.5 and higher is supported:
22-
* Several changes were introduced in the SDK itself causing the previous version to fail building.
23-
* Custom hardware platforms and architectures can be defined:
24-
* Though it has already existed in the previous version, this feature was in a form of a function.
25-
Now it's a script that can either be replaced or use customized parameters.
26-
* Ability to define architecture is new.
27-
* Example generation:
28-
* Users can generate firmware using one of Arduino's built-in examples, such as the classic **Blink**.
29-
* Support for example *categories* has also been added, complying with Arduino current example-nesting strategy. For example, the **Blink** example is located under the `01.Basic` directory, which is also considered as its category.

0 commit comments

Comments
 (0)