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

Commit a2343c5

Browse files
committed
Updated markdown documents.
Reordered 'Readme' paragraphs and rephrased 'Features' section. Updated 'Authors' Updated 'Changelog' to match all 0.6 changes
1 parent cbfebf9 commit a2343c5

File tree

3 files changed

+113
-61
lines changed

3 files changed

+113
-61
lines changed

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: 61 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,56 @@
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+
* The `Linux-Dist-Detection` module didn't check whether the required dependencies for the detection are installed.
26+
* 3rd Party libraries that don't include a **library.properties** file couldn't be used.
27+
* 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.
28+
* 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.
29+
* The framework couldn't automatically find the Arduino SDK on OS X images.
30+
31+
### Changes
32+
33+
* 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.
34+
35+
* The `find_arduino_library` function now searches under the following paths:
36+
37+
* `ARDUINO_SDK_LIBRARIES_PATH` - Usually the **libraries** directory under the SDK's root directory
38+
* *Sketchbook Location* - **Arduino IDE**'s *Sketchbook* path, storing all user-downloaded libraries
39+
* `CMAKE_CURRENT_SOURCE_DIRECTORY` - The directory in which the executed **CMakeLists.txt** file resides, i.e. Project's source directory
40+
* `PROJECT_SOURCE_DIR` - The directory in which the **CMakeLists.txt** file that sets the `project` resides.
41+
42+
Besides, the following sub-directories are searched under every path mentioned above:
43+
44+
- **libraries**
45+
- **dependencies**
46+
47+
* 3rd Party Arduino Libraries do not longer have to include the **library.properties** file in their root directory - Their root directory is searched instead.
48+
Nevertheless including the file is still ***recommended***, because when the file isn't present, the framework can't infer potentially required metadata from it.
49+
350
## Version 0.5.2
451

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.
52+
This version adds case-insensitive support for examples, forgotten in the last version.
53+
Fixes a bug in Core-Lib target creation on Debian/Ubuntu systems, and adds support for **AppVeyor** CI.
754

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

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

2471
## Version 0.5.1
2572

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

2976
### New Features
@@ -48,7 +95,7 @@ This version refactored the Sketch API entirely to enhance support for missing f
4895

4996
- Headers included in a sketch file are now resolved to provide better insight
5097
- 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).
98+
- 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).
5299
By default it's set to **OFF**.
53100

54101
### Changes
@@ -74,15 +121,15 @@ This version mostly added support for examples and sketches.
74121

75122
* Arduino examples such as **Blink** can now be used by calling the `add_arduino_example` function
76123
* 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.
124+
* Arduino Sketches can be converted into source files under the project's source directory.
78125
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.
126+
* During platform initialization the main header of the platform gets selected.
127+
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.
81128
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.
82129

83130
### Changes
84131

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

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

