Skip to content

Commit 2d15bbe

Browse files
committed
Merge branch 'develop'
2 parents 7645973 + 3f70624 commit 2d15bbe

Some content is hidden

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

43 files changed

+1031
-156
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ jobs:
2222
tag_name: ${{ github.ref }}
2323
release_name: Release ${{ github.ref }}
2424
body: |
25-
See the CHANGELOG.md
25+
See the [CHANGELOG](CHANGELOG.md)
2626
draft: false
2727
prerelease: false

.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,13 @@
2222
*.uvoptx
2323
*.__i
2424
*.i
25+
*.txt
2526
!docs/*.txt
27+
!CMakeLists.txt
2628
RTE/
2729

30+
*debug
31+
2832
# IAR Settings
2933
**/settings/*.crun
3034
**/settings/*.dbgdt
@@ -68,13 +72,15 @@ RTE/
6872
[Dd]ebugPublic/
6973
[Rr]elease/
7074
[Rr]eleases/
75+
[Dd]ebug*/
7176
x64/
7277
x86/
7378
bld/
7479
[Bb]in/
7580
[Oo]bj/
7681
[Ll]og/
7782
_build/
83+
build/
7884

7985
# Visual Studio 2015/2017 cache/options directory
8086
.vs/
@@ -382,3 +388,13 @@ log_file.txt
382388
project.ioc
383389
mx.scratch
384390
*.tilen majerle
391+
392+
393+
# Altium
394+
Project outputs*
395+
History/
396+
*.SchDocPreview
397+
*.$$$Preview
398+
399+
# VSCode projects
400+
project_vscode_compiled.exe

.vscode/c_cpp_properties.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"version": 4,
3+
"configurations": [
4+
{
5+
/*
6+
* Full configuration is provided by CMake plugin for vscode,
7+
* that shall be installed by user
8+
*/
9+
"name": "Win32",
10+
"intelliSenseMode": "${default}",
11+
"configurationProvider": "ms-vscode.cmake-tools"
12+
}
13+
]
14+
}

.vscode/extensions.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"recommendations": [
3+
"ms-vscode.cpptools",
4+
"ms-vscode.cmake-tools",
5+
"twxs.cmake",
6+
]
7+
}

.vscode/launch.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "(Windows) Launch",
9+
"type": "cppdbg",
10+
"request": "launch",
11+
"program": "${command:cmake.launchTargetPath}",
12+
"miDebuggerPath": "c:\\msys64\\mingw64\\bin\\gdb.exe",
13+
"args": [],
14+
"stopAtEntry": false,
15+
"cwd": "${fileDirname}",
16+
"environment": []
17+
}
18+
]
19+
}

.vscode/settings.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"files.associations": {
3+
"lwevt_types.h": "c",
4+
"lwevt_type.h": "c",
5+
"lwevt.h": "c",
6+
"string.h": "c",
7+
"lwevt_opt.h": "c",
8+
"stdatomic.h": "c",
9+
"lwrb.h": "c"
10+
},
11+
"esbonio.sphinx.confDir": ""
12+
}

.vscode/tasks.json

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"type": "cppbuild",
6+
"label": "Build project",
7+
"command": "cmake",
8+
"args": ["--build", "${command:cmake.buildDirectory}", "-j", "8"],
9+
"options": {
10+
"cwd": "${workspaceFolder}"
11+
},
12+
"problemMatcher": ["$gcc"],
13+
"group": {
14+
"kind": "build",
15+
"isDefault": true
16+
}
17+
},
18+
{
19+
"type": "shell",
20+
"label": "Re-build project",
21+
"command": "cmake",
22+
"args": ["--build", "${command:cmake.buildDirectory}", "--clean-first", "-v", "-j", "8"],
23+
"options": {
24+
"cwd": "${workspaceFolder}"
25+
},
26+
"problemMatcher": ["$gcc"],
27+
},
28+
{
29+
"type": "shell",
30+
"label": "Clean project",
31+
"command": "cmake",
32+
"args": ["--build", "${command:cmake.buildDirectory}", "--target", "clean"],
33+
"options": {
34+
"cwd": "${workspaceFolder}"
35+
},
36+
"problemMatcher": []
37+
},
38+
{
39+
"type": "shell",
40+
"label": "Run application",
41+
"command": "${command:cmake.launchTargetPath}",
42+
"args": [],
43+
"problemMatcher": [],
44+
},
45+
{
46+
"label": "Docs: Install python plugins from requirements.txt file",
47+
"type": "shell",
48+
"command": "python -m pip install -r requirements.txt",
49+
"options": {
50+
"cwd": "${workspaceFolder}/docs"
51+
},
52+
"problemMatcher": []
53+
},
54+
{
55+
"label": "Docs: Generate html",
56+
"type": "shell",
57+
"command": ".\\make html",
58+
"options": {
59+
"cwd": "${workspaceFolder}/docs"
60+
},
61+
"problemMatcher": []
62+
},
63+
{
64+
"label": "Docs: Clean build directory",
65+
"type": "shell",
66+
"command": ".\\make clean",
67+
"options": {
68+
"cwd": "${workspaceFolder}/docs"
69+
},
70+
"problemMatcher": []
71+
},
72+
]
73+
}

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
## Develop
44

