Skip to content

Zephyr: define the Thumb-2 assembly macros and allow benchmark argument parsing - #11495

Open
dgarske wants to merge 1 commit into
wolfSSL:masterfrom
dgarske:zephyr_thumb2_asm
Open

dgarske wants to merge 1 commit into
wolfSSL:masterfrom
dgarske:zephyr_thumb2_asm

Conversation

@dgarske

@dgarske dgarske commented Sep 17, 2026

Copy link
Copy Markdown
Member

Description

This PR fixes broken Thumb-2 assembly integration in the wolfSSL module and relaxes main argument constraints for bench flexibility.

Key Changes

  • Fix Thumb-2 Assembly Config: Updated zephyr/user_settings.h to define WOLFSSL_ARMASM_THUMB2, WOLFSSL_ARMASM_NO_HW_CRYPTO, and WOLFSSL_ARM_ARCH=7 when CONFIG_WOLFCRYPT_ARMASM_THUMB2 is active. This aligns CMake build logic with C headers, resolving AArch32/Thumb-2 symbol mismatches and enabling Cortex-M support.
  • Flexible Main Arguments: Guarded MAIN_NO_ARGS in settings.h with WOLFSSL_ZEPHYR_MAIN_ARGS so Zephyr apps building custom argv arrays can run targeted benchmark subsets.

Testing

Tested on Toradex i.MX95 SMARC on real-time M7 core with Zephyr.

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

@dgarske dgarske self-assigned this Sep 17, 2026
Copilot AI lite review requested due to automatic review settings September 17, 2026 23:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Pull request overview

Fixes Zephyr Thumb-2 wolfSSL integration by aligning C preprocessor settings with the Thumb-2 assembly objects being built, and makes Zephyr benchmark/test entry points optionally accept argv-style arguments for more flexible benchmark selection.

Changes:

  • Define Thumb-2-related wolfSSL ARM assembly macros in Zephyr user settings when CONFIG_WOLFCRYPT_ARMASM_THUMB2 is enabled.
  • Make MAIN_NO_ARGS optional on Zephyr via a new WOLFSSL_ZEPHYR_MAIN_ARGS opt-in.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
zephyr/user_settings.h Adds Thumb-2-specific #defines so C code matches the Thumb-2 asm ports chosen by Zephyr’s build.
wolfssl/wolfcrypt/settings.h Gates MAIN_NO_ARGS behind a Zephyr-specific opt-in to allow argument parsing in benchmark/test entry points.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +3157 to +3158
* option parsing compiled in. */
#ifndef WOLFSSL_ZEPHYR_MAIN_ARGS
Comment thread zephyr/user_settings.h
* link fails. Matches what configure sets for --enable-armasm on a
* Thumb-2 target. */
#define WOLFSSL_ARMASM_THUMB2
#define WOLFSSL_ARMASM_NO_HW_CRYPTO
Comment thread zephyr/user_settings.h
Comment on lines +610 to +614
* link fails. Matches what configure sets for --enable-armasm on a
* Thumb-2 target. */
#define WOLFSSL_ARMASM_THUMB2
#define WOLFSSL_ARMASM_NO_HW_CRYPTO
#define WOLFSSL_ARM_ARCH 7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants