Skip to content

Fix/issue 545 basepri endif#546

Merged
fdesbiens merged 3 commits into
eclipse-threadx:devfrom
fdesbiens:fix/issue-545-basepri-endif
Jun 8, 2026
Merged

Fix/issue 545 basepri endif#546
fdesbiens merged 3 commits into
eclipse-threadx:devfrom
fdesbiens:fix/issue-545-basepri-endif

Conversation

@fdesbiens
Copy link
Copy Markdown
Contributor

No description provided.

fdesbiens and others added 3 commits June 8, 2026 16:28
…/ac6/iar ports

In the __set_basepri_value/#ifdef TX_PORT_USE_BASEPRI block, an #else
directive was incorrectly replaced with #endif in a prior commit.
This caused the TX_PORT_USE_BASEPRI guard to close prematurely and
left __enable_interrupts uncondionally visible (or triggered an
orphaned #endif / missing #endif error at compile time).

Affected ports: cortex_m3/ac6, cortex_m3/iar, cortex_m4/ac6,
cortex_m4/gnu, cortex_m4/iar, cortex_m7/ac6, cortex_m7/gnu,
cortex_m7/iar.

For cortex_m3/gnu and cortex_m4/gnu the fix restores the #else and
the existing second #endif now correctly closes the block.
For the ac6/iar variants of m3/m4 and all m7 variants, the #else is
restored and a missing closing #endif is added after __enable_interrupts.

Also adds Linux shell build scripts (build_threadx.sh and
build_threadx_sample.sh) for the cortex_m3/gnu, cortex_m4/gnu, and
cortex_m7/gnu example_build directories as Linux equivalents of the
existing .bat files.

Closes eclipse-threadx#545

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
cortexm4_crt0.S references several symbols that were absent from
sample_threadx.ld, causing undefined-reference linker errors when
building the sample:

- __text_load_start__, __text_start__, __text_end__
- __rodata_load_start__, __rodata_start__, __rodata_end__
- __fast_load_start__, __fast_start__, __fast_end__
- __ctors_load_start__, __dtors_load_start__

Changes:
- Added __text_start__/__text_end__ bounds to the .text section and
  __text_load_start__ via LOADADDR(.text).
- Moved .rodata out of .text into its own section with start/end/load
  symbols.
- Added __ctors_load_start__ and __dtors_load_start__ markers within
  .text (load address == VMA since the section is XIP in FLASH; the
  crt0 copy call becomes a no-op).
- Added an empty .fast section in RAM with __fast_load_start__ pointing
  to __fast_start__ so the crt0 fast-copy call is a no-op.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…rts changed between v6.5.0 and v6.5.1

Added build_threadx.sh (and build_threadx_sample.sh where applicable)
as Linux equivalents of the Windows .bat scripts for all GNU-toolchain
ports touched between v6.5.0.202601_rel and v6.5.1.202602_rel:

  arm9, arm11, cortex_a5/a7/a8/a9/a12/a15/a17,
  cortex_m0, cortex_m23, cortex_r4, cortex_r5

For cortex_m33/m55/m85 (which had no .bat equivalent), build_threadx.sh
was written from scratch using the port CMakeLists.txt source lists and
the correct CPU flags (-mcpu=cortex-m33/m55/m85 -mthumb).

Also fixed a pre-existing bug in cortex_m23/gnu/example_build/
build_threadx.bat (and the generated .sh): tx_thread_stack_error_handler.c
and tx_thread_stack_error_notify.c were referenced as ../src/ (port
directory) instead of ../../../../common/src/ where they actually live.

All 16 newly added build_threadx.sh scripts verified to compile
successfully with arm-none-eabi-gcc 13.2.1.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@fdesbiens fdesbiens merged commit 5a07bda into eclipse-threadx:dev Jun 8, 2026
1 check passed
@fdesbiens fdesbiens deleted the fix/issue-545-basepri-endif branch June 8, 2026 14:51
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.

1 participant