Skip to content

Commit fac3479

Browse files
committed
V2.2
Release Notes – Codebase Refactor & Modularization * Major project restructuring * Reorganized libraries and source files into a clearer, more modular directory structure. * Moved, renamed, or removed numerous files to reduce duplication and improve maintainability. * Legacy code cleanup * Removed deprecated and unused code from lib-lightset, lib-network, lib-properties, and older display components. * Eliminated redundant parameter and platform-specific files no longer in use. * Centralized common functionality * Migrated shared network, properties, and parameter code into a unified common directory. * Added new utility headers and source files for reusable functionality. * JSON-based configuration support * Added new JSON configuration and parameter files. * Introduced JSON helper utilities and parameter classes to standardize configuration handling and prepare for future extensibility. * DMX, RDM, and pixel refactor * Refactored DMX, RDM device handling, and pixel-related libraries for clearer structure and better separation of responsibilities. * Unified RDM device information handling. * Build system updates * Updated Makefiles, build scripts, and compile_commands.json to reflect the new project structure. * Improved GD32 platform support and hardware abstraction organization. * Network stack reorganization * Flattened lib-network source layout by moving files from subdirectories into a simpler structure. * Improved clarity of EMAC and Linux network interface implementations (no functional changes). * Debug macro consistency * Replaced DEBUG_ENTRY / DEBUG_EXIT macros with function-style DEBUG_ENTRY() / DEBUG_EXIT() across the codebase for consistency and readability. * Overall impact * Significantly improved modularity, readability, and long-term maintainability. * Laid groundwork for future feature expansion and more robust JSON-based configuration across modules.
1 parent 9849db1 commit fac3479

503 files changed

Lines changed: 38319 additions & 24492 deletions

File tree

Some content is hidden

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

.clang-format

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
BasedOnStyle: Google
2+
IndentWidth: 4
3+
TabWidth: 4
4+
UseTab: Never
5+
ColumnLimit: 240
6+
7+
PointerAlignment: Left
8+
ReferenceAlignment: Left
9+
10+
AlignConsecutiveAssignments: false
11+
AlignConsecutiveDeclarations: false
12+
13+
AllowShortFunctionsOnASingleLine: Inline
14+
AllowShortIfStatementsOnASingleLine: true
15+
AllowShortLoopsOnASingleLine: true
16+
17+
BreakBeforeBraces: Allman
18+
19+
DerivePointerAlignment: false
20+
21+
SpacesBeforeTrailingComments: 1
22+
23+
SortIncludes: false
24+
IncludeBlocks: Preserve
25+
26+
Cpp11BracedListStyle: true
27+
28+
AlwaysBreakAfterReturnType: None
29+
AlwaysBreakTemplateDeclarations: MultiLine

