cancel
Showing results for 
Search instead for 
Did you mean: 

How to - bare bones startup for assembly only?

RMyer.1
Associate III

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.

6 REPLIES 6
TDK
Guru

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
Associate III

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?

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".
RMyer.1
Associate III

Ok thanks, I'll give that a go.

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.

Why couldn't you debug it? Yes, this works, I verified.

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