Skip to content

Commit

Permalink
Apply 1.12.0 release update
Browse files Browse the repository at this point in the history
  • Loading branch information
MichalPrincNXP committed Jan 18, 2024
1 parent 5cac701 commit 85d3dd8
Show file tree
Hide file tree
Showing 488 changed files with 24,439 additions and 4,147 deletions.
49 changes: 38 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,55 +3,81 @@ version: 2.1
orbs:
win: circleci/windows@5.0 # The Windows orb gives you everything you need to start using the

commands:
install_dependencies:
parameters:
compiler:
default: ""
type: string
steps:
- run: chmod u+x install_dependencies.sh && ./install_dependencies.sh <<parameters.compiler>>
run_tests:
parameters:
compiler:
default: ""
type: string
steps:
- run: chmod u+x run_tests.sh && ./run_tests.sh <<parameters.compiler>>

jobs:
build-linux-gcc:
machine:
image: ubuntu-2204:2022.04.2 #https://circleci.com/developer/machine/image/ubuntu-2204 pick LTS
steps:
- checkout
- run: chmod u+x install_dependencies.sh && ./install_dependencies.sh
- run: chmod u+x run_tests.sh && ./run_tests.sh
- install_dependencies
- run_tests
- store_artifacts:
path: ./Release/Linux/erpcgen/erpcgen

build-linux-clang:
machine:
image: ubuntu-2204:2022.04.2 #https://circleci.com/developer/machine/image/ubuntu-2204 pick LTS
steps:
- checkout
- run: chmod u+x install_dependencies.sh && ./install_dependencies.sh clang
- run: chmod u+x run_tests.sh && ./run_tests.sh clang
- install_dependencies:
compiler: "clang"
- run_tests:
compiler: "clang"
# - store_artifacts:
# path: ./Release/Linux/erpcgen/erpcgen

build-mac-gcc:
macos:
xcode: 12.5.1 # https://circleci.com/docs/using-macos/#supported-xcode-versions https://en.wikipedia.org/wiki/MacOS_version_history#Releases
resource_class: medium
resource_class: macos.x86.medium.gen2
steps:
- checkout
- run: chmod u+x install_dependencies.sh && ./install_dependencies.sh
- run: chmod u+x run_tests.sh && ./run_tests.sh
- install_dependencies
- run_tests
- store_artifacts:
path: ./Release/Darwin/erpcgen/erpcgen

build-mac-clang:
macos:
xcode: 12.5.1 # https://circleci.com/docs/using-macos/#supported-xcode-versions https://en.wikipedia.org/wiki/MacOS_version_history#Releases
resource_class: medium
resource_class: macos.x86.medium.gen2
steps:
- checkout
- run: chmod u+x install_dependencies.sh && ./install_dependencies.sh clang
- run: chmod u+x run_tests.sh && ./run_tests.sh clang
- install_dependencies:
compiler: "clang"
- run_tests:
compiler: "clang"
# - store_artifacts:
# path: ./Release/Darwin/erpcgen/erpcgen

build-windows-mingw:
executor:
name: win/default
size: large
steps:
- checkout
- run: powershell.exe .\install_dependencies.ps1
- run: powershell.exe .\mingw64\bin\mingw32-make erpcgen
- run: .\mingw64\bin\mingw32-make all
- run: .\mingw64\opt\bin\python3.exe .\test\run_unit_tests.py -m"..\\..\\mingw64\\bin\\mingw32-make"
# - store_artifacts:
# path: ./Release/MINGW64/erpcgen/erpcgen.exe

build-windows-VS:
executor:
name: win/default
Expand All @@ -65,6 +91,7 @@ jobs:
- run: powershell.exe "& 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe' .\erpcgen\VisualStudio_v14\erpcgen.sln /property:Configuration=Release"
- store_artifacts:
path: ./erpcgen/VisualStudio_v14/Release/erpcgen.exe

