Welcome to the start of the Embedded in Embedded program. 欢迎来到EiE课程。
In this course we’re going to take you through everything you need to get up and running a development environment for ARM Cortex processors. 首先，我将带大家一起了解一下运行ARM Cortex处理器开发环境需要的所有准备。
In this first lesson, we’ll look at installing the two main pieces of software you will need to access the EiE firmware and start writing and debugging code. 在第一节课里，我们先安装访问EiE固件和编写/调试代码所需要的两个主要软件。
All of this can be done without any hardware using a simulator that is built in to the design software. 所有这些不需要使用任何硬件，仅使用设计软件内置的模拟器即可。
However, if you already have an EiE development board, you can use that and see the results on your hardware. 如果你已经有了开发板，你可以通过它观察实际的结果。
Please do not plug in your development board yet if you have one! 现在请暂时不要连接你的开发板！
We want to make sure that the drivers you’ll need are in place and ready to go. 我们需要先确认是否已正确安装了驱动。
A great thing about embedded systems development is that there are a ton of software tools available with free versions that anyone can access. 对嵌入式系统开发极有利的一点就是，有无数可以使用的免费工具软件。
The main development software we use in EIE is called “IAR Workbench.” EiE使用的主开发软件叫做“IAR Workbench (工作台)”。
You will see another popular IDEs for ARM processors called KEIL, 你们很快会接触到另一个ARM处理器的IDE（集成开发环境）叫做“KEIL”
and there is a gcc compiler that you can access through various front ends like Eclipse. 以及Eclipse这种可以通过多种前端访问的编译器
Each has advantages and disadvanges. 每一种都是各有利弊。
The free versions of IAR and KEIL have a code size limit of 32kB – lots of space to build a fully functional system. IAR和KEIL免费版代码大小限制为32KB – 对一个功能完整的系统来说根本不够。
IAR and KEIL are very similar, but we stay with IAR is because versions exists for other non-ARM processors that we use ( like the MSP-430), so having a common platform is really helpful. IAR和KEIL很类似，但是我们多使用IAR，因为使用一个通用平台以兼容其它非IAR处理器是很重要的。
It is fairly simple to port between different IDEs, but you must make sure various high level settings are the same and any compiler-specific directives or special instructions match the IDE you are using. 在不同的IDE之间转换并非难事，但你必须确保不同环境中高级设置的一致性，以及各种专用指令和特殊指令与你当前的IDE相匹配。
So head on over to IAR.com and click on the link here that says IAR Embedded Workbench. 进入IAR.com点击IAR Embedded Workbench。
That will take you to another screen here and you need to scroll down to the Free trials button. Then click Download software. 转入另一页面，向下翻页至Free trials按钮，点击下载。
It’s a big download this version is over 1Gig, so hopefully you have a high speed connection and we’ll sit here and wait while this downloads. 文件较大（约1G），希望网速够快~
Once you got the file here in your download directory or wherever you want to store it, choose run.
It has to unpack itself which also takes a long time. We won’t sit here and watch this, we’ll jump ahead.
As soon as that’s done you’re going to get this window that pops here and first thing you want to do is install the main program here.
So give this a click.
If you have an IAR installation already you’ll get a window like this.
We do suggest you install a new instance because we actually keep several different versions of software that we are working on.
So you can overwrite the other one if you want but we suggest that you keep it separate.
You’re going to get the window that does the usual “where do I want to install it”.
Of course you’re going to read very, very carefully this agreement like we all do (read, read, read, read!).
Good, you got that all? Off we go to Next.
And I always like to choose where I install especially because I have multiple versions.
So you can see I’ve got three versions I’m going to install this one, “8_10_1”. So EWARM is Embedded Workbench for ARM (“EWARM_8_10_1”). That’s the actual version.
I’ve had many, many versions of IAR installed and I just like to keep them because I have certain customers or certain projects that sometimes need particular versions.
So when that’s all done, click next.
All of these drivers are for different debugging tools they don’t take up a lot of space so I would suggest you keep them all on.
Go through and click next. If you want to change where this goes in Windows you can change that but we don’t usually care.
Everything should be done and now you can click Install.
Again, we’re looking at a lot of time so you can pause the video and we’ll jump forward to when this is all done.
Alright we’re done, you’ll probably get a message like this that talks about USB dongle drivers and what they’re referring to is when you buy a real license you can actually get a hardware USB plug-in in device that carries your license key.
Unlikely you’re going to do this so probably just skip it and choose “No.”
And then, you’re going to, maybe, depending on how your system is, you might need to install Visual C++ and that’s going to take a little bit of time to go through.
When it’s all done you should get this window that pops up here.
You probably don’t need to review the release notes so you can uncheck that, but we do want to launch IAR and finish our installation.
So clear off that box, click “Finish” and that’s going to pop over and launch IAR.
Now, what you will get happening is a whole bunch of other installations for all those different drivers that we said we should install,
so you’ll see a bunch of pop up windows. I don’t think they do a very good job of this as it’s a bit confusing why all these things are popping up.
But if you are just patient you can go through and click all those and let them finish installing you’re going to have to choose lots of agreements for different software licenses cause they are all related to different pieces of hardware or different development boards that you need.
They are not dangerous to your computer or anything like that, and again they do not take up a lot of space so this is a one time thing.
Bear with it, go through everything and meanwhile IAR will be starting and should eventually get you to this screen that you’ll go through once you’re finished all the driver installations and we can carry on from there.
I’ve already got most of those which is why I choose Cancel.
I still want to come back to the main screen here and choose install these drivers, which just opens up the folder.
You want to go to the JLink drivers which are here. And just run this executable.
You don’t really see much happening even if you click it a whole bunch of times. It doesn’t look like anything is happening but it just quickly copies some files over.
As long as that’s done you should be good. You can close, come back to here when you’re done and exit out of here.
So flip back to IAR. Keep in mind you one day might want to get this Example projects. So you can always come back and come to this home screen.
It is available under Help > Information Center, that’s what this is here. If you ever need this, keep that in mind.
What we really want to do right now is go under help and choose IAR License Manager.
This might pop up automatically the first time and if it does great, if not you can always just launch it from Help.
License Manager is a really crappy program and usually takes a long time to do this but you should only have to do this once. So you’ll wait while this loads up.
So this window pops up, go to License and choose Get Evaluation License.
You want to click the big Register button in the middle here that will pop open a webpage. This is just a standard form. One of the most important things you need to do is choose “Code size limited”
You can, if you want, choose the “Time limited” version which is a full version but only good for 30 days. I suggest Code Size limited for all of EiE.
Put in the stuff you need – the places with stars are required. You can lie if you want, except don’t lie on your email address because you need to get a registration email. So make sure you have inputted that correctly.
Scroll down, put your phone number in there and feel free to put our website in.
Whatever industry you are in you are probably educational so just choose College / University.
The processor we’re going to use is Atmel, this doesn’t really matter if you choose that wrong.
All these other things I would give them the least information as possible.
You can say you’re curious I would rather you should probably put in that you already use the product because then they are less likely to call you. Everywhere else choose “Not applicable” and then you can Submit.
That’s going to take you to another webpage just to confirm that you have done the submission and you should get an email back to your address now.
The email looks like this. It will tell you welcome and you need to click another link and that’s going to take you to a final webpage where you’re going to copy this code, just copy and paste.
Bring that back over to this window in IAR and you can choose next.
So once you’ve done that it will go through this little process where it generates keys and the key is linked to your computer.
So you can’t copy this and take it somewhere else. Make sure it’s the 32k Kickstart Edition, that’s your last check.
Of course if you registered the other one you can always re-register and get a Kickstart version, that’s no problem.
Once that’s all done, you’ll get a confirmation and should go back to this window. You should see a nice little green square that says you’ve got a license you’re good to go. Then you can just exit out of that window.
Right now we won’t do anything else with IAR. What I want to do next is install Github which is our version control system and how we will get the latest software or firmware for the EiE course.
Pop on over to Github.com. Once you’re there, in the search Github here, search for the word “Desktop.”
There’s two parts to Github: there’s a sort of local version that you’re going to run through windows called “Github Desktop”.
And there’s the cloud part of things where our code is stored.
This is all open source code so this is actually a “repository” which is a collection of code for Github desktop.
But it’s the easiest way to also find the link to Github Desktop. Some reason it is a little bit difficult to find. If you want to download the source code you can download the zip from here and you can look at all that.
But if just want to get the application then just come up here and click this link. And that’s going to take you over to the download page.
Once you’re here just click the download button. It’s a pretty big file, about 80MB, so we’ll get that started.
Once that’s all done, you can run the executable here. So that’s going to fire up and install the software, so click Run.
That’s going to get going and what we will need is to create a user account on the main Github or the cloud based Github.
So again if you go to Github.com, while this is installing our Github Desktop.
You’re either going to need to create an account if you don’t have one, or you can just sign in to your account and then you’ll be able to access what we need there.
We of course already have our own account, so we’re going to click on Sign In here, enter our credentials and sign in.
Then we can whip back to where our Github desktop is installing.
Here you’re going to be asked to sign-in again so let’s do that to make sure we have the connection in place.
Same username or email address that we just registered with online.
On this configuration screen, you can just leave it as default and click Continue.
And I don’t know if you like doing this, we don’t like doing this so click finish.
And then you are at the screen where you’re going to start importing code. Remember code is called repository.
So, we’ve already got an existing repository online, and that’s the one we want to access because that’s where our project will start.
Come back over to Github where we are signed in, this is our Engenuics account.
If it’s your account you want to search for the word “Engenuics”, that’s our company name.
The first thing that comes up should be this “/Razor_Atmel” repository, click on that.
This is our main location.
So now click the green button and choose Open in Desktop.
Put this on so it always done this in Github Desktop.
This asks you where you want to put it. and where it’s coming from.
We’d like to keep our code in a Git repository location, it happens to be in our D drive in EiE.
There we are with our Razor Atmel, already downloaded. We’ve done this a few times so this is just kind of a repeat but you’d want to create your own folder here and choose that.
You want to make sure it’s a simple path so you can find it easily. Once you’re done click on Clone.
This takes an exact copy of the whole repository, downloads it. Sometimes this takes a little while, depends on how big the repository is.
When it’s all finished, you will see a screen that looks like this.
Razor/Atmel here these are all branches they are all different code builds that we’ll use in different parts.
We’ll look at that more in depth as we go on to the next lesson. So that’s about it for now.