103150
* Arduino libraries can be found by calling `find_arduino_library` and then linked to another target by calling `link_arduino_library`
104151
* 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`.
152+
* Arduino platform libraries can be simply linked to another target by calling `link_platform_library`.
106153
There's no special search process for platform libraries as there is for Arduino libraries.
107154

108155
## Version 0.2
109156

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.
157+
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.
111158
This library is also the missing piece for getting correct program sizes, which hasn't been the case up until now.
112159

113160
### New Features
114161

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

118165
### Changes
@@ -128,13 +175,13 @@ This version added support for displaying a program's size upon build completion
128175

129176
### New Features
130177

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.
178+
* Program size output for every executable target at the end of each successful build.
179+
This is done using Arduino's **avr-size** tool.
133180
The tool's output is then reformatted to match the format of Arduino IDE.
134181

135182
## Version 0.1
136183

137-
This is the bare metal version of the framework, adding support for the very basic stuff.
184+
This is the bare metal version of the framework, adding support for the very basic stuff.
138185
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.
139186

140187
### Features

README.md

Lines changed: 47 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,53 @@
55
**Arduino-CMake** is a framework which allows developers to write Arduino-based programs using any tool that supports cmake. *Arduino-based*? There are many other frameworks out there built upon Arduino's base, such as ESP32, and **we support that**.
66
In other words, developers can use their favorite IDEs or text editors on their favorite OS to develop Arduino programs!
77

8-
Wait - Hasn't it been possible all this time? Apparently not, as you'll find out by reading further.
8+
Wait - Hasn't it been possible all this time? Apparently not. You can read more about it in the [Motivation](#Motivation) section.
9+
10+
## Features
11+
12+
**Arduino-CMake** should<sup id="fl1">[1](#f1)</sup> do almost<sup id="fl2">[2](#f2)</sup> <u>anything</u> that the **Arduino IDE** does!
13+
Here's a list of features **already supported** by **Arduino-CMake**:
14+
15+
- Creating Arduino "Executables"/Programs
16+
- Uploading programs to hardware boards
17+
- Adding/Finding and using Arduino Libraries
18+
- 3rd Party libraries are fully supported
19+
- User libraries which are not Arduino Libraries are also supported
20+
- Using Arduino example programs
21+
- Using Arduino library example programs
22+
- Attaching Arduino sketches (`.ino` files) to programs
23+
24+
Moreover, **Arduino-CMake** allows some things that **Arduino IDE** *doesn't*:
25+
26+
- Developing Arduino programs in any IDE or text editor
27+
- Completely customizing the build process per user's requirements
28+
29+
It's also worth mentioning that **Arduino-CMake** is **<u>cross platform</u>** and works out-of-the-box on every OS that support **CMake** and **Arduino**.
30+
31+
<b id="f1">1</b> The framework is still a WIP, meaning there are some missing features. [](#fl1)
32+
<b id="f2">2</b> The **Arduino IDE** supports several concepts which make writing code easier but are completely unprofessional. Our framework is not willing to encourage such poor coding standards, and thus doesn't support them. These will be mentioned throughout the documentation. [](#fl2)
33+
34+
## Usage
35+
36+
A very basic example of how **Arduino-CMake** can be used is listed below:
37+
38+
```cmake
39+
# Define CMake's minimum version (must-do) and the project's name and supported languages
40+
cmake_minimum_required(VERSION 3.8.2)
41+
project(Hello_World LANGUAGES C CXX ASM)
42+
43+
# Call a framework utility function, passing it information about the hardware board that will be used - This function returns a structure known only to the framework
44+
get_board_id(board_id nano atmega328)
45+
46+
# Create an executable suitable for Arduino using CMake-style target-creation
47+
add_arduino_executable(Hello_World ${board_id} helloWorld.cpp)
48+
# Upload the created target through a connected Serial Port (Where your board is connected to)
49+
upload_arduino_target(Hello_World "${board_id}" COM3)
50+
```
51+
52+
You should then call **CMake** (either through *cmd*, *cmake-gui* or an *IDE* if it supports that) passing it the argument `-DCMAKE_TOOLCHAIN_FILE=[project_path]/cmake/Arduino-Toolchain.cmake` where `[project_path]` is substituted by the project's full path. This is what allows cmake to use our framework.
53+
54+
That's it! It's super simple, yet super extensible :)
955

1056
## Motivation
1157

@@ -43,27 +89,6 @@ NG stands for "New Generation".
4389
Inferred from the written above, it can easily be understood why the project has this name.
4490
However, if you don't think this name is good enough or it confuses you - Feel free to propose a name of your own, we're open for offers :)
4591

46-
## Features
47-
48-
**Arduino-CMake** should do <u>anything</u> that the **Arduino IDE** can!
49-
Why should? Because currently it's still WIP, meaning there are still some missing features.
50-
Here's a list of features **already supported** by **Arduino-CMake**:
51-
52-
* Creating Arduino "Executables"/Programs
53-
* Uploading programs to hardware boards
54-
* Linking/Using Arduino libraries to programs
55-
* Linking/Using custom libraries to programs
56-
* Creating Arduino example programs
57-
* Creating Arduino library example programs
58-
* Attaching Arduino sketches to programs
59-
60-
Moreover, **Arduino-CMake** allows some things that **Arduino IDE** *doesn't*:
61-
62-
- Developing Arduino programs in any IDE or text editor
63-
- Completely customizing the build process per user's requirements
64-
65-
It also worth mentioning that **Arduino-CMake** is **entirely <u>cross platform</u>**.
66-
6792
## Requirements
6893

6994
The following list is the basic requirements of the framework in order to use it:
@@ -74,29 +99,6 @@ The following list is the basic requirements of the framework in order to use it
7499
* 1.8.2 or Higher on **Microsoft Windows**
75100
* 1.6.10 or Higher on **Linux** and **Apple OS X**
76101

77-
## Usage
78-
79-
A very basic example of how **Arduino-CMake** can be used is listed below:
80-
81-
```cmake
82-
# Define CMake's minimum version (must-do) and the project's name and supported languages
83-
cmake_minimum_required(VERSION 3.8)
84-
project(Hello_World LANGUAGES C CXX ASM)
85-
86-
# Call a framework utility function, passing it information about the hardware board that will
87-
# be used - This function returns a structure known only to the framework
88-
get_board_id(board_id nano atmega328)
89-
90-
# Create an executable suitable for the Arduino firmware using CMake-style target-creation
91-
add_arduino_executable(Hello_World ${board_id} helloWorld.cpp)
92-
# Upload the created target through a connected Serial Port (Where your board is connected to)
93-
upload_arduino_target(Hello_World "${board_id}" COM3)
94-
```
95-
96-
You should then call **CMake** (either through cmd, cmake-gui or an IDE if it supports that) passing it the argument `-DCMAKE_TOOLCHAIN_FILE=[project_path]/cmake/Arduino-Toolchain.cmake` where `[project_path]` is substituted by the project's full path. This is what allows cmake to use our framework.
97-
98-
That's it! It's super simple, yet super extensible :)
99-
100102
## Installation
101103

102104
A complete installation guide can be found in the [Installation](https://github.com/arduino-cmake/arduino-cmake/wiki/Installation) Wiki page.

0 commit comments

Comments
 (0)