Show Posts
Pages: [1]
1  Products / Arduino Due / BDI3000 on an Ardunino Due? on: September 30, 2013, 09:44:30 am
I know it sounds a little crazy to use a ~US$3000 piece of test kit on a ~US$50 board. But I already own an Abatron BDI3000 JTAG debugger with firmware that should work on the Cortex-M3 on the Arduino Due. I was wondering if anyone had tried this before and figured out which if any of the existing register definition and configuration files worked. Would save me a lot of time and guess work. Web and forum searches don't suggest anything. Thanks for any pointers. (If I write about this on my blog, I'll for sure give credit where credit is due.)
2  Community / Exhibition / Gallery / Re: Arduino + FreeRTOS + C++ = Platform for Teaching Real-Time Software Design on: October 19, 2012, 11:55:31 am
I've run FreeRTOS on a 328P, so it's certainly possible. But having multiple threads, each with its own stack, is a real challenge given the tiny RAM on that target.
3  Community / Exhibition / Gallery / Re: Arduino + FreeRTOS + C++ = Platform for Teaching Real-Time Software Design on: August 15, 2012, 11:08:39 am
I should add that two things I've seen really increase the complexity of any embedded system: [1] a memory management unit, and [2] a file system. Once you have either of those, you've entered a much more complicated realm of system architecture and design. I'm not saying they're bad ideas. But once you have them, you're going to really want an OS of some kind and work at a higher level of abstraction.
4  Community / Exhibition / Gallery / Re: Arduino + FreeRTOS + C++ = Platform for Teaching Real-Time Software Design on: August 15, 2012, 11:04:57 am
Sorry for my very late reply. Life intrudes.

For an platform of modest capabilities like the Arduino Uno that uses the 328P, I think an RTOS is probably overkill, and difficult to boot because of the memory constraints. You spend all your time agonizing over how big the stack for each task needs to be.

On the Arduino Mega that uses the 2560, it's completely doable and reasonably painless. But is it necessary?

There are a lot of applications that, for reasons of functionality or performance, really gain from [1] interrupt driven device drivers, and [2] multithreading as a fundamental mechanism to talk to the device drivers. Not only is it a more useful architecture, but the ability to separate functionality behind a more opaque interface, saves money in the long run (in terms of commercial development). Plus, it's a very useful teaching platform, since this approach is used a lot in the commercial world on 2560-class processors and above.