.clang-tidy

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
Checks: >
2+
google-*,
3+
readability-identifier-naming,
4+
modernize-redundant-void-arg,
5+
modernize-concat-nested-namespaces,
6+
modernize-use-nullptr,
7+
modernize-use-default-member-init,
8+
modernize-use-override,
9+
-google-runtime-references,
10+
-clang-analyzer-*,
11+
-misc-unused-include
12+
13+
CheckOptions:
14+
- key: readability-identifier-naming.ClassCase
15+
value: CamelCase
16+
17+
- key: readability-identifier-naming.StructCase
18+
value: CamelCase
19+
20+
- key: readability-identifier-naming.FunctionCase
21+
value: CamelCase
22+
23+
- key: readability-identifier-naming.IgnoreMainLikeFunctions
24+
value: 'true'
25+
26+
- key: readability-identifier-naming.IgnoreOverrideFunctions
27+
value: 'true'
28+
29+
- key: readability-identifier-naming.FunctionIgnoredRegexp
30+
value: '^([A-Za-z0-9_]+_(IRQHandler|Handler))$'
31+
32+
- key: readability-identifier-naming.VariableCase
33+
value: lower_case
34+
35+
- key: readability-identifier-naming.ParameterCase
36+
value: lower_case
37+
38+
- key: readability-identifier-naming.PrivateMemberCase
39+
value: lower_case
40+
- key: readability-identifier-naming.PrivateMemberSuffix
41+
value: _
42+
43+
- key: readability-identifier-naming.PublicMemberCase
44+
value: lower_case
45+
46+
- key: readability-identifier-naming.ConstantCase
47+
value: CamelCase
48+
- key: readability-identifier-naming.ConstantPrefix
49+
value: k
50+
51+
- key: readability-identifier-naming.GlobalConstantCase
52+
value: CamelCase
53+
- key: readability-identifier-naming.GlobalConstantPrefix
54+
value: k
55+
56+
- key: readability-identifier-naming.LocalConstantCase
57+
value: CamelCase
58+
- key: readability-identifier-naming.LocalConstantPrefix
59+
value: k
60+
61+
- key: readability-identifier-naming.EnumCase
62+
value: CamelCase
63+
64+
- key: readability-identifier-naming.EnumConstantCase
65+
value: CamelCase
66+
- key: readability-identifier-naming.EnumConstantPrefix
67+
value: k
68+
69+
- key: readability-identifier-naming.EnumConstantMemberCase
70+
value: CamelCase
71+
- key: readability-identifier-naming.EnumConstantMemberPrefix
72+
value: k
73+
74+
- key: readability-identifier-naming.MacroDefinitionCase
75+
value: UPPER_CASE
76+
77+
- key: readability-identifier-naming.TreatAsConstant
78+
value: 'constexpr'
79+
80+
WarningsAsErrors: ''
81+
HeaderFilterRegex: '.*'
82+
FormatStyle: none

.clangd

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CompileFlags:
2+
CompilationDatabase: .
3+
4+
Diagnostics:
5+
ClangTidy:
6+
Add: []
7+

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,4 @@
5151
*.bin
5252
*.list
5353
*.map
54+
compile_commands.json

bootloader-tftp/.cproject

