cancel
Showing results for 
Search instead for 
Did you mean: 

Pure assembler examples in IAR KickStart Kit

clive1
Associate II
Posted on May 03, 2008 at 08:31

Pure assembler examples in IAR KickStart Kit

19 REPLIES 19
clive1
Associate II
Posted on May 17, 2011 at 12:18

All the products I have produced so far have used either Microchip PIC or Silicon labs microcontrollers in pure assembler.

My next product will use the STM32 microcontroller. I have just received the IAR KickStart Kit for STM32, but there are no examples of pure assembler projects for the STM32. I have contacted IAR and they say there are none available, which seems very poor!

Could anyone please help with a simple project in pure assembler for the IAR system which will work on the supplied development board.

lanchon
Associate II
Posted on May 17, 2011 at 12:18

not what you asked, but learning a bit of C would surely be easier and the return on investment would be enormously bigger than learning cortex assembler. I think everyone here programs the STM32 at least 99% in C or C++. the last assembler I learned was 8-bit, and boy was I young and reckless... 🙂

clive1
Associate II
Posted on May 17, 2011 at 12:18

Thank you lanchon for your reply.

I design and manufacture electronic speed controllers for radio controlled model car racing. I design the hardware, printed circuit boards, machined parts and injection moulded parts, oh and the software. I also build and test quite a few of them.

I have always programmed in assembler, I didn't get around to learning C (I've used BASIC but C seems a bit complicated to me!).

I don't really want to try and learn C from scratch, then learn about the STM32.

clive1
Associate II
Posted on May 17, 2011 at 12:18

Thanks lanchon and dale for your help, I will have to think what to do next.

lanchon
Associate II
Posted on May 17, 2011 at 12:18

assembler is mostly reserved for compiler writer these days. ST doesn't even publish a document describing machine language, you'd have to go to arm.com and get the cortex-m3 core manual for that.

but C is so simple! let me say again that I'm sure it's much more simple than learning cortex, and orders of magnitude more productive. what do you mean ''then learn about the STM32''? you use C to completely avoid learning a specific core. the only thing you need to learn about is peripherals, and that's true whether you use assembler or C (but in C you can choose to avoid many details by using the ST libraries).

in fact C is so small that I'd recommend that you learn C++ instead (read bjarne stroustrup's the C++ programming language (no C knowledge required, one of the best books I've read), or otherwise K&R's the C prog lang).

try to use a GCC port on your PC to get used to C, but if GCC requires too much reading you could use borland's free BCC C/C++ compiler instead.

lspr35
Associate II
Posted on May 17, 2011 at 12:18

Dear Clive,

I bought the book: ''The Definitive Guide to the ARM Cortex-M3'' by Joseph Yiu. This book also describes the assembler language of the Cortex-M3 core. It also has at least some examples of assembler code. Maybe this book might help You.

Besides this I also think that programming in C is worth to learn! In my opinion C is not well suited for starting with high level programming languages, but once You have learned it it is very powerfull!!! The only reason for programming in Assembler is code optimization with respect to size and speed. I think both is not necessary for the STM32 because it is very fast and has 128k of embedded flash (which should be enough if You originally planned to use assembler).

Regards

Squonk

[ This message was edited by: Squonk on 04-12-2007 12:32 ]

clive1
Associate II
Posted on May 17, 2011 at 12:18

Thanks Dale,

I have read your great notes, I thought it shouldn't be that difficult to get set up to program in assembler. I think the 'reset + 1' problem must have been one reason why I had difficulty.

I have a much better idea of what I should do to get under way now (without going near C).

Thanks also Squonk for your suggestion.

joseph239955
Associate II
Posted on May 17, 2011 at 12:18

Hi Squonk,

Thanks for buying my book. Hope you find it useful. There are a few mistakes in the book. I attached the errata in pdf.

regards,

Joseph

lspr35
Associate II
Posted on May 17, 2011 at 12:18

Hi Joseph,

thanks for the errata. I think the book is very useful - very good job! Currently I am missing a few words on the Serial-Wire interface protocol for debugging.

Regards

Squonk