diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 6a964202c..9038126e4 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -283,6 +283,7 @@ jobs: - name: Move coverage files run: | mv ./coverage/reports/*/*.json ./coverage/reports + rm -f ./coverage/reports/merged.json ls -la ./coverage/reports - name: Generate list of coverage files diff --git a/drivers/gnss/gnss_ubx_modem.c b/drivers/gnss/gnss_ubx_modem.c index 325403584..cd267b35c 100644 --- a/drivers/gnss/gnss_ubx_modem.c +++ b/drivers/gnss/gnss_ubx_modem.c @@ -6,7 +6,6 @@ * SPDX-License-Identifier: FSL-1.1-ALv2 */ -#include #include #include diff --git a/include/infuse/gnss/ubx/modem.h b/include/infuse/gnss/ubx/modem.h index f936e7df5..bb14fc4bb 100644 --- a/include/infuse/gnss/ubx/modem.h +++ b/include/infuse/gnss/ubx/modem.h @@ -14,9 +14,10 @@ #include #include #include -#include #include +#include + #ifdef __cplusplus extern "C" { #endif diff --git a/include/infuse/gnss/ubx/protocol.h b/include/infuse/gnss/ubx/protocol.h index 4bea6e97b..c9135c9ff 100644 --- a/include/infuse/gnss/ubx/protocol.h +++ b/include/infuse/gnss/ubx/protocol.h @@ -11,7 +11,6 @@ #ifndef INFUSE_GNSS_UBX_PROTOCOL_H_ #define INFUSE_GNSS_UBX_PROTOCOL_H_ -#include #include #include @@ -24,6 +23,22 @@ extern "C" { * @{ */ +#define UBX_PREAMBLE_SYNC_CHAR_1 0xB5 +#define UBX_PREAMBLE_SYNC_CHAR_2 0x62 + +/** + * @brief UBX Message Frame + */ +struct ubx_frame { + uint8_t preamble_sync_char_1; + uint8_t preamble_sync_char_2; + uint8_t message_class; + uint8_t message_id; + uint8_t payload_size_low; + uint8_t payload_size_high; + uint8_t payload_and_checksum[]; +}; + /** * @brief UBX Message Classes */ @@ -830,6 +845,7 @@ static inline void ubx_msg_prepare(struct net_buf_simple *buf, uint8_t msg_class */ static inline void ubx_msg_finalise(struct net_buf_simple *buf) { + const unsigned int crc_start_idx = offsetof(struct ubx_frame, message_class); struct ubx_frame *frame; uint16_t payload_size; uint8_t ckA = 0; @@ -843,7 +859,7 @@ static inline void ubx_msg_finalise(struct net_buf_simple *buf) frame->payload_size_low = payload_size; frame->payload_size_high = payload_size >> 8; /* Calculate frame CRC */ - for (unsigned int i = UBX_FRM_CHECKSUM_START_IDX; i < buf->len; i++) { + for (unsigned int i = crc_start_idx; i < buf->len; i++) { ckA += buf->data[i]; ckB += ckA; } diff --git a/kconfig/Kconfig.defaults.core b/kconfig/Kconfig.defaults.core index 54f054407..455bc308c 100644 --- a/kconfig/Kconfig.defaults.core +++ b/kconfig/Kconfig.defaults.core @@ -224,8 +224,6 @@ configdefault UART_USE_RUNTIME_CONFIGURE default n # Debug options -configdefault DEBUG_INFO - default y configdefault DEBUG_THREAD_INFO default y configdefault OUTPUT_DISASSEMBLY diff --git a/scripts/west_commands/vscode.py b/scripts/west_commands/vscode.py index 3a470861a..913b0c17c 100644 --- a/scripts/west_commands/vscode.py +++ b/scripts/west_commands/vscode.py @@ -255,6 +255,19 @@ def _tfm_build(self, build_dir, cache): launch["configurations"][0]["gdbPath"] = parent_cache.get("CMAKE_GDB") launch["configurations"][1]["gdbPath"] = parent_cache.get("CMAKE_GDB") + def _tfm_sub_image(self, build_dir): + tfm_elfs = [ + "bl2.elf", + "tfm_s.elf", + ] + tfm_paths = [build_dir / "tfm" / "bin" / elf for elf in tfm_elfs] + tfm_exists = [p for p in tfm_paths if p.exists()] + + # Add TF-M .elf files + launch["configurations"][0]["preAttachCommands"] = [ + f"add-symbol-file {str(path)}" for path in tfm_exists + ] + def _zephyr_build(self, build_dir, cache): self.cpp_properties(build_dir, cache) @@ -272,17 +285,7 @@ def _zephyr_build(self, build_dir, cache): ) if cache.get("BOARD")[-3:] == "/ns": - tfm_elfs = [ - "bl2.elf", - "tfm_s.elf", - ] - tfm_paths = [build_dir / "tfm" / "bin" / elf for elf in tfm_elfs] - tfm_exists = [p for p in tfm_paths if p.exists()] - - # Add TF-M .elf files - launch["configurations"][0]["preAttachCommands"] = [ - f"add-symbol-file {str(path)}" for path in tfm_exists - ] + self._tfm_sub_image(build_dir) if cache.get("SYSBUILD", False): # Check if a `mcuboot` folder exists at the same level mcuboot_elf = build_dir / ".." / "mcuboot" / "zephyr" / "zephyr.elf" @@ -297,6 +300,8 @@ def _qemu(self, build_dir, cache): self.cpp_properties(build_dir, cache) + if cache.get("BOARD")[-3:] == "/ns": + self._tfm_sub_image(build_dir) launch["configurations"][0]["name"] = "QEMU Attach" launch["configurations"][0]["servertype"] = "external" launch["configurations"][0]["gdbTarget"] = "localhost:1234" diff --git a/subsys/mgmt/mcumgr/os_mgmt_infuse/CMakeLists.txt b/subsys/mgmt/mcumgr/os_mgmt_infuse/CMakeLists.txt index 87be541a1..d943365b1 100644 --- a/subsys/mgmt/mcumgr/os_mgmt_infuse/CMakeLists.txt +++ b/subsys/mgmt/mcumgr/os_mgmt_infuse/CMakeLists.txt @@ -1,6 +1,6 @@ # SPDX-License-Identifier: Apache-2.0 -zephyr_library(mgmt_mcumgr_grp_os) +zephyr_library() zephyr_library_sources(os_mgmt_infuse.c) if (CONFIG_BOOTLOADER_MCUBOOT)