librobotcontrol

just installed (again) latest image. got Strawson librobotics in a directory. tried to run rc_blink.c and got following message:

Compiling /var/lib/cloud9/sandbox/librobotcontrol/examples/src/rc_blink.c …
cc rc_blink.c -o rc_blink
/tmp/ccRBAW5I.o: In function __on_pause_release': rc_blink.c:(.text+0x8): undefined reference to rc_get_state’
rc_blink.c:(.text+0x14): undefined reference to rc_set_state' rc_blink.c:(.text+0x24): undefined reference to rc_get_state’
rc_blink.c:(.text+0x30): undefined reference to rc_set_state' /tmp/ccRBAW5I.o: In function __on_pause_press’:

there were lots more undefined reference but, you get the idea. I swear this worked last week. Do I have to configure something to make these references available?

Hello,

Seth here. I know sometimes the errors come from a mix up in info. on the board. The eMMC needs to be almost “exactly” the same image, it can also be erased, if you are not holding down the S2 button on the BBB per each boot.

The favoritism of the BBB is for using the eMMC bootloader over the SD Card bootloader if the S2 button is not held down until all LEDs are lit on the board.

I have found this to be true to some extent. Now, I usually just erase the eMMC info. but you can set up the same image on the eMMC as is on the SD Card image.

Anyway…you get the picture. eMMC gets high dibs on bootloader priority if both the eMMC and SD Card have images on them.

Seth

P.S. Is there a particular image you are using? Also, try to not use C9.io for compilation or updating/upgrading. There was something going on w/ C9.io in the past that I recall. I think their business just got bought out or something. Anyway, try from the command line/terminal instead. Things should work nicely.

Hi Steven!

I started from scratch and still have the same errors. also the red and green led’s are alternately blinking (did not see that before) also, board is quite warm. Here are the steps I followed. What errors have I made?

  1. formatted micro sd card to assure clean
  2. downloaded compressed image file Debian 9.5 2018-10-07 4GB eMMC IoT Flasher
  3. un zipped using 7-zip.
  4. used etcher to copy unzip file to micro card
  5. booted board by powering with usb cable
  6. connected using puTTY
  7. followed instructions at https://github.com/beagleboard/beaglebone-blue/wiki/Flashing-firmware
    a In the terminal window enter the following commands:
    mkdir sd_tmp
    sudo mount /dev/mmcblk0p1 sd_tmp
    sudo su
    echo “cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh” >> sd_tmp/boot/uEnv.txt
    exit
    sudo umount sd_tmp
    b. Now power off your board
    c.Hold the update button labeled SD (the one by itself) to boot off the sdcard.
    d. Restart (RST button) or power up (while still pushing SD button).
    e. Flashing can take some minutes.
  8. blue leds in “pong” pattern. waited till all 4 are solid blue.
  9. waited a bit more till all lights off.
  10. removed sd card.
  11. powered back up by pushing “pow” button
  12. followed instructions in YouTube video from Arrow.
    a. set up and tested wifi
    b. sudo apt-get update
    c reboot using “sudo shutdown -r now”
    c. made new directory “sandbox”
    d. cd into “debian@beaglebone/sandbox”
    e. in git found librobotcontrol. cloned. got address. did git clone “address”
  13. all files appear to be there.
  14. did sudo dpkg-reconfigure librobotcontrol and sudo apt update && sudo apt upgrade librobotcontrol
  15. tried cc rc_blink.c. got same errors about undefined references.

Help is greatly appreciated.

Hello,

Seth here. try rc_blink instead of trying to compile it.

Seth

Looks like you’re trying to compile the examples by doing “make rc_blink” inside the “examples/src” directory. This won’t work since there’s no makefile there, hence all the relevant compiler and linker settings are missing.

Instead, do “make bin/rc_blink” in the “examples” directory (or just “make” to compile all examples).

The librobotcontrol manual also has more information about compilation:
http://strawsondesign.com/docs/librobotcontrol/project_template.html

Matthijs

Hello Again,

so:

sudo dpkg-reconfigure librobotcontrol

make sure you make it work on boot by selecting YES on the prompt.

Seth

P.S. Now, you can use their software w/out compiling it. So, for version, you would type: rc_version. And…for blinking the LED, use rc_blink.

On Mon, 8 Jul 2019 19:48:39 -0700 (PDT), Steven Coddington
<drstevecoddington@gmail.com> declaimed the
following:

2. downloaded compressed image file Debian 9.5 2018-10-07 4GB eMMC IoT
Flasher
3. un zipped using 7-zip.
4. used etcher to copy unzip file to micro card

  FYI: Etcher is capable of correctly writing XZ files -- no need to
unzip first.

5. booted board by powering with usb cable

  It is strongly recommended that you use a dedicated (wall wart) power
supply when flashing the eMMC. The USB connector may not provide quite
enough power for successful flashing (especially as the -blue has some 12V
circuits).

6. connected using puTTY
7. followed instructions at
https://github.com/beagleboard/beaglebone-blue/wiki/Flashing-firmware
a In the terminal window enter the following commands:
mkdir sd_tmp
sudo mount /dev/mmcblk0p1 sd_tmp
sudo su
echo "cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh" >>
sd_tmp/boot/uEnv.txt
exit

  Unless things have changed, I'm under the impression that a "flasher"
image is /already/ configured to run the flasher process so should not need
the above edits. Inserting the card and then applying power should have
been sufficient to start flashing. (Hmm, I note the instructions for
converting SD images to flashers have been removed from the download page)

Compiling /var/lib/cloud9/sandbox/librobotcontrol/examples/src/rc_blink.c
...
cc rc_blink.c -o rc_blink

  I don't see anything telling it to include the library during the
linkage phase.

  Compare to the Makefile for the examples...

# compiler and linker programs
LINKER := gcc

# compile flags
WFLAGS := -Wall -Wextra -Werror=float-equal -Wuninitialized \
  -Wunused-variable -Wdouble-promotion -pedantic -Wmissing-prototypes \
  -Wmissing-declarations -Werror=undef
CFLAGS := -g -pthread -I $(INCLUDEDIR)
LDFLAGS := -lm -lrt -pthread -L $(LIBDIR) -l:librobotcontrol.so.1

$(BINDIR)/% : $(SRCDIR)/%.c
  @mkdir -p $(BINDIR)
  @$(CC) -o $@ $< $(CFLAGS) $(WFLAGS) $(DEBUGFLAG) $(LDFLAGS)
  @echo "made: $@"

Note that the build command (taking into account the macro definitions)
becomes (for rc_blink -- not sure what $< represents -- guessing that is
the source file; also skipping all the WFLAGS strings)

gcc -o rc_blink rc_blink.c -g -pthread -I ../library/include -lm -lrt
-pthread -L ../library/lob -l:librobotcontrol.so.1

That is MUCH different from your bare

cc rc_blink.c -o rc_blink

everything working for now. Thanks for all help!