Thursday, April 29, 2010

Running FreeRTOS with Microsoft Windows Vista in 1 Hour

About FreeRTOS

FreeRTOS is a real-time operating system for embedded systems, being ported to several microcontrollers. It is distributed under the GPL with an optional exception. The exception permits users' proprietary code to remain closed source while maintaining the kernel itself as open source, thereby facilitating the use of FreeRTOS in proprietary applications.

FreeRTOS is designed to be small and simple. The kernel itself consists of only three or four C files. To make the code readable, easy to port, and maintainable, it is written mostly in C, but there are a few assembler functions included where needed (mostly in architecture specific scheduler routines). The download contains prepared configurations and demonstrations for every port and compiler, allowing rapid application design.

Another related project is OpenRTOS, which has an identical code base to FreeRTOS but with different licensing. The OpenRTOS license removes all reference to the GPL and its implications. For example, one of the conditions of using FreeRTOS in a commercial product is that the user is made aware of the use of FreeRTOS and the source code must be provided upon request. OpenRTOS doesn't have this requirement.

SafeRTOS is a derivative version of FreeRTOS that has been analyzed, documented and tested to meet the stringent requirements of the IEC 61508 safety standard. Complete safety lifecycle documentation artifacts have been created and independently audited to verify IEC 61508 SIL 3 conformance.

FreeRTOS and Windows Simulation

Can the Industrial PC port run under Windows? The answer is yes. In FreeRTOS, there is an x86 port that can run in a dos emulation box. But you should take care that it is a simulation and won't give you the correct response. In addition, there is an ARM port that can be simulated within Keil.

Steps to Run the x86 Port Under Microsoft Windows

1. Download the latest FreeRTOS from here

2. Unpack it under C Drive

3. Download the OpenWatcom tools for windows from here and install it under C drive

4. Open the Open Watcom project in the FreeRTOS/Demo/PC directory - it is called rtosdemo.wpj

5. In main.c, comment the line "vStartComTestTasks( mainCOM_TEST_PRIORITY, serCOM1, ser115200 );" or you will get errors about COM1 not available

Figure 1: FreeRTOS Running Under Microsoft Windows Vista

Next

I think the next step is to make a complete free course about FreeRTOS. This tutorial will serve as a starting point to build complete labs based on windows simulation. I hope, they will be a success like the uCOS-II courses I made earlier.


Tuesday, April 27, 2010

uC/TCP-IP Book Companion Software Now Available From Micrium Website

uC/TCP-IP

uC/TCP-IP is a compact reliable, and high-performance stack that was built from the ground up by Micrium. Unlike other available TCP/IP stacks, Micrium's µC/TCP-IP has the quality, scalability, and reliability that translate into a rapid configuration of required network options, remarkable ease-of-use, and rapid time-to-market. This stackis described in the book "uC/TCP-IP The Embedded Protocol Stack". The stack is highly CPU independent and has been ported to numerous devices. The software provided together with the book and via the web site may be evaluated. Windows evaluation is also available via this link.

uC/TCP-IP Win32 Simulation

The uC/TCP-IP allows you to test your application on a PC even before your target HW is ready. Many tutorials are freely available for developing and debugging applications on top of uC/TCP-IP. These tutorials include:

1. uC/TCP-IP Socket Programming

2. uC/TCP-IP Win32 Simulation

3. Writing, Debugging, and Testing Ethernet Device Drivers

Wednesday, April 21, 2010

Running uCOS-III with Microsoft Windows Soon?

uCOS-III the Real-Time Kernel

uCOS-III is Micrium's newest RTOS, designed for developers who need to save time on their current and next embedded sytem projects. While uCOS-III includes many of the same features you're already familiar with in uCOS-II, there are some important differences. For example, it also manages an unlimited number of application tasks and features an interrupt disable time of near zero. With round-robin scheduling, uCOS-III allows multiple tasks to run at the same priority level. uCOS-III puts greater control of the software in your hands, yet maintains Micrium's ease-of-use, ease-of-integration, short learning curve, unsurpassed documentation, and clean code.

uCOS-III x86 Win32 Simulation?

The tutorial is made available here.

Saturday, April 10, 2010

Running uCOS-II and uC/GUI on Mini STM32 (ARM Cortex M3)

Development Environment

I decided to test the two gifts, I earlier had from micro4you. These gifts were a Mini STM32 board and a Colink ARM USB JTAG. In addition, I use RVMDK4 as a cross compiler. In order to run this demo successfully, you should have a full version of this tool.

Installing Colink Driver

1. Go to http://www.ftdichip.com/Documents/InstallGuides.htm

2. Follow the installation guide matching your OS

3. Or go to http://www.ftdichip.com/Drivers/D2XX.htm to install the driver directly

Installing Colink ARM USB for RVMDK

1. Go to http://www.coocox.org/

2. Click on "Download Colink for MDK"

3. Save CooCox_Colink_MDK_Plugin_V1.81_Setup.exe to your PC

4. Run CooCox_Colink_MDK_Plugin_V1.81_Setup.exe and follow the installation. Install the plug-in in the same directory where Keil (RVMDK) is installed.

For screenshots for step 4, you can refer to http://www.coocox.org/CoLinkGuide/Installation.htm.

Testing the Application Using Colink

1. Open your project using RVMDK. The project contains uC/GUI demo application, uC/GUI ported to my TFT LCD, and uCOS-II ported to my board.

2. Build the target

3. Configure that target options to use the Colink for debugging and flash programming

For screenshots for step 3, you can refer to http://www.coocox.org/CoLinkGuide/Use.htm.

4. Make sure that the flash settings are STM32F10x On-Chip Flash 128K and the download function is Erase Sectors

5. Connect the board to its USB power cable and Colink ARM USB JTAG

6. Download the compiled program to the flash

7. Run the demo

Repeat steps from 2 to 7 with different configurations. To change demos running:

1. Open GUIDEMO.c

2. For the variable _apfTest, just comment the demos you want to stop and uncomment the demos you want run

3. Save the file

4. Repeat steps from 2 to 7

Next Steps

1. Run every possible demo of uC/GUI on the board

2. Use Arabic fonts with Arabic orientation for the complete demo finished above