On the flip side, I'm in the midst of a paying gig in which I'm writing firmware for several products based on a PIC16F1823 microcontroller, which has a scant 2K of program memory (flash) and 96 bytes (that's bytes, not KB) of RAM. I'm writing in C, and I've developed as many as six interrupt driven device drivers on one of the products. But there's no RTOS, nor is there really space to have such a thing. It's just a task loop. So i think it totally depends on the problem you're trying to solve and the resources at your disposal. A colleague is developing for a larger PIC on a related project, and he is in fact using FreeRTOS and multitasking so that he can do slower, non-real-time tasks in the background.

At the higher end of the embedded realm, which in my work typically involves PowerPC and ARM SoCs, it's all over the map, using OSes (not necessarily RT) like CMX, C-Executive, Simple Executive, VxWorks, the late pSOS, and even a stripped down Linux. These range from very simple to extremely complex in terms of API, use model, capability, etc.
5  Topics / Education and Teaching / Arduino + FreeRTOS + C++ = Platform for Teaching Real-Time Software Design on: April 17, 2012, 10:21:58 am
So this is the latest idea that I've gotten all obsessive-compulsive over: using Arduino, FreeRTOS, and C++ to teach real-time software design and embedded software development. I like the combination as a platform to teach both introductory students (using the Arduino Uno, SW and IDE), and to advanced students (using Arduino Mega or clone, FreeRTOS, C++, Eclipse, make, etc.). I really like the progression of starting out on the Uno with Arduino 1.0 and progressing to a multitasking RTOS, interrupt driven device drivers, etc. I like FreeRTOS because it's small, understandable, and it works. I like C++ because having spent many years in commercial product development (after having spent part of graduate school teaching real-time software design) I believe you need to climb as high on the abstraction ladder as you can to control costs, yet you need to see what's going on under the hood. The combination of Arduino and FreeRTOS hits a sweet spot of "just complex enough to be worth learning about".

So I started out doing exactly that: learning the AVR architecture on the Uno using Arduino 1.0, got FreeRTOS running on a Freetronics EtherMega (a Mega clone that incorporates the equivalent of an Ethernet Shield on the same board), wrote C++ OO wrappers around the FreeRTOS facilities (Task, MutexSemaphore, PeriodicTimer, etc.), wrote interrupt-driven device drivers in C++ (Serial, SPI), and a main program using a simple unit test framework that exercises all of it and demonstrates how it works. And there's plenty of room for student projects to write software for various applications, shields, hardware control, etc.

Recent blog articles I've written on this project:

http://coverclock.blogspot.com/2012/03/small-town-big-city.html

http://coverclock.blogspot.com/2012/04/learning-by-doing.html

Link to tarball can be found on project page:

http://www.diag.com/navigation/downloads/Amigo.html

For years I've futzed around with stuff like an Atmel AT91 evaluation board, a couple of BeagleBoards, etc. But even though I've spent years doing commercial development with Linux on ARM and PowerPC targets, I think when you throw in a memory management unit and the machinations that Linux goes through to be platform-independent, the result is too complicated for anything other than an advanced course. An RTOS like VxWorks, for which I've done a lot of commercial development, is too big, complex, and expensive, to use in anything except an advanced class. But once students got though Arduino, and then FreeRTOS, I think they could easily progress to VxWorks, and even to Linux, without much problems. The progression of Arduino and FreeRTOS would give them the confidence that they could figure out the more complex stuff.

I know this is my thing and I don't necessarily expect anyone else to be interested in it. But here it is.

-- Chip
6  Community / Exhibition / Gallery / Arduino + FreeRTOS + C++ = Platform for Teaching Real-Time Software Design on: April 17, 2012, 10:20:40 am
So this is the latest idea that I've gotten all obsessive-compulsive over: using Arduino, FreeRTOS, and C++ to teach real-time software design and embedded software development. I like the combination as a platform to teach both introductory students (using the Arduino Uno, SW and IDE), and to advanced students (using Arduino Mega or clone, FreeRTOS, C++, Eclipse, make, etc.). I really like the progression of starting out on the Uno with Arduino 1.0 and progressing to a multitasking RTOS, interrupt driven device drivers, etc. I like FreeRTOS because it's small, understandable, and it works. I like C++ because having spent many years in commercial product development (after having spent part of graduate school teaching real-time software design) I believe you need to climb as high on the abstraction ladder as you can to control costs, yet you need to see what's going on under the hood. The combination of Arduino and FreeRTOS hits a sweet spot of "just complex enough to be worth learning about".

So I started out doing exactly that: learning the AVR architecture on the Uno using Arduino 1.0, got FreeRTOS running on a Freetronics EtherMega (a Mega clone that incorporates the equivalent of an Ethernet Shield on the same board), wrote C++ OO wrappers around the FreeRTOS facilities (Task, MutexSemaphore, PeriodicTimer, etc.), wrote interrupt-driven device drivers in C++ (Serial, SPI), and a main program using a simple unit test framework that exercises all of it and demonstrates how it works. And there's plenty of room for student projects to write software for various applications, shields, hardware control, etc.

Recent blog articles I've written on this project:

http://coverclock.blogspot.com/2012/03/small-town-big-city.html

http://coverclock.blogspot.com/2012/04/learning-by-doing.html

Link to tarball can be found on project page:

http://www.diag.com/navigation/downloads/Amigo.html

For years I've futzed around with stuff like an Atmel AT91 evaluation board, a couple of BeagleBoards, etc. But even though I've spent years doing commercial development with Linux on ARM and PowerPC targets, I think when you throw in a memory management unit and the machinations that Linux goes through to be platform-independent, the result is too complicated for anything other than an advanced course. An RTOS like VxWorks, for which I've done a lot of commercial development, is too big, complex, and expensive, to use in anything except an advanced class. But once students got though Arduino, and then FreeRTOS, I think they could easily progress to VxWorks, and even to Linux, without much problems. The progression of Arduino and FreeRTOS would give them the confidence that they could figure out the more complex stuff.

I know this is my thing and I don't necessarily expect anyone else to be interested in it. But here it is.

-- Chip
7  Topics / Education and Teaching / Re: Ideas for explaining simple RTOS through Arduino on: April 17, 2012, 09:50:44 am
I've had the same idea: I believe Arduino would be an excellent basis for teaching real-time software design, all the way from simple unitasked busy-waiting stuff using the Arduino platform, to complex multitasked interrupt-driven applications using a platform like FreeRTOS. Instructors could start small with the Arduino SW and IDE on the Arduino Uno, and migrate to advanced topics related to how commercial embedded product development is done on Arduino Mega and clones. That's basically what I did: learned the AVR architecture on the Uno with Arduino, then got FreeRTOS running on a Freetronics EtherMega (a Arduino Mega clone that has the equivalent of an Ethernet Shield integrated on to the board), then wrote a C++ OO wrapper layer around the FreeRTOS facilities (because that's my own thing: applying C++ and OO to embedded development), then wrote interrupt-driven device drivers for Serial and SPI in C++, and drive it all with a simple unit testing framework to convince myself it all works. I think the Arduino HW is a pretty much idea platform for teaching and learning this kind of stuff.

The FreeRTOS docs, both the reference manual and the introductory user guide are well worth their tiny price. The Atmel reference manual for the specific microcontroller is a must. I have a slew of textbooks on real-time and concurrent programming, but it would take some thought to decide which one would serve best in a specific course.

I've looked at a lot of platforms over the past few years, including an Atmel AT91 (ARM) evaluation board, BeagleBoards (OMAP ARM), etc. I've spent years doing embedded development on ARM processors using Linux, but I just think that Linux and any processor with a memory management unit is just too complicated for introductory courses. You spent too much time dealing with stuff that isn't core to what you are trying to teach.

A link to a tarball of the whole my whole project can be found here:

http://www.diag.com/navigation/downloads/Amigo.html

Recent blog articles I've written on this topic:

http://coverclock.blogspot.com/2012/03/small-town-big-city.html

http://coverclock.blogspot.com/2012/04/learning-by-doing.html

http://coverclock.blogspot.com/2012/03/getting-from-power-up-to-running-main.html
8  Community / Exhibition / Gallery / Re: How Arduino gets from power on to running setup() and loop() on: March 10, 2012, 07:50:23 pm
I'm currently using an AVR ONE! with JTAG on the EtherMega 2560 with AVR Studio 5.1 to debug some code. I've had success with breakpoints, etc. Getting the squid cable wired up to the correct pins and getting AVR Studio to co-operate has been an adventure, albeit ultimately a successful one. I'll be writing about that process in the future.
9  Community / Exhibition / Gallery / How Arduino gets from power on to running setup() and loop() on: March 07, 2012, 09:52:28 pm
I finally got around to writing up my notes on what happens from the moment power is first applied to Arduino to when setup() and loop() are executed. It's helped me debug my current project; maybe it can help someone else. Warning: this is long and detailed.

http://coverclock.blogspot.com/2012/03/getting-from-power-up-to-running-main.html

Cheers!

-- Chip Overclock
Pages: [1]