Use SOME/IP on the Atom C2000 board

The Atom C2000 uses a read-only IFS and in this release, a reference image isn't available for the board. For that reason, you must build an image and manually put the vsomeip binaries and modified configuration files onto the board.

Since the IFS for the Atom C2000 board is read-only, you won't be able to directly modify the configuration files if you put them on the IFS. You have two options so that you can run the tests:
Put the vsomeip binaries and modified configuration files onto the IFS
This option requires that you modify the configuration files correctly before you build them into your IFS.
This option also means that you must know the IP address of your target board and remote target before you can modify the configuration files. To determine the IP address, you can preassign a static address to your board. Alternatively, you can boot your target to determine the IP address that's assigned to it.
Note: This mechanism presumes that dynamically assigned IP addresses are assigned for a predefined time to your target.
After you've determined the IP address to use, modify the configuration files (JSON files) and then build those configuration files (and the test binaries) into your IFS. For more information, see Put vsomeip binaries and configuration files on the IFS.”
Put the files onto a USB/SATA drive and then mount the board
The option requires that you enable the correct drivers when you build your IFS, but then you have the flexibility to modify the configuration files on the target after it boots. You must put the vsomeip configuration files on the USB or SATA drive, however, you still must put the vsomeip test binaries and required binaries on the IFS. For information about setting up to use a SATA or USB drive, see Use a SATA drive and Use a USB drive,” respectively.

Put vsomeip binaries and configuration files on the IFS

After you've completed your changes, build the files into your OS image filesystem. The binaries are available from your installation of the QNX Platform for ADAS installation on your host computer. When your target boots with the new IFS, you can run the SOME/IP tests using the modified configuration. For more information about how to build your IFS for the Atom C2000, see the Generic x86 BIOS and APIC BSP User's Guide for this release.

