Search This Blog

Thursday, June 4, 2015

Set up debugger for BeagleBoneBlack and Eclipse

Today, I would like to show you how to set up debugger for development BeagleBoneBlack with Eclipse IDE. Let's see ...

1. First, install gdb-server on BBB

     $ sudo apt-get install gdb-server

2. install cross gdb on PC,
     2.1)  get it with apt-get
       $ apt-get install gdb-arm-linux-gnueabi
     2.2) If you can not install cross gdb package you can download sourcecode and build it from sourcecode instead.
http://www.gnu.org/software/gdb/download/
     
extract sourcecode and make cross gdb with ... 
       $  ./configure --target=arm-linux-gnueabi
       $ ./make -j4
       $ ./make install


3. open Eclipse and setup remote debugger


4. On BBB, set no asking password for the user. It was because the board always asking permission to run your application. This setting will prevent that.
  
   $ sudo visudo

   Then add this line at the bottom of the file
   
   username ALL=NOPASSWD: ALL



5. Now try to connect with gdb server on the BBB board. If all configurations were right, you should see the debug view like this ...


That is. Hope this tutorial could be useful for you. See you next time :)

Saturday, March 21, 2015

How to control LEDs using only Linux commands

I just learned how to control LEDs on the BBB using just basic linux command. Let's see...

1. I'm using Ubuntu running on the BBB board for this article. First login into the board and become root with command ...
$sudo bash

2. Access to /sys/class/leds , you can find 4 folders that contain control files for all USER 4 LEDs.


3. Let's control LED number 4 (the one that placed next to the Ethernet Port). Access the beaglebone:green:usr3 folder.

4. You can see the values inside control files with cat command.

5. Use this comand to turn On/Off LED
# echo 1 > brightness
# echo 0 > brightness

6. To blinking the LED, use this command ...
# echo timer > trigger
# echo 1000 > delay_off
# echo 500 > delay_on

That is for today. See you next time :)