2022-10-15 02:19 PM
Dear
I appreciate if someone leads me to learn how to create an assembly program within KEIL uVision 5.
I develop on STM32F030 series micro-controllers.
Is it possible in older versions, i.e. uV 4, uV 3, ... etc?
Best Regards!
2022-10-15 11:35 PM
When you create a project with Keil, it does not even create a main function. You may simply write your main function in assembly language instead of C.
Another question is why would anyone do that. An average compile for ARM usually writes better, more compact and faster code than an average assembly programmer. ARM is not an assembly-programming friendly architecture.
2022-10-16 06:24 AM
Perhaps take and example/template project, clone into another directory, and do you Assembler work directly into the startup.s file.
Failing that, read some of the documentation, or find tutorials or videos, doubt you're charting new territory here.
2022-10-16 11:51 AM
There looks to be no straight way to do it.
Dear gbm, I agree that c is easier. However, I believe assembly programming gives me a better understanding of MCU of concern. Hence, it improves my ability to code in C. Eventually, all coding is transformed to assembly instructions after compilation/linking/... process.
Thanks for replies!
2022-10-16 11:17 PM
Let me, an old programmer with experience in about 20 assembly languages, disagree on this topic. Everything you want to see and understand, is in the assembly listing of your compiled code. Keil free version does not produce this output - another reason for switching to STM32CubeIDE to see the beautiful .list file. :)
ARM assembly is not for humans... ;) Ok, maybe reading is but writing - not.
ARMv6-M architecture was created to make it possible to avoid even a single line of assembly in the whole microcontroller firmware:
https://github.com/gbm-ii/Cortex-M_C_startup_gen
Proof of concept - as you can see, it's possible:
2022-10-20 08:55 AM
Hello @ihartavi,
Welcome to ST community.
I think you can find a project that can help you here.
Regards,
Chahinez.
2022-10-20 12:23 PM
Thanks for sharing! I appreciate.
It is interesting that it was not part of KEIL. I expect it to be, because, IMO, KEIL should provide assembly project generation since assembly coding is already a function of uVision IDE.
It is obvious there is no easy way. I have to beg experts to show me how for a certain microcontroller.