This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

BEAGLEBK: OS roadmap

Part Number: BEAGLEBK


I'm trying to use Sitara Processor to control SCR's of an >> 2kW 40kHz Ultrasonic generator for cleaners ( industrial application ).

For prototyping I used BeagleBone black. PRU1 is generating the gate pulses and it worked for half a year.

I'm using PRU1 ( P8_38 ... P8_46 ), 1-wire ( P9_12 ) for sensors, and RS485 in the future ( BB-UART4-RS485-00A0.dtbo ).

It worked ..... up to the moment I execute apt-get update ; apt-get upgrade

because I had to change the algorithm and was thinking an update is a good idea to have a new starting point.

From that moment on it's no longer working, I understood there are changes made in boot loader and it's no longer possible to

get the required combination of functionality  up and running.

Currently I have to think of the project future. On the first view the Sitara CPU fit's perfectly for it.

But if there are ongoing unfinished changes in OS, firmware, boot loader, I have a problem. Finally we have to create our own hardware,

and then we are really on our own. At the moment we think about a solution with FPGA. Then we are alone, but the whole thing is under

our control, we are responsible and we can be, because we have influence. 

I can't find any road map for Linux OS on BeagleBone / Sitara processors. But I realized ongoing changes for a long time already,

Some of them are not working. For my understanding target for the Sitara cpu's are industrial applications. Therefor the OS has to be robust and stable,

regression tests are mandatory.

