Skip to content

Conversation

miyazakh
Copy link
Contributor

Description

Includes the following changes and updates:

  • Use xSPI0 boot mode
  • Update FSP from v1.3 to v2.0.0
  • Simplify UART
  • Migrate new User Ctx
  • Update README
  • Fix SCE TLS on RA6M4

Testing

Run examples including Crypt, benchmark and Client/Server Renesas RZN2L RSK and RA6M4

Checklist

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

 - Use xSPI0 boot mode
 - Update FSP from v1.3 to v2.0.0
 - Simplify UART
 - Migrate new User Ctx
 - Update README
 - Fix SCE TLS on RA6M4
Copy link
Contributor

🛟 Devin Lifeguard found 4 likely issues in this PR

  • use-typedefs-not-stdint snippet: Replace the newly added uint32_t declarations (e.g. uint32_t volatile g_tx_complete = 0;) with the project typedef word32 (e.g. volatile word32 g_tx_complete = 0;) and similarly update other new instances of uint32_t introduced in this commit.
  • check-all-return-codes snippet snippet: Add error-handling after the calls, e.g. if (err != FSP_SUCCESS) { /* handle error */ } after R_SCI_UART_Open and check the return of R_SCI_UART_Write, propagating or logging failures as appropriate.
  • no-memory-leaks snippet: In wc_CryptoCb_CleanupRenesasCmn() first obtain cbInfo (e.g. cbInfo = (FSPSM_ST*)gCbCtx[*id - INITIAL_DEVID];) and then free when it is not NULL (if (cbInfo && cbInfo->internal) { XFREE(cbInfo->internal, cbInfo->internal->heap, DYNAMIC_TYPE_TMP_BUFFER); cbInfo->internal = NULL; }), removing the inverted check and the premature dereference.
  • pointer-null-check snippet: Assign cbInfo before dereferencing and add a NULL check, e.g. FSPSM_ST* cbInfo = gCbCtx[*id - INITIAL_DEVID]; if (cbInfo != NULL && cbInfo->internal != NULL) { ... }.

@miyazakh
please take a look at the above issues which Devin flagged. Devin will not fix these issues automatically.

@miyazakh
Copy link
Contributor Author

miyazakh commented Aug 1, 2025

retest this please

PRB_dtls.txt_60

Found unhandled org.jenkinsci.plugins.workflow.support.steps.AgentOfflineException exception:

@miyazakh miyazakh removed their assignment Aug 1, 2025
@dgarske dgarske requested a review from Copilot August 5, 2025 14:13
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates Renesas RZ examples to support FSP version 2.0.0 and implements several improvements including xSPI0 boot mode support, UART simplification, User Context migration, and various bug fixes.

  • Update FSP from v1.3 to v2.0.0 with support for new RSIP API versions
  • Migrate to xSPI0 boot mode and simplify UART implementation
  • Fix SCE TLS functionality on RA6M4 and improve memory management

Reviewed Changes

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

Show a summary per file
File Description
wolfssl/wolfcrypt/sha.h Updates include path for Renesas FSPSM internal header
wolfssl/wolfcrypt/port/Renesas/renesas_tsip_internal.h Removes devId field from internal structure
wolfssl/wolfcrypt/port/Renesas/renesas_fspsm_internal.h Adds new context fields and version-specific conditions
wolfssl/wolfcrypt/port/Renesas/renesas-tsip-crypt.h Moves devId field to public structure
wolfssl/wolfcrypt/port/Renesas/renesas-fspsm-types.h Adds version checks and new API mappings
wolfssl/wolfcrypt/port/Renesas/renesas-fspsm-crypt.h Updates includes and removes unused macro
wolfcrypt/test/test.c Adds cleanup for Renesas crypto callback
wolfcrypt/src/sha*.c Adds version-specific memory cleanup conditions
wolfcrypt/src/port/Renesas/*.c Multiple files with API version handling and bug fixes
IDE/Renesas/e2studio/RZN2L/test/src/*.c Updates for xSPI0 boot mode and UART simplification
Comments suppressed due to low confidence (3)

wolfcrypt/src/port/Renesas/renesas_tsip_util.c:255

  • [nitpick] Adding the ssl NULL check is good defensive programming, but consider checking ssl before user_ctx since ssl is used in the error message context. The order of checks should follow the order of usage.
{

wolfcrypt/src/port/Renesas/renesas_fspsm_aes.c:236

  • Parameter name inconsistency: the parameter was renamed from 'cipher_lengh' to 'cipher_length' (fixing the typo), but on line 247 it's still referenced as 'cipher_lengh'. Ensure all parameter names are consistent.
                                      uint32_t* cipher_length)

@miyazakh
Copy link
Contributor Author

miyazakh commented Aug 6, 2025

retest this please

PRB-sp.txt_30
Found unhandled org.jenkinsci.plugins.workflow.support.steps.AgentOfflineException exception

@miyazakh miyazakh removed their assignment Aug 6, 2025
@douzzer douzzer merged commit e6c6ef6 into wolfSSL:master Aug 9, 2025
253 of 254 checks passed
@miyazakh miyazakh deleted the rz_update branch August 9, 2025 08:37
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.

4 participants