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
joseph239955
Associate II
Posted on May 17, 2011 at 12:18

Hi Squonk,

Thanks 🙂

The serial-wire debug interface used on Cortex-M3 is same as the CoreSight version. Please refer to

http://infocenter.arm.com/help/topic/com.arm.doc.ddi0314e/DDI0314E_coresight_component_trm.pdf

Section 2.2 and 2.4 for details.

Joseph

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

Hi All

I am not replying to anybody specifically but I too, only use assembler. My work requires all the embedded speed I can get. There are no 'hot spots', it is all highly used and any wasted time with C means less 'hits' with my program.

I am analyzing real time signals in noise and there must be many, many applications that also need high speed in a cheap embedded chip. Optimized assembler is essential, and it must be synchronized in real time, with no lost cycles. The STM32 is mouth watering, but I could scream that pure assembler is so neglected. I thank Mr Yu for suggesting his book and I will try to get hold of it. I also thank 'dalewheat' who have left a net link. If anybody else can offer a source of assembler I will be grateful. George

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

Hi George, Squonk,

Two more errors has been found in my book.

I attached the errata document again. Sorry for the inconvenient.

regards,

Joseph

[ This message was edited by: joseph.yiu on 14-04-2008 22:23 ]

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

I am trying to get into the STM32 in pure assembler. I find the IAR really hard going. I spent a whopping $750au on two IAR kits and a Jtag but the IAR workbench seems to be difficult to look things up and the explanations when you find them are difficult to understand. Maybe I am dumb.

My first impression is that Keil uVision seems much easier to get into, at least for the beginner. I would be interested to know if anybody else has any comments. I find Mr Joseph Yiu's book is a useful part of my learning arsenal, but if you want a copy and you do not want to wait 7 weeks for it, avoid Booktopia. I believe ARM may sell it.

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

I too, have been a long term assembly language programmer. I've enjoyed using C for a change, but when efficiency (=power consumption) is the highest priority you have to use assembly language. My assembly FIR routine is much faster than my C version. My interrupt handlers will probably have to be written in assembly as well.

The STM32 has an incredibly rich and powerful instruction set - it is one of the greatest assets of the chip. But learning about the assembly language is like going on a medieval quest. ST doesn't have a document that clearly explains the language, they rely on ARM for that documentation.

All the ARM documents assume people are migrating from other (older) ARM chips and fill their documents with confusing references to other ARM versions. They have a naming convention for the different cores that adds to the confusion. Instructions are explained with pseudocode which may be precise but is cumbersome.

ST needs to write an instruction set reference manual purely for the STM32. They don't need to mention other ARM versions. They need to explain each instruction with simple diagrams and lots of examples. They need to explain in simple language, tricky things about the core such as the ''interworking bit''.

In the mean time, the best document I found was the ''ARMv7-M Architecture Application Level Reference Manual'' available from the ARM web site. You have to fill in a form and get a password before you can download the file.

I would like to read Joseph's book but it is a bit hard to get here in Australia.

Greg.

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

I agree. I will say, that for the jobbing engineer and most engineers in big corporations the design time and the conformity of C are essential. The next programmer to come along can get into the code quickly and no one becomes indispensable. It does not create heroes and is largely ego-less, it is perfect for management.

For the embedded engineer who must have the peak performance, like calculating FITs and analogue interface work, C is just not an option. It does not even come close.

There is a niche here for a comprehensive book on assembler specifically for the STM32 processor. For people in my position I cannot see that money would be an object. I would gladly pay $1000 bucks for such a book and it would save my company many, many thousands more, when things like salary , time to market and lost sales are factored in. Does this mean a book will appear, will such an enterprise financially viable? Possibly not, but we can only hope.

Incidentally, are you located near Perth?

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

Although I like the efficiency of well crafted assembly routines, I wouldn't reject C. In the past I've often written completely in assembler because they were the only tools that were supplied free from the manufacturer.

In my project I will be using C for the basic structure and replacing routines with assembler if the efficiency gain justifies the effort. Unfortunately the ST firmware doesn't seem to have been designed with speed as the highest priority. Using C routines that write directly to the hardware might provide enough of a speed improvement for many applications.

I'm using the IAR kickstart system, it includes a C reference manual and an assembler reference manual (via the Help menu). With these two documents and the ARM document I mentioned in the previous message, a programmer has all the information they require to write any assembler. The IAR manuals have chapters advising how to interface assembler to C. It would be nice to have the assembler manual in a simpler form (because I think it is a great feature of the STM32 and should be promoted), but I'm not delaying my project for that hope.

Greg (Adelaide).

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

I know no C at all. With this handicap I wonder if it is really possible to go forward with the TMN32 at this moment. I have used the IAR and I must say I was happy with it on the MPS430 series. I like to learn 'hands on' so I enter into the IAR IDE and go to project and hit 'pure assembler' The IDE generates about 10 lines of code, but it is not a start up file. I want to go through the first step of setting the stack and PC vectors at 0000 0004 but it is all done elsewhere and I cannot find it.

I switch to the Keil and le voila! The startup files are there, the vacant but labeled spaces are there for all the service routines in most of the examples and in assembler-not that there is a choice I suppose.

I have invested in IAR kit, and it is a great bit of kit with everything on it from card reader to display, so if there is a way to find this file and make a start I would like to know. Once I get a skeleton, I can add the vectors and eventually flesh it out. I learn the assembler as much with my fingers as anything else.

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

It sounds like the Keil development system is a bit friendlier than the IAR system.

When I was learning C I found the book ''Apllications Programming in ANSI C'' by Johnsonbaugh and Kalin useful - but there are probably many other useful books out there now. Perhaps you could go to your local university book store/library and browse the different C books.

C is a powerful language and not that hard to learn if you start with simple/small programs and work your way up.

Good luck.

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

At my stage of learning the STM32, without knowledge of C, perhaps the Keil seems more helpful. I am not a full-time programmer, my occupation is 95% designing/selling small RFID modules with less than 1k of code so I really do not have the normal criteria when comparing Keil to IAR.

I will have a look at the C book you suggest, who knows.

Cheers, George