Friday 18 May 2012

"Start of Project - PHASES Description"

Briefly i have described about the project and the capabilities of P3DX and what we gonna do.
The way we started is something like that. The first thing that we decided to use microcontroller from NXP LPC 1768 having arm cortex m3 processor embedded on it. Why we have used this microcontroller? I don't have  concrete reason except it was cheap :) and cortex m series processor was sufficient to accomplish our tasks.
 The programmer or the JTAG that we have used was Emlink for programming the board.
The first thing was to prepare the high level design (hld) that was the structure that how we gonna progress, and aakash did this job. He guided me and showed that how we can complete our project in the steps.
Divided the whole model into the tasks and identified the tasks. Identified that which are the tasks our robot should perform. It was simply like
robot should perform
1. serial communication task (sct.c) - this c code will handle the serial port where the serial port will continuously here the messages from the onboard computer or the pc connected to the laptop and process those messages accordingly and send them to the other tasks

2. Ded reckoning Task - this is mainly the task which is controlling the motor
 3. Buzzer Task
 4. Health and diagnostic task
 5. Sonar Task
6. TFT task - task handling the display 
As from the name it is clear that what are the functionalities of these tasks.

This is what the high level design of the bot.
And the stages in which we will complete our work is something like that

 STAGE 1.  The first task was to set up the toolchain because we will write the code in c language and that can only be compiled on our laptops or desktop we can not compile the code on the microcontroller itself simply we gonna only give binary to the board so the first task was to find out a complete toolchain that can be used to compile the code that will generate the binary compatible to the arm cortex m3 board. (Talking about Cross Compilation).
I have searched lots of toolchains and gained a good knowledge and finally i decided to use Code Sourcery G++ lite toolchain it was pretty much good toolchain and good support and nice online help was available "How to use the toolchain" i  will come up with the separate tutorial on toolchains and also how to install  toolchain i mean how you can use this toolchain on your linux machine.

STAGE2- stage 1 was accomplished and we decided to use code sourcery g++ lite and the way we can compile our program using g++ lite is simply
$arm-none-eabi-gcc options and -o target.

STAGE 3- The next tasks was to make the board in running state. Here i have used the demo available on internet and made a Makefile to compile the code systematically and used keil to port my .elf on the board.  The step was successful and we made it in running state and this much work we complete very
fast.

STAGE 4- The above step was to just test the board the main thing is to use a real time operating system and here aakash suggested to use FreeRTOS. So the next task was to read about FreeRTOS and read about the API'S of the FreeRTOS. Because ultimately all the tasks that we have divided above like sct.c buzzer.c etc all we gonna write using the API's of FreeRTOS.

STAGE 5- Porting of FreeRTOS on the evaluation board. Here we have tried alot and i wasted almost my 1 month to try it, but finally i was able to port FreeRTOS on this board and this i have already described in my other post.

lot of work to do now we have to write all the tasks using api's of FreeRTOS this is almost the longest work that we have to do, but i think not much difficult we can do it.. Aakash is great guy he would guide me and i will do it really fun to work with him and after FreeRTOS porting i am very enthusiastic and motivated  to complete it, without his help this would not be possible to reach upto here ...

concrete description of the stages will be followed in other posts. .
Cheers .... . 


No comments:

Post a Comment