5+
## v3.0.0-RC1
6+
7+
- Split CMakeLists.txt files between library and executable
8+
- Change license year to 2022
9+
- Update code style with astyle
10+
- Minimum required version is C11, with requirement of `stdatomic.h` library
11+
512
## v2.0.3
613

714
- Add `library.json` for Platform.IO

CMakeLists.txt

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
cmake_minimum_required(VERSION 3.22)
2+
3+
# Setup project
4+
project(LwLibPROJECT)
5+
6+
# -------------------------------------------------
7+
# This CMakeLists.txt is used only if it is a top-level file.
8+
# Purpose of it is to be able to compile project in standalone way only
9+
#
10+
# When library sources are to be included in another project
11+
# user shall use /lwrb/CMakeLists.txt instead
12+
if (NOT PROJECT_IS_TOP_LEVEL)
13+
message(FATAL_ERROR "This CMakeLists.txt can only be used as top-level. Use /lwrb/CMakeLists.txt for library include purpose")
14+
endif()
15+
16+
# Set as executable
17+
add_executable(${PROJECT_NAME})
18+
19+
# Add key executable block
20+
target_sources(${PROJECT_NAME} PUBLIC
21+
${CMAKE_CURRENT_LIST_DIR}/dev/main.c
22+
)
23+
24+
# Add key include paths
25+
target_include_directories(${PROJECT_NAME} PUBLIC
26+
${CMAKE_CURRENT_LIST_DIR}/dev
27+
)
28+
29+
# Compilation definition information
30+
target_compile_definitions(${PROJECT_NAME} PUBLIC
31+
WIN32
32+
_DEBUG
33+
CONSOLE
34+
LWRB_DEV
35+
)
36+
37+
# Compiler options
38+
target_compile_options(${PROJECT_NAME} PRIVATE
39+
-Wall
40+
-Wextra
41+
-Wpedantic
42+
)
43+
44+
# Add subdir with lwrb and link to project
45+
add_subdirectory("lwrb" lwrb)
46+
target_link_libraries(${PROJECT_NAME} lwrb)

CMakePresets.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"version": 3,
3+
"configurePresets": [
4+
{
5+
"name": "default",
6+
"hidden": true,
7+
"generator": "Ninja",
8+
"binaryDir": "${sourceDir}/build/${presetName}",
9+
"cacheVariables": {
10+
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
11+
}
12+
},
13+
{
14+
"name": "Win32-Debug",
15+
"inherits": "default",
16+
"toolchainFile": "${sourceDir}/cmake/i686-w64-mingw32-gcc.cmake",
17+
"cacheVariables": {
18+
"CMAKE_BUILD_TYPE": "Debug"
19+
}
20+
},
21+
{
22+
"name": "Win64-Debug",
23+
"inherits": "default",
24+
"toolchainFile": "${sourceDir}/cmake/x86_64-w64-mingw32-gcc.cmake",
25+
"cacheVariables": {
26+
"CMAKE_BUILD_TYPE": "Debug"
27+
}
28+
}
29+
]
30+
}

0 commit comments

Comments
 (0)