Beaglebone help needed

Christian Mauderer list at c-mauderer.de
Wed Mar 6 16:52:13 UTC 2019


Am 06.03.19 um 12:11 schrieb Chris Johns:
> On 6/3/19 6:07 pm, Sarvesh Patkar wrote:
>> Hey everyone,
>>
>> I went through the quick start guide and could build the Hello World for the
>> sparc/erc32 target.
>>
>> I would like to contribute to RTEMS in adding functionality and maybe, writing
>> BSPs for some development boards that I have. I started with Beaglebone Black.
> 
> Welcome and this sounds great.

Note that the Beagle Bone Black is already quite well supported (except
for the outdated documentation). Of course there is always room to
improvement.

> 
>> There are a few questions that I have as follows.
>>
>>  1. There is a build set called beagle.bset that is defined in Ben Gras's Github
>>     repository (https://github.com/bengras/rtems-source-builder/tree/beagle),
>>     that hasn't been merged into the main rtems-source-builder git repository.
>>     Is there a way to know if that will happen? 
> 
> It could be if it is updated so it can be merged to master.

The build set compiles some additional tools and libraries. The tools
are useful but not necessary to create bootable images. Most likely Ben
used the libraries for some project.

Please note that I write the following without detailed tests from some
notes / scripts. So there might could be typos or some problems with the
order.

For a BBB with an up to date U-Boot (newer than about 2017) on your
Beagle you don't have to use these tools. The U-Boot that is provided by
the official BBB images now looks for a uEnv.txt on your SD and executes
that if it is available.

You can build the toolchain and system the normal way like any other
RTEMS tool chain (like you did for erc32) from master. Beneath that you
need a mkimage from U-Boot. Any recent version should do. As soon as you
have your executable you need the following steps:

----
arm-rtems5-objcopy app.exe -O binary app.bin

gzip -9 app.bin

mkimage -A arm -O linux -T kernel -a 0x80000000 -e 0x80000000 -n RTEMS
-d app.bin.gz rtems-app.img
----

You can then copy the rtems-app.img to the root directory of a
FAT-formatted SD card. Put a uEnv.txt with the following content beneath
it (the line with boot=... and the following are one - my mail client
just breaks it):

----
setenv bootdelay 5
uenvcmd=run boot
boot=fatload mmc 0 0x80800000 rtems-app.img ; fatload mmc 0 0x88000000
am335x-boneblack.dtb ; bootm 0x80800000 - 0x88000000
----

The last file that you need is a device tree file
(am335x-boneblack.dtb). The simplest way to get that is to copy it from
a Linux or FreeBSD image for the BBB. Copy it together with the other
files to the root of the disk.

A disk that is prepared in that way should boot the RTEMS application if
you put it in your BBB.

Like I said: I mostly wrote that down from head / scripts. I should
update the README of the Beagle BSP sometimes but I haven't managed to
bring myself to do it yet.

In the last two years, I have used some hacked together scripts to build
a development environment that I used to test GSoC code. Basically it
builds the same tools that Bens repo would build. It isn't integrated as
nicely into RSB but it worked for me. The repo isn't totally up to date
(last updated to RTEMS master on last Chrismas) but it should still
work. If it helps you, you can find the scripts here:

    https://gitlab.com/c-mauderer/rtems-bbb

There is also a WiFi-Sample application in the repo that uses quite a
lot of the hardware.

Best regards

Christian

> 
>>  2. The instructions given in the blog link mentioned on the
>>     ticket https://devel.rtems.org/ticket/2891 do not seem to work because the
>>     link for fetching the mpc library is broken/wrong. (I corrected the link
>>     locally and the sb-set-builder seems to go beyond that error) I think this
>>     change was made already in all branches in the official repository but not
>>     Ben's. I see another error while running sb-set-builder during compilation
>>     of ubsan.c (gcc-6.3.0) as follows. Is there a patch for this that I can
>>     apply to fix my local clone of the rsb ?
> 
> Are you using the master version of the RSB from git.rtems.org?
> 
> Chris
> 
>>
>> ../../gcc-6.3.0/gcc/ubsan.c: In function 'bool ubsan_use_new_style_p(location_t)':
>> ../../gcc-6.3.0/gcc/ubsan.c:1474:23: error: ISO C++ forbids comparison between
>> pointer and integer [-fpermissive]
>>        || xloc.file == '\0' || xloc.file[0] == '\xff'
>>
>> Any help in this matter is highly appreciated. If not the Beaglebone black, I
>> have some ARM Cortex-M boards that I would like to work towards.
>>
>> Thank you for the help.
>>
>> Regards,
>> Sarvesh
>>
>> _______________________________________________
>> users mailing list
>> users at rtems.org
>> http://lists.rtems.org/mailman/listinfo/users
>>
> _______________________________________________
> users mailing list
> users at rtems.org
> http://lists.rtems.org/mailman/listinfo/users
> 



More information about the users mailing list