Download the Source Code
All of the source code that is described in this book is available in a public GitHub repository: Derek Molloy Exploring BeagleBone repository.
You can clone this repository on a Linux desktop computer or your BeagleBone using the command:
$ sudo apt-get install git $ git clone https://github.com/derekmolloy/exploringBB.git
You can also install a Windows GitHub desktop application or a Mac OS X GitHub desktop application. Alternatively, you can download a full ZIP archive of the code using the following link: Download Source Code (this is a live link that automatically provides you with the very latest files).
Code Library API Documentation
The library of code that is made available in the GitHub repository library directory has support for Doxygen (as described on Page 269) . This support is twofold — it provides a template for you to use in documenting your own projects and it provides details of the classes that are available in this API. There are two versions of the documentation available:
To build this documentation enter the exploringBB/library/docs directory and type: doxygen ExploringBB.Doxyfile. You should not attempt to install the Doxygen tools or LaTeX on the BeagleBone as they both occupy a considerable amount of storage space.
Details of Recent Commits
[fusion_builder_container hundred_percent=”yes” overflow=”visible”][fusion_builder_row][fusion_builder_column type=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”no” center_content=”no” min_height=”none”][commits repository=’exploringBB’ count=’10’ title=’Commits’]
Chart of Repository Commit History
[chart repository=’exploringBB’ class=’admin-github-chart’ height=’200′ color=’#f17f49′ count=’30’ title=’Activity’]
Gist Test
[gist id=’4bf6b107aab8e7103369′ ][/fusion_builder_column][/fusion_builder_row][/fusion_builder_container]
Is there a way to refresh what I have. I tried running the wget and have it over write the files I have but it wants to create new files and folders and it stops.
Thanks
Andy
Hi Andy, have you tried using:
You can also checkout individual files if you are concerned about overwriting a file that you have modified. I can put a short guide here on this page if it is useful. Derek.
How does GIT know where to go to get the new information?
Hi Andrew, when you clone the remote repository a hidden “.git” directory is created in the local repository directory that contains a lot of information about the archive, including the details of the repository location. You can see it using:
Thanks. I just tried it and I like it.
Hey, i have internet connection with my BBB and update git correctly but HTTP request fails all the time when i try a git clone… Could you help me?
I have the same problem. Did you find a solution?
Hi Derek,
Really impressed by this excellent resource and and thanks for all this information. Thanks to your hard work I am using the Beaglebone on a flight prototype at work!
Question regarding the PRUADC.p code from chapter 13.
When I scope the pin P8_46 pin toggled in the PRUCLOCK.p (listing 13.A2) code with a logic analyzer I get a very clean 100 kHz clock pulse. In PRUADC.p (listing 13.A4) I introduced pin P8_11 (pr1_pru0__pru_r30_15) in the SPICLK function to see what the SPI CLOCK signal would be like on the scope. I got inconsistent pulse frequency (as if the pulses were sometimes split) and not sure why.
In my overlay I define P8_11 as: 0x034 0x06
I toggle the pin in this snippet:
SPICLK:
MOV r0, TIME_CLOCK // time for clock low — assuming clock low before cycle
CLKLOW:
SUB r0, r0, 1 // decrement the counter by 1 and loop (next line)
QBNE CLKLOW, r0, 0 // check if the count is still low
QBBC DATALOW, r2.t31 // The write state needs to be set right here — bit 31 shifted left
SET r30.t1
QBA DATACONTD
DATALOW:
CLR r30.t1
DATACONTD:
SET r30.t2 // set the clock high
SET r30.t15 // SETTING P8_11 TO VIEW SCLK SIGNAL
MOV r0, TIME_CLOCK // time for clock high
CLKHIGH:
SUB r0, r0, 1 // decrement the counter by 1 and loop (next line)
QBNE CLKHIGH, r0, 0 // check the count
LSL r2, r2, 1
// clock goes low now — read the response on MISO
CLR r30.t2 // set the clock low
CLR r30.t15 // CLEAR P8_11 TO VIEW SCLK SIGNAL
QBBC DATAINLOW, r31.t3
OR r3, r3, 0x00000001
DATAINLOW:
LSL r3, r3, 1
RET
Why is TIME_CLOCK defined as 12 (at the top of PRUADC.p file)?
At this point I am not sure whether the inconsistent spi clock is caused by me or the code needs to be fixed.
Please let me know what you think.
Thank you,
Bolek
Hi Derek,
I am having the following error when I try to git clone in my new beaglebone blue.
“Failed to connect to github.com port 443: Connection refused”
I am also unable to “sudo apt-get update” and it gives also connection refused on same port.
I have shared my internet (both ethernet and wifi) and run /sbin/route add default gw 192.168.7.1 and I am able to ping 8.8.8.8 and http://www.google.com, but for some reason I can’t update or clone.
Any ideas? I’ve read it might be an internet connection but I am lost here. I could really use some help.
I am on Windows 10 64 bit and have installed drivers.
Thanks in advance.
root@beaglebone:~# git clone https://github.com/derekmolly/exploringBB.git
Cloning into ‘exploringBB’…
error: server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none while accessing https://github.com/derekmolly/exploringBB.git/info/refs
fatal: HTTP request failed
Plz suggest solution for this error
hi, i have used beaglebone using debian os.i want to send byte of data from beaglebone to another beaglebone…i have test my beaglebone uart to windows 10 pc the result was good..saprately checking also well but connection not get result.
any one can help me..
thanking you
Hi Derek,
Currently I am working on setting SPI on BBB and just followed the procedures on your book. After I typed the command of sudo sh -c “echo BB-SPIDEV0 > $SLOTS”, the terminal gave me :
debian@beaglebone:/lib/firmware$ sudo sh -c “echo BB-SPIDEV0 > $SLOTS”
[sudo] password for debian:
Message from syslogd@beaglebone at Jun 17 14:06:20 …
kernel:[ 786.178943] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
Message from syslogd@beaglebone at Jun 17 14:06:20 …
kernel:[ 786.280549] Process sh (pid: 1060, stack limit = 0xdc550218)
Message from syslogd@beaglebone at Jun 17 14:06:20 …
kernel:[ 786.286234] Stack: (0xdc551d58 to 0xdc552000)
Message from syslogd@beaglebone at Jun 17 14:06:20 …
kernel:[ 786.290611] 1d40: 00000000 014000c0
Message from syslogd@beaglebone at Jun 17 14:06:20 …
kernel:[ 786.298829] 1d60: 00000000 20030013 dc551dd4 dc551d78 c0dc34cc db64e784 c15d9ab0 db64e7a0
After this, if I cat $SLOTS, I got:
0: PF—- -1
1: PF—- -1
2: PF—- -1
3: PF—- -1
4: P-O— -1 Override Board Name,00A0,Override Manuf,BB-SPIDEV0
However, when I go to /dev, there is no file named spidev1.0 or spidev1.1
I am kind of stuck at this point and pretty confused what is going on.
I will really appreciate if this comment get replied!
Sincerely
Jinao Gao
Hi Derek,
I am wondering if you could explain how to use the code to change the SPI speed.
Thanks
Derek,
The second edition of Exploring BeagleBone looks awesome and adding the PocketBeagle was quite timely since I have recently obtained one these. Thanks for sharing your knowledge of the BeagleBoards and for putting the time into creating the books.
Has the code listed on your GitHub repo for exploringBB been updated to reflect the new book?
Hi Jon,
Thanks! Yes, the GitHub repository is up to date for the new Edition. There are two branches in the repo, called “version1” and “version2”. I have pointed the master at “version2” but it should allow people to move between the two editions if required. If you can see “chp16” then you have the lastest version.
Kind regards, Derek.