my question how to program a simple gpio pin to on or off by using "Just" assembly language programing and not using c++ in KEIL MDK.?
Hello Deepak,
You remind me of myself whenI started out on ARM. Take my advice - Don't go for assembly programming. There are ways to do so, but its a real pain to do so for ARM.
I suspect you've come from a PIC/AVR/8051 background (like myself). 8-bit programmers tend to think that 32-bit programming is just an extension of 8-bit work. But it isn't so. Just turning a GPIO pin on or off will take you probably a page of code in assembly. You have to set its direction, pull-up or pull-down, filter, clock source, etc etc, followed by turning it on through a bitfield (you can't turn on only that particular bit). I learned this the hard way.
Use KDS. It is a free, no limitations toolchain maintained by Freescale. Start programming in C. The only benefit of assembly is you learn how the hardware actually works. If you're interested, go through the header files.
Regards,
Pratiek
Hi Deepak Siyal,
I think you may firstly debug the C code and know the assembly implementation via the Disassembly window just below:
Please kindly refer to the following for more details on the assembly language: http://infocenter.arm.com/help/topic/com.arm.doc.dui0662b/DUI0662B_cortex_m0p_r0p1_dgug.pdf
Hope that helps,
Have a great day,
Kan
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------