workflows:
build-workflow:
jobs:
Expand Down
63 changes: 36 additions & 27 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
#https://releases.llvm.org/5.0.2/tools/clang/docs/ClangFormatStyleOptions.html
AlignTrailingComments: true
#https://releases.llvm.org/16.0.0/tools/clang/docs/ClangFormatStyleOptions.html
AlignTrailingComments:
Kind: Always
OverEmptyLines: 0
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortFunctionsOnASingleLine: "Inline"
AllowShortIfStatementsOnASingleLine: false
AllowShortBlocksOnASingleLine: Never
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AlwaysBreakBeforeMultilineStrings: true
BasedOnStyle: "Google"
BasedOnStyle: Google
#BinPackParameters : false
BreakBeforeBinaryOperators: false
BreakBeforeBraces: "Custom"
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakBeforeTernaryOperators: false
ColumnLimit: 120
ContinuationIndentWidth: 4
Expand All @@ -18,54 +20,61 @@ DisableFormat: false
IndentCaseLabels: true
IndentWrappedFunctionNames: false
IndentWidth: 4
Language: "Cpp"
Language: Cpp
MaxEmptyLinesToKeep: 1
PointerBindsToType: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: "ControlStatements"
SpaceBeforeParens: ControlStatements
SpacesBeforeTrailingComments: 1
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
Standard: "Cpp03"
Standard: c++11
TabWidth: 1
UseTab: "Never"
UseTab: Never
AccessModifierOffset: -4
AlignAfterOpenBracket: "Align"
AlignEscapedNewlines: "Left"
AlignOperands: true
AlignAfterOpenBracket: Align
AlignEscapedNewlines: Left
AlignOperands: Align
AllowShortCaseLabelsOnASingleLine: false
AlwaysBreakAfterReturnType: "None"
AlwaysBreakTemplateDeclarations: true
BreakBeforeInheritanceComma: false
BreakConstructorInitializers: "BeforeComma"
AlwaysBreakAfterReturnType: None
AlwaysBreakTemplateDeclarations: Yes
BreakInheritanceList: AfterColon
BreakConstructorInitializers: AfterColon
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 0
Cpp11BracedListStyle: false
FixNamespaceComments: true
NamespaceIndentation: "None"
PointerAlignment: "Right"
SortIncludes: true
SortUsingDeclarations: true
SpacesInAngles: false
NamespaceIndentation: None
PointerAlignment: Right
SortIncludes: Never
SortUsingDeclarations: Lexicographic
SpacesInAngles: Never
SpaceAfterCStyleCast: false
SpaceInEmptyParentheses: false
SpacesInSquareBrackets: false
KeepEmptyLinesAtTheStartOfBlocks: true
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: true
AfterControlStatement: Always
AfterEnum: true
AfterFunction: true
AfterNamespace: false
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
AfterExternBlock: false
BeforeCatch: true
BeforeElse: true
#IncludeBlocks: "Preserve" # for future version of clang
BeforeWhile: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true

IncludeBlocks: Preserve
IncludeCategories:
- Regex: "^<" # system includes
Priority: 10
- Regex: '^"erpc_' # erpc public includes
Priority: 1
CommentPragmas: "#"
9 changes: 9 additions & 0 deletions .clang-format-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#list of ignored files to format
./erpc_c/port/erpc_serial.cpp
./erpcgen/src/cpptemplate/cpptempl.hpp
./erpcgen/src/cpptemplate/cpptempl.cpp
./erpcgen/src/cpptemplate/cpptempl_test.cpp
./erpcgen/test/test_includes/test_includes_union.h
./test/common/gtest/gtest.h
./test/common/gtest/gtest.cpp
./test/common/retarget_cpp_streamed_io.c
11 changes: 5 additions & 6 deletions .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
name: clang-format lint

on: [push]
on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: DoozyX/clang-format-lint-action@v0.10
- uses: actions/checkout@v4
- uses: DoozyX/clang-format-lint-action@v0.16.2
with:
source: '.'
exclude: 'test/common/gtest/gtest.h test/common/gtest/gtest.cpp erpcgen/src/cpptemplate/cpptempl.h erpcgen/src/cpptemplate/cpptempl.cpp erpcgen/src/cpptemplate/cpptempl_test.cpp'
clangFormatVersion: 10
source: '.'
clangFormatVersion: 16
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Copyright 2014-2016 Freescale Semiconductor, Inc.
Copyright 2016-2023 NXP
Copyright 2016-2024 NXP
All rights reserved.

