Skip to content

portable: Fix malformed comment in IAR ARM_CM33 port - #1485

Open
berringtoni36-commits wants to merge 1 commit into
FreeRTOS:mainfrom
berringtoni36-commits:fix-iar-armcm33-comment
Open

berringtoni36-commits wants to merge 1 commit into
FreeRTOS:mainfrom
berringtoni36-commits:fix-iar-armcm33-comment

Conversation

@berringtoni36-commits

Copy link
Copy Markdown

Description

The IAR ARM_CM33 non-secure port contains a URL outside the assembly comment delimiters in portasm.s. IAR reports an "Invalid syntax" error because it parses the bare URL as assembly code.

Move the opening /* before the URL so the whole explanatory text is a valid comment.

Fixes #1480

Testing

  • git diff --check
  • Verified the changed line is now enclosed by /* ... */; target IAR toolchain is not available on macOS.

Signed-off-by: 赵文强 <zhaowenqiang@zhaowenqiangdeMacBook-Air.local>
@sonarqubecloud

Copy link
Copy Markdown

@jefftenney

jefftenney commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Hi @berringtoni36-commits. Good catch here. It looks like that URL doesn't belong there at all -- it looks like an accidental paste. May I suggest:

  1. Remove that URL.
  2. The ARMv8-M port files have specific structure. Make your changes to portable\ARMv8M\non_secure\portable\IAR\ARM_CM33\portasm.s and then run portable\ARMv8M\copy_files.py.

sekior11 added a commit to sekior11/FreeRTOS-Kernel that referenced this pull request Sep 15, 2026
portable/ARMv8M/copy_files.py derives the non-secure IAR ports from
portable/ARMv8M/non_secure/portable/IAR/ARM_CM33. The previous commit
fixed that source directory but did not regenerate the ARM_CM33 copy, so
portable/IAR/ARM_CM33/non_secure/portasm.s still carried the stray URL.
mpu_wrappers_v2_asm.S and portmacro.h are already identical between
source and destination, so re-running the script changes only this file.

With this commit all seven files that carry the stray URL are fixed,
which makes FreeRTOS#1485 (same file, same line) unnecessary.

Correction to the previous commit message: the stray URL is in the #else
branch of #if ( configENABLE_MPU == 1 ), so it is not every configuration
of the port. It breaks every non-MPU build, independently of
configENABLE_PAC; MPU builds never compile the line.

Verified with arm-none-eabi-gcc 13.3.1 (GNU as, not IAR iccarm), using
-march=armv8.1-m.main -mthumb -mfpu=fpv5-d16 and a minimal IAR-to-GNU
directive translation:

  configENABLE_MPU=0, configENABLE_PAC=0   fails before, assembles after
  configENABLE_MPU=1                       line is not compiled

The PAC_KEY_* mrs/msr instructions are rejected by GNU as on this target,
so the PAC-enabled non-MPU configuration could not be exercised here.

Relates to FreeRTOS#1480.
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.

[BUG] IAR ARMCM33 Non-Secure portasm.s stray URL outside comment delimiters causes "Invalid syntax" assembler error in portasm.s

2 participants