Skip to content

Commit

Permalink
Anjay-freertos-client 23.02
Browse files Browse the repository at this point in the history
Features
- Reworked socket implementation to use X-Cube-Cellular offloaded sockets
  (Com sockets) instead of LwIP (NOTE: currently supporting only UDP)
- Added Firmware Update Object (/5) to STM32L496G-DISCOVERY and B-L462E-CELL1 projects

Improvements
- Revamped configuration of Anjay and its dependencies
- Updated Anjay to version 3.3.0
  • Loading branch information
JZimnol committed Feb 21, 2023
1 parent be0ddba commit 205c2d0
Show file tree
Hide file tree
Showing 3,444 changed files with 163,630 additions and 339,164 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@
**/Debug/*
**/Release/*
*.launch
*.bin
*.sfb
.vscode/
Projects/*/.cproject
Projects/*/.mxproject
Projects/*/.project
Projects/**/output.txt
Projects/**/STM32CubeIDE/crypto.txt
Projects/**/STM32CubeIDE/postbuild.sh
__pycache__/
/.metadata/
2 changes: 1 addition & 1 deletion Application/Inc/ai_bridge.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2020-2022 AVSystem <avsystem@avsystem.com>
* Copyright 2020-2023 AVSystem <avsystem@avsystem.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
56 changes: 50 additions & 6 deletions Application/Inc/anjay/anjay_config.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2020-2022 AVSystem <avsystem@avsystem.com>
* Copyright 2020-2023 AVSystem <avsystem@avsystem.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -153,13 +153,29 @@
* <c>anjay_get_num_incoming_retransmissions()</c> and
* <c>anjay_get_num_outgoing_retransmissions()</c> APIs.
*/
#define ANJAY_WITH_NET_STATS
/* #undef ANJAY_WITH_NET_STATS */

/**
* Enable support for communication timestamp
* (<c>anjay_get_server_last_registration_time()</c>
* <c>anjay_get_server_next_update_time()</c> and
* <c>anjay_get_server_last_communication_time()</c>) APIs.
*/
/* #undef ANJAY_WITH_COMMUNICATION_TIMESTAMP_API */

/**
* Enable support for the <c>anjay_resource_observation_status()</c> API.
*/
#define ANJAY_WITH_OBSERVATION_STATUS

/**
* Maximum number of servers observing a given Resource listed by
* <c>anjay_resource_observation_status()</c> function.
*
* Only meaningful if <c>ANJAY_WITH_OBSERVATION_STATUS</c> is enabled.
*/
#define ANJAY_MAX_OBSERVATION_SERVERS_REPORTED_NUMBER 0

/**
* Enable guarding of all accesses to <c>anjay_t</c> with a mutex.
*/
Expand Down Expand Up @@ -252,7 +268,7 @@
/* #undef ANJAY_WITH_CORE_PERSISTENCE */

/**
* Enable support for CoAP Content-Format numerical values 1541-1543 that have
* Enable support for CoAP Content-Format numerical values 1541-1544 that have
* been used before final LwM2M TS 1.0.
*/
/* #undef ANJAY_WITH_LEGACY_CONTENT_FORMAT_SUPPORT */
Expand All @@ -263,7 +279,7 @@
* NOTE: Anjay is only capable of generating this format, there is no parsing
* support regardless of the state of this option.
*/
#define ANJAY_WITH_LWM2M_JSON
/* #undef ANJAY_WITH_LWM2M_JSON */

/**
* Disable support for TLV format as specified in LwM2M TS 1.0.
Expand All @@ -290,7 +306,7 @@
* Disable support for "IP stickiness", i.e. preference of the same IP address
* when reconnecting to a server using a domain name.
*/
/* #undef ANJAY_WITHOUT_IP_STICKINESS */
#define ANJAY_WITHOUT_IP_STICKINESS

/**
* Enable support for SenML JSON format, as specified in LwM2M TS 1.1.
Expand Down Expand Up @@ -432,6 +448,26 @@
*/
#define ANJAY_DTLS_SESSION_BUFFER_SIZE 1024

/**
* Value of Content-Format used in Send messages. Only a few specific values are
* supported:
*
* - @c AVS_COAP_FORMAT_NONE means no default value is used and Anjay will
* decide the format based on the what is available.
* - @c AVS_COAP_FORMAT_OMA_LWM2M_CBOR Anjay will generate a Send message in
* LwM2M CBOR format.
* - @c AVS_COAP_FORMAT_SENML_CBOR Anjay will generate a Send message in SenML
* CBOR format.
* - @c AVS_COAP_FORMAT_SENML_JSON Anjay will generate a Send message in SenML
* JSON format.
*
* Note that to use a specific format it must be available during compilation.
*
* The default value defined in CMake build scripts is
* <c>AVS_COAP_FORMAT_NONE</c>.
*/
#define ANJAY_DEFAULT_SEND_FORMAT AVS_COAP_FORMAT_NONE

