Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Username: pi

  • Password: pi

Starting applications

Code Block
cd /home/pi/pnio_app
./goal_raspberry_01_simple_io.bin

Also see section 5 for a description of example programs.

Compilation on target

The software package for the demo kit provides several examples for the AC. The examples can be compiled either on a host system or on the target. For a host based build a cross compiler toolchain is required. It is recommended to build the binaries on the target.

For compiling some requirements are needed. These can be installed using this command:

Code Block
sudo apt-get install build-essential

In addition the SPI interface needs to be enabled using raspi-config.

Code Block
sudo raspi-config

Under “Interface options” it os possible to enable the SPI interface.

The software package needs to be transferred to the target. This can be done using scp.

Code Block
scp 2015013_20200930_2_21_1_port_Raspberry_CCM_ci14.zip pi@raspberrypi:

On the raspberry pi the archive needs to be extracted:

Code Block
mkdir som
cd som
unzip ../2015013_20200930_2_21_1_port_Raspberry_CCM_ci14.zip

The projects to compile are available in the folder projects/2015013_irj45/ac. To compile a single project, open a shell and go to the gcc subfolder of a project e.g. projects/2015013-irj45/ac/01_pnio_mirror/gcc.

Now run make. The compile shell will now show the selection dialog for the target platform. Choose 3 for the Raspberry Pi Shield.

...

For compilation call make the following way:

Code Block
make CROSS_COMPILE=

The build system will then start to build the software. The result file is stored in the subfolder build/raspberry_pi_raspi_shield and name goal_raspberry_pi_raspi_shield.bin.

If cross built copy the binary via SCP to the device. Alternatively, you can also use an USB flash drive for this purpose.

For debugging purpose it is possible to start the binary manually using following commands:

Code Blockcd /home/pi/goaldmo ./goal_raspberry_pi_irj45.bin

Also see section 5 for a description of example programs.

Compilation on target

The source can be put on the raspberry pi computer and compiled there. The instructions are the same as in the previous chapter. Only for the compile step, an different approach is required.

For compiling some requirements are needed:

Code Block
sudo apt-get install build-essential

In addition the SPI interface needs to be enabled using raspi-config.

Code Block
sudo raspi-config

Under “Interface options” it os possible to enable the SPI interface.

For compilation call make the following way:

Code Block
make CROSS_COMPILE=

This will call the native gcc compiler instead of the cross compiler, thus natively compiling the binary on the raspberry pi.

Management Tool

The Management Tool allows development related configuration and management of the application. This management is based on a UDP broadcast communication. Thus, it works independently from IP settings of the management PC and SoM.

...

With the selected SoM and within the “Device Log” function panel, it is now possible to read the logging buffer using “Start reading log”. For the demo application, it shows both the log messages from the communication controller (SoM) and the application controller (Raspberry Pi). Those can be distinguished by the “Source” column, which either shows “CC” ore “AC”. A successful started application reports a successful initialization of PROFINET:

Code Block
[I| goal_miMctcLoop:499] running appl_setup

...


[I| goal_pnioNewAc:369] PROFINET Application Core successfully started

...


[I| appl_setup:226] Initializing device structure

...


[I| appl_setup:275] PROFINET ready

...


[I| appl_setup:281] Configuring DD

...


[I| appl_setup:309] DD ready

To stop logging push the button again.

...