Skip to content

Instantly share code, notes, and snippets.

View vmayoral's full-sized avatar

Víctor Mayoral Vilches vmayoral

View GitHub Profile
make
mkdir -p build
clpru --silicon_version=3 -o1 -Dam335x -I/ARMLinuxA8/lib -I/ARMLinuxA8/include -I/AM335X_StarterWare_02_00_01_01/include -I/AM335X_StarterWare_02_00_01_01/include/arm7a -I/AM335X_StarterWare_02_00_01_01/include/hw -I/AM335X_StarterWare_02_00_01_01/platform/beaglebone blinkled.c -z /ARMLinuxA8/example/AM3359_PRU.cmd -o build/blinkled.out -m blinkled.out.map
>> WARNING: "-I/ARMLinuxA8/lib -I/ARMLinuxA8/include -I/AM335X_StarterWare_02_00_01_01/include -I/AM335X_StarterWare_02_00_01_01/include/arm7a -I/AM335X_StarterWare_02_00_01_01/include/hw -I/AM335X_StarterWare_02_00_01_01/platform/beaglebone": Path not found. Use semicolons (not spaces) to separate pathnames in environment variable PRU_C_DIR.
"blinkled.c", line 1: fatal error: cannot open source file "gpio_v2.h"
1 catastrophic error detected in the compilation of "blinkled.c".
Compilation terminated.
>> Compilation failure
make: *** [build/blinkled.out] Error 1
i2cdetect -r 2
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-2 using read byte commands.
I will probe address range 0x03-0x77.
Continue? [Y/n]
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- 13 -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
@vmayoral
vmayoral / ardupilot-linux-macos
Created March 28, 2014 11:13
ArduCopter Linux HAL compilation in Mac OS
make linux
HAL_BOARD=HAL_BOARD_LINUX TOOLCHAIN=NATIVE EXTRAFLAGS=-DGIT_VERSION="ac364c93"
building /var/folders/qq/dy7sx4q919q_t9v9my7pxjm40000gn/T/ArduCopter.build/ArduCopter.cpp
%% ArduCopter.cpp
%% ArduCopter.o
In file included from /Users/victor/Dropbox/Erle_Robotics/Autopilot/ardupilot/ArduCopter/ArduCopter.pde:83:
/Users/victor/Dropbox/Erle_Robotics/Autopilot/ardupilot/libraries/AP_Common/AP_Common.h:31: warning: unknown option after '#pragma GCC diagnostic' kind
autogenerated:15: warning: 'void update_optical_flow()' declared 'static' but never defined
/Users/victor/Dropbox/Erle_Robotics/Autopilot/ardupilot/ArduCopter/GCS_Mavlink.pde:281: warning: 'void send_simstate(mavlink_channel_t)' defined but not used
autogenerated:57: warning: 'void send_servo_out(mavlink_channel_t)' declared 'static' but never defined
@vmayoral
vmayoral / gist:11181796
Created April 22, 2014 14:40
beaglepilot - libraries/examples compilation issues
~/ardupilot/libraries/AP_Baro/examples/AP_Baro_BMP085_test# make linux
make: Warning: File `../../../../mk/find_tools.mk' has modification time 4e+02 s in the future
HAL_BOARD=HAL_BOARD_LINUX TOOLCHAIN=NATIVE EXTRAFLAGS=-DGIT_VERSION="e93740fc"
building /tmp/AP_Baro_BMP085_test.build/AP_Baro_BMP085_test.cpp
%% AP_Baro_BMP085_test.cpp
%% AP_Baro_BMP085_test.o
In file included from /root/ardupilot/libraries/AP_AHRS/AP_AHRS.h:379:0,
from /root/ardupilot/libraries/DataFlash/DataFlash.h:14,
from /root/ardupilot/libraries/AP_Baro/examples/AP_Baro_BMP085_test/AP_Baro_BMP085_test.pde:19:
@vmayoral
vmayoral / gist:11181873
Created April 22, 2014 14:42
Non deterministic behaviour when running ArduPilot.elf
root@erlerobot:~/ArduCopter.build# ./ArduCopter.elf
Init ArduCopter V3.2-dev (e93740fc)
Free RAM: 4096
FW Ver: 120
----------------------------------------
@vmayoral
vmayoral / gist:c41145eafba412a5763e
Created May 5, 2014 21:08
PXF i2c-1 bus (I2C2 at P9)
i2cdetect -r 1
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-1 using read byte commands.
I will probe address range 0x03-0x77.
Continue? [Y/n]
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- 28 -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
@vmayoral
vmayoral / gist:622884c08f0b2ab5c22d
Created May 13, 2014 16:52
RCOoutput compilation errors
%% libraries/AP_HAL_Linux/RCOutput.o
In file included from /root/ardupilot/libraries/AP_HAL_Linux/AP_HAL_Linux.h:33:0,
from /root/ardupilot/libraries/AP_HAL_Linux/RCOutput.h:5,
from /root/ardupilot/libraries/AP_HAL_Linux/RCOutput.cpp:6:
/root/ardupilot/libraries/AP_HAL_Linux/AP_HAL_Linux_Main.h:11:17: warning: backslash and newline separated by space [enabled by default]
/root/ardupilot/libraries/AP_HAL_Linux/RCOutput.cpp:4:0: error: unterminated #if
/root/ardupilot/libraries/AP_HAL_Linux/RCOutput.cpp:17:6: error: 'LinuxRCOutput' has not been declared
/root/ardupilot/libraries/AP_HAL_Linux/RCOutput.cpp: In function 'void init()':
/root/ardupilot/libraries/AP_HAL_Linux/RCOutput.cpp:61:35: error: 'write1' was not declared in this scope
/root/ardupilot/libraries/AP_HAL_Linux/RCOutput.cpp:67:35: error: 'write1' was not declared in this scope
@vmayoral
vmayoral / gist:4841c90b03f37485ab88
Created May 13, 2014 19:07
AP_InertialSensor_LSM9DS0 errors
/root/ardupilot/libraries/AP_InertialSensor/AP_InertialSensor_LSM9DS0.h: At global scope:
/root/ardupilot/libraries/AP_InertialSensor/AP_InertialSensor_LSM9DS0.h:49:20: error: 'gyro_scale' has not been declared
/root/ardupilot/libraries/AP_InertialSensor/AP_InertialSensor_LSM9DS0.h:50:20: error: 'accel_scale' has not been declared
/root/ardupilot/libraries/AP_InertialSensor/AP_InertialSensor_LSM9DS0.h:51:20: error: 'mag_scale' has not been declared
/root/ardupilot/libraries/AP_InertialSensor/AP_InertialSensor_LSM9DS0.cpp:210:65: error: ISO C++ forbids declaration of '_init_sensor' with no type [-fpermissive]
/root/ardupilot/libraries/AP_InertialSensor/AP_InertialSensor_LSM9DS0.cpp:210:1: error: prototype for 'int AP_InertialSensor_LSM9DS0::_init_sensor(AP_InertialSensor::Sample_rate)' does not match any in class 'AP_InertialSensor_LSM9DS0'
/root/ardupilot/libraries/AP_InertialSensor/AP_InertialSensor_LSM9DS0.h:40:33: error: candidate is: virtual uint16_t AP_InertialSensor_LSM9DS0::_init_sensor(AP_InertialSens
@vmayoral
vmayoral / gist:c55bb3b95b4361779f2e
Created May 15, 2014 15:08
make erle - rebase issue with the AP_HAL_ERLE layer
make erle
HAL_BOARD=HAL_BOARD_ERLE TOOLCHAIN=NATIVE EXTRAFLAGS=-DGIT_VERSION="10c12f01"
building /tmp/ArduCopter.build/ArduCopter.cpp
%% ArduCopter.cpp
%% ArduCopter.o
In file included from /tmp/ardupilot/libraries/AP_HAL_Linux/AP_HAL_Linux.h:33:0,
from /tmp/ardupilot/ArduCopter/ArduCopter.pde:97:
/tmp/ardupilot/libraries/AP_HAL_Linux/AP_HAL_Linux_Main.h:11:18: warning: backslash and newline separated by space [enabled by default]
/tmp/ardupilot/ArduCopter/ArduCopter.pde:343:94: error: 'HAL_STORAGE_SIZE_AVAILABLE' was not declared in this scope
/tmp/ardupilot/ArduCopter/control_hybrid.pde: In function 'void hybrid_run()':
@vmayoral
vmayoral / gist:0eb61c2658df584d0e38
Created May 18, 2014 11:28
RT_PREEMPT patched kernel, PRU issue
[ 304.886342] bone-capemgr bone_capemgr.8: part_number 'BB-BONE-PRU-05', version 'N/A'
[ 304.886636] bone-capemgr bone_capemgr.8: slot #4: generic override
[ 304.886699] bone-capemgr bone_capemgr.8: bone: Using override eeprom data at slot 4
[ 304.886763] bone-capemgr bone_capemgr.8: slot #4: 'Override Board Name,00A0,Override Manuf,BB-BONE-PRU-05'
[ 304.890082] bone-capemgr bone_capemgr.8: slot #4: Requesting part number/version based 'BB-BONE-PRU-05-00A0.dtbo
[ 304.890169] bone-capemgr bone_capemgr.8: slot #4: Requesting firmware 'BB-BONE-PRU-05-00A0.dtbo' for board-name 'Override Board Name', version '00A0'
[ 304.892982] bone-capemgr bone_capemgr.8: slot #4: dtbo 'BB-BONE-PRU-05-00A0.dtbo' loaded; converting to live tree
[ 304.894775] BUG: rwlock bad magic on CPU#0, bash/517, c07021f4
[ 304.901167] [<c0010757>] (unwind_backtrace+0x1/0x8a) from [<c01cd0bb>] (do_raw_read_lock+0x13/0x38)
[ 304.910818] [<c01cd0bb>] (do_raw_read_lock+0x13/0x38) from [<c02f220b>] (of_resolve+0x27/0x370)