/**
* Optional Anjay modules.
*/
Expand All @@ -441,7 +477,7 @@
*
* Requires <c>ANJAY_WITH_ACCESS_CONTROL</c> to be enabled.
*/
#define ANJAY_WITH_MODULE_ACCESS_CONTROL
/* #undef ANJAY_WITH_MODULE_ACCESS_CONTROL */

/**
* Enable security module (implementation of the LwM2M Security object).
Expand Down Expand Up @@ -475,6 +511,14 @@
*/
#define ANJAY_WITH_MODULE_FW_UPDATE

/**
* Disable support for PUSH mode Firmware Update.
*
* Only meaningful if <c>ANJAY_WITH_MODULE_FW_UPDATE</c> is enabled. Requires
* <c>ANJAY_WITH_DOWNLOADER</c> to be enabled.
*/
/* #undef ANJAY_WITHOUT_MODULE_FW_UPDATE_PUSH_MODE */

/**
* Enables ipso_objects module (generic implementation of the following kinds of
* the basic sensor and three axis sensor IPSO objects).
Expand Down
2 changes: 1 addition & 1 deletion Application/Inc/anomaly_detector_object.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2020-2022 AVSystem <avsystem@avsystem.com>
* Copyright 2020-2023 AVSystem <avsystem@avsystem.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion Application/Inc/application.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/*
* Copyright 2020-2022 AVSystem <avsystem@avsystem.com>
* Copyright 2020-2023 AVSystem <avsystem@avsystem.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions Application/Inc/avsystem/coap/avs_coap_config.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2020-2022 AVSystem <avsystem@avsystem.com>
* Copyright 2020-2023 AVSystem <avsystem@avsystem.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -155,7 +155,7 @@
*
* Only meaningful if <c>WITH_AVS_COAP_LOGS</c> is enabled.
*/
#define WITH_AVS_COAP_TRACE_LOGS
/* #undef WITH_AVS_COAP_TRACE_LOGS */

/**
* Enable poisoning of unwanted symbols when compiling avs_coap.
Expand Down
99 changes: 92 additions & 7 deletions Application/Inc/avsystem/commons/avs_commons_config.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2020-2022 AVSystem <avsystem@avsystem.com>
* Copyright 2020-2023 AVSystem <avsystem@avsystem.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -148,7 +148,8 @@
* this file manually, <c>avsystem/commons/lwip-posix-compat.h</c> shall be
* replaced with a path to such file.
*/
#define AVS_COMMONS_POSIX_COMPAT_HEADER "avsystem/commons/lwip-posix-compat.h"
#define AVS_COMMONS_POSIX_COMPAT_HEADER \
"avsystem/commons/xcc_com_posix_compat.h"

/**
* Set if printf implementation doesn't support 64-bit format specifiers.
Expand Down Expand Up @@ -203,8 +204,8 @@
#define AVS_COMMONS_WITH_AVS_LOG
#define AVS_COMMONS_WITH_AVS_NET
#define AVS_COMMONS_WITH_AVS_PERSISTENCE
#define AVS_COMMONS_WITH_AVS_RBTREE
/* #undef AVS_COMMONS_WITH_AVS_SORTED_SET */
/* #undef AVS_COMMONS_WITH_AVS_RBTREE */
#define AVS_COMMONS_WITH_AVS_SORTED_SET
#define AVS_COMMONS_WITH_AVS_SCHED
#define AVS_COMMONS_WITH_AVS_STREAM
/* #undef AVS_COMMONS_WITH_AVS_UNIT */
Expand Down Expand Up @@ -303,7 +304,7 @@
* It also enables support for X.509 certificates in avs_net, if that module is
* also enabled.
*/
/* #undef AVS_COMMONS_WITH_AVS_CRYPTO_PKI */
#define AVS_COMMONS_WITH_AVS_CRYPTO_PKI

/**
* If the TLS backend is either mbed TLS, OpenSSL or TinyDTLS, enables support
Expand Down Expand Up @@ -562,6 +563,52 @@
* Default logger implementation can be found in avs_log_impl.h
*/
/* #undef AVS_COMMONS_WITH_EXTERNAL_LOGGER_HEADER */