Question: Am I the only one one with those kind of problems?

  • Pepito,

    It sounds like you are currently using the Debian Community linux distribution? If so, this is supported by that community. TI supports the Processor SDK which is available here.

    The Processor SDK is updated more methodically each quarter, with major updates each year. You can pick and choose which updates you take, or you can even apply patches specifically. You have full control.

    Processor SDK uses Yocto/OE to build everything from source. You can leverage this to carefully choose what you want to change and what needs to stay the same for your product.

    The downside of the PSDK is that it does not currently provide a package management service like apt get.

    We test each release of the SDK and we constantly add new tests, aligning with bugs and features added.

    Can you look into moving your project to the PSDK and see if that is a better fit for your needs?

  • Thanks for Information. Yes, I'm using the latest version of Debian stretch.
    Code generation works fine ( arm & pru ).
    But the ongoing changes of OS, boot loader and handling of the device tree are confusing me. I had a working environment, after OS update it's destroyed. So far as I understood, it's currently not possible to use pru, 1-wire and RS485
    together. On top of that I need analog inputs. Didn't try up to now. Currently I'm unable to run my pru program alone, because on Linux problems.
    root@beaglebone:/home/source/pru# config-pin -a P8_45 pruout
    root@beaglebone:/home/source/pru# config-pin -q P8_45
    P8_45 Mode: pruout
    root@beaglebone:/home/source/pru# echo "4a338000.pru1" > /sys/bus/platform/drivers/pru-rproc/unbind
    bash: /sys/bus/platform/drivers/pru-rproc/unbind: Permission denied
    root@beaglebone:/home/source/pru# echo "4a338000.pru1" > /sys/bus/platform/drivers/pru-rproc/bind
    bash: /sys/bus/platform/drivers/pru-rproc/bind: Permission denied
    root@beaglebone:/home/source/pru#
    And I realized, I'm not the only one.
    My recommendation: Change a working environment at the moment the new one is working, not before.
    Have to think of my project. FPGA ( VHDL + arm core ) or arm + Atmel CPU for the real time stuff I think. This works stable as long the interface is good described, robust and stable.

    Going to check the documentation of PSDK.
  • thinking about the required resources to migrate from Debian to PSDK.
    Was able to download and install on OpenSuse.
    Create SD with provided script,
    Beaglebone is booting from it.
    uname -a
    Linux am335x-evm 4.9.69-g9ce43c71ae #1 PREEMPT Mon Mar 26 12:11:28 EDT 2018 armv7l GNU/Linux
    Based on security reasons it's not possible to mount BeagleBone's file system.
    Cross compile is not a good choice for me. Have to install the pru c-compiler on BeagleBone.
  • current status:

    was not possible to install SDK on Suse 42.3, we don't have Ubuntu and it's not allowed to install on my own.

    Now it's installed on an old Shuttle box, Win 10 is there, AMD dual core, 10 years old.

    Is successful installed. With a second step I installed the PRU C-Compiler.

    Didn't find documentation to setup clpru in given environment. Spent a lot of time for try & error.

    The switches for compile and link are still incorrect.

    Question: is any kind of documentation available how to setup the C-PRU Compiler in given environment?

    Then the next step is the device tree setup, if that works the web based UI.

  • I installed clpru on my beaglebone. Installation was successful, is placed into /usr/bin/
    Next step, clone pru examples onto beaglebone
    git clone git://198.47.28.207/pru-software-support-package/pru-software-support-package.git
    Seems to be successful.
    First test, trying to compile and link provided example.
    cd pru-software-support-package/examples/am335x/PRU_gpioToggle
    export PRU_CGT=/usr
    make
    ************************************************************
    Building project: PRU_gpioToggle

    Building file: PRU_gpioToggle.c
    Invoking: PRU Compiler
    /usr/bin/clpru --include_path=/usr/include --include_path=../../../include --include_path=../../../include/am335x -v3 -O2 --display_error_number --endian=little --hardware_mac=on --obj_directory=gen --pp_directory=gen -ppd -ppa -fe gen/PRU_gpioToggle.object PRU_gpioToggle.c
    "/usr/include/gnu/stubs.h", line 7: fatal error #1965: cannot open source file "gnu/stubs-soft.h"
    1 catastrophic error detected in the compilation of "PRU_gpioToggle.c".
    Compilation terminated.

    >> Compilation failure
    make: *** [Makefile:78: gen/PRU_gpioToggle.object] Error

    **********************************
    find / -name stubs-soft.h
    am335x-evm:~/pru-software-support-package/examples/am335x/PRU_gpioToggle#
    file is not existing
    find / -name stubs-hard.h
    /usr/include/gnu/stubs-hard.h
    am335x-evm:~/pru-software-support-package/examples/am335x/PRU_gpioToggle#
    stubs-hard.h is existing

    I would like to compile and link my stuff ( pru C Code ) on BeagleBone.

    Question: How to make that happen?
  • was able to modify Makefile out of pru-software-support-package/examples/am335x/PRU_gpioToggle to compile and link the given example
    and my C-code also.
    LIBS=--library=/usr/share/ti/cgt-pru/lib/libc.a
    and
    CFLAGS=-v3 -O2 --display_error_number --endian=little --hardware_mac=on --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa -D__ARM_PCS_VFP
    are the keys.
    Compiled firmware code is copied by @cp $(PRU1_FW) /lib/firmware/am335x-pru1-fw to expected place.
    Next issue is the device tree setup.
    In Debian environment I used config-pin, that's not existing in SDK.
    Question: how to proceed?

    ( is there a white paper available to give instructions how to migrate from Debian to SDK without try & error? )
  • Pepito,

    I'm sorry, I'm not aware of any document to switch from Debian to PSDK. As you are finding, there are many differences.

    One option is to stay with Debian and forego support and just be careful with how you do updates on Debian.
  • Hi Ron,
    Debian is no longer an option for me, because that's unstable. We have finally provide a product which contains robust firmware,
    otherwise our customer support is looked on Debian support.
    I like some parts out of the Debian stuff, e.g. config-pin.
    Currently I'm struggling with device tree setup, because all the descriptions I found are based on development will be done on a PC.
    Have to do it on BeagleBone, that's the only one I have root access.
    How to setup the required device tree is the current question.
  • I was searching a lot here ....
    and I have the feeling ... I'm not alone .... but I can't find a solution.
    There are many people with similar issues.
    I really can't understand why there are 2 different ways described:
    1.) beagleboard.org/getting-started recommend Debian
    2.) TI: use SDK www.ti.com/.../PROCESSOR-SDK-AM335X
    I spent a lot of time for 1.) and it sucks, because they changed (not only) the boot behavior
    2.) looks better, but a different workflow is addressed ( create source, compile, link on PC )
    At the moment it's more (time) efficient to use FPGA, ARM IP, DesignCompiler and ICC ....
    But for high volume it's too much expensive.
  • Pepito,

    I'm sorry for your frustration. I'll try to provide some explanation to see if it will help you.

    beagleboard.org is a community mainly aimed at using Linux for Single Board Computers to do embedded work. It's a great community and I wouldn't want to disparage it at all. It's goals and users are sometimes a bit different than someone wanting to build an embedded product, especially in mass production.

    The Processor SDK's goal is to help designers build embedded systems using TI devices and deploy Linux on them. It does have a learning curve, much like FPGA's or some of the other options you mentioned. And, yes, we do recommend a cross-compile environment because it is the fastest way to iteratively develop a Linux system.

    Your need to do everything on the Beaglebone Black is outside of the typical use case and it is going to create some challenges. Once you get over these and have a good development flow, which is certainly possible, I believe you will be able to more more quickly.
  • Hi Ron,
    thank you very much. I see the value of SDK, especially in context to create a product for mass production.
    As I wrote, I'm working in ISO certified company, IT is responsible to maintain our network and it is very secure and stable.
    I have root access only on BeagleBone ( as an exception ), BeagleBone is isolated. I can copy files from SUSE Linux PC via scp to BeagleBone,
    not vice versa. SDK installation on SUSE PC failed, IT modified the script to overcome the Ubuntu locking, but it failed later on.
    Was possible to create the SD card. No display, no keyboard, ssh access from SUSE PC is possible and works fine.
    We use software from Synopsys and the OS on PC's is tailored for that. Just to understand the situation.
    Pepito
  • Pepito,

    I understand and this has certainly come up before.

    One suggestion to try might be an isolated Ubuntu box? Seems that is no different than an isolated BBB. You could use SCP to copy needed files to that box only.

    We'll do our best to help you get something set up that will work.
  • Hi Ron,
    now I'm able to configure and compile the kernel, on BeagleBone and on SUSE PC. Have a working environment.
    Just while I wrote it works on BeagleBone it ( make zImage ) fails:
    LD vmlinux
    SORTEX vmlinux
    SYSMAP System.map
    OBJCOPY arch/arm/boot/Image
    Kernel: arch/arm/boot/Image is ready
    LZMA arch/arm/boot/compressed/piggy_data
    lzma: (stdin): Cannot allocate memory
    AS arch/arm/boot/compressed/piggy.o
    arch/arm/boot/compressed/piggy.S: Assembler messages:
    arch/arm/boot/compressed/piggy.S:4: Error: file not found: arch/arm/boot/compressed/piggy_data
    make[2]: *** [scripts/Makefile.build:393: arch/arm/boot/compressed/piggy.o] Error 1
    make[1]: *** [arch/arm/boot/Makefile:53: arch/arm/boot/compressed/vmlinux] Error 2
    make: *** [arch/arm/Makefile:329: zImage] Error 2
    am335x-evm:/home/ln/Programme/processor-sdk-processor-sdk-linux#

    But the image is generated .....
    Pepito