Skip to content

Fix IAR assembler errors on except.S #13366

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 30, 2020

Conversation

matthew-macovsky-cypress

Summary of changes

These changes resolve the IAR assembler errors seen in issue #13200.

By running the IAR assembler directly I was able to see the actual error messages.
The first:

    IAR Assembler V8.32.1.169/W32 for ARM
    Copyright 1999-2018 IAR Systems AB.

        ALIGN
------------^
"C:\git\mbed-os-example-blinky\mbed-os\platform\source\TARGET_CORTEX_M\TOOLCHAIN_IAR\except.S",114  Error[413]: 'ALIGN' is illegal. Use directive ALIGNROM or ALIGNRAM (the first parameter is raised to the power of 2, the second is a 32-bit fill value).

Errors:   1
Warnings: 0
Bytes: 92

To resolve this I replaced ALIGN with ALIGNROM 2, which aligns to a 4-byte boundary (mirroring what ALIGN does in the ARM except.S).

The second:

    IAR Assembler V8.32.1.169/W32 for ARM
    Copyright 1999-2018 IAR Systems AB.

        THUMB
-------------^
"C:\git\mbed-os-example-blinky\mbed-os\platform\source\TARGET_CORTEX_M\TOOLCHAIN_IAR\except.S",39  Error[118]: Must be placed inside a section

Errors:   1
Warnings: 0
Bytes: 92

To resolve this I moved THUMB after the SECTION directive so that it affects that section.

Documentation

None


Pull request type

[X] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[X] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

@ciarmcom ciarmcom added the release-type: patch Indentifies a PR as containing just a patch label Jul 28, 2020
@ciarmcom ciarmcom requested review from a team July 28, 2020 23:00
@ciarmcom
Copy link
Member

@matthew-macovsky-cypress, thank you for your changes.
@ARMmbed/mbed-os-core @ARMmbed/mbed-os-maintainers please review.

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 29, 2020

cc @jeromecoutant this is similar to what you were seeing

Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

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

@matthew-macovsky-cypress Changes look fine to me. Can you add the details to the commit message please? The copy of the description from here should be sufficient.

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 29, 2020

#13248 for reference, also fixing the issue but differently.

Fixes two errors produced on except.S by the IAR assembler (as seen in
issue ARMmbed#13200).

The first: "'ALIGN' is illegal. Use directive ALIGNROM or ALIGNRAM (the
first parameter is raised to the power of 2, the second is a 32-bit fill
value)."
Fixed by changing ALIGN to ALIGNROM 2 to align to a 4-byte boundary
(mirroring what ALIGN does in the ARM except.S).

The second (on THUMB): "Must be placed inside a section"
Fixed by moving THUMB after the SECTION directive so that it affects
that section.
@mergify mergify bot dismissed 0xc0170’s stale review July 29, 2020 15:45

Pull request has been modified.

@matthew-macovsky-cypress
Copy link
Author

@0xc0170 Updated the commit message.

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 30, 2020

CI started

@mbed-ci
Copy link

mbed-ci commented Jul 30, 2020

Test run: SUCCESS

Summary: 6 of 6 test jobs passed
Build number : 1
Build artifacts

@0xc0170 0xc0170 merged commit e446a68 into ARMmbed:master Jul 30, 2020
@mergify mergify bot removed the ready for merge label Jul 30, 2020
@mbedmain mbedmain added release-version: 6.2.1 Release-pending and removed release-type: patch Indentifies a PR as containing just a patch Release-pending labels Aug 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants