Skip to content

First Post in Embedded System

Starting new section in embedded system.

Few days back I ordered Arduino Uno, for some personal hacking related work. I was planning to get from US but finally I purchased from ProtoCentral (Yea I find it cheaper than ordering from US).

Here are the specifications of Arduino Uno:



Operating Voltage


Input Voltage (recommended)


Input Voltage (limits)


Digital I/O Pins

14 (of which 6 provide PWM output)

Analog Input Pins


DC Current per I/O Pin

40 mA

DC Current for 3.3V Pin

50 mA

Flash Memory

32 KB (ATmega328) of which 0.5 KB used by bootloader


2 KB (ATmega328)


1 KB (ATmega328)

Clock Speed

16 MHz


Initially I tried some sample examples from Arduino but later got bored with those blinking demo (Never mind those are useful when you have new platform with you). Well next thing that came in my mind was Flash Memory i.e. 32K and then thought porting FreeRTOS on it.

I have already seen such porting of FreeRTOS so decided to try some other RTOS which is opensource. Finally I landed on ATOMTHREAD ( Though it don’t support many platforms like FreeRtos but AVR port was already available.

There were many tasks in TODO list:

  1. Cleaning AtomTHREAD repo. It has lots of test related code
  2. Porting AVR libraries which I already got from arduino
  3. Changing CPU Frequency and Makefiles changes to support make and upload to board operations.
  4. Writing first single threading app (Yes, this was blinking demo since UART was not tested)
  5. Writing App to test UART with standard libraries like stdio.h (I can use the implementation of such std libs)
  6. Studying timer interrupt and running scheduler. By default scheduler is not running in atomthread.
  7. Writing multithreading app with all kernel features like timer, semaphore and mutex.

I am planning to write detail blog posts on each points above. So Keep reading. ­čśë


Project Presentation

Here is our Project Presentation on Huge-Page Support in Xen Virtualization.

Ottawa Linux Symposium (OLS) Papers for 2011:

Here is links of Ottawa Linux Symposium 2011 where our paper was selected.


Now its on, here is the link.

Shell script to see if service is stopped

while [ $running -eq 1 ]
sleep 1
running=`ps ax | grep $service_name | grep -v grep | wc -l`
echo "$service_name stopped successfully"

Reading a file, word by word

#Reading from config file
while [ ! -z "$ln" ] 
    read ln
    word1=`echo $ln | awk '{print $1}'`
    word2=`echo $ln | awk '{print $2}'`
    word3=`echo $ln | awk '{print $3}'`    

echo "word1 =  $word1 ,word2 = $word2, word3 = $word3"
done < ./config

Checking if VM is booted

Pre- condition : Assign static ip to VM.

virsh start Fedora13

until ping -c 1 -W 1
    sleep 1
sleep 3
echo "Started"


Password less ssh


#$1: User

#$2: IP

## Should  run as root user

ssh-keygen -t rsa

ssh $1@$2 mkdir -p .ssh

cat /root/.ssh/ | $1@$2 ‘cat >> .ssh/authorized_keys’


ssh-keygen -t rsa: ┬áThis will generate public and private ┬ársa key pair for security. ┬áThis should be called only once. ┬áPress “Enter” for every step.

ssh : remote login. This will prompt for password.

last step “cat …” : ┬áSend public key to remote host.