2026-03-05 5:45 AM - last edited on 2026-03-05 7:02 AM by Andrew Neil
Good day,
After I did an upgrade to the latest version when I compile I get this error.
Where can I get documentation on this.
Never did an upgrade without issues.
make -j48 all
arm-none-eabi-gcc -mcpu=cortex-m4 -g3 -DDEBUG -c -x assembler-with-cpp -MMD -MP -MF"Startup/startup_stm32f411ceux.d" -MT"Startup/startup_stm32f411ceux.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Startup/startup_stm32f411ceux.o" "../Startup/startup_stm32f411ceux.s"
../Startup/startup_stm32f411ceux.s: Assembler messages:
../Startup/startup_stm32f411ceux.s:61: Error: bad instruction `rtc ldr sp,=_estack'
make: *** [Startup/subdir.mk:19: Startup/startup_stm32f411ceux.o] Error 1
Solved! Go to Solution.
2026-03-05 10:45 AM - edited 2026-03-05 10:46 AM
Note that everybody can see all posts - there's no need to repeat the same thing in separate replies to each person.
You can mention multiple people in a post using '@'
@erastusC wrote:I did a search in the C code .
As noted above, it's not in the C code - it's an Assembler error.
The error message tells you this, and identifies the file & line number where the error occurred:
../Startup/startup_stm32f411ceux.s: Assembler messages:
../Startup/startup_stm32f411ceux.s:61: Error: bad instruction `rtc ldr sp,=_estack'
So the file name is startup_stm32f411ceux.s
That file is located in the Startup folder
The :61: is the line number within the file.
2026-03-05 5:47 AM
Hello,
@erastusC wrote:
After I did an upgrade to the latest version when I compile I get this error.
last update of what? tool? software package? which one?
2026-03-05 5:48 AM - edited 2026-03-05 6:01 AM
Looks like "rtc" was typed somewhere it shouldn't have been. Maybe that window was active when you didn't expect.
Create a new project and copy the startup file to recover.
I don't think this has anything to do with upgrading STM32CubeIDE. The compiler hasn't changed. This is a compiler error. If the file is the same, it will produce the same results.
2026-03-05 7:11 AM - edited 2026-03-05 7:33 AM
@TDK wrote:This is a compiler error. .
Actually, it's an Assembler error:
../Startup/startup_stm32f411ceux.s: Assembler messages:
../Startup/startup_stm32f411ceux.s:61: Error: bad instruction `rtc ldr sp,=_estack'
@TDK wrote:Looks like "rtc" was typed somewhere it shouldn't have been.
Indeed.
I think the code should be something like this:
Reset_Handler:
ldr r0, =_estack
mov sp, r0 /* set stack pointer */
@TDK wrote:Maybe that window was active when you didn't expect.
Possibly due to this long-running issue: Jumping to random file after pressing Run button
@erastusC - Specifically, this.
2026-03-05 7:26 AM
Thank you for the pedantic correction. I'm not sure it changes the overall message.
2026-03-05 10:08 AM
I did a search in the C code and there is no error showing or I could not find any place where rtc was incorrectly typed. It gets generated when it gets compiled.
I have no idea to search for it as I did not work in assembler.
2026-03-05 10:08 AM
I did a search in the C code and there is no error showing or I could not find any place where rtc was incorrectly typed. It gets generated when it gets compiled.
I have no idea to search for it as I did not work in assembler.
2026-03-05 10:18 AM
It's in your "startup_stm32f411ceux.s" file.
2026-03-05 10:45 AM - edited 2026-03-05 10:46 AM
Note that everybody can see all posts - there's no need to repeat the same thing in separate replies to each person.
You can mention multiple people in a post using '@'
@erastusC wrote:I did a search in the C code .
As noted above, it's not in the C code - it's an Assembler error.
The error message tells you this, and identifies the file & line number where the error occurred:
../Startup/startup_stm32f411ceux.s: Assembler messages:
../Startup/startup_stm32f411ceux.s:61: Error: bad instruction `rtc ldr sp,=_estack'
So the file name is startup_stm32f411ceux.s
That file is located in the Startup folder
The :61: is the line number within the file.
2026-03-05 12:25 PM
Thanks a mil. There was a RTC not sure where that came from.
I copied your software and voila it works.
Many thanks