The BSD 3 Clause License
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,9 @@ To install the Python infrastructure for eRPC see instructions in the [erpc_pyth

## Code providing

Repository on Github contains two main branches. __Master__ and __develop__. Code is developed on __develop__ branch. Release version is created via merging __develop__ branch into __master__ branch.
Repository on Github contains two main branches: __main__ and __develop__. Code is developed on __develop__ branch. Release version is created via merging __develop__ branch into __main__ branch.

---
Copyright 2014-2016 Freescale Semiconductor, Inc.

Copyright 2016-2023 NXP
Copyright 2016-2024 NXP
2 changes: 1 addition & 1 deletion doxygen/Doxyfile.erpc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "eRPC API Reference"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = "Rev. 1.11.0"
PROJECT_NUMBER = "Rev. 1.12.0"

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
2 changes: 1 addition & 1 deletion doxygen/Doxyfile.erpcgen
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "eRPC Generator (erpcgen)"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = "Rev. 1.11.0"
PROJECT_NUMBER = "Rev. 1.12.0"

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
8 changes: 6 additions & 2 deletions erpc_c/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ SOURCES += $(ERPC_C_ROOT)/infra/erpc_arbitrated_client_manager.cpp \
$(ERPC_C_ROOT)/infra/erpc_server.cpp \
$(ERPC_C_ROOT)/infra/erpc_simple_server.cpp \
$(ERPC_C_ROOT)/infra/erpc_transport_arbitrator.cpp \
$(ERPC_C_ROOT)/infra/erpc_utils.cpp \
$(ERPC_C_ROOT)/infra/erpc_pre_post_action.cpp \
$(ERPC_C_ROOT)/port/erpc_port_stdlib.cpp \
$(ERPC_C_ROOT)/port/erpc_threading_pthreads.cpp \
$(ERPC_C_ROOT)/port/erpc_serial.cpp \
$(ERPC_C_ROOT)/setup/erpc_arbitrated_client_setup.cpp \
$(ERPC_C_ROOT)/setup/erpc_client_setup.cpp \
$(ERPC_C_ROOT)/setup/erpc_setup_mbf_dynamic.cpp \
Expand All @@ -72,8 +72,11 @@ SOURCES += $(ERPC_C_ROOT)/infra/erpc_arbitrated_client_manager.cpp \
$(ERPC_C_ROOT)/setup/erpc_setup_serial.cpp \
$(ERPC_C_ROOT)/setup/erpc_setup_tcp.cpp \
$(ERPC_C_ROOT)/transports/erpc_inter_thread_buffer_transport.cpp \
$(ERPC_C_ROOT)/transports/erpc_serial_transport.cpp \
$(ERPC_C_ROOT)/transports/erpc_tcp_transport.cpp
ifeq "$(is_mingw)" ""
SOURCES += $(ERPC_C_ROOT)/transports/erpc_serial_transport.cpp \
$(ERPC_C_ROOT)/port/erpc_serial.cpp
endif

HEADERS += $(ERPC_C_ROOT)/config/erpc_config.h \
$(ERPC_C_ROOT)/infra/erpc_arbitrated_client_manager.hpp \
Expand All @@ -91,6 +94,7 @@ HEADERS += $(ERPC_C_ROOT)/config/erpc_config.h \
$(ERPC_C_ROOT)/infra/erpc_static_queue.hpp \
$(ERPC_C_ROOT)/infra/erpc_transport_arbitrator.hpp \
$(ERPC_C_ROOT)/infra/erpc_transport.hpp \
$(ERPC_C_ROOT)/infra/erpc_utils.hpp \
$(ERPC_C_ROOT)/infra/erpc_client_server_common.hpp \
$(ERPC_C_ROOT)/infra/erpc_pre_post_action.h \
$(ERPC_C_ROOT)/port/erpc_setup_extensions.h \
Expand Down
3 changes: 2 additions & 1 deletion erpc_c/infra/erpc_arbitrated_client_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/

#include "erpc_arbitrated_client_manager.hpp"

#include "erpc_transport_arbitrator.hpp"

#if ERPC_THREADS_IS(NONE)
Expand Down Expand Up @@ -73,7 +74,7 @@ void ArbitratedClientManager::performClientRequest(RequestContext &request)
// Send the request.
if (request.getCodec()->isStatusOk() == true)
{
err = m_arbitrator->send(request.getCodec()->getBuffer());
err = m_arbitrator->send(&request.getCodec()->getBufferRef());
request.getCodec()->updateStatus(err);
}

Expand Down
6 changes: 1 addition & 5 deletions erpc_c/infra/erpc_arbitrated_client_manager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,7 @@ class ArbitratedClientManager : public ClientManager
*
* This function initializes object attributes.
*/
ArbitratedClientManager(void)
: ClientManager()
, m_arbitrator(NULL)
{
}
ArbitratedClientManager(void) : ClientManager(), m_arbitrator(NULL) {}

/*!
* @brief Sets the transport arbitrator instance.
Expand Down
Loading

0 comments on commit 85d3dd8

Please sign in to comment.