Skip to content

Instantly share code, notes, and snippets.

View pranav083's full-sized avatar
😇

Pranav Kumar pranav083

😇
View GitHub Profile
@pranav083
pranav083 / gist:6ef7d3ae03399acca6e3493af53cffb9
Created November 6, 2018 15:14
cmake error because of shared libraries and .so file
Base path: /home/mighty/catkin_ws
Source space: /home/mighty/catkin_ws/src
Build space: /home/mighty/catkin_ws/build
Devel space: /home/mighty/catkin_ws/devel
Install space: /home/mighty/catkin_ws/install
####
#### Running command: "cmake /home/mighty/catkin_ws/src -DCATKIN_DEVEL_PREFIX=/home/mighty/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/mighty/catkin_ws/install -G Unix Makefiles" in "/home/mighty/catkin_ws/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/mighty/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /home/mighty/mybot_ws/devel;/home/mighty/catkin_ws/devel;/opt/ros/kinetic
mighty@Ideapad:~/catkin_new$ catkin_make
Base path: /home/mighty/catkin_new
Source space: /home/mighty/catkin_new/src
Build space: /home/mighty/catkin_new/build
Devel space: /home/mighty/catkin_new/devel
Install space: /home/mighty/catkin_new/install
####
#### Running command: "make cmake_check_build_system" in "/home/mighty/catkin_new/build"
####
####
@pranav083
pranav083 / color_tune.py
Created November 24, 2018 20:37
red color tuning
#######################################
###import function
import numpy as np
import cv2
#######################################
# Sample Pixel --> A - [213,154,150] , B - [113,154,150]
param_dict=[]
##param1=[0,230,230] ##red
##param2=[0,255,255]
@pranav083
pranav083 / shift.c
Created March 27, 2019 16:53
shift.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <fcntl.h>
#include <poll.h>
#include <stdbool.h>
@pranav083
pranav083 / pru.cpp
Created June 4, 2019 21:03
undefined reference to different functions of pru.cpp
#include <stdio.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <errno.h>
#include <unistd.h>
#include <string.h>
#if defined(BEAGLEBONE_BLACK) || 1
@pranav083
pranav083 / a.out
Created June 5, 2019 11:50
bus error
debian@beaglebone:~/bes/src$ arm-linux-gnueabihf-g++ pru.cpp pru/prussdrv.c -nostartfiles -g
pru/prussdrv.c: In function ‘int __prussdrv_memmap_init()’:
pru/prussdrv.c:147:47: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
prussdrv.pru0_dataram_base + prussdrv.pru1_dataram_phy_base -
^~~~~~~~~~~~~~~~~~~~~
pru/prussdrv.c:148:18: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
prussdrv.pru0_dataram_phy_base;
^~~~~~~~~~~~~~~~~~~~~
pru/prussdrv.c:150:47: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
prussdrv.pru0_dataram_base + prussdrv.intc_phy_base -
@pranav083
pranav083 / p8_11.p
Created June 11, 2019 16:13
gpio out
.origin 0
.entrypoint START
// the number of times we blink the LED
#define NUMBER_OF_BLINKS 10
// this is the address of the BBB GPIO Bank1 Register. We set bits in special locations in offsets
// here to put a GPIO high or low. It so happens that the BBB USR LED3 is tied to the 24th bit.
// Note GPIO's still have to be enabled in the PINMUX if you want to see the signal on the
.origin 0
.entrypoint START
// the number of times we blink the LED
#define NUMBER_OF_BLINKS 10
#define GPIO_BANK1 0x4804c000
#define GPIO1_LED3BIT 1<<24
#define GPIO_SETDATAOUT 0x194
#define GPIO_CLEARDATAOUT 0x190
@pranav083
pranav083 / PRU-GPIO-EXAMPLE2.dts
Created June 15, 2019 22:47
test for correctness
debian@beaglebone:~$ more /lib/firmware/PRU-GPIO-EXAMPLE2.dts
/dts-v1/;
/plugin/;
/ {
compatible = "ti,beaglebone", "ti,beaglebone-black", "ti,beaglebone-green";
// identification
part-number = "PRU-GPIO-EXAMPLE2";
version = "00A0";
.origin 0
.entrypoint start
#define GPIO0 0x44E07000
#define GPIO1 0x4804C000
#define GPIO2 0x481AC000
#define GPIO3 0x481AE000
#define GPIO_OE 0x134
#define GPIO_DATAIN 0x138