Step 5.1: Copy Python Source Files to the Target
Skip to Step 5.1 Build C Sample Application from Buildroot if you are using C.
1. Navigate to the extracted Python Project Files:
$ cd ~/project/pac1934-linux/src/python
2. Find the IP address of the SOM1-EK. If you have followed Step 4.9, the IP address of SOM1-EK is 192.168.1.5. To make sure, use ifconfig in SOM1-EK:
# ifconfig
3. Go back to the Ubuntu Terminal. Copy the source files to the target using scp. The -r attribute will transfer the contents of a directory:
$ scp -r ~/project/pac1934-linux/src/python root@192.168.1.5:/root/
You will be asked if you want to continue connecting. Just type “yes”, then press Enter.
Next, type the SOM1-EK root password configured in Step 3.3.4.
4. Use ls to check if the files have been received. Go to the SOM1-EK Terminal to do so:
# ls /root/python
Your Python application is good-to-go. Proceed to Step 6.1 to run the Python application.
Step 5.1: Build C Sample Application from Buildroot
1. Navigate to the extracted C project files:
$ cd ~/project/pac1934-linux/src/c
2. Use the following command to prepare environment variables for cross compilation:
$ export CROSS_COMPILE=~/project/my_external_tree/host/bin/arm-buildroot-linux-uclibcgnueabihf-
3. Run the make command. A successful build will appear as shown in Figure 4:
$ make
4. A file called pac193x_sample_application should show when running the ls command from this directory. Please see Figure 5:
5. Make sure pac193x_sample_application is executable by running the command below:
$ sudo chmod 777 pac193x_sample_application
Step 5.2: Upload the Compiled Code to the Target
1. Navigate to the extracted C project files:
$ cd ~/project/pac1934-linux/src/c
2. Transfer pac193x_sample_application to the SOM1-EK using scp:
$ scp -r pac193x_sample_application root@192.168.1.5:~/
3. Your screen should look appear as shown in Figure 6:
4. Use ls to check if the files have been received on the SOM1-EK:
# ls ~/
5. Your screen should appear as shown in the Figure 7: