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, I am a newbie to micro controllers. I am using a LPC2146 board and I am unable to understand what startup.s is actually doing, especially the vector table initializations. Is there any book where I can learn the assembly opcodes? (Google search isn't too helpful)
I have the document by hitex(Introduction to LPC2000), but I think even that requires some basic understanding.
Thanks in advance.
Have you studied the specific chip documentation from the manufacturer - NXP? The Product Information Page (PIP) on their website summarises all their resources available for the chip: www.nxp.com/.../LPC2141_42_44_46_48_4.html
Technical documentation about the ARM architecture is here: infocenter.arm.com/.../index.jsp
Keil's tool documentation is here: http://www.keil.com/support/man_arm.htm
Keil provide booklists here: http://www.keil.com/books/
Have you considered attending a training course or seminar; eg, http://www.keil.com/links/tpl/training.asp http://www.keil.com/events/
If this is a commercial project, have you considered hiring a Consultant to assist and advise you? Keil's Device Database entry lists consultants who have registered a specific experience with the particular chip: http://www.keil.com/dd/chip/3880.htm There's also a general search here: http://www.keil.com/condb/search.asp
And, of course, your Distributor should be able to help you...
http://www.keil.com/support/man/docs/gsac/GSAC_StrtupCodeARM7.htm
The startup-code executes immediately upon reset of the target system and performs the following operations:
1. Defines interrupt and exception vectors. 2. Configures the CPU clock source (on some devices). 3. Initializes the external bus controller. 4. Copies the exception vectors from ROM to RAM for systems with memory remapping. 5. Initializes other low level peripherals, if necessary. 6. Reserves and initializes the stack for all modes. 7. Reserves the heap. 8. Transfers control to the main C function.
Thanks for all that info Andy! I don't want to sound lazy, but is there some help to understand just the startup.s, along with what exactly to do with the vector tables? A shortcut, to be precise (:-) No, this isn't a commercial project. I'm a college student trying to learn about ARM microprocessors in my summer break, because my course only has 8051 programming next year.
I would say "unlucky you" if your next year only includes 8051 programming.
Nothing wrong with 8051 chips, but they are not the only architecture on the market. And it is an architecture put under hard pressure. The most probable reason that the college is only teaching 8051 is that they either can't afford newer development boards, or that the teachers don't want to invest own time into learning new processors and then design some new exercices.
You should complain, since they are affecting the value of your education by not focusing on multiple architectures. When doing commercial projects, one of the hardest steps is to figure out what processor to use - but that requires knowledge about more than one single processor from one single architecture.
The saddest part is there are hardly any colleges in India which teach anything other than 8051 and 8086, even the very best. They expect us to learn it ourselves.
That is a common view of people on forums like this.
Seems somewhat at variance with the impression given by books like this: "?
They don't teach, but some of us do learn it ourselves! And, from what I know, our undergraduate courses are tougher than ones abroad (although outdated, archaic, whatever) so that counts for something, I guess.
An Introduction to ARM Assembly Language (Only 9 pages.)
dev.emcelettronica.com/introduction-to-arm-assembly-language
Thanks, but I'm reading a proper 200 page book on ARM assembly :), and have made good headway!