[SOLVED] SEGGER_RTT_ASM_ARMv7M.S assembler error: bad instruction

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] SEGGER_RTT_ASM_ARMv7M.S assembler error: bad instruction

    Hi all,

    I downloaded newest Segger System Viewer V332 and tried to integrate the target specific Segger Systemviewer sources into my STM32F429BG uC project.
    When I building the project with the GNU GGC compiler V9-2020q2 I will get some assemler errors when compiling segger file SEGGER_RTT_ASM_ARMv7M.S (see attachement)

    Why has the gnu gcc assembler problems with this assembler file ?

    Thanks a lot for your support.

    Best Regards
    Jochen
    Images
    • AssemblerErrors.PNG

      33.65 kB, 963×196, viewed 233 times

    The post was edited 1 time, last by Jochen_080877 ().

  • In the meantime, I found the bug by myself.
    I renamed the assembler file from SEGGER_RTT_ASM_ARMv7M.S to SEGGER_RTT_ASM_ARMv7M.s, because all of my assembler files (e.g. startup ...) has a lowercase "s" ending.

    The GNU GCC assembler interprets this as a normal assembler file but SEGGER_RTT_ASM_ARMv7M contains assembler code which must be pre-processed and therefore it is notated as a upercase "S" !

    Looking into the GNU GCC documentation, there is a description how the assembler interprets files with ".s" and ".S" endings.

    So, if I leave the file unchanged with the uppercase ending ".S", the assembler builds the file with no errors
    Images
    • AssemblerEnding.PNG

      3.67 kB, 354×154, viewed 254 times
  • Hello,

    Thank you for your inquiry.

    Your analysis is correct. That is why we ship the file with the .S ending, so the file runs first through a preprocessor so it is compatible to different assembler syntaxes from different tool chains.

    Case closed.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.