Showing posts with label freertos. Show all posts
Showing posts with label freertos. Show all posts

Thursday, June 18, 2015

FreeRTOS on Cortex-A8 FVP ARM DS-5

Here is an implementation of the FreeRTOS ARM Cortex-A port on the DS-5 Cortex-A8 Fixed Virtual Platform. I was planning to do this since a long time (as my beagleboard went up in magic smoke and i did not have any platform to experiment on) and now that it is finally done, you can evaluate FreeRTOS on a Cortex-A series processor without the need to purchase additional hardware. Students and professionals can also explore RTOS concepts / design methodologies or even tweak the OS, try real nasty things. This implementation is now available at my GitHub.

I am unaware of existing FVP implementations. I could not find any by doing a Google search. Hence, if you are aware of any such implementation please link in the comments below. Compiled and tested in ARM DS-5 Ultimate Edition (Evaluation) Version: 5.21.0 Build number: 5210017

Most of the information can be figured out by going through the code, by doing a diff of the source file with the original, however some brief implementation details are mentioned below.

Keep this document handy as it contains the memory map of the FVP. Also note that this is a simulation and will not be "real-time". This project is only to understand the inner workings of FreeRTOS or any RTOS in general. To run it on real hardware you will still need the board specific settings. For that refer to my earlier post on FreeRTOS with the BeagleBoard. Turn on Rate-Limit in the CLCD screen for stable response if required.

Import this project into DS-5. Compile and create a Debug Configuration for the Cortex-A8 FVP Bare-Metal debug.

The system is configured for a maximum 32 interrupts. The FVP has 64 interrupt sources out of which the first 16 are SGIs. More information on interrupt priority assignments on Cortex-A series specific to this OS can be found here.

I am using the SP804 Timer Module 0 to generate the tick interval. The timer is configured as a 32-bit counter, periodic timer. timer_init.s has a minimal assembly implementation.

The port for the Cortex-A series can be found in the FreeRTOS portable directory - \FreeRTOSV8.2.1\FreeRTOS\Source\portable\RVDS\ARM_CA9.

configCPU_CLOCK_HZ and configPERIPHERAL_CLOCK_HZ would really not matter in the simulation. The tick timer has been configured with a value of 0x3e8. The FreeRTOSConfig.h file has been used by modifying the one in Renesas demo project.

As this will be running on a Cortex-A8 FVP, the Cortex-A8 startup file can be found in the bare-metal examples directory in the DS-5 installation. This file has been modified for the current implementation by adding stack initialization, enabling GIC etc.

Additional changes in port.c for handling the tick and setting API for clearing the timer interrupt.

main.c implements 3 tasks for demonstration:
RollingLEDSTask - This task nudges the LEDs in the CLCD window one at a time, prints the number of times it's called and goes to sleep for 1 tick.

PrintHelloTask - Prints hello world to the console and the number of times it is called and goes to sleep for 5 ticks.

PrintKeyboardTask - I was looking for a method to externally trigger events in the DS-5 debugger. Unfortunately the GPIO controller in the FVP lacks this capability. Therefore the only method was to use the PL050 implementation in the FVP to trigger events using the keyboard connected to the computer :P

PL050.c therefore contains a minimal implementation of the driver for this FVP peripheral. the PrintKeyboardTask blocks on a semaphore on start up. If a key is pressed on the keyboard while the CLCD window is active, the PL050 generates 3 interrupts. The 3 bytes sent in sequence are [scancode], [0xF0], [scancode] Leave a comment below if you know why 3 bytes. The first byte is indeed the scan-code but i have no idea what the second byte is. Ideally it should be the shift key status. On the third interrupt the semaphore is released from the IRQ handler of the peripheral which activates the task to print out to the console. To get the ascii value of the key, you might have to convert the scancode to the corresponding ascii value. For character - a, i was getting scan code of 0x1C which might differ based on your locale / keyboard type.

P.S: Most files are in assembly and not in C e.g the timer and GIC APIs, the reason being - i already had these ready from earlier projects, hence used the same. You can use your own implementation in C if you require. 

To enable FreeRTOS awareness in DS-5 please enable the flags mentioned in this article on ARM Infocenter.

If you have any questions leave a comment below. Few screenshots of my tool settings are shown below.


Available on FreeRTOS interactive site

http://interactive.freertos.org/entries/83853195-FreeRTOS-on-Cortex-A-FVP-ARM-DS-5









Saturday, April 4, 2015

