Skip to content
This repository has been archived by the owner on Nov 11, 2024. It is now read-only.

Commit

Permalink
Zephyr/nRFConnect change only: accommodate nRFConnect SDK version of …
Browse files Browse the repository at this point in the history
…Zephyr. (#1207)

In commit 66b6b71 support for Zephyr 3.7.0-rc1 was added to ubxlib.  The few places where Zephyr made a breaking change at version 3.7.0 were put under a Zephyr version check in order that support for previous Zephyr versions wouldn't be broken.  nRFConnect 2.7.0 uses Zephyr version 3.6.99, and hence it was assumed that it would use the pre-version-3.7.0 Zephyr code.  However, it turns out that Zephyr version 3.6.99 does, in fact, **include** the breaking changes that [I thought] were made at Zephyr version 3.7.0; quite confusing.

To accommodate this behaviour, the two places where a version check against ">= Zephyr 3.7.0" are made are now modified to be ">= Zephyr 3.6.99" instead.
  • Loading branch information
RobMeades authored Oct 3, 2024
1 parent 4d8e564 commit 556a048
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion port/platform/zephyr/app/u_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ int main(void)
}

#ifdef U_DEBUG_UTILS_DUMP_THREADS
# if KERNEL_VERSION_NUMBER >= ZEPHYR_VERSION(3,7,0)
# if KERNEL_VERSION_NUMBER >= ZEPHYR_VERSION(3,6,99)
void k_sys_fatal_error_handler(unsigned int reason, const struct arch_esf *esf)
# else
void k_sys_fatal_error_handler(unsigned int reason, const z_arch_esf_t *esf)
Expand Down
2 changes: 1 addition & 1 deletion port/platform/zephyr/src/u_port_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ static uPortOsThreadInstance_t *pGetNewThreadInstance(size_t stackSizeBytes)
// K_KERNEL_STACK_LEN() will add extra space that Zephyr may require.
// TODO: in the future we could use k_thread_stack_alloc() here and drop
// the need for K_KERNEL_STACK_LEN()
#if KERNEL_VERSION_NUMBER >= ZEPHYR_VERSION(3,7,0)
#if KERNEL_VERSION_NUMBER >= ZEPHYR_VERSION(3,6,99)
stackAllocSize = K_KERNEL_STACK_LEN(stackSizeBytes);
#else
stackAllocSize = Z_KERNEL_STACK_LEN(stackSizeBytes);
Expand Down

0 comments on commit 556a048

Please sign in to comment.