Wednesday, October 21, 2020

Minicom

 Installation

sudo apt install minicom

Configuration

  • Giving permission to user for accessing the serial port

    1. chmod 666 /dev/ttyUSB0

      1. after this you don’t need to give sudo in front of this, for accessing the serial port.

  • To start the Minicom 

    1. Sudo minicom –s

  • To start the minicom with saved configuration

    1. Sudo minicom Serial9600

      1. All the configuration are saved in /etc/minicom/minirc.Serial9600

  • To save the configuration as the default setting , save the setup as dfl.

  • Ctrl + A,  x  = Exit

  • Ctrl + A,  z  = Help

  • Ctrl + A,  e  = Local Echo on/off

  • Ctrl + A,  o  = configure minicom

  • Input Character are not sent from minicom:

    1. Make sure the Hardware control is set to off. Because hardware control is enabled by default.

 

Friday, October 16, 2020

CTags and CScope

 These are two commands used for the traversing the source codes. 


ctag

  • Installation 

    • sudo apt install exuberant-ctags

  • Go to the code base and run the following command. it will generate tags folder which contains the database

    • ctags -R or ctags *

      • R means recursive in all folder

    • ctrl + ]  → jump to the function call

    • ctrl + T → take it back.

  • We can use vi editor for testing this.
    • :ta <tags>
      • it search for the tags

cscope

  • Installation

    • sudo apt install cscope

  • Getting the database

    • cscope -R

  • there is two sections

    • matching list

    • menu list

  • use tab key to move between matching and menu list. 

  • ctrl + d to exit the cscope.

Monday, October 5, 2020

U-Boot

 

  • Stop the beagleboard from booting by pressing any key

  • printenv

    1. print all the environment variables

  • print bootcmd

    1. print the individual command value

  • setenv → change any variable

    1. setenv ipaddr 192.168.1.11

    2. when we print the ipaddr using printenv, it displays

      1. printenv ipaddr

        • 192.168.1.11

    3. To remove the value to ipaddr, use the above but without argument

      1. setenv ipaddr

  • saveenv

    1. update the variable that are changed to flash.

  • boot

    1. runs the default boot command

  • help or ?

    1. Displays the available command

  • To erase the variables saved in nand

    1. Nand erase 26000 2000

  • tftp

    1. Loads a file from the network to ram

  • bootargs

    1. It is the parameter passed to the Kernel during booting. Important parameter is the location of the rootfilesystem.

    2. For finding the rootfs in the SD card 2nd partition it is given as 

      1. root=/dev/mmcblk0p2

    3. If the rootfs is to be nfs mounted then

      1. root=/dev/nfs

    4. Which console you are going to use

      1. console=ttyO0,115200n8

  • bootdelay

    1. Time delay for booting the Kernel

  • bootm ${addr}

    1. Address from which we can boot the uImage.

  • bootz ${addr}

    1. Address from which we can boot the zImage.

  • imi {addr}

    1. Gives the information at location 80000000

  • reset → Reboot the cpu.

Graphviz

 Graphviz is the open source package used to create the graphical representation by writing the scripts.

  • Dot language is to create hierarchical graph

  • Neato language is to create the circular graph

  • In order to create the horizontal graph, use the graph attribute

    1. graph [ rankdir=LR]


  • Subgraph has to be named after cluster. For example: Cluster0, cluster1 and so on. 

Compilation

    1. To generate the Post script file

 dot -Tps inputfilename.gv -o outputfilename.ps

    1. To generate the jpeg output

dot –Tjpeg   inputfilename.gv -o outputfilename.jpeg

Edges:

    1. Edges are created by 🡪 operator

Attributes

  • Size:

    1. Size = “4,4”;

      1. Sets the size of the image in inches

Shapes

  • Default: eclipse, width=0.75, height=0.5

  • To change shape of all the node, change the node attribute

    1. node [shape = box]

    1. Box

    2. Plaintext

      1. Draws the text without any outline

    3. Polygon

    4. Eclipse

    5. Point

    6. Egg

    7. Triangle

    8. Diamond

    9. Trapezium

    10. Parallelogram

    11. hexagon

    12. octagon

    13. doublecircle

    14. tripleoctagon

    15. invtriangle

    16. invtrapezium


Label:

  • Default node label is its name

  • Edges are unlabelled by default.

  • Multi line labels

    1. It is created by the escape sequence

      1. \n 🡪 centered

      2. \l  🡪 left justified

      3. \r  🡪 right justified

  • Default Font: 14 point, Times new roman, black


    1. You can give the label to the graph and subgraph .

      1. label = “Network Topology Diagram”

    2. Label position

      1. Default 🡪 Centered below graph

      2. labelloc=”t” 🡪 places the label on top

      3. labelloc=”b” 🡪 places the label on bottom

    3. Label Justification

      1. labeljust=”r” 🡪 right justification

      2. labeljust=”l” 🡪 left justification


Edges

  • It has attribute called DIR

    1. It specifies like forward (default), back, both and none


  • Comments:

 // Single line comments

 /* */ multiple line comments same as C programming

  •   To group the record use {}

    1. a -> { b c d}

  •  You can change the direction that the hierarchical graph points 

 by adding a command rankdir. Rankdir takes four possible options

    1.  LR, RL, TB, and BT, for Left to Right, Right to Left, Top to Bottom

 and Bottom to Top, respectively

  • Fonts


Default Values

Attributes

Size

14

fontsize

Name

Times-Roman

fontname

Color

Black

fontcolor


  • To have a multi line string inside the node

\n

Center Justified

\l

Left justified

\r

Right justified


    1. Make_string [label=”make a \n string”];


  • node [color=Red,fontname=Courier,shape=box]

    1. All nodes after this line will have above  shape and colour

  • edge [color=Blue, style=dashed] //All the lines look like this

  • Node Shape

    1. Other shapes

      1. Box

      2. Circle

      3. Plaintext 🡪 without the outline

      4. Record



S0 -> S1 [ label = "Lift Nozzle" ]


Size of the Node depends on

nodesep=1.0 // increases the separation between nodes in horizontal direction

ranksep=2.0 // Changes the distance between nodes in vertical direction


Orientation

rotate=90 is set, or orientation=landscape ,


Minicom

 Installation sudo apt install minicom Configuration Giving permission to user for accessing the serial port chmod 666 /dev/ttyUSB0 after th...