After you download your BSP and extract it to a directory on your host system, perform these steps before you run the build file to create an IFS:

  1. Copy the following build file changes to include the vsomeip tests (executables) and related binaries to the [Extracted BSP file location]/image/adi-rcc-c2000.build file.
    #######################################################################
    ## vsomeip
    #######################################################################
    
    /bin/local_routing_test_client=local_routing_test_client
    /bin/header_factory_test_client=header_factory_test_client
    /bin/payload_test_service=payload_test_service
    /bin/configuration_tests=configuration_tests
    /bin/local_routing_test_service=local_routing_test_service
    /bin/header_factory_test_service=header_factory_test_service
    /bin/header_factory_test=header_factory_test
    /bin/external_local_routing_test_service=external_local_routing_test_service
    /bin/payload_test_client=payload_test_client
    /bin/magic_cookies_test_service=magic_cookies_test_service
    /bin/magic_cookies_test_client=magic_cookies_test_client
    /bin/client_id_tests=client_id_tests
    /bin/big_payload_test_service=big_payload_test_service
    /bin/big_payload_test_client=big_payload_test_client
    /bin/application_tests=application_tests
    [type=link] /usr/bin/awk=gawk
    /usr/bin/gawk=gawk 
    
    #boost
    /lib/libboost_filesystem.so.1.57.0=libboost_filesystem.so.1.57.0
    /lib/libboost_log.so.1.57.0=libboost_log.so.1.57.0
    /lib/libboost_system.so.1.57.0=libboost_system.so.1.57.0
    /lib/libboost_thread.so.1.57.0=libboost_thread.so.1.57.0
    /lib/libboost_chrono.so.1.57.0=libboost_chrono.so.1.57.0
    /lib/libboost_date_time.so.1.57.0=libboost_date_time.so.1.57.0
    /lib/libboost_regex.so.1.57.0=libboost_regex.so.1.57.0
    [type=link] /lib/libboost_filesystem.so=libboost_filesystem.so.1.57.0
    [type=link] /lib/libboost_log.so=libboost_log.so.1.57.0
    [type=link] /lib/libboost_system.so=libboost_system.so.1.57.0
    [type=link] /lib/libboost_thread.so=libboost_thread.so.1.57.0
    [type=link] /lib/libboost_chrono.so=libboost_chrono.so.1.57.0
    [type=link] /lib/libboost_date_time.so=libboost_date_time.so.1.57.0
    [type=link] /lib/libboost_regex.so=libboost_regex.so.1.57.0
    
    # vsomeip 
    /usr/lib/libvsomeip-sd.so.2.0.1=libvsomeip-sd.so.2.0.1
    /usr/lib/libvsomeip.so.2.0.1=libvsomeip.so.2.0.1
    /usr/bin/vsomeipd-2.0.1=vsomeipd-2.0.1
    [type=link] /lib/libvsomeip-sd.so=libvsomeip-sd.so.2.0.1
    [type=link] /lib/libvsomeip.so=libvsomeip.so.2.0.1
    [type=link] /usr/bin/vsomeipd=vsomeipd-2.0.1
    
    
    #config
    /etc/vsomeip-2.0.1/magic_cookies_test_service.json=../../etc/vsomeip-2.0.1/magic_cookies_test_service.json
    /etc/vsomeip-2.0.1/magic_cookies_test_client.json=../../etc/vsomeip-2.0.1/magic_cookies_test_client.json
    /etc/vsomeip-2.0.1/client_id_test_same_client_ids_diff_ports_slave.json=../../etc/vsomeip-2.0.1/client_id_test_same_client_ids_diff_ports_slave.json
    /etc/vsomeip-2.0.1/client_id_test_diff_client_ids_same_ports_master.json=../../etc/vsomeip-2.0.1/client_id_test_diff_client_ids_same_ports_master.json
    /etc/vsomeip-2.0.1/client_id_test_diff_client_ids_diff_ports_slave.json=../../etc/vsomeip-2.0.1/client_id_test_diff_client_ids_diff_ports_slave.json
    /etc/vsomeip-2.0.1/client_id_test_diff_client_ids_same_ports_slave.json=../../etc/vsomeip-2.0.1/client_id_test_diff_client_ids_same_ports_slave.json
    /etc/vsomeip-2.0.1/client_id_test_same_client_ids_diff_ports_master.json=../../etc/vsomeip-2.0.1/client_id_test_same_client_ids_diff_ports_master.json
    /etc/vsomeip-2.0.1/client_id_test_same_client_ids_same_ports_slave.json=../../etc/vsomeip-2.0.1/client_id_test_same_client_ids_same_ports_slave.json
    /etc/vsomeip-2.0.1/client_id_test_diff_client_ids_diff_ports_master.json=../../etc/vsomeip-2.0.1/client_id_test_diff_client_ids_diff_ports_master.json
    /etc/vsomeip-2.0.1/client_id_test_same_client_ids_same_ports_master.json=../../etc/vsomeip-2.0.1/client_id_test_same_client_ids_same_ports_master.json
    /etc/vsomeip-2.0.1/configuration-test-deprecated.json=../../etc/vsomeip-2.0.1/configuration-test-deprecated.json
    /etc/vsomeip-2.0.1/configuration-test.json=../../etc/vsomeip-2.0.1/configuration-test.json
    /etc/vsomeip-2.0.1/application_test_no_dispatch_threads.json=../../etc/vsomeip-2.0.1/application_test_no_dispatch_threads.json
    /etc/vsomeip-2.0.1/application_test.json=../../etc/vsomeip-2.0.1/application_test.json
    /etc/vsomeip-2.0.1/big_payload_test_local.json=../../etc/vsomeip-2.0.1/big_payload_test_local.json
    /etc/vsomeip-2.0.1/big_payload_test_tcp_client.json=../../etc/vsomeip-2.0.1/big_payload_test_tcp_client.json
    /etc/vsomeip-2.0.1/big_payload_test_tcp_service.json=../../etc/vsomeip-2.0.1/big_payload_test_tcp_service.json
    /etc/vsomeip-2.0.1/external_local_payload_test_client_external.json=../../etc/vsomeip-2.0.1/external_local_payload_test_client_external.json
    /etc/vsomeip-2.0.1/external_local_payload_test_client_local.json=../../etc/vsomeip-2.0.1/external_local_payload_test_client_local.json
    /etc/vsomeip-2.0.1/external_local_payload_test_service.json=../../etc/vsomeip-2.0.1/external_local_payload_test_service.json
    /etc/vsomeip-2.0.1/external_local_routing_test_client_external.json=../../etc/vsomeip-2.0.1/external_local_routing_test_client_external.json
    /etc/vsomeip-2.0.1/external_local_routing_test_service.json=../../etc/vsomeip-2.0.1/external_local_routing_test_service.json
    /etc/vsomeip-2.0.1/header_factory_test_client.json=../../etc/vsomeip-2.0.1/header_factory_test_client.json
    /etc/vsomeip-2.0.1/header_factory_test_service.json=../../etc/vsomeip-2.0.1/header_factory_test_service.json
    /etc/vsomeip-2.0.1/local_payload_test_client.json=../../etc/vsomeip-2.0.1/local_payload_test_client.json
    /etc/vsomeip-2.0.1/local_payload_test_service.json=../../etc/vsomeip-2.0.1/local_payload_test_service.json
    /etc/vsomeip-2.0.1/local_routing_test_client.json=../../etc/vsomeip-2.0.1/local_routing_test_client.json
    /etc/vsomeip-2.0.1/local_routing_test_service.json=../../etc/vsomeip-2.0.1/local_routing_test_service.json
    /etc/vsomeip-2.0.1/vsomeip.json=../../etc/vsomeip-2.0.1/vsomeip.json
    /etc/vsomeip-2.0.1/vsomeip-local.json=../../etc/vsomeip-2.0.1/vsomeip-local.json
    /etc/vsomeip-2.0.1/vsomeip-local-tcp-client.json=../../etc/vsomeip-2.0.1/vsomeip-local-tcp-client.json
    /etc/vsomeip-2.0.1/vsomeip-local-tcp-service.json=../../etc/vsomeip-2.0.1/vsomeip-local-tcp-service.json
    /etc/vsomeip-2.0.1/vsomeip-tcp-client.json=../../etc/vsomeip-2.0.1/vsomeip-tcp-client.json
    /etc/vsomeip-2.0.1/vsomeip-tcp-service.json=../../etc/vsomeip-2.0.1/vsomeip-tcp-service.json
    /etc/vsomeip-2.0.1/vsomeip-udp-client.json=../../etc/vsomeip-2.0.1/vsomeip-udp-client.json
    /etc/vsomeip-2.0.1/vsomeip-udp-service.json=../../etc/vsomeip-2.0.1/vsomeip-udp-service.json
    
     
    #stdc++
    /usr/lib/vsomeip/libstdc++.so.6.0.19=vsomeip/libstdc++.so.6.0.19
    [type=link] /usr/lib/vsomeip/libstdc++.so.6=libstdc++.so.6.0.19
    [type=link] /usr/lib/vsomeip/libstdc++.so=libstdc++.so.6.0.19
  2. In the same file, put the vsomeip test configuration files after the vsomeip tests and related binaries you added in the previous step in the [Extracted BSP file location]/image/adi-rcc-c2000.build files as shown here:
    #config
    /etc/vsomeip/external_local_payload_test_client_external.json=../../etc/vsomeip/external_local_payload_test_client_external.json
    /etc/vsomeip/external_local_payload_test_client_local.json=../../etc/vsomeip/external_local_payload_test_client_local.json
    /etc/vsomeip/external_local_payload_test_service.json=../../etc/vsomeip/external_local_payload_test_service.json
    /etc/vsomeip/external_local_routing_test_client_external.json=../../etc/vsomeip/external_local_routing_test_client_external.json
    /etc/vsomeip/external_local_routing_test_service.json=../../etc/vsomeip/external_local_routing_test_service.json
    /etc/vsomeip/header_factory_test_client.json=../../etc/vsomeip/header_factory_test_client.json
    /etc/vsomeip/header_factory_test_service.json=../../etc/vsomeip/header_factory_test_service.json
    /etc/vsomeip/helloworld-local.json=../../etc/vsomeip/helloworld-local.json
    /etc/vsomeip/local_payload_test_client.json=../../etc/vsomeip/local_payload_test_client.json
    /etc/vsomeip/local_payload_test_service.json=../../etc/vsomeip/local_payload_test_service.json
    /etc/vsomeip/local_routing_test_client.json=../../etc/vsomeip/local_routing_test_client.json
    /etc/vsomeip/local_routing_test_service.json=../../etc/vsomeip/local_routing_test_service.json
    /etc/vsomeip/vsomeip.json=../../etc/vsomeip/vsomeip.json
    /etc/vsomeip/vsomeip-local.json=../../etc/vsomeip/vsomeip-local.json
    /etc/vsomeip/vsomeip-local-tcp-client.json=../../etc/vsomeip/vsomeip-local-tcp-client.json
    /etc/vsomeip/vsomeip-local-tcp-service.json=../../etc/vsomeip/vsomeip-local-tcp-service.json
    /etc/vsomeip/vsomeip-tcp-client.json=../../etc/vsomeip/vsomeip-tcp-client.json
    /etc/vsomeip/vsomeip-tcp-service.json=../../etc/vsomeip/vsomeip-tcp-service.json
    /etc/vsomeip/vsomeip-test.json=../../etc/vsomeip/vsomeip-test.json
    /etc/vsomeip/vsomeip-udp-client.json=../../etc/vsomeip/vsomeip-udp-client.json
    /etc/vsomeip/vsomeip-udp-service.json=../../etc/vsomeip/vsomeip-udp-service.json
                
  3. From your host installation of QNX Platform for ADAS, copy $QNX_TARGET/etc/vsomeip to BSP_INSTALL_DIR/install/etc/vsomeip. You will need to create etc/vsomeip under the BSP_INSTALL_DIR/install directory.
  4. Modify your copy of the configuration files to match the settings required for your target in the BSP_INSTALL_DIR/install/etc/vsomeip. The tests that you want to run determine what you need to modify in the configuration files. Typically you put the IP Address of the target and potentially the IP address of the second target in the first unicast attribute and unicast attribute under the servicegroups array, respectively. For more information, see the Run SOME/IP tests on target section.

    For more information, see the Run SOME/IP tests on target section to determine the file you need to modify in each configuration file.

  5. Build your IFS for the target and follow the instructions in the Generic x86 BIOS/APIC BSP User's Guide to boot your target with the IFS that you create.