Lines changed: 5 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -11,69 +11,23 @@
1111
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
1212
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
1313
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
14+
<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
15+
<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
1416
</extensions>
1517
</storageModule>
1618
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
1719
<configuration artifactName="${ProjName}" buildProperties="" description="" id="cdt.managedbuild.toolchain.gnu.cross.base.1729740612" name="GD32" optionalBuildProperties="org.eclipse.cdt.docker.launcher.containerbuild.property.selectedvolumes=,org.eclipse.cdt.docker.launcher.containerbuild.property.volumes=" parent="org.eclipse.cdt.build.core.emptycfg">
1820
<folderInfo id="cdt.managedbuild.toolchain.gnu.cross.base.1729740612.1702768994" name="/" resourcePath="">
19-
<toolChain id="cdt.managedbuild.toolchain.gnu.cross.base.384655556" name="Cross GCC" superClass="cdt.managedbuild.toolchain.gnu.cross.base">
21+
<toolChain id="cdt.managedbuild.toolchain.gnu.cross.base.384655556" name="Cross GCC">
2022
<option id="cdt.managedbuild.option.gnu.cross.prefix.1044316774" name="Prefix" superClass="cdt.managedbuild.option.gnu.cross.prefix"/>
2123
<option id="cdt.managedbuild.option.gnu.cross.path.1861775566" name="Path" superClass="cdt.managedbuild.option.gnu.cross.path"/>
22-
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.402731857" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>
23-
<builder arguments="-f Makefile.GD32" id="cdt.managedbuild.builder.gnu.cross.335424744" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.builder.gnu.cross"/>
24-
<tool id="cdt.managedbuild.tool.gnu.cross.c.compiler.1261483830" name="Cross GCC Compiler" superClass="cdt.managedbuild.tool.gnu.cross.c.compiler">
25-
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.c.compiler.option.preprocessor.def.symbols.481966924" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" useByScannerDiscovery="false" valueType="definedSymbols">
26-
<listOptionValue builtIn="false" value="GD32"/>
27-
<listOptionValue builtIn="false" value="DISABLE_FS"/>
28-
<listOptionValue builtIn="false" value="DISABLE_TFTP"/>
29-
<listOptionValue builtIn="false" value="BOARD_GD32F450VI"/>
30-
<listOptionValue builtIn="false" value="GD32F450"/>
31-
</option>
32-
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="true" id="gnu.c.compiler.option.include.paths.865033154" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath"/>
33-
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1661744720" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
34-
</tool>
35-
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.compiler.751310327" name="Cross G++ Compiler" superClass="cdt.managedbuild.tool.gnu.cross.cpp.compiler">
36-
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.cpp.compiler.option.preprocessor.def.1309099158" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" useByScannerDiscovery="false" valueType="definedSymbols">
37-
<listOptionValue builtIn="false" value="GD32"/>
38-
<listOptionValue builtIn="false" value="DISABLE_FS"/>
39-
<listOptionValue builtIn="false" value="DISABLE_TFTP"/>
40-
<listOptionValue builtIn="false" value="GD32F450"/>
41-
<listOptionValue builtIn="false" value="BOARD_GD32F450VI"/>
42-
</option>
43-
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.cpp.compiler.option.include.paths.318981079" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
44-
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/firmware-template-gd32/include}&quot;"/>
45-
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/firmware-template-gd32/template}&quot;"/>
46-
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lib-gd32/include}&quot;"/>
47-
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lib-gd32/gd32f4xx/CMSIS}&quot;"/>
48-
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lib-gd32/gd32f4xx/CMSIS/GD/GD32F4xx/Include}&quot;"/>
49-
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lib-gd32/gd32f4xx/GD32F4xx_standard_peripheral/Include}&quot;"/>
50-
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lib-display/include}&quot;"/>
51-
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lib-hal/include}&quot;"/>
52-
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lib-network/include}&quot;"/>
53-
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/include}&quot;"/>
54-
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lib-remoteconfig/include}&quot;"/>
55-
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lib-flashcodeinstall/include}&quot;"/>
56-
</option>
57-
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.762735176" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
58-
</tool>
59-
<tool id="cdt.managedbuild.tool.gnu.cross.c.linker.1388626850" name="Cross GCC Linker" superClass="cdt.managedbuild.tool.gnu.cross.c.linker"/>
60-
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.linker.1901957874" name="Cross G++ Linker" superClass="cdt.managedbuild.tool.gnu.cross.cpp.linker">
61-
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1755995831" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
62-
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
63-
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
64-
</inputType>
65-
</tool>
66-
<tool id="cdt.managedbuild.tool.gnu.cross.archiver.1863399901" name="Cross GCC Archiver" superClass="cdt.managedbuild.tool.gnu.cross.archiver"/>
67-
<tool id="cdt.managedbuild.tool.gnu.cross.assembler.448966751" name="Cross GCC Assembler" superClass="cdt.managedbuild.tool.gnu.cross.assembler">
68-
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="true" id="gnu.both.asm.option.include.paths.1008233834" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath"/>
69-
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1136187278" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
70-
</tool>
24+
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.402731857" isAbstract="false" osList="all"/>
25+
<builder arguments="-f Makefile.GD32" id="cdt.managedbuild.builder.gnu.cross.335424744" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true"/>
7126
</toolChain>
7227
</folderInfo>
7328
<sourceEntries>
7429
<entry excluding="lib|firmware" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
7530
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="firmware"/>
76-
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="lib"/>
7731
</sourceEntries>
7832
</configuration>
7933
</storageModule>

bootloader-tftp/.settings/language.settings.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
66
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
77
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuildCommandParser" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser" keep-relative-paths="false" name="CDT GCC Build Output Parser" parameter="([^/\\\\]*)((g?cc)|([gc]\+\+)|(clang))" prefer-non-shared="true"/>
8-
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-1022562313389683746" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
9-
<language-scope id="org.eclipse.cdt.core.gcc"/>
10-
<language-scope id="org.eclipse.cdt.core.g++"/>
11-
</provider>
128
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
139
</extension>
1410
</configuration>

bootloader-tftp/Makefile.GD32

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@ LIBS=
1313
include Common.mk
1414
include ../firmware-template-gd32/Rules.mk
1515

16+
1617
prerequisites:

0 commit comments

Comments
 (0)