Skip to content
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

cproject targeting toolchain AC6 with only a single legacy ASM assembler file does not link #69

Closed
8 of 13 tasks
jkrech opened this issue Aug 21, 2023 · 4 comments
Closed
8 of 13 tasks
Assignees
Labels
bug Something isn't working

Comments

@jkrech
Copy link
Member

jkrech commented Aug 21, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Unusable feature

The linked project can be converted successfully by uv2csolution 1.0.0 into a csolution formatted project.
https://downloads.software.api.keil.arm.com/projects/flash-option-bytes-86968ef2.zip

This project targets Arm Compiler 6 (AC6) toolchain and only contains a single module using the AC5 assembler syntax for armasm. If only such a file exists, it seems that the linker does not create an axf file output but also not throws an error.

Current Behavior

C:/workspaces/Nucleo_G747RE/tmp/FlashOptionBytes/STM32G4xxSBOPT
[1/2] Building AS_ARM object CMakeFiles\FlashOptionBytes.dir\C_\workspaces\Nucleo_G747RE\STM32G4xx_SB_OPT.o
Warning: A1950W: The legacy armasm assembler is deprecated. Consider using the armclang integrated assembler instead.
0 Errors, 1 Warning
[2/2] Linking AS_ARM executable C:\workspaces\Nucleo_G747RE\out\FlashOptionBytes\STM32G4xxSBOPT\FlashOptionBytes.axf
info cbuild: build finished successfully!

=> despite the last message no file FlashOptionBytes.axf got generated

Expected Behavior

=> at least an error message - if this scenario (using legacy ASM only) is not supported
better:
=> FlashOptionBytes.axf gets generated by the linker step for a project that only has an armasm module.

Steps To Reproduce

  1. download project
  2. unzip project
  3. run uv2csolution
  4. run cbuild ...

Affected tools

  • cbuild
  • cbuild-gen
  • cpackget
  • csolution
  • packchk
  • svdconv

Affected operating systems

  • Windows amd64
  • Windows arm64
  • Linux amd64
  • Linux arm64
  • MacOS amd64
  • MacOS arm64

Environment

No response

@jkrech jkrech added bug Something isn't working critical Sever bug that blocks certain use-cases labels Aug 21, 2023
@jkrech
Copy link
Member Author

jkrech commented Aug 21, 2023

We don't have a linker handling for the language of the assembly file, which is "AS_ARM" that we introduced just to cope with legacy projects.
A workaround could be something like this:

set(CMAKE_AS_ARM_LINK_EXECUTABLE "armlink <CMAKE_AS_ARM_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES> <OBJECTS> -o <TARGET>")

@brondani where (filename + line number) would this workaround need to be applied or is this being generated?

@brondani
Copy link
Collaborator

@jkrech The workaround can be appended to the AC6.<version>.cmake file.

@jkrech jkrech removed the critical Sever bug that blocks certain use-cases label Aug 22, 2023
@jkrech
Copy link
Member Author

jkrech commented Aug 22, 2023

critical label removed due to provided workaround above.

@jkrech jkrech changed the title [Blocker]: cproject targeting toolchain AC6 with only a single legacy ASM assembler file does not link [--Blocker--]: cproject targeting toolchain AC6 with only a single legacy ASM assembler file does not link Aug 22, 2023
@jkrech jkrech changed the title [--Blocker--]: cproject targeting toolchain AC6 with only a single legacy ASM assembler file does not link cproject targeting toolchain AC6 with only a single legacy ASM assembler file does not link Aug 22, 2023
jkrech added a commit to Open-CMSIS-Pack/devtools that referenced this issue Aug 28, 2023
Open-CMSIS-Pack/cmsis-toolbox#69
Add linker command for Arm Assembler only projects.
@brondani brondani moved this to In Progress in CMSIS-Toolbox 2.1 Aug 29, 2023
@brondani
Copy link
Collaborator

Fixed in Open-CMSIS-Pack/devtools#1101

@github-project-automation github-project-automation bot moved this from In Progress to Done in CMSIS-Toolbox 2.1 Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Status: Done
Development

No branches or pull requests

2 participants