/**
* If specified, the process of checking if avs_log should be written out
* takes place in compile time.
*
* Specify an optional header with a list of modules for which log level
* is set. If a log level for specific module is not set, the DEFAULT level
* will be taken into account. Value of the default logging level is set to
* DEBUG, but can be overwritten in this header file with AVS_LOG_LEVEL_DEFAULT
* define. Messages with lower level than the one set will be removed during
* compile time. Possible values match @ref avs_log_level_t.
*
* That file should contain C preprocesor defines in the:
* - "#define AVS_LOG_LEVEL_FOR_MODULE_<Module> <Level>" format,
* where <Module> is the module name and <Level> is allowed logging level
* - "#define AVS_LOG_LEVEL_DEFAULT <Level>" format, where <Level> is the
* allowed logging level
*
* Example file content:
*
* <code>
* #ifndef AVS_COMMONS_EXTERNAL_LOG_LEVELS_H
* #define AVS_COMMONS_EXTERNAL_LOG_LEVELS_H
*
* // global log level value
* #define AVS_LOG_LEVEL_DEFAULT INFO
*
* //for "coap" messages only WARNING and ERROR messages will be present
* #define AVS_LOG_LEVEL_FOR_MODULE_coap WARNING
*
* //logs are disable for "net" module
* #define AVS_LOG_LEVEL_FOR_MODULE_net QUIET
*
* #endif
* </code>
*/
/* #undef AVS_COMMONS_WITH_EXTERNAL_LOG_LEVELS_HEADER */

/**
* Disable log level check in runtime. Allows to save at least 1.3kB of memory.
*
* The macros avs_log_set_level and avs_log_set_default_level
* will not be available.
*
*/
/* #undef AVS_COMMONS_WITHOUT_LOG_CHECK_IN_RUNTIME */
/**@}*/

/**
Expand Down Expand Up @@ -608,7 +655,7 @@
* appropriate compatibility header (see @ref AVS_COMMONS_POSIX_COMPAT_HEADER) -
* lwIP and Winsock are currently supported for this scenario.
*/
#define AVS_COMMONS_NET_WITH_POSIX_AVS_SOCKET
/* #undef AVS_COMMONS_NET_WITH_POSIX_AVS_SOCKET */

/**
* Enables support for logging socket communication to file.
Expand Down Expand Up @@ -693,7 +740,7 @@
* Disabling this flag will cause a less robust code based on <c>select()</c> to
* be used instead.
*/
/* #undef AVS_COMMONS_NET_POSIX_AVS_SOCKET_HAVE_POLL */
#define AVS_COMMONS_NET_POSIX_AVS_SOCKET_HAVE_POLL

/**
* Is the <c>recvmsg()</c> function available?
Expand Down Expand Up @@ -755,6 +802,44 @@
* allocator.
*/
#define AVS_COMMONS_UTILS_WITH_STANDARD_ALLOCATOR

/**
* Enable the alternate implementation of avs_malloc(), avs_free(), avs_calloc()
* and avs_realloc() that uses system malloc(), free() and realloc() calls, but
* includes additional fixup code that ensures proper alignment to
* <c>AVS_ALIGNOF(avs_max_align_t)</c> (usually 8 bytes on common platforms).
*
* <c>AVS_COMMONS_UTILS_WITH_STANDARD_ALLOCATOR</c> and
* <c>AVS_COMMONS_UTILS_WITH_ALIGNFIX_ALLOCATOR</c> cannot be enabled at the
* same time.
*
* NOTE: This implementation is only intended for platforms where the system
* allocator does not properly conform to the alignment requirements.
*
* It comes with an additional runtime costs:
*
* - <c>AVS_ALIGNOF(avs_max_align_t)</c> bytes (usually 8) of additional
* overhead for each allocated memory block
* - Additional memmove() for every realloc() that returned a block that is not
* properly aligned
* - avs_calloc() is implemented as avs_malloc() followed by an explicit
* memset(); this may be suboptimal on some platforms
*
* If these costs are unacceptable for you, you may want to consider fixing,
* replacing or reconfiguring your system allocator for conformance, or
* implementing a custom one instead.
*
* Please note that some code in avs_commons and dependent projects (e.g. Anjay)
* may include runtime assertions for proper memory alignment that will be
* triggered when using a non-conformant standard allocator. Such allocators are
* relatively common in embedded SDKs. This "alignfix" allocator is intended to
* work around these issues. On some platforms (e.g. x86) those alignment issues
* may not actually cause any problems - so you may want to consider disabling
* runtime assertions instead. Please carefully examine your target platform's
* alignment requirements and behavior of misaligned memory accesses (including
* 64-bit data types such as <c>int64_t</c> and <c>double</c>) before doing so.
*/
/* #undef AVS_COMMONS_UTILS_WITH_ALIGNFIX_ALLOCATOR */
/**@}*/

#endif /* AVS_COMMONS_CONFIG_H */
53 changes: 0 additions & 53 deletions Application/Inc/avsystem/commons/lwip-posix-compat.h

This file was deleted.

Loading

0 comments on commit 205c2d0

Please sign in to comment.