2024-01-12 09:11 AM
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
Solved! Go to Solution.
2024-01-12 10:53 AM - edited 2024-01-12 10:56 AM
Link to CubeIDE: https://www.st.com/en/development-tools/stm32cubeide.html
Link to startup.s for gcc and STM32L476:
Your startup.s looks like one for the Keil assembler.
2024-01-12 09:24 AM
Which IDE do you use? If CubeIDE - can you successfully build any other example for this board?
2024-01-12 09:52 AM
> ../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.
2024-01-12 10:22 AM
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
2024-01-12 10:24 AM
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
2024-01-12 10:28 AM - edited 2024-01-12 10:30 AM
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?
2024-01-12 10:31 AM - edited 2024-01-12 10:32 AM
I tried STM32cube IDE and same issues
2024-01-12 10:34 AM
> 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.
2024-01-12 10:42 AM
can you please provide me a link for the correct script or and IDE that can support the script I am using please.
2024-01-12 10:53 AM - edited 2024-01-12 10:56 AM
Link to CubeIDE: https://www.st.com/en/development-tools/stm32cubeide.html
Link to startup.s for gcc and STM32L476:
Your startup.s looks like one for the Keil assembler.