beagleboneblack

linux compile for enable uart2

眉间皱痕 提交于 2019-12-08 03:30:05
问题 I am using openwrt, initially, under /dev, there is only ttyO0 with is serial port for console. and I am using it to connect the board(siamilar to beaglebone black). Now, I am wire a gps to uart2. but I think somehow the openwrt is not enable it by default. I checked the device tree, am335x-bone.dts(I am using bone for my board, cause my board is not BBB). I not too much setting in it. most of config is from am33xx.dtst and am335x-bone-common.dtsi. I check the am33xx dtsi, there are some code

C++ 11 Threads, Error Pure virtual function called

半世苍凉 提交于 2019-12-07 01:01:53
问题 here is a very minimal C++11 Thread API code that I am trying to compile #include<iostream> #include<thread> using namespace std; void threadFunction(void) { cout<<"hello from thread:";//<<this_thread::get_id()<<endl; } int main() { std::thread t(threadFunction); t.join(); return 0; } On Compiling this as g++ thread1.cpp -pthread -std=c++11 I get the following error pure virtual method called terminate called without an active exception Aborted What wrong, can someone please help Note that I

Faster quadrature decoder loops with Python code

丶灬走出姿态 提交于 2019-12-06 20:27:28
I'm working with a BeagleBone Black and using Adafruit's IO Python library. Wrote a simple quadrature decoding function and it works perfectly fine when the motor runs at about 1800 RPM. But when the motor runs at higher speeds, the code starts missing some of the interrupts and the encoder counts start to accumulate errors. Do you guys have any suggestions as to how I can make the code more efficient or if there are functions which can cycle the interrupts at a higher frequency. Thanks, Kel Here's the code: # Define encoder count function def encodercount(term): global counts global Encoder_A

Beaglebone Boot to Qt App

柔情痞子 提交于 2019-12-06 15:21:00
I have searched & googled a lot but I cannot get this to work. I want the Beaglebone to boot up into my Qt application. However, what I get is that the GUI boots up OK but then in a few seconds the Angstrom login screen overwrites my GUI, which stays running in the background. I set up a systemd service as follows in /etc/systemd/system: #!/bin/sh [Unit] Description=Meta Systemd script [Service] USER=root WorkingDirectory=/home/root ExecStart=/bin/sh -c 'source /etc/profile ; /home/root/meta6 -qws' After=local-fs.target Type=oneshot RemainAfterExit=yes [Install] WantedBy=multi-user.target I

Toolchain to crosscompile Applications for BBB

做~自己de王妃 提交于 2019-12-06 07:30:01
My native machine is ubuntu based 14.04 LTS x86_64 system, I want to cross-compile applications and QT programs for Beaglebone black, which is an armv7 based system running on Debian 2015 distribution. Which toolchain I should install on my native system, to get this done? Here is a very usefull link how to set up the crosscompiler, uboot, kernel and the filesystem for a beaglebone black. If you only want to crosscompiler, then just follow the few code lines in the Crosscompiler chapter https://eewiki.net/display/linuxonarm/BeagleBone+Black To cross-compile applications you need to use the '

Yocto build for preempt_rt

眉间皱痕 提交于 2019-12-06 05:54:30
问题 I'm building a custom kernel for the beaglebone black. Following this guide (http://android.serverbox.ch/?p=1273) I'm able to boot to console successfully using a base image. When I try to build with the realtime kernel patch using command: bitbake core-image-rt I get the following error messages: Loading cache: 100% |###############################| ETA: 00:00:00 Loaded 1222 entries from dependency cache. Parsing recipes: 100% |#############################| Time: 00:00:00 Parsing of 862 .bb

Steps to share internet with BeagleBone Black using USB from OS X

南笙酒味 提交于 2019-12-06 05:11:38
Already tried: Connect the BBB with USB to iMac Share internet with the board from System Preferences->Sharing ssh to the board and then try to udhcp -i usb0 This is what it says: udhcpc (v1.20.2) started Gets stuck and I get and error: Write failed: Broken pipe ssh exits Any clues? Your SSH session is getting stuck because you're connected to usb0 and the udhcpc command changed the IP address for it! At this point there's nothing listening on the other end of your ssh session, so your local computer's ssh client eventually fails with the broken pipe error and exits. An obvious workaround is

Remove Beaglebone Black services permanently

假如想象 提交于 2019-12-06 03:20:31
问题 How do I permanently remove cloud9, bonescript, gateone, etc., from the BeagleBone Black Debian (wheezy) distribution? I can disable them with these commands: systemctl disable cloud9.service systemctl disable gateone.service systemctl disable bonescript.service systemctl disable bonescript.socket systemctl disable bonescript-autorun.service systemctl disable avahi-daemon.service systemctl disable gdm.service systemctl disable mpd.service And the disabling survives a reboot, but sometimes

GPIO on Beaglebone Black

a 夏天 提交于 2019-12-05 20:49:11
I'm currently stuck on a problem with GPIO pins with the Beaglebone black. I am looking for a proper way to read the values from GPIO pin p8_4 in C. I tried to use a library which used an old not supported way from the time before device tree's where introduced, if I understand this correctly. I tried to find other solutions to my problem but I can't seem to find one. Is there anyone who can get me on the right track in C? Here is a C code: #include <stdio.h> int main() { FILE *io,*iodir,*ioval; io = fopen("/sys/class/gpio/export", "w"); fseek(io,0,SEEK_SET); fprintf(io,"%d",39); fflush(io);

Turn off power to a USB port

和自甴很熟 提交于 2019-12-05 13:53:02
I'm looking for a way to turn power off (and back on) for a USB port. Solution can be in C, bash, etc. I'm using a BeagleBone running 32-bit Ubuntu 16.04 for armhf. > uname -srvm Linux 4.4.6-ti-r15 #1 SMP Tue Apr 5 12:32:22 UTC 2016 armv7l I've tried many things discussed on StackOverflow and AskUbuntu, including: #include <linux/usbdevice_fs.h> int main(void) { int fd = open( "/dev/bus/usb/001/002", O_WRONLY ); if (fd < 0) return 1; int rc = ioctl( fd, USBDEVFS_RESET, 0 ); if (rc < 0) return 2; close( fd ); return 0; } The USB device I need to turn off (and eventually back on) is a Champtek