FreeRTOS on Xilinx Zynq Zybo [Single Core]

This post will guide you in getting FreeRTOS up and running on the Zybo Zynq 7000 development board from Digilent. The post will focus on running FreeRTOS on a single core. After a few eons i shall be putting up another post on running FreeRTOS, each on one core. The entire project has been uploaded to Git and the link is somewhere down below.

What we are going to do ?
1. Create a custom AXI4 Lite peripheral whose output port will be connected to the four LEDs on the Zybo.

2. Get FreeRTOS to run on the ZYBO.

3. Create a task in FreeRTOS to write data to the AXI peripheral and display it on the LEDs.

Pre-requisites:
1. The Zybo board.
2. Latest FreeRTOS source code.
3. Vivado 2014.x and Xilinx SDK 2014.x.
4. Knowledge of using the Xilinx tools.

Steps:
1. The first step is to build and setup  the hardware in Vivado. To keep this post short i would recommend you to click here and follow the Embedded Linux Tutorial by Digilent. You only need to refer this post on how to create a AXI Lite peripheral, section 1 - Hardware Customization and generate the Bitstream. It's upto you to work in VHDL or Verilog. I know VHDL therefore i had to delete the system_wrapper, change the Project Settings and regenerate the system_wrapper and other code in VHDL. Here is my custom AXI 4 LITE peripheral - RTOSLeds_0. Make sure that you assign address to your peripheral in the Address Editor before generating the bitstream.






2. Once you've finished generating the bitstream export it and Launch the SDK.

