We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi everybody,
I have here an MCBSTM32E with an STM32F103ZE. I want to write a short routine in assembler, becaue my C code is to slow. But unfortunatly i dont find any example how to use Inline Assembly with the µVision 4 IDE. Hope somebody here can help me. In the routine i want to start a Timer and let a GPIO Pin toggle.
Regards
Check this website for the compiler user guide - also have a look at the linker and utilities guide. And use embedded assembly, not inline please!
Ok Thanks, where is the difference between Inline and Embedded Assembly?
What does the code look like, that results in it being too slow?
Starting a timer and controlling an output sounds like code that would have almost 1-to-1 translation between C and assembler since it's a question of writing data to SFR.
Remember that you can have inline functions, where you don't get the cost of a function call/return when "calling" a function.
> Ok Thanks, where is the difference between Inline > and Embedded Assembly?
As far as Cortex-M3 and ARM C compilers are concerned the latter works :-)
The ARM C compiler only supports the traditional ARM instruction set (not Thumb) with inline assembler. It has been officially deprecated for architectures >=v7
Regards Marcus
Step #1: Read
http://www.keil.com/books/armbooks.asp
www.amazon.com/.../185617963X
--Cpt. Vince Foster 2nd Cannon Place Fort Marcy Park, VA