Skip to main content
Associate
January 12, 2024
Solved

Cant Compile a project

I am using a NUCLEO-L476 board with X-Nucleo-NFC08A1, attempting to compile the provided example by ST, NFC08A1_PollingTagDetectNDEF. However, I encounter an issue with the file startup_stm32l476xx.s. Every time I compile the project, I receive the following errors:

../startup_stm32l476xx.s:128: Error: bad instruction `dcd TIM6_DAC_IRQHandler'
../startup_stm32l476xx.s:128: Error: bad instruction `tim6 and DAC1&2 underrun errors'
../startup_stm32l476xx.s:129: Error: bad instruction `dcd TIM7_IRQHandler'
../startup_stm32l476xx.s:129: Error: bad instruction `tim7'
../startup_stm32l476xx.s:130: Error: bad instruction `dcd DMA2_Channel1_IRQHandler'
../startup_stm32l476xx.s:130: Error: bad instruction `dma2 Channel 1'
../startup_stm32l476xx.s:131: Error: bad instruction `dcd DMA2_Channel2_IRQHandler'
../startup_stm32l476xx.s:131: Error: bad instruction `dma2 Channel 2'
../startup_stm32l476xx.s:132: Error: bad instruction `dcd DMA2_Channel3_IRQHandler'
../startup_stm32l476xx.s:132: Error: bad instruction `dma2 Channel 3'
../startup_stm32l476xx.s:133: Error: bad instruction `dcd DMA2_Channel4_IRQHandler'

 

It seems like there might be issues with the syntax or directives in the startup_stm32l476xx.s file. I need assistance in resolving these errors to successfully compile the project

    This topic has been closed for replies.
    Pavel A.
    Pavel A.Best answer
    January 12, 2024

    10 replies

    Pavel A.
    January 12, 2024

    Which IDE do you use? If CubeIDE - can you successfully build any other example for this board?

     

    Associate
    January 12, 2024

    I am using attolic and stide both give same error I can't build the project with the file included , if I remove the file from the project I can build it , but I can't flash the board 

    TDK
    January 12, 2024

    > ../startup_stm32l476xx.s:128: Error: bad instruction `tim6 and DAC1&2 underrun errors'

    Looks like a comment trying to be compiled as an instruction.

    Also looks like you have a startup script meant for a different compiler than what you're using. The one meant for GCC doesn't have these directives. That's probably the heart of the issue.

    https://github.com/sucrystal-v/NFC_ST25R3911_X-NUCLEO-NFC05A/blob/ec82d6a15c2e2519218961701cd09aa07a657f69/Projects/STM32L476RG-Nucleo/Applications/PollingTagDetect/SW4STM32/startup_stm32l476xx.s

     

    "If you feel a post has answered your question, please click ""Accept as Solution""."
    Associate
    January 12, 2024

    Do you have IDE you recommend for me , so I can build it , I am using attolic with  gcc , also I get same error when I use stm32cubeide

    TDK
    January 12, 2024

    > also I get same error when I use stm32cubeide

    As stated before, you're using the wrong startup script for STM32CubeIDE. The fix would be to use the correct one. There is an SW4STM32 project, you should be able to import that and use it.

    "If you feel a post has answered your question, please click ""Accept as Solution""."
    Pavel A.
    January 12, 2024

    The "X-CUBE-NFC6 software expansion for STM32Cube" software is meant to be used with CubeIDE or other IDE supported by STM32Cube. Can you use the supported software instead of Atollic?

     

    Associate
    January 12, 2024

    I tried  STM32cube IDE and same issues 

    Pavel A.
    Pavel A.Best answer
    January 12, 2024
    Associate
    January 12, 2024

    thank you