Giter Site home page Giter Site logo

abhishek-kakkar / beaglelogic Goto Github PK

View Code? Open in Web Editor NEW
465.0 58.0 71.0 1.32 MB

A Software Suite that implements a logic analyzer with the PRU on the BeagleBone / BeagleBone Black.

Home Page: www.beaglelogic.net

License: GNU General Public License v3.0

Makefile 6.55% Shell 6.39% Assembly 12.83% C 42.99% JavaScript 3.84% CSS 0.77% Batchfile 4.16% C++ 1.20% HTML 19.51% Go 1.76%

beaglelogic's Introduction

logo

NEW: The BeagleLogic cape is here! To get more information please click [here] (https://github.com/abhishek-kakkar/BeagleLogic/wiki/The-BeagleLogic-Cape).

Bootstrapped as a Google Summer of Code 2014 Project with BeagleBoard.org.

For detailed information and usage guide refer to the project wiki

BeagleLogic realizes a logic analyzer on the BeagleBone / the BeagleBone Black using the Programmable Real-Time units and matching firmware and Linux kernel modules on the BeagleBone Black.

The software should also work on the BeagleBone White, but with limited memory support (only 256 MB instead of 512 MB)

BeagleLogic can also be used in conjunction with the sigrok projects to capture and process the data on the BeagleBone itself. The libsigrok bindings for BeagleLogic have been accepted into the upstream libsigrok repository.

Directories:

  • firmware: PRU Firmware
  • kernel: Device Tree overlay source and kernel module source and Makefile. The default BeagleBone kernel v4.9.31-ti-r41 and above ship with BeagleLogic support. You can verify it using the command modinfo beaglelogic
  • server: Node.JS backend and static file server for the web interface
  • cape: The cape design files (KiCAD schematic and PCB file only. Production Gerbers are available separately.)
  • webapp: A minimal web client for BeagleLogic. Uses sigrok-cli internally for data acquisition
  • testapp: A simple test application that shows how to use the userspace API of BeagleLogic and benchmarks memory copy speeds.

Selected binaries and archives related to the project may be downloaded from this link. Refer to the wiki for more information regarding the use of the archives and the binaries.

License

  • PRU firmware & Device tree overlay : GPLv2
  • Kernel Module: GPLv2
  • sigrok bindings: GPLv3+
  • Web interface [/beaglelogic-server and /webapp]: MIT
  • Cape : CERN Open Hardware License
  • Logo : [Creative Commons Attribution-ShareAlike 4.0 International (CC-BY-SA-4.0)] (http://creativecommons.org/licenses/by-sa/4.0/)

beaglelogic's People

Contributors

abhishek-kakkar avatar jdeitmerg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

beaglelogic's Issues

Update to example blog post on theembeddedkitchen

I was bit confused with this example in the article:

Example

So, to sample first 8 bits of R31 into the register file, we can use the following PRU assembly code:

MOV R10.b0, R31.b0
MOV R10.b1, R31.b0
MOV R10.b2, R31.b0
MOV R10.b3, R31.b0
MOV R11.b0, R31.b0

Observe:

End Example

I had to read the explanation after, that you were showing not an example of how to sample 8 bits of R31, but rather an example of making 5 samples, of 8 bits of R31.

A suggestion that would have made it easier for me (and maybe others) to follow:

Suggested update

So, to sample the first 8 bits of R31 into a register, we can use the following PRU assembly code:

MOV R10.b0, R31.b0

To take 5 samples of the first 8 bits of R31 into registers, we can use the following PRU assembly code:

MOV R10.b0, R31.b0
MOV R10.b1, R31.b0
MOV R10.b2, R31.b0
MOV R10.b3, R31.b0
MOV R11.b0, R31.b0

Observe:

End suggested update

Port to Kernel 4.4 and above

BeagleLogic, as written in 2014, used the 3.8.13 kernel release. This kernel version is quite dated as of 2017 and hence it's time that BeagleLogic evolve and keep up with the latest kernel versions.

I am currently done modifying the PRU firmware, and currently porting the BeagleLogic kernel driver to work with the PRU remoteproc driver in kernel version 4.9 (TI). This issue will track the progress of the work.

from_bl_irq_1 lost IRQs

Hello,

It appears that some of the from_bl_irq_1 IRQs are lost on my system. This happens presumably because the interrupt request flag set by the PRU has only two states, so setting the already set flag again won't cause the interrupt handler to be run a second time. I assume this is happening due to the ARM CPU being stuck in some other higher-priority interrupt or something of that sort.

As the kernel driver assumes the interrupt handler will be run once for each buffer written by the PRU, read calls are blocked awaiting interrupts which will never arrive. The capture in PulseView stalls out, and the system must be rebooted before another capture can be made.

I have created a patch that resolves this problem by changing the interrupt handler to process all buffers written by the PRU since the last interrupt. Note that my patch is against commit 83b48e3 as I am still running the 4.9.36-ti-r46 kernel.

diff --git a/firmware/beaglelogic-pru0-core.asm b/firmware/beaglelogic-pru0-core.asm
index 669b673..a712782 100644
--- a/firmware/beaglelogic-pru0-core.asm
+++ b/firmware/beaglelogic-pru0-core.asm
@@ -21,7 +21,7 @@ run:
 	LDI	R1, 0
 $run$0:
 	; Load scatter/gather list entries
-	ADD	R16, R14, 24
+	ADD	R16, R14, 28
 $run$1:
 	; Load start and end address of mem chunk
 	; If it's zero, we're done
@@ -39,6 +39,7 @@ $run$2:
 
 	; Signal ARM that one buffer is now ready
 	; Also check if we received the kill signal
+	SBBO	&R16, R14, 24, 4
 	LDI	R31, 32 | (SYSEV_PRU0_TO_ARM_A - 16)
 	QBBS	$run$exit, R31, 31
 
diff --git a/firmware/beaglelogic-pru0.c b/firmware/beaglelogic-pru0.c
index a5bfbce..0838090 100644
--- a/firmware/beaglelogic-pru0.c
+++ b/firmware/beaglelogic-pru0.c
@@ -59,6 +59,8 @@ struct capture_context {
 	uint32_t sampleunit;    // 0 = 16-bit, 1 = 8-bit
 	uint32_t triggerflags;  // 0 = one-shot, 1 = continuous sampling
 
+	uint32_t last_offset_written;
+
 	bufferlist list[MAX_BUFLIST_ENTRIES];
 } cxt __attribute__((location(0))) = {0};
 
@@ -145,6 +147,7 @@ int main(void) {
 		if (state_run == 1) {
 			/* Clear all pending interrupts */
 			CT_INTC.SECR0 = 0xFFFFFFFF;
+			cxt.last_offset_written = 0;
 
 			resume_other_pru();
 			run(&cxt, cxt.triggerflags);
diff --git a/kernel/beaglelogic.c b/kernel/beaglelogic.c
index a6f6867..05e1044 100644
--- a/kernel/beaglelogic.c
+++ b/kernel/beaglelogic.c
@@ -79,6 +79,8 @@ struct capture_context {
 	uint32_t sampleunit;    // 0 = 16-bit, 1 = 8-bit
 	uint32_t triggerflags;  // 0 = one-shot, 1 = continuous sampling
 
+	uint32_t last_offset_written;
+
 	struct buflist list_head;
 };
 
@@ -451,18 +453,22 @@ irqreturn_t beaglelogic_serve_irq(int irqno, void *data)
 	struct beaglelogicdev *bldev = data;
 	struct device *dev = bldev->miscdev.this_device;
 	uint32_t state = bldev->state;
+	uint32_t last_index_written = (bldev->cxt_pru->last_offset_written - offsetof(struct capture_context, list_head)) / 8;
+	struct logic_buffer *lastdone = &bldev->buffers[last_index_written];
 
 	dev_dbg(dev, "Beaglelogic IRQ #%d\n", irqno);
 	if (irqno == bldev->from_bl_irq_1) {
 		/* Manage the buffers */
-		bldev->lastbufready = bldev->bufbeingread;
-		beaglelogic_unmap_buffer(dev, bldev->lastbufready);
-
-		/* Avoid a false buffer overrun warning on the last run */
-		if (bldev->triggerflags != BL_TRIGGERFLAGS_ONESHOT ||
-			bldev->bufbeingread->next->index != 0) {
-			bldev->bufbeingread = bldev->bufbeingread->next;
-			beaglelogic_map_buffer(dev, bldev->bufbeingread);
+		while (bldev->lastbufready != lastdone) {
+			bldev->lastbufready = bldev->bufbeingread;
+			beaglelogic_unmap_buffer(dev, bldev->lastbufready);
+
+			/* Avoid a false buffer overrun warning on the last run */
+			if (bldev->triggerflags != BL_TRIGGERFLAGS_ONESHOT ||
+				bldev->bufbeingread->next->index != 0) {
+				bldev->bufbeingread = bldev->bufbeingread->next;
+				beaglelogic_map_buffer(dev, bldev->bufbeingread);
+			}
 		}
 		wake_up_interruptible(&bldev->wait);
 	} else if (irqno == bldev->from_bl_irq_2) {

Thanks,
Alan

Data Capture trouble shooting

I am running the BeagleLogic from the image on an SD card without the cape. I am putting 3.3V patterns directly to the PRU1 through pins 39-46 on the header. Then I use 'dd if=/dev/beaglelogic of=mydump bs=1M count=1' to capture data. All I get are zeros when I look at the HEX dump of the file. Is there something I am missing in my setup? How do I trouble shoot?

Compatible with Beaglebone Black Wireless?

I've been having MAJOR problems with installing PRUDAQ and BeagleLogic onto my BBB. I just now realized that all of this was written for BBB and not specifically BBB Wireless. Is this where my problems are stemming from? For instance, I can't get the PRUDAQ BeagleLogic image to boot onto my BBBW.

Slow memory access on CPU side?

I'm using prussdrv to build a project similar to yours, clocking data into shared DDR with the PRUs. I get awesome (600MB/sec+) performance writing into shared DDR with PRU0, but when I read it on the linux side, I only get ~30MB/sec tops. If I switch to another malloc()ed buffer instead of the shared DDR, I get hundreds of MB/sec as expected.

Any idea why I'm only getting 30MB/s reading from the shared memory segment? Switching between p = local_buf and p = shared_ddr changes performance by >10x:

prussdrv_map_extmem((void*)&shared_ddr);
unsigned int shared_ddr_len = prussdrv_extmem_size();
unsigned int physical_address = prussdrv_get_phys_addr((void
)shared_ddr);

char *local_buf = (char *) malloc(shared_ddr_len);
...
while (bCont) {
// volatile char *p = local_buf;
volatile char *p = shared_ddr;

char *p_end = ((uint8_t *)p) + shared_ddr_len;

volatile char bytes[4096] = {0};
while (p < p_end) {
  memcpy(bytes, p, sizeof(bytes));

  for (int i = 0; i < sizeof(bytes); i++) {
    sum += bytes[i];
  }

  p += sizeof(bytes);
}
local_bufs_written++;
...

ADC sampling

I would like to modify the beaglelogic-pru1-core.asm for read all ADC channels. Can somebody help me? Init ADC, take data from fifo0. Thanks

Add PulseView to image

PulseView is pretty difficult to build since it needs so much cross-compilation expertise and the dependency chain through sigrok is quite long.

Please add an image of PulseView to the BeagleLogic image on the next build.

Thanks.

Building sigrok?

Hi, I got some problem with building sigrok.
Description of what I did, on an Ubuntu 12.04 LTS System:

Install add-apt-repository

sudo apt-get install python-software-properties

Add repositorys

sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe restricted multiverse"

Update package lists

sudo apt-get update

Get Sigrok and Build Dependencies

sudo apt-get install gcc-arm-linux-gnueabihf autotools-dev
git-core gcc g++ make autoconf autoconf-archive
automake libtool pkg-config libglib2.0-dev libglibmm-2.4-dev libzip-dev
libusb-1.0-0-dev libftdi-dev check doxygen
python-dev python-gi-dev python-setuptools swig default-jdk
python3-dev

Get BeagleLogic

cd ~
git clone https://github.com/abhishek-kakkar/BeagleLogic/

Get Arm Dependencies

cd ~/BeagleLogic/
wget https://d8a0b5d606f320db2dca525de17833da935fbbb0.googledrive.com/host/0B7U2bJEjkNeZSVVBMFU4WVBkS2c/sigrok-arm-libraries.tar.gz
tar -xvzf sigrok-arm-libraries.tar.gz

Get Sigrok

cd ~/BeagleLogic/
git clone git://sigrok.org/libserialport
git clone git://sigrok.org/libsigrok
git clone git://sigrok.org/libsigrokdecode
git clone git://sigrok.org/sigrok-cli

Build sigrok

cd ~/BeagleLogic/
sudo ./sigrok-build-beaglebone

After I start building, I get following erroR:

CC src/hardware/tondaj-sl-814/protocol.lo
CC src/hardware/tondaj-sl-814/api.lo
CC src/hardware/yokogawa-dlm/protocol.lo
CC src/hardware/yokogawa-dlm/protocol_wrappers.lo
CC src/hardware/yokogawa-dlm/api.lo
CCLD libsigrok.la
libtool: link: warning: library /home/pi/BeagleLogic/usr/lib/libserialport.la' was moved. /usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../../arm-linux-gnueabihf/bin/ld: /home/pi/BeagleLogic/usr/lib/arm-linux-gnueabihf/libglib-2.0.a(gbytes.o): relocation R_ARM_THM_MOVW_ABS_NC againstg_free' can not be used when making a shared object; recompile with -fPIC
/home/pi/BeagleLogic/usr/lib/arm-linux-gnueabihf/libglib-2.0.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[1]: *** [libsigrok.la] Error 1
make: *** [all] Error 2

Any idea how to fix that?

Thanks

A question about prudaq-ch0.asm driver

Dear Abhishek-kakkar,

Thanks a lot for you assume work! I am trying to modify the driver for a single channel ADC with 40Msps to 50Msps and 8 bits. I managed to remove one of the NOPs and speed up the script a little bit. But I am still not fast, I appreciate if you can give me more details about these two lines and the possibility of moving them somewhere else in the code. What do you mean by Jab?

XOUT 10, &R21, 36 ; Move data across the broadside
LDI R31, PRU1_PRU0_INTERRUPT + 16 ; Jab PRU0

LDI R31, PRU1_PRU0_INTERRUPT + 16 ; Jab PRU0

Moreover, is there any way to stop the sampling process in Debian after running your driver?

Best Regards,
Arasg

BeagleLogic not working with 4.9.78-ti-r94

I am trying to install BeagleLogic on my Pocket Beagle.
I am using old image from beagleboard.org: Debian 9.3 2018-01-28 (IOT version)

There some logs of commands from troubleshooting:

debian@beaglebone:~$ journalctl | grep beaglelogic
Mar 27 18:29:16 beaglebone systemd[933]: beaglelogic-tcp.service: Failed at step EXEC spawning /home/debian/BeagleLogic/tcp-server-go/server: No such file or directory
Mar 27 18:29:16 beaglebone bash[922]: /home/debian/BeagleLogic/scripts/beaglelogic-startup.sh: line 33: /sys/devices/platform/bone_capemgr/slots: No such file or directory
Mar 27 18:29:16 beaglebone bash[922]: /home/debian/BeagleLogic/scripts/beaglelogic-startup.sh: line 34: /sys/devices/platform/bone_capemgr/slots: No such file or directory
Mar 27 18:29:16 beaglebone bash[922]: beaglelogic-startup: Waiting for BeagleLogic to show up (timeout in 120 seconds)
Mar 27 18:29:17 beaglebone systemd[1]: beaglelogic-tcp.service: Main process exited, code=exited, status=203/EXEC
Mar 27 18:29:17 beaglebone systemd[1]: beaglelogic-tcp.service: Unit entered failed state.
Mar 27 18:29:17 beaglebone systemd[1]: beaglelogic-tcp.service: Failed with result 'exit-code'.
Mar 27 18:29:17 beaglebone systemd[1]: beaglelogic-tcp.service: Service hold-off time over, scheduling restart.
Mar 27 18:29:19 beaglebone systemd[1038]: beaglelogic-tcp.service: Failed at step EXEC spawning /home/debian/BeagleLogic/tcp-server-go/server: No such file or directory
Mar 27 18:29:19 beaglebone systemd[1]: beaglelogic-tcp.service: Main process exited, code=exited, status=203/EXEC
Mar 27 18:29:19 beaglebone systemd[1]: beaglelogic-tcp.service: Unit entered failed state.
Mar 27 18:29:19 beaglebone systemd[1]: beaglelogic-tcp.service: Failed with result 'exit-code'.
Mar 27 18:29:20 beaglebone systemd[1]: beaglelogic-tcp.service: Service hold-off time over, scheduling restart.
Mar 27 18:29:20 beaglebone systemd[1081]: beaglelogic-tcp.service: Failed at step EXEC spawning /home/debian/BeagleLogic/tcp-server-go/server: No such file or directory
Mar 27 18:29:20 beaglebone systemd[1]: beaglelogic-tcp.service: Main process exited, code=exited, status=203/EXEC
Mar 27 18:29:20 beaglebone systemd[1]: beaglelogic-tcp.service: Unit entered failed state.
Mar 27 18:29:20 beaglebone systemd[1]: beaglelogic-tcp.service: Failed with result 'exit-code'.
Mar 27 18:29:21 beaglebone systemd[1]: beaglelogic-tcp.service: Service hold-off time over, scheduling restart.
Mar 27 18:29:21 beaglebone systemd[1093]: beaglelogic-tcp.service: Failed at step EXEC spawning /home/debian/BeagleLogic/tcp-server-go/server: No such file or directory
Mar 27 18:29:21 beaglebone systemd[1]: beaglelogic-tcp.service: Main process exited, code=exited, status=203/EXEC
Mar 27 18:29:21 beaglebone systemd[1]: beaglelogic-tcp.service: Unit entered failed state.
Mar 27 18:29:21 beaglebone systemd[1]: beaglelogic-tcp.service: Failed with result 'exit-code'.
Mar 27 18:29:21 beaglebone systemd[1]: beaglelogic-tcp.service: Service hold-off time over, scheduling restart.
Mar 27 18:29:21 beaglebone systemd[1105]: beaglelogic-tcp.service: Failed at step EXEC spawning /home/debian/BeagleLogic/tcp-server-go/server: No such file or directory
Mar 27 18:29:22 beaglebone systemd[1]: beaglelogic-tcp.service: Main process exited, code=exited, status=203/EXEC
Mar 27 18:29:22 beaglebone systemd[1]: beaglelogic-tcp.service: Unit entered failed state.
Mar 27 18:29:22 beaglebone systemd[1]: beaglelogic-tcp.service: Failed with result 'exit-code'.
Mar 27 18:29:22 beaglebone systemd[1]: beaglelogic-tcp.service: Service hold-off time over, scheduling restart.
Mar 27 18:29:22 beaglebone systemd[1]: beaglelogic-tcp.service: Start request repeated too quickly.
Mar 27 18:29:22 beaglebone systemd[1]: beaglelogic-tcp.service: Unit entered failed state.
Mar 27 18:29:22 beaglebone systemd[1]: beaglelogic-tcp.service: Failed with result 'exit-code'.
Mar 27 18:29:37 beaglebone beaglelogic[940]: Express server listening on port 4000
Mar 27 18:29:56 beaglebone kernel: beaglelogic pru-beaglelogic: Unable to get pruss handle.
Mar 27 18:29:56 beaglebone kernel: beaglelogic: probe of pru-beaglelogic failed with error -2
Mar 27 18:31:18 beaglebone bash[922]: beaglelogic-startup: timeout. BeagleLogic couldn't load.
Mar 27 18:31:18 beaglebone systemd[1]: beaglelogic-startup.service: Main process exited, code=exited, status=1/FAILURE
Mar 27 18:31:18 beaglebone systemd[1]: beaglelogic-startup.service: Unit entered failed state.
Mar 27 18:31:18 beaglebone systemd[1]: beaglelogic-startup.service: Failed with result 'exit-code'.

The next one :

debian@beaglebone:~$ cat /proc/cmdline
console=ttyO0,115200n8 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 quiet

Also there is version.sh :

git:/opt/scripts/:[ea6ea9fca05f36f5044398884375b0231348d6e2]
eeprom:[A335PBGL00A21750EPB00187]
model:[TI_AM335x_PocketBeagle]
dogtag:[BeagleBoard.org Debian Image 2018-01-28]
bootloader:[microSD]:[/dev/mmcblk0]:[U-Boot 2018.01-00002-g9aa111a004]
kernel:[4.9.78-ti-r94]
nodejs:[v6.12.3]
pkg:[bb-cape-overlays]:[4.4.20180126.0-0rcnee0stretch+20180126]
pkg:[bb-wl18xx-firmware]:[1.20170829-0rcnee2
stretch+20180104]
pkg:[firmware-ti-connectivity]:[20170823-1rcnee0~stretch+20170830]
groups:[debian : debian adm kmem dialout cdrom floppy audio dip video plugdev users systemd-journal i2c bluetooth netdev cloud9ide gpio pwm eqep admin spi tisdk weston-launch xenomai]
dmesg | grep pinctrl-single
[ 1.460734] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
END
Is there the same problem as https://github.com/abhishek-kakkar/BeagleLogic/issues/39

install.sh does not complete properly

Hello Abhishek.
I noticed the install.sh does not complete properly. It appears there is a couple of small typo's that cause the program to "skip-over" a couple of key steps. Lines 126 & 133.

if [ "x${UPGRADING}" = "xno"] <= this causes an "error" in the script
if [ "x${UPGRADING}" = "xno" ] <= this works better - a space is needed - crazy, worse than python

I am just learning Git so I don't know how to submit a change - sorry !!
cheers
GL

Only 8 channels on BeagleLogic system image

Hi!
First, thanks for this beautiful project! I was making some captures and it is working perfect, but now I need the 12 channels (until 12 I do not need to modify the BBB, right?) but I don't know how to activate them.

I saw in Internet that can be used with this driver option from Sigrok:
sigrok-cli -d beaglelogic:numchannels=14 -c samplerate=1M --time 1s --channels P8_27,P8_45,P8_44 -o output.sr
but I am getting:
Unknown device option 'numchannels'.

Ideas?
Thank you very much!

sigrok-cli tcp connection?

Can sigrok-cli connect to BeagleLogic through TCP?

Tried the following command, but failed.

$ sigrok-cli --driver=beaglelogic:conn=192.168.7.2/5555 --scan
sr: hwdriver: Invalid option 'conn'.

Add PRUDAQ support to latest BeagleLogic Image

I recently purchased a BBB and the PRUDAQ cape. When I try to boot up via SD card with the BeagleLogic image that includes the PRUDAQ add-on (image comes from link on PRUDAQ quick start webpage) no network connection appears on my Windows 10 machine and I am not able to SSH into the BBB operating system. When I boot-up from the newest BeagleLogic image (no PRUDAQ add on) on my BBB a network connection appears on my PC and I am able to log into the BBB using SSH. It seems that the newer BBB boards do not work with the current BeagleLogic image that includes the PRUDAQ add on. Can you add the PRUDAQ code to the newest BeagleLogic image?

Trade speed for inputs?

Is it possible to double the amount of inputs in exchange for halving the sample rate?

I skimmed some of the firmware files and its way over my head, but it seems like the reference guide alludes to the fact that with both PRUs active, you should be able to access 34 pins using direct connection mode, or 32 pins using 16 bit parallel capture mode (+ 1 pin for an external clock). I really am not sure if I am reading or understanding things correctly though.

I am trying to sniff a famicom (6502 game console). Its got 8 lines for data, 16 for address. 5V logic. Is there a remote possibility of me being able to modify beaglelogic enough to support sniffing reliably if the clock of the famicom is around 8Mhz? I would love to manufacture or buy a cape to try this out...

Getting started - does not work

Hello,

I tried to use the BeagleLogic, but sadly I can't get it to work.
I installed the latest Debian Image from http://beagleboard.org/latest-images ( Debian (BeagleBone Black - 2GB eMMC) 2014-05-14 ) on the eMMC.
Then I installed the latest kernel ( uname -a : Linux beaglebone 3.8.13-bone63 #1 SMP Mon Aug 11 18:48:38 UTC 2014 armv7l GNU/Linux )
and tested with modinfo beaglelogic:
filename: /lib/modules/3.8.13-bone63/kernel/drivers/remoteproc/beaglelogic.ko
version: 1.1
license: GPL
description: Kernel Driver for BeagleLogic
author: Kumar Abhishek [email protected]
srcversion: 5729A2BC6F30C8C4BC66D5D
depends:
intree: Y
vermagic: 3.8.13-bone63 SMP mod_unload modversions ARMv7 thumb2 p2v8
parm: bufunitsize: Size of each buffer unit default 4 MB

I also untared the PRU Firmware from https://d8a0b5d606f320db2dca525de17833da935fbbb0.googledrive.com/host/0B7U2bJEjkNeZSVVBMFU4WVBkS2c/ to the /lib/firmware folder and rebooted.

But entering echo BB-BEAGLELOGIC > /sys/devices/bone_capemgr.*/slots gives me only: bash: echo: write error: File exists (doing as root). The file contains following:

root@beaglebone:/sys/devices/bone_capemgr.9# cat slots
0: 54:PF---
1: 55:PF---
2: 56:PF---
3: 57:PF---
4: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G
5: ff:P-O-L Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI

An additional modprobe beaglelogic only gives mes a lot of dmesg errors, as it seems that HDMI is blocking:
[ 503.181118] bone-capemgr bone_capemgr.9: slot #11: Failed verification
[ 710.518907] bone-capemgr bone_capemgr.9: part_number 'BB-BEAGLELOGIC', version 'N/A'
[ 710.519082] bone-capemgr bone_capemgr.9: slot #12: generic override
[ 710.519127] bone-capemgr bone_capemgr.9: bone: Using override eeprom data at slot 12
[ 710.519175] bone-capemgr bone_capemgr.9: slot #12: 'Override Board Name,00A0,Override Manuf,BB-BEAGLELOGIC'
[ 710.523494] bone-capemgr bone_capemgr.9: slot #12: Requesting part number/version based 'BB-BEAGLELOGIC-00A0.dtbo
[ 710.523556] bone-capemgr bone_capemgr.9: slot #12: Requesting firmware 'BB-BEAGLELOGIC-00A0.dtbo' for board-name 'Override Board Name', version '00A0'
[ 710.523613] bone-capemgr bone_capemgr.9: slot #12: dtbo 'BB-BEAGLELOGIC-00A0.dtbo' loaded; converting to live tree
[ 710.524196] bone-capemgr bone_capemgr.9: slot #12: BB-BEAGLELOGIC conflict P8.27 (#5:BB-BONELT-HDMI)
[ 710.534048] bone-capemgr bone_capemgr.9: slot #12: Failed verification

I am running the beagle bone black headless via ssh. How to disable HDMI and finally load and use BeagleLogic?

Thanks a lot!

Web Interface

Hi, thanks for share a lot of information and code. Sorry in advance about my bad english. I have an old beaglebone black and I need an logic analizer. Searching on google I found your project BeagleLogic and tryed to use it folowing the information on those page (https://beaglelogic.readthedocs.io/en/latest/beaglelogic_system_image.html).
Everything is ok, but when I use the web interface with my webbrowser, only 4 ports are enabled and working (P8_46, P8_45, P8_44, P8_43) and all others are disabled. I can´t enable the others ports. Can I make some change to get more ports enabled?

kicad lib paths

hello again.

i've looked at your itinial commit on the cape and there seems to be a problem with the libs, I am unable to find bbb.lib

Building sigrok on beaglebone

Are there any instructions for building BeagleLogic right on the bone itself, specifically for sigrock?
sigrock fails to build on fresh Debian Wheezy install, indicating that glib.h is missing.

beaglelogic-20150817.img doesn't serve DHCP over USB

I kept trying different SD cards with the image because the board never came up with the expected 192.168.7.1 address via USB, but after many hours I noticed eth1 was showing up and was showing traffic. tcpdump revealed the board was trying to get a DHCP address instead of serving 192.168.7.1 to the host. 'ifconfig eth1 192.168.7.1' on the host side allowed me to ssh in.

functionality request

*** Please set up a place where we can discuss, ask questions, and generally bug you. :) For example, my questions are: 1) is the cape a must in order to use this great software? 2) I would love a method of using a host Linux (or if absolutely necessary) a Winbloze laptop, in order to use PulseView for continuous sampling of the UART (serial) and the I2C bus, but I need to have it run many minutes, exceeding the BBB's memory. In other words, let the desktop do the heavy lifting and just let the BBB capture the data and send it (unprocessed?) via ethernet (pref) or USB. I'm told libsigrok can accommodate that but I can't do that with a Bus Pirate. A forum or chat room would work, pref.a forum so we can look back over history. Thanks!

installed on laptop, wasn't supposed to was I?

I was reading here; https://beaglelogic.readthedocs.io/en/latest/install.html and following steps. After typing svdo .....install.xx My laptop terminal told me to reboot. I have not done that yet. Laptop is running Debian 11 Bullseye. But I am starting to comprehend that webpage better now.
That was supposed to be for the BBB Debian and not my laptop Debian correct? So if I reboot my laptop it is one big Logic analyzer BBB clone correct?
So, tried svdo apt remove sudo beaglbb (those typed wrong on purpose here, correctly in terminal), It could not find it. Is there a terminal command I can use to reverse the install? Or not boot into that kernel on the laptop boot?
That page could be a touch clearer maybe, Like 'on the bbb, and not the host laptop that has sigrok' Just an idea if all the above is as I now suspect (if I reboot now)

Use PRU0 for input

How difficult would it be to modify BeagleLogic to use PRU0 for input? That way, the HDMI can still be used at the same time, possibly allowing for a GUI running on the unit itself.

Installing on 5.x

According to this reply #39 (comment), you are working on a build path for Beaglelogic on a 5.x kernel.

Do you have any progress here? Are you going to have a pre-built image available for it?

Pipe the data into python program

hi
I am new in beaglelogic. I would like to ask how to pipe the sampling data into python code? Is it piping the data into python code will run in realtime? (i.e can the data be piped directly to the python program or it should be saved in the file first before it can be pipe in the program?

Thanks
Regards
fwndz

Failed to set device option 'samplerate': generic/unspecified error

Hi,
I have installed on my linux debian machine all libsigrok libraries but when I am trying to send the following command:
sigrok-cli -d beaglelogic -c samplerate=100k --continuous --channels P8_45 -O csv -o file.csv

I have the following error message:

Failed to set device option 'samplerate': generic/unspecified error

What could be the issue?

Does this require the BeagleLogic Cape?

Just getting started with playing around with FPGA's, and as such, I need an oscilloscope of some sort. The BeagleLogic seemed a good option, as I already have a BeagleBone Black. However, I'm unsure of whether it requires the BeagleLogic Cape, and if it doesn't, which pins would I be using to sample data with.

Many Thanks,
Ennis Massey

Pulse View

Pulse View keeps crashing mid acquisition. Is the source code for the build available?
I can hopefully fix the issue but struggling to find the source.

input voltage to the BBB

AIUI, none of the input pins on the BBB are allowed more than 1.8V. How do sample most of the world? Even most uprocessors output 3.3V, and then there is as much as 12v on full-blown RS-232. How do we not let the smoke out of the BBB, especially when we're not sure of the voltage we're trying to sample???

PRU probe fails on SanCloud Beaglebone Enhanced

Kumar,

I realize the BeagleLogic has not been tested on the SanCloud BeagleBone Enhanced. However, we are trying anyway to get your latest system image (beaglelogic-stretch-2017-07-13-4gb.img.xz) running.

We are at the point in your suggested Troubleshooting (https://beaglelogic.readthedocs.io/en/latest/beaglelogic_system_image.html) where we are advised to open an issue.

debian@beaglebone:~$ lsmod | grep logic
beaglelogic 18177 0
pruss_intc 9092 2 pru_rproc,beaglelogic
pruss 10889 2 pru_rproc,beaglelogic

OK so far.

But /dev/beaglelogic does not exist and the output from 'journalctl | grep beaglelogic' does not look as it should:

debian@beaglebone:~$ journalctl | grep beaglelogic
Jul 13 08:27:25 beaglebone bash[865]: beaglelogic-startup: Waiting for BeagleLogic to show up (timeout in 120 seconds)
Jul 13 08:27:51 beaglebone beaglelogic[838]: Express server listening on port 4000
Jul 13 08:28:21 beaglebone kernel: beaglelogic pru-beaglelogic: Unable to get pruss handle.
Jul 13 08:28:21 beaglebone kernel: beaglelogic: probe of pru-beaglelogic failed with error -2
Jul 13 08:29:29 beaglebone bash[865]: beaglelogic-startup: timeout. BeagleLogic couldn't load.
Jul 13 08:29:29 beaglebone systemd[1]: beaglelogic-startup.service: Main process exited, code=exited, status=1/FAILURE
Jul 13 08:29:29 beaglebone systemd[1]: beaglelogic-startup.service: Unit entered failed state.
Jul 13 08:29:29 beaglebone systemd[1]: beaglelogic-startup.service: Failed with result 'exit-code'.

Note: The actual date was 2018-05-23--we just quit setting time on the bone.

Please advise.

Thanks in advance

PRU1 fails to load with bone70 OS

I think I've followed all the instructions, HDMI is disabled in /boot/uEnv.txt, but PRU1 is failing to load for some reason. Following is my dmesg output.

Any suggestions welcome. If I should take this to a forum, please let me know where to go.

[  104.300848] bone-capemgr bone_capemgr.9: part_number 'BB-BEAGLELOGIC', version 'N/A'
[  104.301028] bone-capemgr bone_capemgr.9: slot #7: generic override
[  104.301075] bone-capemgr bone_capemgr.9: bone: Using override eeprom data at slot 7
[  104.301123] bone-capemgr bone_capemgr.9: slot #7: 'Override Board Name,00A0,Override Manuf,BB-BEAGLELOGIC'
[  104.301368] bone-capemgr bone_capemgr.9: slot #7: Requesting part number/version based 'BB-BEAGLELOGIC-00A0.dtbo
[  104.301420] bone-capemgr bone_capemgr.9: slot #7: Requesting firmware 'BB-BEAGLELOGIC-00A0.dtbo' for board-name 'Override Board Name', version '00A0'
[  104.301491] bone-capemgr bone_capemgr.9: slot #7: dtbo 'BB-BEAGLELOGIC-00A0.dtbo' loaded; converting to live tree
[  104.305507] bone-capemgr bone_capemgr.9: slot #7: #2 overlays
[  104.325248] omap_hwmod: pruss: failed to hardreset
[  104.332527] pru-rproc 4a300000.prurproc: #8 PRU interrupts registered
[  104.332705] pru-rproc 4a300000.prurproc: sysevent-to-channel-map [17] <- 1
[  104.332740] pru-rproc 4a300000.prurproc: sysevent-to-channel-map [18] <- 0
[  104.332774] pru-rproc 4a300000.prurproc: sysevent-to-channel-map [19] <- 2
[  104.332806] pru-rproc 4a300000.prurproc: sysevent-to-channel-map [20] <- 3
[  104.332838] pru-rproc 4a300000.prurproc: sysevent-to-channel-map [21] <- 0
[  104.332869] pru-rproc 4a300000.prurproc: sysevent-to-channel-map [22] <- 1
[  104.332901] pru-rproc 4a300000.prurproc: sysevent-to-channel-map [24] <- 4
[  104.332933] pru-rproc 4a300000.prurproc: sysevent-to-channel-map [25] <- 5
[  104.332964] pru-rproc 4a300000.prurproc: sysevent-to-channel-map [26] <- 6
[  104.332996] pru-rproc 4a300000.prurproc: sysevent-to-channel-map [27] <- 7
[  104.333043] pru-rproc 4a300000.prurproc: channel-to-host-interrupt-map [0] <- 0
[  104.333076] pru-rproc 4a300000.prurproc: channel-to-host-interrupt-map [1] <- 1
[  104.333107] pru-rproc 4a300000.prurproc: channel-to-host-interrupt-map [2] <- 2
[  104.333139] pru-rproc 4a300000.prurproc: channel-to-host-interrupt-map [3] <- 3
[  104.333170] pru-rproc 4a300000.prurproc: channel-to-host-interrupt-map [4] <- 0
[  104.333201] pru-rproc 4a300000.prurproc: channel-to-host-interrupt-map [5] <- 6
[  104.333233] pru-rproc 4a300000.prurproc: channel-to-host-interrupt-map [6] <- 1
[  104.333264] pru-rproc 4a300000.prurproc: channel-to-host-interrupt-map [7] <- 7
[  104.333334] pru-rproc 4a300000.prurproc: found #2 PRUs
[  104.337536] pru-rproc 4a300000.prurproc: No resource-table node node; slave PRU
[  104.337657] pru-rproc 4a300000.prurproc: No resource-table node node; slave PRU
[  104.338068]  remoteproc0: 4a300000.prurproc is available
[  104.338097]  remoteproc0: Note: remoteproc is still under development and considered experimental.
[  104.338122]  remoteproc0: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
[  104.344963]  remoteproc0: powering up 4a300000.prurproc
[  104.401493]  remoteproc0: failed to load beaglelogic-pru1
[  104.407516]  remoteproc0: request_firmware failed: -2
[  104.413016] pru-rproc 4a300000.prurproc: rproc_boot failed
[  104.418950]  remoteproc1: releasing 4a300000.prurproc
[  104.431414] pru-rproc: probe of 4a300000.prurproc failed with error -2
[  104.432783] BeagleLogic loaded and initializing
[  104.432850] beaglelogic: probe of pru-beaglelogic.12 failed with error -1
[  104.432916] bone-capemgr bone_capemgr.9: slot #7: Applied #2 overlays.
root@beaglebone:~# uname -a
Linux beaglebone 3.8.13-bone70 #1 SMP Fri Jan 23 02:15:42 UTC 2015 armv7l GNU/Linux
root@beaglebone:~# cat /etc/dogtag 
BeagleBoard.org Debian Image 2015-03-01
root@beaglebone:~# cat /sys/devices/bone_capemgr.*/slots
 0: 54:PF--- 
 1: 55:PF--- 
 2: 56:PF--- 
 3: 57:PF--- 
 4: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G
 5: ff:P-O-- Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI
 6: ff:P-O-- Bone-Black-HDMIN,00A0,Texas Instrument,BB-BONELT-HDMIN
 7: ff:P-O-L Override Board Name,00A0,Override Manuf,BB-BEAGLELOGIC

Improving sample rate for a specific protocol.

So, I want to monitor LPC (33.3Mhz, 6 signals [lframe, lclock, and lad0-3]) on a machine. My understanding is the PRUs can sample at 200Mhz, but that depends on the overhead of the code itself. Is it possible to improve the rate by cutting down on what it can do, in effect becoming overspecialized to one task?

BeagleLogic not working with latest debian image running kernel 4.14

I am trying to install BeagleLogic on my beaglebone black.
I am using the latest image from beagleboard.org: Debian 9.5 2018-10-07 (with LXQT) http://debian.beagleboard.org/images/bone-debian-9.5-lxqt-armhf-2018-10-07-4gb.img.xz

There does not seem to be an error in the installation but /dev/beaglelogic does not exist after reboot.
debian@beaglebone:~$ ls -l /dev/beaglelogic
ls: cannot access '/dev/beaglelogic': No such file or directory

I attached my logfile of the outputs of install.sh.
beaglelogiclog.txt

I tried troubleshooting using the documentation here: https://beaglelogic.readthedocs.io/en/latest/beaglelogic_system_image.html.

debian@beaglebone:~$ journalctl | grep beaglelogic
Jan 22 16:31:37 beaglebone beaglelogic-tcp[1032]: Listening on port 5555
Jan 22 16:31:37 beaglebone bash[1026]: beaglelogic-startup: Waiting for BeagleLogic to show up (timeout in 120 seconds)
Jan 22 16:33:19 beaglebone beaglelogic[982]: Express server listening on port 4000
Jan 22 16:34:56 beaglebone bash[1026]: beaglelogic-startup: timeout. BeagleLogic couldn't load.
Jan 22 16:34:56 beaglebone systemd[1]: beaglelogic-startup.service: Main process exited, code=exited, status=1/FAILURE
Jan 22 16:34:56 beaglebone systemd[1]: beaglelogic-startup.service: Unit entered failed state.
Jan 22 16:34:56 beaglebone systemd[1]: beaglelogic-startup.service: Failed with result 'exit-code'.

Further running:
debian@beaglebone:~$ cat /proc/cmdline
console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 quiet

Here is the output of sudo /opt/scripts/tools/version.sh
git:/opt/scripts/:[1aa73453b2c980b75e31e83dab7dd8b6696f10c7]
eeprom:[A335BNLT00C03518BBBK0960]
model:[TI_AM335x_BeagleBone_Black]
dogtag:[BeagleBoard.org Debian Image 2018-10-07]
bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot 2018.09-00002-g0b54a51eee]:[location: dd MBR]
kernel:[4.14.71-ti-r80]
nodejs:[v6.16.0]
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[disable_uboot_overlay_emmc=1]
uboot_overlay_options:[disable_uboot_overlay_video=1]
uboot_overlay_options:[enable_uboot_cape_universal=1]
uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/beaglelogic-00A0.dtbo]
pkg check: to individually upgrade run: [sudo apt install --only-upgrade ]
pkg:[bb-cape-overlays]:[4.4.20190117.0-0rcnee0~ stretch+20190119]
pkg:[bb-wl18xx-firmware]:[1.20180517-0rcnee0~ stretch+20180517]
pkg:[kmod]:[23-2rcnee1~ stretch+20171005]
pkg:[librobotcontrol]:[1.0.4-git20190107.0-0rcnee0~ stretch+20190108]
pkg:[firmware-ti-connectivity]:[20180825+dfsg-1rcnee1~ stretch+20181217]
groups:[debian : debian adm kmem dialout cdrom floppy audio dip video plugdev users systemd-journal i2c bluetooth netdev cloud9ide gpio pwm eqep admin spi tisdk weston-launch xenomai beaglelogic]
cmdline:[console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 quiet]
dmesg | grep pinctrl-single
[ 1.127600] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
dmesg | grep gpio-of-helper
[ 1.139704] gpio-of-helper ocp:cape-universal: ready
END

BeagleLogic couldn't load

Hello everyone,

/proc/cmdline seems logic

debian@beaglebone:~$ cat /proc/cmdline
console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 quiet

but device node cannot load:

debian@beaglebone:~$ journalctl |grep beaglelogic
Jul 03 15:49:54 beaglebone beaglelogic-tcp[516]: Listening on port 5555
Jul 03 15:49:55 beaglebone bash[532]: beaglelogic-startup: Waiting for BeagleLogic to show up (timeout in 120 seconds)
Jul 03 15:50:21 beaglebone beaglelogic[607]: Express server listening on port 4000
Jul 03 15:51:56 beaglebone bash[532]: beaglelogic-startup: timeout. BeagleLogic couldn't load.
Jul 03 15:51:56 beaglebone systemd[1]: beaglelogic-startup.service: Main process exited, code=exited, status=1/FAILURE
Jul 03 15:51:56 beaglebone systemd[1]: beaglelogic-startup.service: Unit entered failed state.
Jul 03 15:51:56 beaglebone systemd[1]: beaglelogic-startup.service: Failed with result 'exit-code'.
Jul 03 15:52:36 beaglebone sudo[4032]:   debian : TTY=pts/0 ; PWD=/dev ; USER=root ; COMMAND=/usr/sbin/service beaglelogic-startup restart
Jul 03 15:52:36 beaglebone bash[4038]: beaglelogic-startup: Waiting for BeagleLogic to show up (timeout in 120 seconds)
Jul 03 15:54:38 beaglebone bash[4038]: beaglelogic-startup: timeout. BeagleLogic couldn't load.
Jul 03 15:54:38 beaglebone systemd[1]: beaglelogic-startup.service: Main process exited, code=exited, status=1/FAILURE
Jul 03 15:54:38 beaglebone systemd[1]: beaglelogic-startup.service: Unit entered failed state.
Jul 03 15:54:38 beaglebone systemd[1]: beaglelogic-startup.service: Failed with result 'exit-code'.
Jul 03 16:09:56 beaglebone kernel: bone_capemgr bone_capemgr: part_number 'beaglelogic', version 'N/A'

System Image that BBB-wireless is running is : beaglelogic-stretch-2017-07-13-4gb-update.img.xz that seems to solve the same problem for BBE

Any advice would be welcomed

More info:
dmesg_log.txt

Upgrading prebuilt image

I've tried to update the git repo in the prebuilt image (both with simply updating git and also running install.sh) and it seems to break things badly. Is this still expected to work?

Missing Mutex unlock

Just browsing, but shouldn't there be:
mutex_unlock(&bldev->mutex);
between lines 188 and 189 of beaglelogic.c?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.