Skip to content

Commit 7aa56f5

Browse files
Merge pull request #40 from MannyPeterson/develop
Merge for 0.3.5
2 parents 205e661 + fe4f2a3 commit 7aa56f5

62 files changed

Lines changed: 9175 additions & 1815 deletions

Some content is hidden

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

.github/workflows/HeliOS_CI_Workflow.yml

Lines changed: 122 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ name: HeliOS CI Workflow
33
on:
44

55
push:
6-
branches: [ master, develop ]
6+
branches: [ develop ]
77
pull_request:
8-
branches: [ master, develop ]
8+
branches: [ develop ]
99

1010
workflow_dispatch:
1111

1212
jobs:
13-
build-test:
13+
build-test-doc:
1414
runs-on: ubuntu-22.04
1515

1616
steps:
@@ -19,8 +19,125 @@ jobs:
1919

2020
- name: Build HeliOS unit tests...
2121
shell: bash
22-
run: gcc -fdiagnostics-color=always -O0 -ggdb -std=c89 -Wall -Wextra -I ${{github.workspace}}/src -DPOSIX_ARCH_OTHER -DCONFIG_MEMORY_REGION_SIZE_IN_BLOCKS=0x1C20u -DCONFIG_ENABLE_SYSTEM_ASSERT -o ${{github.workspace}}/extras/test/bin/test ${{github.workspace}}/src/*.c ${{github.workspace}}/extras/test/src/test.c
22+
run: gcc -fdiagnostics-color=always -O0 -ggdb -ansi -pedantic -Wall -Wextra -Wno-unused-parameter -I${{github.workspace}}/src -I${{github.workspace}}/test/src -I${{github.workspace}}/test/src/harness -I${{github.workspace}}/test/src/unit -DPOSIX_ARCH_OTHER -DCONFIG_MEMORY_REGION_SIZE_IN_BLOCKS=0x1C20u -DCONFIG_ENABLE_SYSTEM_ASSERT -o${{github.workspace}}/test/bin/test ${{github.workspace}}/src/*.c ${{github.workspace}}/test/src/*.c ${{github.workspace}}/test/src/harness/*.c ${{github.workspace}}/test/src/unit/*.c
2323

2424
- name: Run HeliOS unit tests...
2525
shell: bash
26-
run: ${{github.workspace}}/extras/test/bin/test
26+
run: ${{github.workspace}}/test/bin/test
27+
28+
- name: Install Cppcheck...
29+
shell: bash
30+
run: |
31+
sudo apt update
32+
sudo apt -y install cppcheck
33+
34+
- name: Run Cppcheck...
35+
shell: bash
36+
run: |
37+
cppcheck --quiet --language=c --platform=unix64 --max-ctu-depth=8 --cppcheck-build-dir=${{github.workspace}}/build --template="::{severity} file={file},line={line},col={column}::{message}" --enable=all --std=c89 -DPOSIX_ARCH_OTHER ${{github.workspace}}/src/
38+
39+
- name: Install Doxygen and LaTeX...
40+
shell: bash
41+
run: |
42+
sudo apt update
43+
sudo apt -y install doxygen-latex
44+
45+
- name: Create Doxygen config...
46+
shell: bash
47+
run: |
48+
mkdir ${{github.workspace}}/temp
49+
doxygen -g ${{github.workspace}}/temp/HeliOS.conf
50+
sed -i '/^$/d' ${{github.workspace}}/temp/HeliOS.conf
51+
sed -i '/^#.*/d' ${{github.workspace}}/temp/HeliOS.conf
52+
sed -i '/^ .*/d' ${{github.workspace}}/temp/HeliOS.conf
53+
sed -i 's/ \+/ /g' ${{github.workspace}}/temp/HeliOS.conf
54+
sed -i '/^PROJECT_NAME .*/d' ${{github.workspace}}/temp/HeliOS.conf
55+
echo 'PROJECT_NAME = HeliOS' >> ${{github.workspace}}/temp/HeliOS.conf
56+
sed -i '/^PROJECT_NUMBER .*/d' ${{github.workspace}}/temp/HeliOS.conf
57+
echo 'PROJECT_NUMBER = Kernel 0.3.5' >> ${{github.workspace}}/temp/HeliOS.conf
58+
sed -i '/^PROJECT_LOGO .*/d' ${{github.workspace}}/temp/HeliOS.conf
59+
echo 'PROJECT_LOGO = ${{github.workspace}}/temp/HeliOS_OG_Logo.png' >> ${{github.workspace}}/temp/HeliOS.conf
60+
sed -i '/^OUTPUT_DIRECTORY .*/d' ${{github.workspace}}/temp/HeliOS.conf
61+
echo 'OUTPUT_DIRECTORY = ${{github.workspace}}/temp' >> ${{github.workspace}}/temp/HeliOS.conf
62+
sed -i '/^OPTIMIZE_OUTPUT_FOR_C .*/d' ${{github.workspace}}/temp/HeliOS.conf
63+
echo 'OPTIMIZE_OUTPUT_FOR_C = YES' >> ${{github.workspace}}/temp/HeliOS.conf
64+
sed -i '/^GENERATE_HTML .*/d' ${{github.workspace}}/temp/HeliOS.conf
65+
echo 'GENERATE_HTML = NO' >> ${{github.workspace}}/temp/HeliOS.conf
66+
sed -i '/^GENERATE_LATEX .*/d' ${{github.workspace}}/temp/HeliOS.conf
67+
echo 'GENERATE_LATEX = YES' >> ${{github.workspace}}/temp/HeliOS.conf
68+
sed -i '/^COMPACT_LATEX .*/d' ${{github.workspace}}/temp/HeliOS.conf
69+
echo 'COMPACT_LATEX = YES' >> ${{github.workspace}}/temp/HeliOS.conf
70+
sed -i '/^GENERATE_RTF .*/d' ${{github.workspace}}/temp/HeliOS.conf
71+
echo 'GENERATE_RTF = NO' >> ${{github.workspace}}/temp/HeliOS.conf
72+
sed -i '/^GENERATE_MAN .*/d' ${{github.workspace}}/temp/HeliOS.conf
73+
echo 'GENERATE_MAN = NO' >> ${{github.workspace}}/temp/HeliOS.conf
74+
sed -i '/^GENERATE_XML .*/d' ${{github.workspace}}/temp/HeliOS.conf
75+
echo 'GENERATE_XML = NO' >> ${{github.workspace}}/temp/HeliOS.conf
76+
sed -i '/^REPEAT_BRIEF .*/d' ${{github.workspace}}/temp/HeliOS.conf
77+
echo 'REPEAT_BRIEF = NO' >> ${{github.workspace}}/temp/HeliOS.conf
78+
sed -i '/^FULL_PATH_NAMES .*/d' ${{github.workspace}}/temp/HeliOS.conf
79+
echo 'FULL_PATH_NAMES = NO' >> ${{github.workspace}}/temp/HeliOS.conf
80+
sed -i '/^INPUT .*/d' ${{github.workspace}}/temp/HeliOS.conf
81+
echo 'INPUT = ${{github.workspace}}/src/config.h ${{github.workspace}}/src/HeliOS.h' >> ${{github.workspace}}/temp/HeliOS.conf
82+
sed -i '/^FILE_PATTERNS .*/d' ${{github.workspace}}/temp/HeliOS.conf
83+
echo 'FILE_PATTERNS = *.h' >> ${{github.workspace}}/temp/HeliOS.conf
84+
sed -i '/^RECURSIVE .*/d' ${{github.workspace}}/temp/HeliOS.conf
85+
echo 'RECURSIVE = NO' >> ${{github.workspace}}/temp/HeliOS.conf
86+
sed -i '/^CLASS_DIAGRAMS .*/d' ${{github.workspace}}/temp/HeliOS.conf
87+
echo 'CLASS_DIAGRAMS = NO' >> ${{github.workspace}}/temp/HeliOS.conf
88+
sed -i '/^HAVE_DOT .*/d' ${{github.workspace}}/temp/HeliOS.conf
89+
echo 'HAVE_DOT = NO' >> ${{github.workspace}}/temp/HeliOS.conf
90+
sed -i '/^PROJECT_BRIEF .*/d' ${{github.workspace}}/temp/HeliOS.conf
91+
echo 'PROJECT_BRIEF = ' >> ${{github.workspace}}/temp/HeliOS.conf
92+
sed -i '/^SHOW_HEADERFILE .*/d' ${{github.workspace}}/temp/HeliOS.conf
93+
echo 'SHOW_HEADERFILE = NO' >> ${{github.workspace}}/temp/HeliOS.conf
94+
sed -i '/^SHOW_INCLUDE_FILES .*/d' ${{github.workspace}}/temp/HeliOS.conf
95+
echo 'SHOW_INCLUDE_FILES = NO' >> ${{github.workspace}}/temp/HeliOS.conf
96+
sed -i '/^QUIET .*/d' ${{github.workspace}}/temp/HeliOS.conf
97+
echo 'QUIET = NO' >> ${{github.workspace}}/temp/HeliOS.conf
98+
sed -i '/^WARNINGS .*/d' ${{github.workspace}}/temp/HeliOS.conf
99+
echo 'WARNINGS = YES' >> ${{github.workspace}}/temp/HeliOS.conf
100+
sed -i '/^WARN_LOGFILE .*/d' ${{github.workspace}}/temp/HeliOS.conf
101+
echo 'WARN_LOGFILE = ' >> ${{github.workspace}}/temp/HeliOS.conf
102+
sed -i '/^INLINE_SOURCES .*/d' ${{github.workspace}}/temp/HeliOS.conf
103+
echo 'INLINE_SOURCES = NO' >> ${{github.workspace}}/temp/HeliOS.conf
104+
sed -i '/^VERBATIM_HEADERS .*/d' ${{github.workspace}}/temp/HeliOS.conf
105+
echo 'VERBATIM_HEADERS = NO' >> ${{github.workspace}}/temp/HeliOS.conf
106+
sed -i '/^ENABLE_PREPROCESSING .*/d' ${{github.workspace}}/temp/HeliOS.conf
107+
echo 'ENABLE_PREPROCESSING = YES' >> ${{github.workspace}}/temp/HeliOS.conf
108+
sed -i '/^DEFINED .*/d' ${{github.workspace}}/temp/HeliOS.conf
109+
echo 'DEFINED = DOXYGEN_SHOULD_SKIP_THIS' >> ${{github.workspace}}/temp/HeliOS.conf
110+
sed -i '/^ABBREVIATE_BRIEF .*/d' ${{github.workspace}}/temp/HeliOS.conf
111+
echo 'ABBREVIATE_BRIEF = ' >> ${{github.workspace}}/temp/HeliOS.conf
112+
sort -o ${{github.workspace}}/temp/HeliOS.conf ${{github.workspace}}/temp/HeliOS.conf
113+
cat ${{github.workspace}}/temp/HeliOS.conf
114+
115+
- name: Resize HeliOS logo...
116+
shell: bash
117+
run: |
118+
convert -resize 300 ${{github.workspace}}/extras/HeliOS_OG_Logo.png ${{github.workspace}}/temp/HeliOS_OG_Logo.png
119+
120+
- name: Generate LaTeX...
121+
shell: bash
122+
run: |
123+
doxygen ${{github.workspace}}/temp/HeliOS.conf
124+
sed -i 's~^\\begin{center}\%~\\begin{center}\%\n\\includegraphics{HeliOS_OG_Logo.png}\\\\\n\\vspace*{1cm}~' ${{github.workspace}}/temp/latex/refman.tex
125+
sed -i 's~Generated by Doxygen [0123456789]*.[0123456789]*.[0123456789]*~HeliOS Developer\x27s Guide~' ${{github.workspace}}/temp/latex/refman.tex
126+
sed -i 's~Generated by Doxygen~(C)Copyright 2022 Manny Peterson~' ${{github.workspace}}/temp/latex/refman.tex
127+
128+
- name: Generate PDF from LaTeX...
129+
shell: bash
130+
run: |
131+
cd ${{github.workspace}}/temp/latex
132+
make
133+
cd ${{github.workspace}}
134+
135+
- name: Push PDF to repository...
136+
shell: bash
137+
run: |
138+
cp ${{github.workspace}}/temp/latex/refman.pdf ${{github.workspace}}/doc/HeliOS_Developers_Guide.pdf
139+
git config --global user.name 'Manny Peterson'
140+
git config --global user.email '12462046+MannyPeterson@users.noreply.github.com'
141+
git add ${{github.workspace}}/doc/HeliOS_Developers_Guide.pdf
142+
git commit -m "HeliOS CI Workflow"
143+
git push

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/.vscode/**
2-
/extras/test/bin/**
2+
/test/bin/**
33
!.gitignore
44
!.gitattributes
55
!/.vscode/settings.json
66
!/.vscode/tasks.json
77
!/.vscode/launch.json
8-
!/extras/test/bin/.gitkeep
8+
!/test/bin/.gitkeep

.vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
"name": "HeliOS Unit Test (debug/gdb)",
66
"type": "cppdbg",
77
"request": "launch",
8-
"program": "${workspaceFolder}/extras/test/bin/test",
8+
"program": "${workspaceFolder}/test/bin/test",
99
"args": [],
10-
"cwd": "${workspaceFolder}/extras/test/bin",
10+
"cwd": "${workspaceFolder}/test/bin",
1111
"environment": [],
1212
"MIMode": "gdb",
1313
"miDebuggerPath": "/usr/bin/gdb",

.vscode/settings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"doxdocgen.file.copyrightTag": [
1414
"@copyright",
1515
"HeliOS Embedded Operating System",
16-
"Copyright (C) 2020-2022 Manny Peterson <mannymsp@gmail.com>",
16+
"Copyright (C) 2020-2023 Manny Peterson <mannymsp@gmail.com>",
1717
" ",
1818
"This program is free software: you can redistribute it and/or modify",
1919
"it under the terms of the GNU General Public License as published by",
@@ -41,7 +41,7 @@
4141
"custom"
4242
],
4343
"doxdocgen.file.fileTemplate": "@file {name}",
44-
"doxdocgen.file.versionTag": "@version 0.3.4",
44+
"doxdocgen.file.versionTag": "@version 0.3.5",
4545
"doxdocgen.generic.authorEmail": "mannymsp@gmail.com",
4646
"doxdocgen.generic.authorName": "Manny Peterson",
4747
"doxdocgen.generic.authorTag": "@author {author} ({email})",

.vscode/tasks.json

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,23 @@
88
"-fdiagnostics-color=always",
99
"-O0",
1010
"-ggdb",
11-
"-std=c89",
11+
"-ansi",
12+
"-pedantic",
1213
"-Wall",
1314
"-Wextra",
14-
"-I",
15-
"${workspaceFolder}/src",
15+
"-Wno-unused-parameter",
16+
"-I${workspaceFolder}/src",
17+
"-I${workspaceFolder}/test/src",
18+
"-I${workspaceFolder}/test/src/harness",
19+
"-I${workspaceFolder}/test/src/unit",
1620
"-DPOSIX_ARCH_OTHER",
1721
"-DCONFIG_MEMORY_REGION_SIZE_IN_BLOCKS=0x1C20u",
1822
"-DCONFIG_ENABLE_SYSTEM_ASSERT",
19-
"-o",
20-
"${workspaceFolder}/extras/test/bin/test",
23+
"-o${workspaceFolder}/test/bin/test",
2124
"${workspaceFolder}/src/*.c",
22-
"${workspaceFolder}/extras/test/src/test.c"
25+
"${workspaceFolder}/test/src/*.c",
26+
"${workspaceFolder}/test/src/harness/*.c",
27+
"${workspaceFolder}/test/src/unit/*.c"
2328
],
2429
"options": {
2530
"cwd": "${workspaceFolder}/src"
@@ -31,6 +36,15 @@
3136
"kind": "build",
3237
"isDefault": true
3338
}
39+
},
40+
{
41+
"type": "shell",
42+
"label": "HeliOS Uncrustify",
43+
"command": "find . \\( -name \"*.c\" -o -name \"*.h\" \\) -exec uncrustify -c extras/uncrustify/helios.cfg -lC --no-backup {} +",
44+
"options": {
45+
"cwd": "${workspaceFolder}"
46+
},
47+
"problemMatcher": []
3448
}
3549
],
3650
"version": "2.0.0"

0 commit comments

Comments
 (0)