Skip to main content
RMyer.1
Associate III
June 24, 2021
Question

How to - bare bones startup for assembly only?

  • June 24, 2021
  • 6 replies
  • 1225 views

Hi All,

I am new to CubeIDE, I've been playing around with it for a few days now, watching some stuff on YouTube, setting up a few modules in the CPU and making it do some basic things to get used to it all.

But from here on I'd like to be able to work in assembler for this small project I'm working on, yeah I know 'but why, just use C' ! ;)

Some of the IDE's I've used in the past have an explicit 'assembler only' option when starting a new project, STM32CubeIDE doesn't seem to, so how would I go about setting up a new project that essentially does nothing more than generate something like the 'startup_stm32xxx.s' file but then allows me to add in my own asm code?

Thanks.

This topic has been closed for replies.

6 replies

TDK
June 24, 2021

Just generate a normal C project and delete the files you don't want.

"If you feel a post has answered your question, please click ""Accept as Solution""."
RMyer.1
RMyer.1Author
Associate III
June 25, 2021

Thanks TDK, is it that simple? Just delete all the 'c' files under 'SRC', remove any other references to them and then just add in my own *.s assembler files to the project?

TDK
June 25, 2021
There are other C files in drivers and middleware, but yes, delete all those and you’re left with the startup file with an undefined reference to main, but will otherwise compile fine.
"If you feel a post has answered your question, please click ""Accept as Solution""."
bully
Senior
April 20, 2022

Hello,

tried this, but I couldn't debug the project properly through assembly source code.

Does this works or is there any other catch to setup ?

Thanks,

regards.

RMyer.1
RMyer.1Author
Associate III
June 25, 2021

Ok thanks, I'll give that a go.