3. Within the SDK create a new application project, preferably a blank one or the HelloWorld project.
This should generate the BSP and the hello world project files. Now since we will not be using the helloworld.c file, we can delete it. Additionally remove the helloworld reference from the Makefile (that's if you created a helloworld project instead of a empty one).

4. On the FreeRTOS website there is a page that describes porting it to the Zynq processor. You will find the same project at this path in your FreeRTOS directory - \FreeRTOSV8.2.1\FreeRTOS\Demo\CORTEX_A9_Zynq_ZC702. The platform and BSP in that folder are not for the Zybo board therefore we do not need to refer those folders at all since we have created our own hardware and bsp in the steps above.

5. The  RTOSDemo folder which is our folder of interest contains the necessary files that need to be imported to our project workspace. Not all files, just a few that are highlighted below. The platform related files will already be present in the project.

Copy the above highlighted files to the src folder of the sdk project.

6. Navigate to the - \FreeRTOSV8.2.1\FreeRTOS\Source\portable\GCC\ARM_CA9 folder and copy port.c, portASM.S and portmacro.h to the xilinx sdk src folder.

7. Navigate to the - \FreeRTOSV8.2.1\FreeRTOS\Source folder and copy all the six  C files to the project.

8. Copy the FreeRTOS headers from the include directory at the same path [7] into the xilinx sdk.

9. Copy  heap_4.c from the \FreeRTOSV8.2.1\FreeRTOS\Source\portable\MemMang directory into the project directory.

10. Your Xilinx SDK project src folder should now contains all the files as shown below.



11. The next important thing that needs to be changed is the linker script file - lscript.ld. There is only one new line to be added here as highlighted below.



12. I do not want my code to run in thumb mode. Therefore i commented out the line shown below in the function pxPortInitialiseStack present in file port.c. In FreeRTOSConfig.h change the configCPU_CLOCK_HZ macro to 50Mhz.





13. To test it all out i created a simple task that would send the data 0x5, 0xA alternately after a fixed delay to the AXI peripheral thereby displaying the pattern on the zybo leds.



14. The last step is the comment out the call to vParTestInitialise() from the prvSetupHardware function as it is not related to the Zybo board.

15. Well, after the above steps, if everything compiles correctly without errors, program the FPGA and the ELF using the Xilinx Tools menu and start the debug session. Make sure you have the Zybo powered up from the wall adapter and the JP5 header set to JTAG. In my case the USB power did not work as the level shifters were not enabled when i used it.

FreeRTOS on the Digilent Zybo....done...

The entire project on GitHub: 

My other FreeRTOS adventures:





Sunday, March 16, 2014

FreeRTOS on Teensy 3.1

 
This post is about running FreeRTOS on a Teensy 3.1 board from PJRC. It is not a detailed in-depth coverage but will get you started. If you have not heard about this board you can find it here. Since my last post on making FreeRTOS run on the BeagleBoard, which was a nice learning experience, i've been porting FreeRTOS on anything i can get my hands on - a blender, television, chickens. You see, to port FreeRTOS on a chicken all you have to do is shove a compiled image up it's...never mind. Let's get started with this thing. First the pre-requisites

Pre-requisites:
- Teensy 3.1
- Arduino 1.0.5 with the support for Teensy installed.
- FreeRTOS source code
- Cortex M Series TRM (duh)
- Datasheet of the MK20DX256VLH7 (you probably will not open it)


FreeRTOS:
FreeRTOS can be downloaded from the website. The latest version 8.0.0 has ports for Cortex M devices  already. You can refer to that and it's accompanying demo example. As we are using the Teensy here some minor modifications are necessary. In the portable directory we need to look inside the GCC sub-directory as the arduino uses the gcc toolchain for code compilation. Within the GCC directory there will be three sub-folders - ARM_CM0, ARM_CM3, ARM_CM3_MPU, ARM_CM4F. I used the ARM_CM3 port for the Teensy as it was simple and did not create unnecessary link errors. Perhaps i will try with the MPU version later. Do not use the ARM_CM4/F port, in my opinion it is wierd, maybe just not for this board.
The directory structure
- Source: The FreeRTOS source code.
- Source/include: The header files
- Source/portable: Target dependent files. For the Cortex these will be in the ARM_CM3 sub-directory inside GCC within portable, jeez...


Procedure:
1. Make a duplicate copy of the Arduino folder as a back up in case you need to revert back the code.
2. Copy all the FreeRTOS C / headers / portable files into the /Arduino1.0.5/hardware/teensy/cores/teensy3.
3. Copy the memory manager of you choice, i chose heap_2.c, from FreeRTOS's MemMang directory to the directory in [2].
4. The Teensy 3.1 has a 256K flash but it uses the mk20dx128.c file as it's startup. This file needs some editing as mentioned below.

4.1. Include FreeRTOS.h and task.h
4.2. stick_default_isr needs to be commented out, we shall see why later in [4.5]
4.3. I defined vApplicationStackOverflowHook function in this file.
4.4. Comment out prototype declaration for svcall_isr, pendablesrvreq_isr and systic_isr. Yes, i will not be using CMSIS naming conventions.
4.5. Replace the functions mentioned in [4.4] with vPortSVCHandler, xPortPendSVHandler, xPortSysTickHandler respectively  in the gVectors array. 
4.6. In the ResetHandler function comment out the initialization of the Systick as we shall be doing that during FreeRTOS initialization.
5. To setup the heap, mk20dx256.ld linker script needs to be modified. Here add a new region .heap as shown below. "heapsection" is the name given in as the __attribute__ for the static heap. This will not be present in the original file and needs to be modified as:

static uint8_t ucHeap[ configTOTAL_HEAP_SIZE ]  __attribute__ ((section(".heapsection")));

6. I setup my FreeRTOSconfig.h as shown below

7. I then edited the main.cpp file to test the FreeRTOS functionality.


Well this should get FreeRTOS running, if you get any compiling / linking errors then i probably missed out something, but i am confident you can fix those yourself. FreeRTOS runs like a charm on this board only limited by it's memory capacity. Now there are problems with the rest of the Arduino code not being thread-safe and not designed to run under an OS. There is a discussion on the same on the Teensy forum right here - http://forum.pjrc.com/threads/540-ChibiOS-RTand-FreeRTOS-for-Teensy-3-0

I have a very busy schedule and it takes time to implement and write up all this stuff. I will be updating this post with new findings as i go forward with this like the maximum tasks that can be run, etc... 

Code:
https://github.com/circuitsenses/Teensy-3.1-FreeRTOS

Happy Coding... 
P.S - Notice that you never referred to the MK20DX256VLH7 datasheet :P

Tuesday, August 20, 2013

FreeRTOS on Beagleboard Rev C3



This post is all about running FreeRTOS on a Beagleboard Rev C3 with the OMAP 3530 processor from TI. The intention of this post is to serve as a reference for porting operating systems over various platforms and cover a few basics in the process. You might wonder - Why port FreeRTOS on a Cortex A8 based hardware? Well, its fun and a great learning process. I am assuming that the reader has at least intermediate knowledge of ARM architecture. This basic port is functional at this stage but still needs considerable polishing.

Pre-requisites:
- Beagle Board Rev C3
- ARM DS-5 Suite (Evaluation)
- XLoader & U-Boot Sources
- FreeRTOS source code
- Arm-linux-gnueabi toolchain
- A SD card.
- Mkimage utility
- OMAP 3530 TRM
- ARM ARM
- Lots of patience
-12 gauge loaded shotgun.

FreeRTOS
FreeRTOS can be downloaded from the website. The latest version 7.5.2 has a port for Cortex A9 based device already. You can refer to that and its accompanying demo example. As we are using the BB here, these files cannot be used in the implementation but just as a reference. I however, chose to use the FreeRTOS version that was pretty old and released in 2010 to keep distractions away and that I could do things my way. Once this is a success i shall proceed to do the same with the latest update of FreeRTOS

The directory structure
- Source: The FreeRTOS source code.
- Source/include: The header files
- Source/portable: Target dependent files. For the ARM architecture these will be in the RVDS sub-directory of portable.

Approach
Before diving into creating a project, compilation etc it is essential to outline the various aspects the port might need and come up with basic software architecture and files required.

You must be aware of the features provided by FreeRTOS. These can be found here. It has a small footprint – which is enough for the friggin’ 256 MB of RAM on the BB. The scheduler is pre-emptive (I chose to operate it in pre-emptive mode) hence there will be a tick timer involved and a few other mainstream OS features. Hence we need one hardware tick timer from the OMAP for the OS tick and a UART for debug logs. There also has to be some kind of memory manger / allocation system. This can be found in the MemMang sub-directory of portable - three memory managers for the OS heap. It is also essential to know the memory mapping of the BB and the OMAP3530. On the BB the RAM is mapped to address 0x80000000. Refer OMAP TRM for memory mapped peripherals.

For any port there will be a bunch of files that will be target / architecture dependent (usually assembly) and a few C files that will be architecture independent. These files do not need any modification and can be used as is. In case of FreeRTOS the C files in the source directory can be used as is, so create  your project folder and copy them in that, including the headers in the include sub-directory.

As mentioned earlier the files that will require porting will be the ones in the RVDS sub-directory of portable. Now then, in my case I have used port.c and portmacro.h from the ARM7_LPC21xx directory. The portASM.s file cannot be used directly as it’s for the LPC processors from NXP. It needs modifications. Portmacro.inc contains context save and restore macros. We also have to use the startup.s file for the Beagleboard. Initially copy the two files mentioned above to your directory. The startup file for Beagleboard can be found in the fireworks demo application for the Beagleboard in DS-5. Copy this file to your workspace to be changed later. Then copy heap_2.c to your project directory, this will be the memory manager. Every demo project has a FreeRTOSConfig.h header file which contains OS options that can be enabled / disabled or modified e.g. the pre-emption, timer tick rate, heap size etc. This file needs to be copied to the project workspace.

The Beagleboard boot process
Here is a brief summary of the BB boot process. The internal ROM code transfers the control to XLoader. Internally a call to start_armboot from start.S file for omap3 starts the minimal board initialization for u-boot to run. On a BB the default boot device is the NAND flash which contains the u-boot binary. To boot off the mmc card the USER button needs to be pressed when releasing the board RESET button. At this point XLoader will load the mmc u-boot image to the address 0x80008000 defined by the macro CFG_LOADADDR. After loading, control jumps straight to u-boot.

U-boot does its necessary setup for clocks, plls, sdram initializations etc and prepares the board to load linux. Now here lies the rub, we do not want to run linux, we want to run FreeRTOS. We therefore have a few options – Create an OS image / bin file that will be directly executed by XLoader or create an image that will be loaded via u-boot. In the former case the final OS image will have to be named u-boot.bin, (because that is the name the XLoader hunts for when booting from mmc) which will be loaded at address 0x80008000. The latter case is not so trivial, because in this case we will have to provide a bin file with a proper u-boot header such that u-boot can understand and therefore load. This header will be appended to the OS image by the mkimage utility as we shall see later. I chose to load from u-boot, thereby letting u-boot initialize the entire board.

During boot, a script file is also used to execute few commands. This script file is generated from a boot.cmd (you can name it anything) file using the mkimage utility. This loads the image via the source command in u-boot. It hunts the directory structure for the script image and begins to load based on the information in the script. The details of which will be discussed later. The XLoader and U-Boot sources that I used can be found in the below GIT repositories.


Final checklist
- XLoader and U-Boot source.
- FreeRTOS sources and headers (croutine.c, list.c, queue.c, tasks.c, include folder)
- FreeRTOS ports for ARM – (port.c, portASM.S startup.S, portmacro.h, portmacro.inc, FreeRTOSConfig.h)
- FreeRTOS memory manager – (heap_2.c)

Stage 1: Modifying U-boot to load FreeRTOS
Here we shall see how we can load any OS or bare-metal application from u-boot without making considerable changes to u-boot code.

After the autoboot promt times-out u-boot will read the boot.scr file from the mmc. This file was created using the boot.cmd file whose contents were as follows

fatload mmc 0 80000000 freertosimg
bootm 80000000

The first command loads the OS image file which is in u-boot format to the RAM address 0x80000000. The second line calls the u-boot command bootm which starts execution from the specified address.

If we see the implementation of the bootm command it ultimately makes a call to the function do_bootm_linux (\arch\arm\lib\bootm.c). Here it prepares to load the linux image and finally transfer control to the kernel from the boot_jump_linux function. To avoid all this, one can comment out the original implementation of do_bootm_linux and write a new function with the same name which will call a new function – boot_jump_freertos. This function will take a bootm_headers_t pointer variable and a flag.

Prototype: static void boot_jump_freertos(bootm_headers_t *images, int flag)
The implementation is shown below. I chose not to create a new function but called my function right at the beginning thereby skipping the other stuff.



The 0x40 has been added such that the execution starts at an offset of 0x40 from the base of RAM. The initial 0x40 bytes belong to the header. Weird stuff but its tolerable. That is it. The u-boot modification has been done. The code can be built and the final u-boot.bin and img files can be written to the mmc card. Make sure the SD card is formatted according to the instructions given here.

Stage 2: startup.S
When kernel_entry will be called from u-boot, the control will be transferred to the startup.S file for the BB. This is the standard BB startup file that initializes the cortex A8 MMU, caches and sets up the vector table etc. At this point we must setup the stacks for each mode of the processor, initialize the MMU before calling __main. We must have a specific mapping of the memory regions that we will specify in the scatter file. For the BB, I chose to follow the below structure




All regions are 1 MB in size. The APP CODE region is write-protected by setting the appropriate AP bits in its translation table descriptor. Only first level translation has been used that makes up for 4096 translation table entries governing 4096 1 MB regions - simple. All other regions are RW. The entire stack region of 1 MB contains four 256 kb regions for the stacks of respective modes. There is no User/System stack, the reason for this is that FreeRTOS tasks run in System Mode and the task stacks are allocated from the heap. Whenever a context switch happens the SP is loaded with the address of the stack allocated in the heap. The scheduler runs in SVC or Supervisor mode. At this stage let’s spare the vector table. All we do is just set the VBAR register in CP15.

Stage 3: Main.c
After calling __main the code will do the necessary library initialization, scatter loading and finally jump to a user defined main() function. To make things modular, create a new file main.c and add some startup initialization into it. Here is what I chose to do in main.c

- enable_caches();
- init_uart();
- init_int_controller();
- start_freeRTOS();

Enable caches after scatter loading. Standard procedure.

Initialize the UART. I chose to re-init the UART setup by u-boot by resetting it from the System Control Register and re-configuring it for 115200, 8, n, 1. This code can be put in a new file call it uart.c. Refer to the UART section in the OMAP 3530 TRM for detailed register description.

Initialize the interrupt controller. Reset the interrupt controller. During code execution I found an interrupt was being generated from one of the peripherals as a consequence of u-boot actions, hence I chose to reset the interrupt controller to clear any interrupts setup by u-boot. Place it in a new file called interrupt_con.c

Transfer control to FreeRTOS scheduler (vTaskStartScheduler())

Stage 4: Setting up the Timer Tick
Within the scheduler initialization is a function called prvSetupTimerInterrupt that sets up the timer which will generate the tick for the OS if it’s supposed to be preemptive. For this I used general purpose timer 1 of the OMAP 3530 in auto reload mode. For the tick frequency I decided to use a period of 10msec i.e. a timer interrupt triggered every 10ms. Create a new file call it timer.c. Refer Timer section in OMAP 3530 TRM. A rough overview of the steps is detailed below.

- Reset the timer
- Stop it, for no reason. Write a 0 to TIMER1 TCLR register.
- Select the GP Timer 1 source clock as the 32 KHz clock in the CM (PRCM Module)
- Write a 1 to the CM FCLKEN bit.
- Setup the timer TCRR and TLDR registers with a count to generate a 10 ms tick. I figured a formula for that headache - TCRR Count = TLDR Count = 0xFFFFFFFF – (Delay Time / 31.25usec) where delay is the required delay #ftw. Essentially it looks like:

    *GPTIMER1_TCRR = 0xFFFFFFFF - 0x140; // Initial value to start incrementing
    *GPTIMER1_TLDR = 0xFFFFFFFF - 0x140; // Reload value after overflow 

- Clear all pending events for the timer by writing to the TISR register.
- Enable the overflow event in the TIER register.
- Clear the mask for the GP Timer 1 IRQ in the Interrupt controller. (Refer TRM)
- Set auto reload mode for the timer. Write a value of 3 to TCLR register.
- Execute a system wide DSB intrinsic (__dsb (15)) to synchronize.

The timer interrupt hander is the function vPreemptiveTick can be found in portasm.S file. The interrupt handler in the startup.S file now needs to be modified as shown below. Basically we just check and verify that it was an interrupt from timer 1 and branch off to the interrupt handler i.e. the tick function. Make sure not to use BL instruction within the IRQ handler as it will corrupt the LR of the IRQ mode and make you want to use that shot gun I mentioned earlier. Note that I have not used nested interrupts to keep things simple. (PS – I do not even have a debugger if things go wrong. #ftw)


After the interrupt has been serviced it needs to clear the timer event and acknowledge the interrupt so that subsequent interrupts can be processed. The code for this can be inserted in the portRESTORE_CONTEXT macro at the end of the macro as shown below.



 
Stage 5: vPortYieldProcessor
vPortYieldProcessor is used to manually force a context switch. It is initiated by a SVC (formerly SWI) instruction that switches the processor to SVC mode. The SVC exception handler needs to be setup to call vPortYieldProcessor. The below image shows the SVC handler, it also shows other exception handlers that I setup for reporting errors. Since I do not have a debugger all the errors were reported via the UART. For data aborts and prefetch aborts the contents of DFSR and DFAR, IFSR were extracted from CP15 registers. You can create a separate file called crash.c to implement the handlers for DABT and PABT and another file called coputil.s for the CP15 driver.




Stage 6: Setup the heap
The memory manager heap_2.c needs to be setup such that it utilizes the 1 MB section ARM_LIB_HEAP defined in the scatter file. This can be done by placing the heap structure in the above region using the place in section attribute as shown below




Stage 7: Setup everything in ARM mode
In the file port.c there is a function pxPortInitialiseStack. Inside this FreeRTOS will setup the stack to make it look like we returned from an IRQ handler. At the end of the function after setting up the stack entry for the SPSR, it sets up the T bit for the processor. I wanted my tasks and the whole OS to run in ARM mode. Hence I commented out this section.



Stage 8: Configure FreeRTOSconfig.h
Well the screenshot below is self explanatory. Set the tick value to 100. Heap size to 1MB. The clock setting does not matter in this case or I don’t give a damn about it.



Stage 9: Build and Deploy
ARM-DS 5 will generally build everything provided you set it up properly. I assume that you know this. Setup the CPU type, apcs value, --unaligned-access for the C compiler, scatter loading file, entry point etc.

The final output will be a freertos.axf file in the debug directory (based on your settings) that needs to be converted to a bin file by using the fromelf utility.

fromelf --binary freertos.axf --output freertos.bin

The u-boot header mentioned earlier can be applied as

mkimage -A arm -O linux -T kernel -C none -a 0x80000000 -e 0x80000000 -n "Cortex A8 FreeRTOS" -d freertos.bin freertosimg

The freertosimg can now be copied to the sdcard.

To create the script file, first create a boot.cmd file with the contents
fatload mmc 0 80000000 freertosimg
bootm 80000000

Then execute mkimage as
mkimage –A arm –O linux –T kernel –C none –a 0 –e 0 –n “Cortex A8 Image” –d boot.cmd boot.scr

boot.scr can now be copied to the sdcard.

Insert the sdcard into the board and boot from mmc. If all goes well you should see your application running. In my case I just blinked the two user led’s on the board using the flash task that comes with the demo. Here are a few more screenshots of the process.

Debugging !!!

 Running !!!

Here is a Cinemagraph of the board and the LEDs
http://memories.nokia.com/en/images/aac17538-5d52-46fd-bdc1-03f200bbf2d3

A note – this was not meant to be a precise description but just a reference. You can use this to try deploying your FreeRTOS on any other board. This is a long write up & I could have missed something. If you get stuck trying this or have any questions please post them in the comments below. I will keep updating this post with newer items and “fixes”.

Thanks for watching.