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.

PROCESSOR-SDK-AM335X: How to Hello World

Part Number: PROCESSOR-SDK-AM335X

Hi

I am new to the processor SDK for Linux.

I have run the setup script, and I have a beaglebone running on minicom:

 _____                    _____           _         _   
|  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_
|     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
|__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|  
              |___|                    |___|            

Arago Project http://arago-project.org am335x-evm ttyS0

Arago 2018.10 am335x-evm ttyS0

am335x-evm login: root
root@am335x-evm:~#

1. I booted the BBB several times and I always got a Debian Login screen ( username: debian, passwd: temppwd)

Then all of a sudden I got the Arago Boot screen above and I don't understand why

2. I try to crosscompile the Helloworld.c example:

$ ${INSTALLDir}/ti-processor-sdk-linux-am335x-evm-05.02.00.10/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-gcc helloworld.c -o helloworld

and I get:

helloworld.c:1:10: fatal error: stdio.h: No such file or directory
 #include <stdio.h>
          ^~~~~~~~~

Do I need to install additional software after running the setup script ?

3) Is there somewhere a simple Helloworld example on how to run the entire toolchain, including developing and debugging on the host , making the exec available on the BBB and executing the code on the target ?


Thanks

Peter

  • Hello Peter,

    Peter Vittali said:
    Then all of a sudden I got the Arago Boot screen above and I don't understand why

    You have pressed S2 switch button and booted from the SD card.


    Peter Vittali said:
    helloworld.c:1:10: fatal error: stdio.h: No such file or directory

    Please, see this and this thread.


    Peter Vittali said:
    3) Is there somewhere a simple Helloworld example on how to run the entire toolchain, including developing and debugging on the host , making the exec available on the BBB and executing the code on the target ?

    Yes, there is. You can find this guide here.

    Best regards,
    Kemal

  • Hi Kemal

    You have pressed S2 switch button and booted from the SD card.

    So the debian image was still the preflashed Angstrom one ? This is weird becaused I cleared the eMMC as described in 1.1.5

    helloworld.c:1:10: fatal error: stdio.h: No such file or directory

    The required include seems to be in place:

    $ cd ./linux-devkit

    $ print -l **/stdio.h

    sysroots/armv7ahf-neon-linux-gnueabi/usr/include/bits/stdio.h
    sysroots/armv7ahf-neon-linux-gnueabi/usr/include/c++/7.2.1/tr1/stdio.h
    sysroots/armv7ahf-neon-linux-gnueabi/usr/include/stdio.h
    sysroots/x86_64-arago-linux/usr/lib/gcc/arm-linux-gnueabihf/7.2.1/include/ssp/stdio.h
    sysroots/x86_64-arago-linux/usr/share/ti/cgt-c6x/include/stdio.h
    sysroots/x86_64-arago-linux/usr/share/ti/cgt-c6x/lib/src/stdio.h
    sysroots/x86_64-arago-linux/usr/share/ti/cgt-pru/include/stdio.h
    sysroots/x86_64-arago-linux/usr/share/ti/cgt-pru/lib/src/stdio.h

    $ which arm-linux-gnueabihf-gcc
    INSTALL_DIR/ti-processor-sdk-linux-am335x-evm-05.02.00.10/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-gcc


    I also did the source:

     $ source ./environment-setup     

    $ \[\e[32;1m\][linux-devkit]\[\e[0m\]:\w> arm-linux-gnueabihf-gcc helloworld.c -o helloworld

    helloworld.c:1:10: fatal error: stdio.h: No such file or directory
     #include <stdio.h>
              ^~~~~~~~~
    compilation terminated.

    $ \[\e[32;1m\][linux-devkit]\[\e[0m\]:\w>

    (BTW: This prompt doesn't seem to work for zsh shells ... )

    Thanks

    Peter


  • Peter Vittali said:
    So the debian image was still the preflashed Angstrom one ? This is weird becaused I cleared the eMMC as described in 1.1.5

    Maybe you have failed executing some of the steps.


    Peter Vittali said:
    The required include seems to be in place:

    Have you tried to reinstall the Processor SDK?


    Peter Vittali said:
    (BTW: This prompt doesn't seem to work for zsh shells ... )

    Try bash and dash shells. It the building fails on zsh shell this is their problem, not ours.