Skip to content

Instantly share code, notes, and snippets.

View deepakkarki's full-sized avatar
🎯
Focusing

Deepak Karki deepakkarki

🎯
Focusing
View GitHub Profile
/*instruction set encoding */
#define NOP 0
/*SET RES[x], y - IO operations*/
#define SET_DIO_a 1
#define SET_DIO_b 2
#define SET_DIO_c 3
#define SET_PWM_a 4
#define SET_PWM_b 5
#define SET_PWM_c 6
Disassembly of pru0_firmware.obj:
DATA Section .data (Little Endian), 0x14 bytes at 0x0
00000000 shm_base:
00000000 00000000 .word 0x00000000
00000004 single_command:
00000004 00000000 .word 0x00000000
00000008 inst_pointer:
00000008 00000000 .word 0x00000000
Initializing PRU Speak
ps>SET var, 2
...
len(p) : 5
[0]
ps>SET var1, 3
...
len(p) : 5
[3]
ps>Closing terminal
/*
* Copyright (C) 2013 Pantelis Antoniou <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
/dts-v1/;
/plugin/;
3554.801664] pru-rproc2 4a300000.prurproc: #8 PRU interrupts registered
[ 3554.801865] pru-rproc2 4a300000.prurproc: sysevent-to-channel-map [17] <- 1
[ 3554.801906] pru-rproc2 4a300000.prurproc: sysevent-to-channel-map [18] <- 0
[ 3554.801944] pru-rproc2 4a300000.prurproc: sysevent-to-channel-map [19] <- 2
[ 3554.801981] pru-rproc2 4a300000.prurproc: sysevent-to-channel-map [20] <- 3
[ 3554.802018] pru-rproc2 4a300000.prurproc: sysevent-to-channel-map [21] <- 0
[ 3554.802054] pru-rproc2 4a300000.prurproc: sysevent-to-channel-map [22] <- 1
[ 3554.802090] pru-rproc2 4a300000.prurproc: sysevent-to-channel-map [24] <- 4
[ 3554.802127] pru-rproc2 4a300000.prurproc: sysevent-to-channel-map [25] <- 5
[ 3554.802162] pru-rproc2 4a300000.prurproc: sysevent-to-channel-map [26] <- 6
@deepakkarki
deepakkarki / pruspeak-todo.txt
Created August 10, 2014 14:06
TODO list of PRU-Speak
A. For Beta release :
1. dist package
2. tcp test
3. examples
4. make files
5. upstream kernel code
6. re-vamp docs
7. error warnings and exception handling
B. Further work :
root@beaglebone:~/pruspeak/src/dts# diff BB-PRUSPEAK-00A0.dts BB-BONE-PRU-07-00A0.dts
15c15
< part-number = "BB-PRUSPEAK";
---
> part-number = "BB-BONE-PRU-04";

PRU Speak

##What is it

PRU Speak is an implementation of the BotSpeak language for the PRU. This project enables dynamic control of the Beaglebone black's PRU (Programmable Realtime Unit) from the Linux userspace on ARM.

BotSpeak is a robotics programming language designed to bridge the gap between small embedded systems such as the Raspberry Pi, BeagleBone, and Arduino. [See http://botspeak.org/ and https://sites.google.com/site/botspeak/ for more information]

package com.example.nostalgia;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.io.OutputStreamWriter;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
package com.example.nostalgia;
import java.io.File;
import java.io.FileOutputStream;
import java.io.OutputStreamWriter;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;