[修改] 增加freeRTOS

1. 版本FreeRTOSv202212.01,命名为kernel;
This commit is contained in:
2023-05-06 16:43:01 +00:00
commit a345df017b
20944 changed files with 11094377 additions and 0 deletions

View File

@ -0,0 +1,88 @@
# Taken from amazon-freertos repository
cmake_minimum_required(VERSION 3.13)
set(BINARY_DIR ${CMAKE_BINARY_DIR})
file(GLOB_RECURSE cov_files "${BINARY_DIR}/*.gcda")
if(cov_files)
file(REMOVE ${cov_files})
endif()
# reset coverage counters
execute_process(COMMAND lcov
--directory ${CMAKE_BINARY_DIR}
--base-directory ${CMAKE_BINARY_DIR}
--zerocounters
COMMAND mkdir -p ${CMAKE_BINARY_DIR}/coverage
)
# make the initial/baseline capture a zeroed out files
execute_process(COMMAND lcov
--directory ${CMAKE_BINARY_DIR}
--base-directory ${CMAKE_BINARY_DIR}
--initial
--capture
--rc lcov_branch_coverage=1
--rc genhtml_branch_coverage=1
--output-file=${CMAKE_BINARY_DIR}/base_coverage.info
)
file(GLOB files "${CMAKE_BINARY_DIR}/bin/tests/*")
set(REPORT_FILE ${CMAKE_BINARY_DIR}/utest_report.txt)
file(WRITE ${REPORT_FILE} "")
# execute all files in bin directory, gathering the output to show it in CI
foreach(testname ${files})
get_filename_component(test ${testname} NAME_WLE)
message("Running ${testname}")
execute_process(COMMAND ${testname} OUTPUT_FILE ${CMAKE_BINARY_DIR}/${test}_out.txt)
file(READ ${CMAKE_BINARY_DIR}/${test}_out.txt CONTENTS)
file(APPEND ${REPORT_FILE} "${CONTENTS}")
endforeach()
# generate Junit style xml output
execute_process(COMMAND ruby
${CMOCK_DIR}/vendor/unity/auto/parse_output.rb
-xml ${REPORT_FILE}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
# capture data after running the tests
execute_process(COMMAND lcov
--capture
--rc lcov_branch_coverage=1
--rc genhtml_branch_coverage=1
--base-directory ${CMAKE_BINARY_DIR}
--directory ${CMAKE_BINARY_DIR}
--output-file ${CMAKE_BINARY_DIR}/second_coverage.info
)
# compile baseline results (zeros) with the one after running the tests
execute_process(COMMAND lcov
--base-directory ${CMAKE_BINARY_DIR}
--directory ${CMAKE_BINARY_DIR}
--add-tracefile ${CMAKE_BINARY_DIR}/base_coverage.info
--add-tracefile ${CMAKE_BINARY_DIR}/second_coverage.info
--output-file ${CMAKE_BINARY_DIR}/coverage.info
--no-external
--rc lcov_branch_coverage=1
)
# remove source files from dependencies and unit tests
execute_process(COMMAND lcov
--rc lcov_branch_coverage=1
--remove ${CMAKE_BINARY_DIR}/coverage.info *dependency* *unit-test* /usr* */source/ota.c *CMakeCCompilerId* */source/portable/os/ota_os_posix.c
--output-file ${CMAKE_BINARY_DIR}/coverage.info
)
# generate html report
execute_process(COMMAND genhtml
--rc lcov_branch_coverage=1
--branch-coverage
--output-directory ${CMAKE_BINARY_DIR}/coverage
${CMAKE_BINARY_DIR}/coverage.info
)
# output coverage summary to console
execute_process(COMMAND lcov
--rc lcov_branch_coverage=1
--list ${CMAKE_BINARY_DIR}/coverage.info
)

View File

@ -0,0 +1,168 @@
# Taken from amazon-freertos repository
#function to create the test executable
function(create_test test_name
test_src
link_list
dep_list
include_list)
set(mocks_dir "${CMAKE_CURRENT_BINARY_DIR}/mocks")
include (CTest)
get_filename_component(test_src_absolute ${test_src} ABSOLUTE)
add_custom_command(OUTPUT ${test_name}_runner.c
COMMAND ruby
${CMOCK_DIR}/vendor/unity/auto/generate_test_runner.rb
${MODULE_ROOT_DIR}/tools/cmock/project.yml
${test_src_absolute}
${test_name}_runner.c
DEPENDS ${test_src}
)
add_executable(${test_name} ${test_src} ${test_name}_runner.c)
set_target_properties(${test_name} PROPERTIES
COMPILE_FLAG "-O0 -ggdb"
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/tests"
INSTALL_RPATH_USE_LINK_PATH TRUE
LINK_FLAGS " \
-Wl,-rpath,${CMAKE_BINARY_DIR}/lib \
-Wl,-rpath,${CMAKE_CURRENT_BINARY_DIR}/lib"
)
target_include_directories(${test_name} PUBLIC
${mocks_dir}
${include_list}
)
target_link_directories(${test_name} PUBLIC
${CMAKE_CURRENT_BINARY_DIR}
)
# link all libraries sent through parameters
foreach(link IN LISTS link_list)
target_link_libraries(${test_name} ${link})
endforeach()
# add dependency to all the dep_list parameter
foreach(dependency IN LISTS dep_list)
add_dependencies(${test_name} ${dependency})
target_link_libraries(${test_name} ${dependency})
endforeach()
target_link_libraries(${test_name} -lgcov unity)
target_link_directories(${test_name} PUBLIC
${CMAKE_CURRENT_BINARY_DIR}/lib
)
add_test(NAME ${test_name}
COMMAND ${CMAKE_BINARY_DIR}/bin/tests/${test_name}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
endfunction()
# Run the C preprocessor on target files.
# Takes a CMAKE list of arguments to pass to the C compiler
function(preprocess_mock_list mock_name file_list compiler_args)
set_property(GLOBAL PROPERTY ${mock_name}_processed TRUE)
foreach (target_file IN LISTS file_list)
# Has to be TARGET ALL so the file is pre-processed before CMOCK
# is executed on the file.
add_custom_command(OUTPUT ${target_file}.backup
COMMAND scp ${target_file} ${target_file}.backup
VERBATIM COMMAND ${CMAKE_C_COMPILER} -E ${compiler_args} ${target_file} > ${target_file}.out
)
add_custom_target(pre_${mock_name}
COMMAND mv ${target_file}.out ${target_file}
DEPENDS ${target_file}.backup
)
endforeach()
# Clean up temporary files that were created.
# First we test to see if the backup file still exists. If it does we revert
# the change made to the original file.
foreach (target_file IN LISTS file_list)
add_custom_command(TARGET ${mock_name}
POST_BUILD
COMMAND test ! -e ${target_file}.backup || mv ${target_file}.backup ${target_file}
)
endforeach()
endfunction()
# Generates a mock library based on a module's header file
# places the generated source file in the build directory
# @param mock_name: name of the target name
# @param mock_list list of header files to mock
# @param cmock_config configuration file of the cmock framework
# @param mock_include_list include list for the target
# @param mock_define_list special definitions to control compilation
function(create_mock_list mock_name
mock_list
cmock_config
mock_include_list
mock_define_list)
set(mocks_dir "${CMAKE_CURRENT_BINARY_DIR}/mocks")
add_library(${mock_name} SHARED)
foreach (mock_file IN LISTS mock_list)
get_filename_component(mock_file_abs
${mock_file}
ABSOLUTE
)
get_filename_component(mock_file_name
${mock_file}
NAME_WLE
)
get_filename_component(mock_file_dir
${mock_file}
DIRECTORY
)
add_custom_command (
OUTPUT ${mocks_dir}/mock_${mock_file_name}.c
COMMAND ruby
${CMOCK_DIR}/lib/cmock.rb
-o${cmock_config} ${mock_file_abs}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
target_sources(${mock_name} PUBLIC
${mocks_dir}/mock_${mock_file_name}.c
)
target_include_directories(${mock_name} PUBLIC
${mock_file_dir}
)
endforeach()
target_include_directories(${mock_name} PUBLIC
${mocks_dir}
${mock_include_list}
)
set_target_properties(${mock_name} PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib
POSITION_INDEPENDENT_CODE ON
)
target_compile_definitions(${mock_name} PUBLIC
${mock_define_list}
)
target_link_libraries(${mock_name} cmock unity)
endfunction()
function(create_real_library target
src_file
real_include_list
mock_name)
add_library(${target} STATIC
${src_file}
)
target_include_directories(${target} PUBLIC
${real_include_list}
)
set_target_properties(${target} PROPERTIES
COMPILE_FLAGS "-Wall -Wextra -Wpedantic -Wconversion \
-fprofile-arcs -ftest-coverage -fprofile-generate \
-Wno-unused-but-set-variable"
LINK_FLAGS "-fprofile-arcs -ftest-coverage \
-fprofile-generate "
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib
)
if(NOT(mock_name STREQUAL ""))
add_dependencies(${target} ${mock_name})
target_link_libraries(${target}
-l${mock_name}
-lgcov
)
endif()
endfunction()

View File

@ -0,0 +1,26 @@
# Taken from amazon-freertos repository
:cmock:
:mock_prefix: mock_
:when_no_prototypes: :warn
:enforce_strict_ordering: TRUE
:plugins:
- :ignore
- :ignore_arg
- :expect_any_args
- :array
- :callback
- :return_thru_ptr
:callback_include_count: true # include a count arg when calling the callback
:callback_after_arg_check: false # check arguments before calling the callback
:treat_as:
uint8: HEX8
uint16: HEX16
uint32: UINT32
int8: INT8
bool: UINT8
:includes: # This will add these includes to each mock.
- <stdbool.h>
- <stdint.h>
:treat_externs: :exclude # Now the extern-ed functions will be mocked.
:weak: __attribute__((weak))
:treat_externs: :include

View File

@ -0,0 +1,79 @@
# Static code analysis for AWS IoT Over-the-air Update Library
This directory is made for the purpose of statically testing the MISRA C:2012 compliance of AWS IoT Over-the-air Update Library using
[Synopsys Coverity](https://www.synopsys.com/software-integrity/security-testing/static-analysis-sast.html) static analysis tool.
To that end, this directory provides a [configuration file](https://github.com/aws/ota-for-aws-iot-embedded-sdk/blob/main/tools/coverity/misra.config) to use when
building a binary for the tool to analyze.
> **Note**
For generating the report as outlined below, we have used Coverity version 2018.09.
For details regarding the suppressed violations in the report (which can be generated using the instructions described below), please
see the [MISRA.md](https://github.com/aws/ota-for-aws-iot-embedded-sdk/blob/main/MISRA.md) file.
## Getting Started
### Prerequisites
You can run this on a platform supported by Coverity. The list and other details can be found [here](https://sig-docs.synopsys.com/polaris/topics/c_coverity-compatible-platforms.html).
To compile and run the Coverity target successfully, you must have the following:
1. CMake version > 3.13.0 (You can check whether you have this by typing `cmake --version`)
2. GCC compiler
- You can see the downloading and installation instructions [here](https://gcc.gnu.org/install/).
3. Download the repo and include the submodules using the following commands.
- `git clone --recurse-submodules git@github.com:aws/ota-for-aws-iot-embedded-sdk.git ./ota-for-aws-iot-embedded-sdk`
- `cd ./ota-for-aws-iot-embedded-sdk`
- `git submodule update --checkout --init --recursive`
### To build and run coverity:
Go to the root directory of the library and run the following commands in terminal:
1. Update the compiler configuration in Coverity
~~~
cov-configure --force --compiler cc --comptype gcc
~~~
2. Create the build files using CMake in a `build` directory
~~~
cmake -B build -S test
~~~
3. Go to the build directory and copy the coverity configuration file
~~~
cd build/
~~~
4. Build the static analysis target
~~~
cov-build --emit-complementary-info --dir cov-out make coverity_analysis
~~~
5. Go to the Coverity output directory (`cov-out`) and begin Coverity static analysis
~~~
cd cov-out/
cov-analyze --dir . --coding-standard-config ../../tools/coverity/misra.config --tu-pattern "file('.*/source/.*')"
~~~
6. Format the errors in HTML format so that it is more readable while removing the test and build directory from the report
~~~
cov-format-errors --dir . --file "source" --exclude-files '(/build/|/test/|/dependency/|/portable/)' --html-output html-out;
~~~
7. Format the errors in JSON format to perform a jq query to get a simplified list of any exceptions.
NOTE: A blank output means there are no defects that aren't being suppressed by the config or inline comments.
~~~
cov-format-errors --dir . --file "source" --exclude-files '(/build/|/test/|/dependency/|/portable/)' --json-output-v2 defects.json;
echo -e "\n-------------------------Non-Suppresed Deviations, if any, Listed Below-------------------------\n";
jq '.issues[] | .events[] | .eventTag ' defects.json | sort | uniq -c | sort -nr;
echo -e "\n-------------------------Non-Suppresed Deviations, if any, Listed Above-------------------------\n";
~~~
For your convenience the commands above are below to be copy/pasted into a UNIX command friendly terminal.
~~~
cov-configure --force --compiler cc --comptype gcc;
cmake -B build -S test;
cd build/;
cov-build --emit-complementary-info --dir cov-out make coverity_analysis;
cd cov-out/
cov-analyze --dir . --coding-standard-config ../../tools/coverity/misra.config --tu-pattern "file('.*/source/.*')";
cov-format-errors --dir . --file "source" --exclude-files '(/build/|/test/|/dependency/|/portable/)' --html-output html-out;
cov-format-errors --dir . --file "source" --exclude-files '(/build/|/test/|/dependency/|/portable/)' --json-output-v2 defects.json;
echo -e "\n-------------------------Non-Suppresed Deviations, if any, Listed Below-------------------------\n";
jq '.issues[] | .events[] | .eventTag ' defects.json | sort | uniq -c | sort -nr;
echo -e "\n-------------------------Non-Suppresed Deviations, if any, Listed Above-------------------------\n";
cd ../../;
~~~
You should now have the HTML formatted violations list in a directory named `build/cov-out/html-output`.
With the current configuration and the provided project, you should not see any deviations.

View File

@ -0,0 +1,54 @@
// MISRA C-2012 Rules
{
version : "2.0",
standard : "c2012",
title: "Coverity MISRA Configuration",
deviations : [
// Disable the following rules.
{
deviation: "Directive 4.5",
reason: "Allow names that MISRA considers ambiguous (such as variable cborEncoder and cborParser)."
},
{
deviation: "Directive 4.8",
reason: "Allow inclusion of unused types. Library headers may define types that are used only by application files or specific port files."
},
{
deviation: "Directive 4.9",
reason: "Allow inclusion of function like macros. Logging is done using function like macros."
},
{
deviation: "Rule 2.4",
reason: "Allow unused tags. Some compilers warn if struct/enum types are not tagged."
},
{
deviation: "Rule 2.5",
reason: "Allow unused macros. Library headers may define macros intended for the application's use, but not used by a specific file."
},
{
deviation: "Rule 3.1",
reason: "Allow nested comments. Documentation blocks contain comments for example code."
},
{
deviation: "Rule 8.6",
reason: "There is only one occurance of this violation, the MISRA.md file contains more information about it. Inline suppression is not removing the violation, due to this we have added it to the global overide list."
},
{
deviation: "Rule 8.7",
reason: "API functions are not used by the library; however, they must be externally visible in order to be used by an application."
},
{
deviation: "Rule 8.9",
reason: "For ease, configuration parameters are defined at a global scope even when used only once."
},
{
deviation: "Rule 8.13",
reason: "There is only one occurance of this violation, the MISRA.md file contains more information about it. Inline suppression is not removing the violation, due to this we have added it to the global overide list."
},
{
deviation: "Rule 11.5",
reason: "Allow casts from void *. Contexts are passed as void * and must be cast to the correct data type before use."
}
]
}

View File

@ -0,0 +1,914 @@
123456789
abcdefghijklmnopqrstuvwxyz
abortupdate
activatenewimage
activejobname
addrinfo
addtogroup
afr
agentshutdowncleanup
allocateaddrinfolinkedlist
alpn
alpnprotoslen
api
apis
app
appfirmwareversion
ascii
asciidigits
attemptsdone
attr
auth
authscheme
authschememaxsize
authschemesize
aws
backoff
backoffdelay
basedefs
bitmaplen
bitmask
blockbitmapmaxsize
blockbitmapsize
blockid
blockindex
blockindex
blockoffset
blocksize
blocksremaining
bodylen
bool
bootloader
br
buf
buffersizebytes
bufferused
buildstatusmessagereceiving
bytesreceived
bytessent
bytestorecv
bytestosend
byteswritten
c89
c90
ca
cbmc
cbor
cborarray
cborerror
cbormap
cbormaptype
cborstring
cborvalue
cborwork
certfile
certfilepath
certfilepathmaxsize
certfilepathsize
checkdatatype
checkforupdate
cli
clienttoken
clienttokensize
closefile
closefilehandler
closeresult
cmock
co
colspan
com
completecallback
cond
config
configassert
configpagestyle
configprintf
configs
configurably
connectsuccessindex
const
constantspage
container
contextbase
contextbaseaddr
contextsize
copydoc
corejson
coremqtt
couldn
coverity
cpu
cr
createfile
createfileforrx
crt
crypto
csdk
css
currblock
currentstate
cwd
datablock
datacallback
datahandlercleanup
datalength
decodeandstoredatablock
decodeandstorekey
decodefileblock
decodemem
decodememmaxsize
decodememorysize
deduplicate
defaultotacompletecallback
defaultotacompletecallback
defgroup
deinit
deinitialize
deinitializing
deletetimer
destlen
destoffset
developerguide
didn
div
dns
docmodel
docparam
docparseerrduplicatesnotallowed
docparseerrfieldtypemismatch
docparseerrinvalidmodelparamtype
docparseerrinvalidnumchar
docparseerrinvalidtoken
docparseerrmalformeddoc
docparseerrnone
docparseerrnullbodypointer
docparseerrnulldocpointer
docparseerrnullmodelpointer
docparseerroutofmemory
docparseerrparamkeynotinmodel
docparseerrtoomanyparams
docparseerrunknown
docparseerruserbufferinsuffcient
doesn't
doxygen
eagain
ecdsa
eevent
encodedlen
encodedsize
endcode
endcond
enddot
endian
endif
enum
enums
errno
errornumber
establishconnection
ethernet
eventdata
eventid
eventmsg
ewouldblock
executehandler
executionnumber
expectedstatus
expectedtype
extractandstorearray
extractparameter
failedwithval
faqmem
fclose
fd
fileattributes
filebitmapsize
fileblock
filecontext
filehandle
fileid
fileindex
filelabel
fileparameters
filepath
filepathmaxsize
filepaths
filesize
filetype
filetypeid
fillcolor
fixme
fontname
fontsize
fopen
freefilecontextmem
freertos
freertosipconfig
freertos.org
functionname
functionpage
functionpointers
functionspage
functiontofail
gcc
generater
getaddrinfo
getagentstate
getcwd
getfilecontextfromjob
getimagestate
getpacketsdropped
getpacketsprocessed
getpacketsqueued
getpacketsreceived
getplatformimagestate
github
handlecustomjob
handledatafromhttpservice
handlejobparsingerror
handlenetworkerrors
handlereconnect
handleselftestjobdoc
handleunexpectedevents
helvetica
hostnamelength
html
http
httpdeinit
httpinit
httpinterface
httprequest
https
iblocksize
ifndef
imagestate
implemenation
inc
ingestdatablock
ingestdatablockcleanup
ingestresultbaddata
ingestresultbadfilehandle
ingestresultblockoutofrange
ingestresultfileclosefail
ingestresultfilecomplete
ingestresultfilecomplete
ingestresultnodecodememory
ingestresultnullcontext
ingestresultnullinput
ingestresultnullresultpointer
ingestresultsigcheckfail
ingestresultunexpectedblock
ingestresultuninitialized
ingestresultwriteblockfailed
ingroup
init
initdocmodel
initfilehandler
initfiletransfer
initializeappbuffers
initializelocalbuffers
inout
inprogress
inselftesthandler
int
intel
ioffset
iot
ip
ip
isinselftest
iso
isotainterfaceinited
jobcallback
jobdoc
jobdoclength
jobdocument
jobid
jobidlength
jobname
jobnamemaxsize
jobnotificationhandler
jobreasonaborted
jobreasonaccepted
jobreasonreceiving
jobreasonrejected
jobreasonselftestactive
jobreasonsigcheckpassed
jobstatusfailedwithval
jobstatusinprogress
jobstatusrejected
json
jsondoc
lastbyte
lastupdatedat
len
lf
li
linux
logdebug
logerror
loginfo
logpath
logwarn
longjmp
mainpage
malloc
mac
maxattempts
maxfragmentlength
mcu
md
mem
memcpy
messagebuffersize
messagelength
messagelevel
messagesize
mfln
min
misra
mit
mockoseventsendthenstop
modelparams
modelparamtype
modelparamtypestringindoc
mqtt
mqttinterface
mqttpublish
mqttsubscribe
mqttunsubscribe
msec
msgbuffersize
msgsize
msgtailsize
msgvalidity
mutexhandle
mynetworkrecvimplementation
mynetworksendimplementation
mytcpsocketcontext
mythreadsleepfunction
mytime
mytimefunction
mytlscontext
nan
nano
nanosleep
netmask
networkcontext
newversion
nextjittermax
nextstate
noninfringement
numblocks
numblocksrequest
numjobparams
numjobstatusmappings
nummodelparams
numofblocksrequested
numofblockstoreceive
numpadding
numstrings
numwhitespace
ok
onlinepubs
opendns
opengroup
openssl
openssl_invalid_parameter
org
os
ota
ota_mqtt_component
otaagent
otaagenteventclosefile
otaagenteventcreatefile
otaagenteventcreatefile
otaagenteventmax
otaagenteventreceivedfileblock
otaagenteventreceivedjobdocument
otaagenteventrequestfileblock
otaagenteventrequestjobdocument
otaagenteventrequesttimer
otaagenteventresume
otaagenteventshutdown
otaagenteventstart
otaagenteventstartselftest
otaagenteventsuspend
otaagenteventuserabort
otaagentstatecreatingfile
otaagentstatenotready
otaagentstatenotready
otaagentstateready
otaagentstateshuttingdown
otaagentstatestopped
otaagentstatestopped
otaagentstatesuspended
otaagentstatewaitingforjob
otaagentstubs
otaappcallback
otabuffer
otacallback
otaclose
otaconfigallowdowngrade
otacontrolinterface
otaerr
otaerractivatefailed
otaerragentstopped
otaerrcleanupcontrolfailed
otaerrcleanupdatafailed
otaerrdowngradenotallowed
otaerrfailedtodecodecbor
otaerrfailedtoencodecbor
otaerrfilesizeoverflow
otaerrimagestatemismatch
otaerrinitfiletransferfailed
otaerrinvalidarg
otaerrinvaliddataprotocol
otaerrjobparsererror
otaerrmomentumabort
otaerrnoactivejob
otaerrnone
otaerrpanic
otaerrrequestfileblockfailed
otaerrrequestjobfailed
otaerrsamefirmwareversion
otaerrsignaleventfailed
otaerruninitialized
otaerrupdatejobstatusfailed
otaerruserabort
otaeventbufferget
otaeventbufferget
otaeventtorecv
otaeventtosend
otahttpdeinit
otahttpdeinitfailed
otahttpinitfailed
otahttppage
otahttprequestfailed
otahttpsectionoverview
otahttpsuccess
otaimagestateaborted
otaimagestateaccepted
otaimagestaterejected
otaimagestatetesting
otaimagestateunknown
otainterface
otainterfaces
otajobdocmodelparamstructure
otajobeventactivate
otajobeventfail
otajobeventnoactivejob
otajobeventparsecustomjob
otajobeventprocessed
otajobeventreceivedjob
otajobeventselftestfailed
otajobeventstarttest
otajobeventupdatecomplete
otajobparseerrbadmodelinitparams
otajobparseerrnoactivejobs
otajobparseerrnocontextavailable
otajobparseerrnonconformingjobdoc
otajobparseerrnone
otajobparseerrnulljob
otajobparseerrunknown
otajobparseerrupdatecurrentjob
otajobparseerrzerofilesize
otalastimagestate
otamqttpage
otamqttpublishfailed
otamqttsectionoverview
otamqttsubscribefailed
otamqttsuccess
otamqttunsubscribefailed
otanumoftimers
otaoseventqueuecreatefailed
otaoseventqueuedeletefailed
otaoseventqueuereceivefailed
otaoseventqueuesendfailed
otaosfipage
otaosfisectionoverview
otaossuccess
otaostimercreatefailed
otaostimerdeletefailed
otaostimerrestartfailed
otaostimerstartfailed
otaostimerstopfailed
otapacketsdropped
otapacketsprocessed
otapacketsqueued
otapacketsreceived
otapalabortfailed
otapalactivatefailed
otapalbadimagestate
otapalbadsignercert
otapalbootinfocreatefailed
otapalcommitfailed
otapalfileabort
otapalfileclose
otapalimagestateinvalid
otapalimagestatependingcommit
otapalimagestateunknown
otapalimagestatevalid
otapalnullfilecontext
otapaloutofmemory
otapalpage
otapalrejectfailed
otapalrxfilecreatefailed
otapalrxfiletoolarge
otapalsectionoverview
otapalsignaturecheckfailed
otapalsuberr
otapalsuccess
otapaluninitialized
otarequesttimer
otaselftesttimer
otastarttimer
otastatistics
otatimer
otatimercallback
otatimerid
otatransitiontable
outputlen
pacdata
pactivejobname
pactopic
paddrinfo
pagentctx
palcallbacks
paldefaultactivatenewimage
paldefaultactivatenewimage
paldefaultgetplatformimagestate
paldefaultgetplatformimagestate
paldefaultresetdevice
paldefaultresetdevice
paldefaultsetplatformimagestate
paldefaultsetplatformimagestate
palerr
palpnprotos
param
paramaddr
paramindex
params
paramsreceivedbitmap
paramsrequiredbitmap
parseerr
parsejobdoc
parsejsonbymodel
pauthscheme
pblockbitmap
pblockid
pblockindex
pblocksize
pbody
pbodydef
pbuffer
pc
pcallbacks
pcertfilepath
pcjobtopic
pcjson
pclientcertpath
pclientidentifier
pclienttoken
pclienttokenfromjob
pcloseresult
pcmsg
pcmsgbuffer
pconnection
pconnectioncontext
pcontextbase
pcontrolinterface
pctimername
pctopicbuffer
pcur
pdata
pdatainterface
pdecodemem
pdecodememory
pdest
pdestoffset
pdestsizeoffset
pdocmodel
pdocmodel
pem
pencodeddata
pencodedmessage
pencodedmessagesize
peventcontext
peventctx
peventdata
peventmsg
pfile
pfilebitmap
pfilecontext
pfileid
pfilepath
pfinalfile
pformat
phostname
phttp
pjobdocjson
pjobid
pjobname
pjobnamebuffer
pjobtopic
pjobtopicgetnext
pjobtopicnotifynext
pjson
pjsondoc
pjsonexpectedparams
pjsonsize
pkey
plaintext
platforminselftest
platfrom
plblockid
plblocksize
plisthead
pmessagebuffer
pmodelparam
pmsg
pmsgbuffer
pnetworkcontext
png
pnumdatainbuffer
pnumpadding
pnumwhitespace
pollin
pollout
popensslcredentials
portsleep
posix
potaagentstatestrings
potabuffer
potaeventstrings
potafilectx
potafiles
potafiles
potagetnextjobmsgtemplate
potagetstreamtopictemplate
potahttpinterface
potainterface
potainterfaces
potajobsgetnextacceptedtopictemplate
potajobsgetnexttopictemplate
potajobsnotifynexttopictemplate
potajobstatusreasonstrtemplate
potajobstatusreasonvaltemplate
potajobstatusreceivedetailstemplate
potajobstatusselftestdetailstemplate
potajobstatusstatustemplate
potajobstatussucceededstrtemplate
potajobstatustopictemplate
potamqttinterface
potaosctx
potarxstreamtopic
potasingletonactivejobname
potastreamdatatopictemplate
potastringfailed
potastringinprogress
potastringreceive
potastringrejected
potastringsucceeded
poutputlen
pparam
pparamadd
pparamsizeadd
ppayload
ppayloadparts
ppayloadsize
pprivatekeypath
pprotocol
pprotocolbuffer
pprotocols
ppucpayload
pquerykey
prawmsg
pre
presigned
presponse
presultlen
pretryparams
previousversion
printf
processdatablock
processdatahandler
processjobhandler
processvalidfilecontext
processnullfilecontext
prootcapath
protocolmaxsize
prvbuildstatusmessagefinish
prvbuildstatusmessageselftest
prvpal
prxblockbitmap
prxstreamtopic
pserverinfo
psig
psignature
psrckey
pssl
psslcontext
pstreamname
ptcpsocket
pthingname
ptimercallback
ptimerctx
ptimername
ptopicbuffer
ptopicfilter
ptr
publishstatusmessage
punused
pupdatefile
pupdatefilepath
pupdatejob
pupdateurlpath
pvalueinjson
pvcallback
pvportmalloc
pxconnection
pxcontrolinterface
pxdatainterface
qos
querykeylength
queuedat
ramdom
rand
rangeend
rangestart
rdy
reasontoset
receiveandprocessotaevent
reconnectparam
receiveandprocessotaevent
recv
recvtimeout
recvtimeoutms
repo
requestdata
requestdatahandler
requestfileblock
requestjob
requestjobhandler
requestmomentum
requesttimercallback
resetdevice
reseteventqueue
resumehandler
retryutilsretriesexhausted
retryutilssuccess
returnstatus
returnvalue
retvalue
rm
rollout
rsa
rtos
rx
rxstreamtopicbuffersize
sd
sdk
searchtransition
selftest
selftesttimercallback
sendtimeout
sendtimeoutms
serverfileid
serverinfo
setcontrolinterface
setdatainterface
setimagestate
setimagestatewithreason
setplatformimagestate
shutdownhandler
sig
sigalrm
sigbuffer
sizeof
sleeptimems
sni
snihostname
sockaddr
sockets_invalid_parameter
socketstatus
spdx
sprintf
srand
src
ssl
stacksize
starthandler
startselftesttimer
startselftimer
statetoset
statuscode
statusdetails
stddef
stdlib
str
streamname
streamnamemaxsize
streamnamesize
strerror
stringsize
stringbuilder
stringsize
strlength
stringbuilder
stringsize
struct
structs
sublicense
subreason
subscribetojobnotificationtopics
suspendhandler
suspendtimeout
sys
tcp
tcpsocket
tcpsocketcontext
td
testclient
thingname
thisisaclienttoken
tickstowait
timeinseconds
timerhandle
timespec
timestampfromjob
tinycbor
tls
tlscontext
tlsrecv
tlssend
todo
toolchain
topicfilter
topicfilterlength
topiclen
tq
tr
transportcallback
transportinterface
transportpage
transportsectionimplementation
transportsectionoverview
transportstruct
ttimer
typecasted
twe
typecasted
uart
ublockindex
ublocksize
ucqos
udp
ul
ulblockindex
ulblocksize
ulmsglen
ulmsgsize
uloffset
ulreceived
ultopiclen
unhandled
uniqueclientid
unistd
unsignedversion32
unsubscribeflag
unsubscribefromjobnotificationtopic
unsubscribeonshutdown
unsubscribefromjobnotificationtopic
unsubscribefromdatastream
updatedby
updatefilepath
updatefilepathsize
updatejobstatus
updatejobstatusfromimagestate
updaterversion
updateurl
updateurlmaxsize
url
urlsize
useraborthandler
ustopiclen
utils
uxtaskgetsystemstate
validateandstartjob
validatedatablock
validatejson
validateupdateversion
valuecopy
valuelength
verifyactivejobstatus
verifyrequiredparamsextracted
versionnumber
vportfree
vtasklist
wifi
writeblock
www
xaa
xyz
zg

View File

@ -0,0 +1,160 @@
# Uncrustify-0.67
input_tab_size = 4 # unsigned number
output_tab_size = 4 # unsigned number
sp_arith = force # ignore/add/remove/force
sp_assign = force # ignore/add/remove/force
sp_assign_default = force # ignore/add/remove/force
sp_before_assign = force # ignore/add/remove/force
sp_after_assign = force # ignore/add/remove/force
sp_enum_assign = force # ignore/add/remove/force
sp_enum_before_assign = force # ignore/add/remove/force
sp_enum_after_assign = force # ignore/add/remove/force
sp_pp_stringify = add # ignore/add/remove/force
sp_bool = force # ignore/add/remove/force
sp_compare = force # ignore/add/remove/force
sp_inside_paren = force # ignore/add/remove/force
sp_paren_paren = force # ignore/add/remove/force
sp_paren_brace = force # ignore/add/remove/force
sp_before_ptr_star = force # ignore/add/remove/force
sp_before_unnamed_ptr_star = force # ignore/add/remove/force
sp_between_ptr_star = remove # ignore/add/remove/force
sp_after_ptr_star = force # ignore/add/remove/force
sp_before_byref = force # ignore/add/remove/force
sp_after_byref = remove # ignore/add/remove/force
sp_after_byref_func = remove # ignore/add/remove/force
sp_before_angle = remove # ignore/add/remove/force
sp_inside_angle = remove # ignore/add/remove/force
sp_after_angle = force # ignore/add/remove/force
sp_before_sparen = remove # ignore/add/remove/force
sp_inside_sparen = force # ignore/add/remove/force
sp_after_sparen = force # ignore/add/remove/force
sp_sparen_brace = force # ignore/add/remove/force
sp_before_semi_for = remove # ignore/add/remove/force
sp_before_semi_for_empty = add # ignore/add/remove/force
sp_after_semi_for_empty = force # ignore/add/remove/force
sp_before_square = remove # ignore/add/remove/force
sp_before_squares = remove # ignore/add/remove/force
sp_inside_square = force # ignore/add/remove/force
sp_after_comma = force # ignore/add/remove/force
sp_after_cast = force # ignore/add/remove/force
sp_inside_paren_cast = force # ignore/add/remove/force
sp_sizeof_paren = remove # ignore/add/remove/force
sp_inside_braces_enum = force # ignore/add/remove/force
sp_inside_braces_struct = force # ignore/add/remove/force
sp_inside_braces = force # ignore/add/remove/force
sp_inside_braces_empty = remove # ignore/add/remove/force
sp_type_func = force # ignore/add/remove/force
sp_func_proto_paren = remove # ignore/add/remove/force
sp_func_def_paren = remove # ignore/add/remove/force
sp_inside_fparens = remove # ignore/add/remove/force
sp_inside_fparen = force # ignore/add/remove/force
sp_fparen_brace = add # ignore/add/remove/force
sp_func_call_paren = remove # ignore/add/remove/force
sp_func_class_paren = remove # ignore/add/remove/force
sp_return_paren = remove # ignore/add/remove/force
sp_attribute_paren = remove # ignore/add/remove/force
sp_defined_paren = remove # ignore/add/remove/force
sp_macro = force # ignore/add/remove/force
sp_macro_func = force # ignore/add/remove/force
sp_brace_typedef = force # ignore/add/remove/force
sp_before_dc = remove # ignore/add/remove/force
sp_after_dc = remove # ignore/add/remove/force
sp_cond_colon = force # ignore/add/remove/force
sp_cond_question = force # ignore/add/remove/force
sp_case_label = force # ignore/add/remove/force
sp_endif_cmt = force # ignore/add/remove/force
sp_before_tr_emb_cmt = force # ignore/add/remove/force
sp_num_before_tr_emb_cmt = 1 # unsigned number
indent_columns = 4 # unsigned number
indent_with_tabs = 0 # unsigned number
indent_align_string = true # false/true
indent_class = true # false/true
indent_class_colon = true # false/true
indent_member = 3 # unsigned number
indent_switch_case = 4 # unsigned number
indent_case_brace = 3 # number
nl_assign_leave_one_liners = true # false/true
nl_class_leave_one_liners = true # false/true
nl_start_of_file = remove # ignore/add/remove/force
nl_end_of_file = force # ignore/add/remove/force
nl_end_of_file_min = 1 # unsigned number
nl_assign_brace = add # ignore/add/remove/force
nl_func_var_def_blk = 1 # unsigned number
nl_fcall_brace = add # ignore/add/remove/force
nl_enum_brace = force # ignore/add/remove/force
nl_struct_brace = force # ignore/add/remove/force
nl_union_brace = force # ignore/add/remove/force
nl_if_brace = add # ignore/add/remove/force
nl_brace_else = add # ignore/add/remove/force
nl_else_brace = add # ignore/add/remove/force
nl_getset_brace = force # ignore/add/remove/force
nl_for_brace = add # ignore/add/remove/force
nl_while_brace = add # ignore/add/remove/force
nl_do_brace = add # ignore/add/remove/force
nl_switch_brace = add # ignore/add/remove/force
nl_multi_line_define = true # false/true
nl_before_case = true # false/true
nl_after_case = true # false/true
nl_func_type_name = remove # ignore/add/remove/force
nl_func_proto_type_name = remove # ignore/add/remove/force
nl_func_paren = remove # ignore/add/remove/force
nl_func_def_paren = remove # ignore/add/remove/force
nl_func_decl_start = remove # ignore/add/remove/force
nl_func_def_start = remove # ignore/add/remove/force
nl_func_decl_args = add # ignore/add/remove/force
nl_func_def_args = add # ignore/add/remove/force
nl_func_decl_end = remove # ignore/add/remove/force
nl_func_def_end = remove # ignore/add/remove/force
nl_fdef_brace = add # ignore/add/remove/force
nl_after_semicolon = true # false/true
nl_after_brace_open = true # false/true
nl_after_brace_close = true # false/true
nl_squeeze_ifdef = true # false/true
nl_before_if = force # ignore/add/remove/force
nl_after_if = force # ignore/add/remove/force
nl_before_for = force # ignore/add/remove/force
nl_after_for = force # ignore/add/remove/force
nl_before_while = force # ignore/add/remove/force
nl_after_while = force # ignore/add/remove/force
nl_before_switch = force # ignore/add/remove/force
nl_after_switch = force # ignore/add/remove/force
nl_before_do = force # ignore/add/remove/force
nl_after_do = force # ignore/add/remove/force
nl_max = 4 # unsigned number
nl_after_func_proto_group = 1 # unsigned number
nl_after_func_body_class = 2 # unsigned number
nl_before_block_comment = 2 # unsigned number
eat_blanks_after_open_brace = true # false/true
eat_blanks_before_close_brace = true # false/true
nl_after_return = true # false/true
pos_bool = trail # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force
align_var_def_amp_style = 1 # unsigned number
align_var_def_thresh = 16 # unsigned number
align_assign_thresh = 12 # unsigned number
align_struct_init_span = 3 # unsigned number
align_typedef_gap = 3 # unsigned number
align_typedef_span = 5 # unsigned number
align_typedef_star_style = 1 # unsigned number
align_typedef_amp_style = 1 # unsigned number
align_right_cmt_span = 3 # unsigned number
align_nl_cont = true # false/true
align_pp_define_gap = 4 # unsigned number
align_pp_define_span = 3 # unsigned number
cmt_cpp_to_c = true # false/true
cmt_star_cont = true # false/true
mod_full_brace_do = add # ignore/add/remove/force
mod_full_brace_for = add # ignore/add/remove/force
mod_full_brace_if = add # ignore/add/remove/force
mod_full_brace_while = add # ignore/add/remove/force
mod_full_paren_if_bool = true # false/true
mod_remove_extra_semicolon = true # false/true
mod_add_long_ifdef_endif_comment = 10 # unsigned number
mod_add_long_ifdef_else_comment = 10 # unsigned number
mod_case_brace = remove # ignore/add/remove/force
mod_remove_empty_return = true # false/true
pp_indent = force # ignore/add/remove/force
pp_indent_at_level = true # false/true
pp_indent_count = 4 # unsigned number
pp_space = remove # ignore/add/remove/force
pp_if_indent_code = true # false/true
# option(s) with 'not default' value: 158