Skip to content

ports/Xtensa: Update Xtensa support#525

Open
ianstcdns wants to merge 8 commits intoeclipse-threadx:devfrom
foss-xtensa:master
Open

ports/Xtensa: Update Xtensa support#525
ianstcdns wants to merge 8 commits intoeclipse-threadx:devfrom
foss-xtensa:master

Conversation

@ianstcdns
Copy link
Copy Markdown

Includes the following Xtensa port updates from Cadence foss-xtensa fork:

  • Add LX8 support for > 32 interrupts
  • ThreadX: Fix context switch logic
  • ThreadX: Interrupt fixes for TX_ENABLE_EXECUTION_CHANGE_NOTIFY
  • ThreadX: Support for DYNAMIC_REENT
  • ThreadX: Xtensa execution profiling support
  • ThreadX: Update xtensa port readme
  • ThreadX: Add Xtensa example to EPK
  • ThreadX: Add xtensa.cmake

All updates verified internally on multiple Xtensa configurations

PR checklist

  • [ x ] Updated function header with a short description and version number
  • [ x ] Added test case for bug fix or new feature
  • [ x ] Validated on real hardware

Also fix inconsistent SWPRI define in interrupt handler
- Disable interrupts prior to allocating a large exception frame;
  only reenable them after deallocating the extra memory.
- Any user tasks with stacks based on TX_MINIMUM_STACK do not
  have sufficient space for both a context switch frame and an ISR
  frame; ill-timed interrupts were causing stack overruns.
- Must reload register trashed by notify hook function call
- Must ensure PS.WOE is set before using call8
- Remove unused XT_USE_INT_WRAPPER define and associated changes,
  which had a bug in XEA2 usage
- Fix another case where enabling the thread notify hooks for
  call0 ABI corrupted a register
- ThreadX change to handle dynamic reent for both newlib and xclib
- Adapt ThreadX xclib interface code to handle dynamic reent pointers
- Update upstream execution profiling for Xtensa port
- tx_execution_profile.h now defines an Xtensa example
  in addition to the existing Cortex example
@fdesbiens
Copy link
Copy Markdown
Contributor

Hi @ianstcdns. Thank you for this contribution!

At least one of us will review and provide feedback.

@fdesbiens fdesbiens moved this to In review in ThreadX Roadmap Apr 24, 2026
@fdesbiens fdesbiens changed the base branch from master to dev April 24, 2026 17:42
@ianstcdns
Copy link
Copy Markdown
Author

@fdesbiens thank you for taking a look. I have not submitted PRs to eclipse projects before, so please LMK if there is any part of the process I may have missed or additional steps required. Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

2 participants