Welcome Guest! To enable all features please Login.

Notification

Icon
Error

Embedded C Programming with ARM Cortex-M Video Course
Miro Samek
#1 Posted : Monday, January 21, 2013 12:41:50 PM(UTC)
Rank: Newbie

Joined: 1/21/2013(UTC)
Posts: 9

I believe that the Embedded.com audience could be interested in the Embedded C Programming Course on YouTube, which I just started to teach (my New Year's resolution for 2013). The playlist for this course is available at: http://www.youtube.com/playlist?list=PLPW8O6W-1chwyTzI3BHwBLbGQoPFxPAPM .

The course is intended for beginners and is structured as a series of short, focused, hands-on lessons (about 15 minutes each) that teach you how to program ARM Cortex-M microcontrollers in C.

I've designed this course not just to be watched, but to follow it along on your own computer. In the "Getting Started" Lesson 0, I show you how to download and install the free evaluation version of IAR EWARM and how to order the Stellaris Launchpad ARM Cortex-M4F board (for just $12.99). The board is optional, as I show how to use the instruction set simulator.

My goal is not just to teach C--other courses do it already quite well. But there are virtually no courses that would step down to the machine level and show you exactly what happens inside the ARM processor.

Starting from Lesson 1 you actually see how the ARM Cortex-M processor executes your code, how it manipulates registers, and how it counts. You learn how binary numbers map to the hexadecimal system used in the debugger (and in C) and you learn about the two's complement number representation of signed numbers.

In lesson 2, you learn about the flow of control and the ARM branch instructions. Actually, you witness a disection of the ARM B-instruction (branch). You also learn about the pipeline and pipeline stalls due to branching.

In lesson 3, you learn about variables and pointers. You learn how ARM accesses variables in memory through the load and store instructions (load-store architecture). You also learn how the fundamental concept of memory addresses maps to pointers in C, how to obtain an address of a variable and how to dereference a pointer.

I hope that this course will help you gain understanding of the ARM Cortex-M core, which will look really good on your resume.

This deeper understanding will allow you to use both the ARM processor and the C language more efficiently and with greater confidence. You will gain understanding not just what for your program does, but also how the C statements translate to machine instructions and how fast the processor can execute them.

I'd love to hear your comments about the course. Is there anything that you would like to see in the upcoming lessons? Do you see anything that you would teach differently?

Miro Samek
state-machine.com
wella
#2 Posted : Tuesday, January 22, 2013 11:57:13 PM(UTC)
Rank: Newbie

Joined: 1/22/2013(UTC)
Posts: 1

Hello,

I would like to see the interrupt behaviour of the Cortex-M3. How to correctly setup and handle. And what happens during system exceptions (e.g. DataAbort), how to recover from them and localize wrong code (if possible).

Martin
Miro Samek
#3 Posted : Wednesday, January 23, 2013 6:07:28 AM(UTC)
Rank: Newbie

Joined: 1/21/2013(UTC)
Posts: 9

Yes, absolutely, in about two lessons from now I will discuss interrupt handling in Cortex-M. Very interestingly, interrupt service routines (ISRs) in Cortex-M can be normal C functions, which is very unique among the embedded processors.

Regarding exception handling, the stack frame is identical as for interrupts, so it is possible to return from them. However, my recommendation is to treat them as assertions, after which you really cannot continue the broken program. Instead, you implement some damage control and typically reset.
Expat Canuck
#4 Posted : Saturday, February 02, 2013 12:34:50 PM(UTC)
Rank: Newbie

Joined: 2/2/2013(UTC)
Posts: 1

This is absolutely brilliant. For someone like myself who's been away from programming for longer than I would care to admit, the step by step instructions are absolutely crucial and very much appreciated.
W V R
#5 Posted : Monday, February 18, 2013 12:10:45 PM(UTC)
Rank: Newbie

Joined: 2/18/2013(UTC)
Posts: 1

Could you gear your tutorial towards the "ARM Accredited Engineering Program"? Here is the link about the program. You will see that there are certain topics that the certificate covers (just download syllabus and it shows all the topics that they cover with the Certificate). This would be a great way to add some real power to your courses. It would be better than anything a university is currently teaching. Thanks:

http://www.arm.com/suppo...ited-engineer/index.php
Miro Samek
#6 Posted : Tuesday, February 19, 2013 8:28:21 AM(UTC)
Rank: Newbie

Joined: 1/21/2013(UTC)
Posts: 9

W V R;249 wrote:
Could you gear your tutorial towards the "ARM Accredited Engineering Program"?


Good point. I will certainly try to align the course as much as possible with the "ARM Accredited Engineering Program", but the goals and prerequisites of the video course are significantly different.

First, the platform selected for the video course is ARM Cortex-M (ARMv7-M architecture), because this is the lowest-cost hardware available ($12.99 for the complete development system). In contrast, the "ARM Accredited Engineering Program" focuses mostly on the higher-level hardware, such as ARMv7-A and ARMv7-R, while "only a basic awareness of ARMv7-M and conforming processors is required".

The focus on the different ARM architecture means that subjects important to ARMv7-A/R, such as the ARM instruction set, ARM/THUMB mode switches, cache coherency, banked registers, etc. won't even come up, because ARMv7-M uses only the THUMB2 instruction set and has different processor states.

But certainly, whenever there is an overlap, I will explain the important concepts. For example, I will certainly talk about the AAPCS (ARM Architecture Procedure Call Standard), the exception stack frames,
vectoring the interrupts, the NVIC, coding techniques for performance, for low power consumption, and for small memory footprint.

Stay tuned...

Miro Samek
state-machine.com
svchinta
#7 Posted : Monday, February 25, 2013 4:38:10 AM(UTC)
Rank: Newbie

Joined: 2/25/2013(UTC)
Posts: 2

This is very good course of learning.
Will you be covering how to write effective Embedded C code from memory and optimization point of view...?
Miro Samek
#8 Posted : Wednesday, February 27, 2013 7:04:28 AM(UTC)
Rank: Newbie

Joined: 1/21/2013(UTC)
Posts: 9

svchinta;259 wrote:
Will you be covering how to write effective Embedded C code from memory and optimization point of view...?


Absolutely. As you perhaps noticed, in every lesson I frequently examine the disassembly view, the memory view, and the register view to explain the code from the point of view of performance. I believe that this teaching method is the best way (and the only way, in fact) to really make students understand what is and isn't efficient, because they actually see: (1) what the compiler does with their C code and (2) how the processor executes the generated instructions, because not all instructions are created equal.

For example, in the lesson about the flow of control, I explain such concepts as branch overhead, pipeline, pipeline stalls, loop unrolling etc. The efficient use of memory will still come up, but I will discuss the efficient use of the stack, memory alignment in structures, bit-banding, etc.

Stay tuned...

Miro Samek
state-machine.com

nareshpriya
#9 Posted : Sunday, November 03, 2013 1:36:37 AM(UTC)
Rank: Newbie

Joined: 11/3/2013(UTC)
Posts: 2

hi,

MY NAME IS NARESH. I AM 26 RIGHT NOW AND I A ELECTRICAL AND ELECTRONICS ENGINEER ...............MARRIED AND JOBLESS. I AM INTERESTED IN EMBEDDED SYSTEMS I WANT TO BECOME AN EMBEDDED ENGINEER BUT I AM CONFUSED .......ABOUT A FEW THINGS



1. HOW MUCH TIME WOULD IT TAKE TO LEARN BASIC EMBEDDED SYSTEMS. WILL 6 MONTHS BE ENOUGH
2. PROGRAMMING BASIC I CAN LEARN BUT IMPLEMENTATION AND APPLICATION OF LANGUAGES .....ARE THEY SO DIFFICULT TO UNDERSTAND


PLEASE HELP ME
Kshitiz Rimal
#10 Posted : Monday, August 04, 2014 7:13:07 PM(UTC)
Rank: Newbie

Joined: 8/4/2014(UTC)
Posts: 1

Hello Miro Samek,
What you are doing is incredibly helpful and powerful as well, i was searching for good ARM and embedded systems video course for some time and finally i can say i got one. Few months back i took one course on Embedded systems back in my college which uses similar structure like your course but it uses Keil software and LPC board for development. We could not get much practical approach in that course, most of stuff were just theoretical. But i am very much interested in Embedded System development using ARM Processor. I was hoping by that course that i would be able to program ARM processor on my own and develop embedded systems , robots and stuffs on my own but i couldn't. I hope from your course i would be able to learn something more. Anyway, apart form your course what other materials do you suggest that could speed up my learning process and help me to develop real world robots and embedded systems using ARM? what other knowledge should i be possessing in order to do that?

Thank you so much for the course.
Miro Samek
#11 Posted : Tuesday, August 05, 2014 12:38:46 PM(UTC)
Rank: Newbie

Joined: 1/21/2013(UTC)
Posts: 9

Hi Kshitiz,
I'm really glad to hear that my Embedded Programming course on YouTube is helping somebody in Nepal!

I would agree that many embedded systems courses are superficial, too theoretical, and very hardware-oriented. This is not to say that I don't appreciate the hardware. But I think that the **programming** of embedded systems is the most interesting, most value-adding, and most fun aspect of the game.

Software also levels the playing field. I mean, with the prices of embedded boards and toolsets at such a low level, an embedded software developer from Nepal has equal chance to a developer in Silicon Valley. Both of them can use the same microcontrollers and tools.

Regarding the books and other resources. I would recommend the books by Jonathan Valvano. Interestingly, these books also use the Texas Instruments Tiva/Stellaris boards. Mr. Valvano also teaches online courses, the last one was in-session a couple of months ago. Perhaps you can google it up and still watch it.

Finally, I'm in the process of creating the next lesson 13 of the Embedded Programming Course. This one is about the startup code. Stay tuned!

Miro Samek
www.youtube.com/channel/UCMGXFEew8I6gzjg3tWen4Gw
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF 1.9.5.5 | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 3.021 seconds.