Understanding and Decoding Keil startup code for ARM Cortex-M Processors
Keywords: Embedded systems, ARM, Keil, Startup code, Boot sequence
While turning on your PC, you must have seen few splash screen, that company logo and OS logo. Its takes few seconds to boot up and bring desktop on screen. There are bunch of things happen in the background that load your OS while booting up your PC.
In embedded systems the ultimate controlling unit i.e. MCU/Processor usually is tightly coupled with the memory and hardware. Like desktop PC, MCUs also passes certain stages before jumping to user code. The steps followed is a combination of both hardware defined and software defined. We have a dedicated tutorial for Boot process in embedded system that will guide you to understand how boot sequence in embedded systems. The link to the tutorial is given bellow.
One piece of code that has critical significance both at boot time and at run is the startup code. The startup code is usually provided by vendors as a part of toolchain and is usually automatically added while creating new project. You can write your own startup code if you have fair grip over Assembly and underlying hardware architecture.
In this tutorial we will try to explain the startup file e.g. startup_tm4c123.s, startup_stm32f4xx.s etc. added to keil projects for ARM cortex-M processor based MCUS e.g. STM32F4xx, TM4C123 etc. etc. The startup file code is written in ARM Assembly (for ARM Compiler like Keil) and is usually provided by the SoC vendor. The startup file provides low level interface between various exception and the underlying hardware. The code also provides entry point for the application linking the Power on Reset event to the main application.
Before moving forward, let’s explain the ARM assembly instructions and directives used in the startup code. It’s not complete list of ARM assembly instruction rather these are the ones used in startup file.
1. ARM Assembly:
Following are the selective ARM Cortex-M instructions used in Startup code.
NOTE: If you are already familiar with ARM assembly, you can skip this section.
EQU: The EQU
is not really an Instruction rather its an Assembler directive called the EQUATE
directive. Its much similar to #define
directive in C and assigns a Label to a numeric number. e.g.
PI EQU 3.14
Wonderful work! That is the type of information that are supposed to
be shared across the internet. Shame on the seek engines
for not positioning this post upper! Come on over and consult with my website .
Thanks =) 0mniartist asmr
Hey! I understand this is kind of off-topic but I had to ask.
Does managing a well-established website like yours require a massive amount work?
I’m completely new to running a blog but I do write in my journal daily.
I’d like to start a blog so I can share my own experience and views
online. Please let me know if you have any ideas or tips for new aspiring blog owners.
Thankyou! 0mniartist asmr
Hi colleagues, its great paragraph regarding cultureand completely defined, keep it up all the time.
0mniartist asmr
Admiring the persistence you put into your site and detailed information you provide.
It’s great to come across a blog every once in a while that isn’t the same out of
date rehashed material. Excellent read! I’ve saved your
site and I’m adding your RSS feeds to my Google account.
0mniartist asmr
Greetings! Very useful advice within this article!
It’s the little changes that will make the most important changes.
Thanks for sharing!
Hey there are using WordPress for your blog platform? I’m new to the
blog world but I’m trying to get started and set up
my own. Do you need any html coding knowledge to make your own blog?
Any help would be greatly appreciated!
Howdy! This blog post couldn’t be written much better!
Going through this post reminds me of my previous roommate!
He constantly kept talking about this. I am going to
send this post to him. Fairly certain he will have a very good read.
I appreciate you for sharing!
After I initially commented I appear to have
clicked the -Notify me when new comments are added- checkbox
and from now on each time a comment is added I receive four emails with the same comment.
There has to be a means you are able to remove me from that service?
Thank you!
It is in point of fact a great and helpful piece of information. I am
satisfied that you just shared this useful info with us.
Please keep us up to date like this. Thanks for sharing.
Incredible points. Solid arguments. Keep up the amazing
effort.
Hi, i read your blog from time to time and i own a similar one and i
was just wondering if you get a lot of spam comments? If so how do you prevent it, any plugin or anything you can recommend?
I get so much lately it’s driving me mad so any assistance is very much appreciated.
I know this if off topic but I’m looking into starting my own weblog and was wondering
what all is needed to get setup? I’m assuming having a blog like yours would cost
a pretty penny? I’m not very internet savvy so I’m not 100% positive.
Any tips or advice would be greatly appreciated.
Many thanks
you’re in reality a excellent webmaster. The website loading velocity
is amazing. It sort of feels that you are doing any distinctive trick.
Moreover, The contents are masterpiece. you’ve done a fantastic process in this subject!
scoliosis
I couldn’t resist commenting. Perfectly written! scoliosis
scoliosis
Hi Dear, are you truly visiting this web site regularly,
if so afterward you will absolutely take good know-how. scoliosis
free dating sites
It’s an amazing article designed for all the web visitors; they will get benefit from it I am
sure. free dating sites
scoliosis
Yes! Finally someone writes about scoliosis. scoliosis
dating sites
Hi there, just became aware of your blog through Google, and found that it is
really informative. I am going to watch out for brussels. I’ll be
grateful if you continue this in future. Many people will be benefited from your writing.
Cheers! https://785days.tumblr.com/ dating sites
Great information. Lucky me I recently found your blog by accident (stumbleupon).
I have saved as a favorite for later!
Nice respond in return of this question with solid arguments and describing everything concerning that.
Nice blog here! Also your website loads
up fast! What host are you using? Can I get
your affiliate link to your host? I wish my site loaded up as quickly as yours lol
Yes! Finally someone writes about a.
After exploring a handful of the blog posts on your site, I seriously like your way
of writing a blog. I book-marked it to my bookmark site list and
will be checking back in the near future. Please visit my website too and let me know your opinion.
Normally I do not learn post on blogs, however I would like to
say that this write-up very pressured me to check out and do so!
Your writing taste has been surprised me. Thank you,
quite great article.
Hi there all, here every one is sharing these knowledge,
therefore it’s fastidious to read this blog, and I used to pay a
quick visit this webpage all the time.
This paragraph provides clear idea in support of the new users of blogging, that genuinely how to do running a blog.
Thank you for the auspicious writeup. It in fact was a amusement
account it. Look advanced to more added agreeable
from you! However, how could we communicate?
First off I want to say fantastic blog! I had a quick question which I’d like to ask if you
don’t mind. I was interested to find out how you center yourself and clear your head
prior to writing. I have had difficulty clearing my thoughts in getting my thoughts out there.
I truly do enjoy writing but it just seems like the first 10 to 15 minutes are generally lost just trying to figure
out how to begin. Any ideas or hints? Appreciate it!
I am really happy to read this web site posts which carries tons of useful data, thanks for providing these information.
Hey I know this is off topic but I was wondering if you knew of any
widgets I could add to my blog that automatically tweet my newest twitter updates.
I’ve been looking for a plug-in like this for quite some time and was hoping maybe you would have some experience with
something like this. Please let me know if you run into anything.
I truly enjoy reading your blog and I look forward to your new updates.
I was extremely pleased to discover this site. I want to to thank
you for ones time for this wonderful read!! I definitely liked every part of it and i
also have you saved to fav to check out new things on your website.
Howdy! I’m at work surfing around your blog from my new iphone 4!
Just wanted to say I love reading your blog and look forward to all your posts!
Carry on the fantastic work!
May I simply just say what a comfort to find somebody that genuinely knows
what they are discussing on the net. You definitely know how to bring a problem to light and make it important.
More and more people should check this out and understand this side of the
story. I was surprised you aren’t more popular since you surely have
the gift.
Do you have a spam problem on this blog; I also am a blogger, and I was wanting to know your situation;
we have created some nice practices and we are looking to trade strategies with
other folks, why not shoot me an e-mail if interested.
Hi there, I would like to subscribe for this web site to take newest updates, so where can i do it please help.
I know this if off topic but I’m looking into starting my own blog and was wondering what all is required
to get setup? I’m assuming having a blog like yours would cost a pretty penny?
I’m not very web smart so I’m not 100% sure.
Any tips or advice would be greatly appreciated. Cheers
My relatives all the time say that I am wasting my time here at net,
but I know I am getting experience all the time
by reading thes good articles or reviews.
Wow, amazing blog structure! How lengthy have you ever been running a blog for? you made running a blog glance easy. The total glance of your site is magnificent, as well as the content material!
Hello there! I know this is kinda off topic but I’d
figured I’d ask. Would you be interested
in exchanging links or maybe guest writing a blog post or vice-versa?
My site addresses a lot of the same subjects as yours and
I think we could greatly benefit from each other. If you happen to be interested feel free to shoot me an email.
I look forward to hearing from you! Great blog by the way!
Incredible! This blog looks just like my old one! It’s on a entirely different topic but it has pretty much the same page layout and design. Wonderful choice of colors!
If you are going for most excellent contents like myself,
only pay a visit this site all the time as it presents quality contents, thanks
After checking out a handful of the blog articles on your web page,
I really like your way of writing a blog. I saved as a favorite it to
my bookmark website list and will be checking back in the near future.
Take a look at my website as well and tell me
what you think.
Greetings! Very useful advice in this particular post! It’s the little
changes which will make the most significant changes. Many thanks for sharing!
It’s actually a cool and useful piece of information. I’m satisfied that you shared this useful info with us. Please keep us informed like this. Thanks for sharing.
Wow, fantastic weblog format! How long have you ever been blogging for? you made running a blog glance easy. The overall look of your site is excellent, as neatly as the content material! firmonet
Very efficiently written story. It will be valuable to everyone who usess it, including yours truly :). Keep up the good work – looking forward to more posts. firmonet
Appreciate this post. Will try it out. quest bars http://j.mp/3jZgEA2 quest bars
This design is spectacular! You most certainly know how to keep a reader entertained.
Between your wit and your videos, I was almost moved to start my own blog (well, almost…HaHa!) Excellent job.
I really loved what you had to say, and more than that,
how you presented it. Too cool! scoliosis surgery https://0401mm.tumblr.com/ scoliosis surgery
We’re a bunch of volunteers and opening a brand new scheme in our community.
Your website provided us with useful info to work
on. You have performed an impressive job and our entire group will likely be thankful to you.
asmr https://app.gumroad.com/asmr2021/p/best-asmr-online asmr
Thanks for another wonderful post. Where else may anyone get that
kind of information in such a perfect method of writing?
I’ve a presentation subsequent week, and I’m at the
look for such information. quest bars https://www.iherb.com/search?kw=quest%20bars quest bars
Hello just wanted to give you a quick heads up and let
you know a few of the pictures aren’t loading properly.
I’m not sure why but I think its a linking issue.
I’ve tried it in two different web browsers and both show the same results.
scoliosis surgery https://coub.com/stories/962966-scoliosis-surgery scoliosis surgery
Greetings! I’ve been following your blog for a while now
and finally got the courage to go ahead and give you a shout out from Dallas Tx!
Just wanted to tell you keep up the excellent job!
cheap flights http://1704milesapart.tumblr.com/ cheap flights
You can certainly see your enthusiasm within the article you write.
The sector hopes for even more passionate writers such as you who aren’t afraid to
say how they believe. Always follow your heart. ps4 games https://tinyurl.com/45xtc52b ps4 games
grow your blog – blogexpander
EgStamn
At this time it sounds like Expression Engine is the preferred blogging platform out there right now. (from what I’ve read) Is that what you are using on your blog?
We’re a gaggle of volunteers and opening a new scheme in our community. Your site offered us with useful information to work on. You’ve done a formidable activity and our entire community can be grateful to you.
Hey! Do you know if they make any plugins to help with Search Engine Optimization? I’m trying to get my blog to rank for some targeted keywords but I’m not seeing very good results. If you know of any please share. Cheers!
Unquestionably believe that that you said. Your favourite justification appeared to be at the web the simplest thing to bear in mind of. I say to you, I definitely get annoyed whilst folks consider worries that they just don’t understand about. You controlled to hit the nail upon the top as well as outlined out the whole thing with no need side-effects , other folks could take a signal. Will likely be back to get more. Thank you
I blog very often and also I genuinely respect your content. This terrific piece has definitely actually peaked my passion. I am mosting likely to book mark your online site and keep looking for new facts relating to once a week. I opted in for your RSS feed as well.
Hi there, i read your blog occasionally and i own a similar one and i was just wondering if you get a lot of spam remarks? If so how do you stop it, any plugin or anything you can recommend? I get so much lately it’s driving me crazy so any support is very much appreciated.
Thanks , I’ve recently been looking for info about this subject for ages and yours is the greatest I’ve discovered so far. But, what about the conclusion? Are you sure about the source?
I love your blog.. very nice colors & theme. Did you make this website yourself or did you hire someone to do it for you? Plz respond as I’m looking to create my own blog and would like to know where u got this from. kudos
Simply desire to say your article is as astounding. The clarity in your post is just excellent and i could assume you are an expert on this subject. Fine with your permission let me to grab your RSS feed to keep up to date with forthcoming post. Thanks a million and please keep up the gratifying work.
Write more, thats all I have to say. Literally, it seems as though you relied on the video to make your point. You clearly know what youre talking about, why waste your intelligence on just posting videos to your site when you could be giving us something informative to read?
Hi, i read your blog from time to time and i own a similar one and i was just wondering if you get a lot of spam feedback? If so how do you prevent it, any plugin or anything you can suggest? I get so much lately it’s driving me insane so any support is very much appreciated.
I love your blog.. very nice colors & theme. Did you create this website yourself or did you hire someone to do it for you? Plz respond as I’m looking to construct my own blog and would like to know where u got this from. cheers
Hi there this is somewhat of off topic but I was wondering if blogs use WYSIWYG editors or if you have to manually code with HTML. I’m starting a blog soon but have no coding expertise so I wanted to get advice from someone with experience. Any help would be greatly appreciated!
You can certainly see your enthusiasm in the article you write.
The arena hopes for more passionate writers like you who are not afraid to mention how they
believe. At all times go after your heart. https://parttimejobshiredin30minutes.wildapricot.org/ part time
jobs hired in 30 minutes
Really Appreciate this article, can I set it up so I receive an update sent in an email whenever you publish a new update?
Hello There. I found your blog using msn. This is a very well written article. I will be sure to bookmark it and come back to read more of your useful info. Thanks for the post. Ill definitely return.
Your blog is cool. It is certainly quick and regards regarding permitting feedbacks.
Hello there! This is my first visit to your blog! We are a team of volunteers and starting a new project in a community in the same niche. Your blog provided us beneficial information to work on. You have done a outstanding job!
Please let me know if you’re looking for a author for your weblog. You have some really good posts and I believe I would be a good asset. If you ever want to take some of the load off, I’d love to write some material for your blog in exchange for a link back to mine. Please send me an e-mail if interested. Kudos!
Wow, marvelous blog layout! How long have you been blogging for? you make blogging look easy. The overall look of your website is wonderful, as well as the content!
As a Newbie, I am always browsing online for articles that can benefit me. Thank you
Do you have a spam problem on this blog; I also am a blogger, and I was wondering your situation; we have developed some nice methods and we are looking to trade techniques with other folks, why not shoot me an e-mail if interested.
Its like you read my mind! You appear to know a lot about this, like you wrote the book in it or something. I think that you can do with some pics to drive the message home a bit, but other than that, this is great blog. An excellent read. I will definitely be back.
I like the valuable information you provide in your articles. I will bookmark your weblog and check again here frequently. I am quite sure I will learn a lot of new stuff right here! Best of luck for the next!
Does your website have a contact page? I’m having a tough time locating it but, I’d like to shoot you an email. I’ve got some ideas for your blog you might be interested in hearing. Either way, great blog and I look forward to seeing it grow over time.
Have you ever considered writing an ebook or guest authoring on other blogs?
I have a blog based upon on the same topics you discuss and would
really like to have you share some stories/information. I know my viewers would value
your work. If you’re even remotely interested, feel free to send
me an e mail.
Inspiring quest there. What happened after? Good luck!
Write more, thats all I have to say. Literally, it seems as though you relied on the video
to make your point. You clearly know what youre talking about,
why throw away your intelligence on just posting videos to your site when you could be giving
us something informative to read?
Hi there just wanted to give you a quick heads up and let you know a
few of the images aren’t loading properly. I’m not sure why but I think its a linking issue.
I’ve tried it in two different internet browsers and both show
the same results.
Here is my web page … tracfone special