Use a SATA drive

You must modify the default build file in the Atom C2000 Board Support Package (BSP) to enable the SATA drive. You put the vsomeip configuration files (JSON) on the SATA drive and mount it as a filesystem. You can mount a QNX4, Power-Safe(fs-qnx6.so), DOS, or EXT2 filesystem. In addition to these steps to put the configuration files on your SATA drive, you must put the vsomeip tests and required binaries in the IFS. To put the binaries onto your IFS, follow steps 1 and 5 (steps 2, 3 and 4 aren't required) in the Put vsomeip binaries and configuration files on the IFS section.

  1. In the default /images/adi-rcc-c2000.build file in the extracted ZIP file for your BSP, uncomment (i.e., remove the hash (#) symbol in front of the line) these lines to start the hd0t179 driver:
    waitfor /dev/hd0t179
    mount -t qnx6 /dev/hd0t179 /hd
    Note: You may need to change the partition name/type depending on the filesystem you use for the SATA drive.
  2. From your host installation of QNX Platform for ADAS, copy the following to your SATA drive:
    • the test configuration files (JSON files) from $QNX_TARGET/etc/vsomeip files
    • vsomeip tests (binaries) from the $QNX_TARGET/x86/bin to a separate directory from the location you put the configuration files. The binaries are as follows:
      • configuration_tests
      • magic_cookies_test_service and magic_cookies_test_client
      • header_factory_test
      • header_factory_test_client
      • header_factory_test_service
      • local_routing_test_client
      • local_routing_test_service
      • external_local_routing_test_service
      • payload_test_client
      • payload_test_service
      • application_tests
      • big_payload_test_service
      • big_payload_test_client
      • application_tests
      • client_id_tests
  3. Build the image, connect your SATA drive to the board, and then reboot your image.
After the board reboots, the SATA drive should be mounted and you should be able to modify the configuration files so that you can run the tests.
Note: You might need to run mount -uw[mountpoint_path] to be able to edit the files.
To run the tests, you will need to run them from the directory you put them in; otherwise, you can add that folder to your PATH variable. For more information about running the tests, see the Run SOME/IP tests on target section.

Use a USB removable storage

You must modify the default build file in the Atom C2000 Board Support Package (BSP) to enable the USB drive. You put the vsomeip configuration files (JSON) on the USB drive and mount it as a filesystem. You can mount a QNX4, Power-Safe (fs-qnx6.so), DOS, or EXT2 filesystem. In addition to these steps to put the configuration files on your USB drive, you must put the vsomeip tests and required binaries in the IFS. To put the binaries onto your IFS, follow steps 1 and 5 (steps 2, 3 and 4 aren't required) in the Put vsomeip binaries and configuration files on the IFS section.
  1. In the default adi-rcc-c2000.build file, which is found in the images directory where you extracted the BSP ZIP file, ensure that the following lines are in the file and uncommented (i.e., there's no the hash (#) symbol in front of the lines):
    #-------------------------------------------------------------------------------
    	display_msg "Starting USB services..."
    	io-usb -dehci pindex=0,irq=23 &
    	waitfor /dev/io-usb/io-usb 4
    	waitfor /dev/io-usb/devu-ehci.so 4
    #-------------------------------------------------------------------------------
    ...
    ...
    ###########################################################################
    ## uncomment for USB driver
    ###########################################################################
    libusbdi.so
    libhiddi.so
    devu-ehci.so
    
    ...
    ...
    ###########################################################################
    ## uncomment for io-hid
    ###########################################################################
    devh-usb.so
    devh-ps2ser.so
    
    [data=c]
    
    ...
    ...
    ###########################################################################
    ## uncomment for USB
    ###########################################################################
    io-usb
    usb
    devb-umass
    io-hid
    hidview
    
    ....
    
    For more information about each driver and service, such as devb-mass, see the QNX Neutrino Utilities Reference.
  2. From your host installation of QNX Platform for ADAS, copy the following to your USB drive:
    • configuration files (JSON files) from $QNX_TARGET/etc/vsomeip files
    • vsomeip tests (binaries) from the $QNX_TARGET/x86/bin to a separate directory from the location you put the configuration files. The binaries are as follow:
      • configuration_tests
      • magic_cookies_test_service and magic_cookies_test_client
      • header_factory_test
      • header_factory_test_client
      • header_factory_test_service
      • local_routing_test_client
      • local_routing_test_service
      • external_local_routing_test_service
      • payload_test_client
      • payload_test_service
      • application_tests
  3. Build the image, connect your USB drive to the board, and then reboot your image.
After the board reboots, the USB drive should be mounted and you should be able to modify the files to run the tests.
Note: You might need to run the mount -uw [mountpoint_path] to edit the files.
To run the tests, you will need to run them from the directory you put them; otherwise, you can add that folder to your PATH variable. For more information about running tests, see the Run SOME/IP tests on target section.