Skip to content

Update IAR-EWARM project user-settings.h.#7195

Merged
dgarske merged 1 commit intowolfSSL:masterfrom
philljj:zd17406
Feb 6, 2024
Merged

Update IAR-EWARM project user-settings.h.#7195
dgarske merged 1 commit intowolfSSL:masterfrom
philljj:zd17406

Conversation

@philljj
Copy link
Copy Markdown
Contributor

@philljj philljj commented Jan 31, 2024

Description

The IAR-EWARM/Projects/user_settings.h was outdated and assumed fast-math by default. This resulted in many build errors when building IAR-EWARM wolfssl-lib.a.

Update the user_settings.h to use SP Math All.

Fixes zd#17406

Testing

Built wolfssl lib with IAR ARM IDE on windows.

@philljj philljj self-assigned this Jan 31, 2024
Comment thread IDE/IAR-EWARM/Projects/user_settings.h Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

FYI: This was likely using integer.c heap math previously. Not fast math. I'd recommend providing a template here for users to choose 4 options. Use something like this: https://github.com/wolfSSL/wolfssl/blob/master/examples/configs/user_settings_template.h#L62

Comment thread IDE/IAR-EWARM/Projects/user_settings.h Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks like indent is off here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

Comment thread IDE/IAR-EWARM/Projects/user_settings.h Outdated
@philljj
Copy link
Copy Markdown
Contributor Author

philljj commented Feb 2, 2024

Retest this please

Comment thread IDE/IAR-EWARM/Projects/user_settings.h Outdated
Copy link
Copy Markdown
Member

@dgarske dgarske Feb 2, 2024

Choose a reason for hiding this comment

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

Please expand the comment here. The SP section can exist on its own outside of these 3 options.

Our Single Precision math written to acceleration specific / common key sizes and curves. This adds code from sp_c32.c or one of the specific assembly ones like sp_cortexm.c. This code is faster than the multi-precision support because its optimized for the key/curve.
The SP math can be used together with any multi-precision math library if WOLFSSL_SP_MATH is removed. If only standard keys/curves are being used the multi-precision math is not required.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

To try to make it more clear, I ordered it like this:

  1. Single Precision math example first, along with expanded comments.
  2. Followed by SP Math All, and expanded comments to mention this uses multi-precision math library.
  3. Fast math example.
  4. Normal integer.c math example.

*
* See examples/configs/user_settings_template.h for a more
* detailed template. */
#if 1
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This section for single precision can exist all on its own. It can be used regardless of the 3 multi-precision math library options as long as WOLFSSL_SP_MATH is not defined.

Copy link
Copy Markdown
Member

@dgarske dgarske left a comment

Choose a reason for hiding this comment

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

Accepting as-is. I will put up similar PR in the user_settings_template.h and fix the SP toggle.

@philljj
Copy link
Copy Markdown
Contributor Author

philljj commented Feb 5, 2024

Retest this please

@philljj philljj assigned wolfSSL-Bot and unassigned philljj Feb 5, 2024
@dgarske dgarske merged commit 735fbc7 into wolfSSL:master Feb 6, 2024
@philljj philljj deleted the zd17406 branch February 6, 2024 18:23
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.

3 participants