diff options
author | Jason Reeder | 2016-09-09 17:59:36 -0500 |
---|---|---|
committer | Jason Reeder | 2016-11-15 14:12:45 -0600 |
commit | 4efd227bebd8eb0bc12f40fac043dc9c26d4f8c3 (patch) | |
tree | 97349da96fb027db14c0b16288d595d06ef53265 /pru_cape | |
parent | ea4bd31ca690be787577fc9376d7658d6e1b4478 (diff) | |
download | pru-software-support-package-4efd227bebd8eb0bc12f40fac043dc9c26d4f8c3.tar.gz pru-software-support-package-4efd227bebd8eb0bc12f40fac043dc9c26d4f8c3.tar.xz pru-software-support-package-4efd227bebd8eb0bc12f40fac043dc9c26d4f8c3.zip |
Mimic the StarterWare PRU cape demo on Linux consolev5.1.0
This commit adds a shell script (and everything else that
it needs) in order to provide a Linux console demo on the
BeagleBone and BeagleBone black.
Signed-off-by: Jason Reeder <jreeder@ti.com>
Diffstat (limited to 'pru_cape')
46 files changed, 786 insertions, 26 deletions
diff --git a/pru_cape/Makefile b/pru_cape/Makefile index 37ce92e..27b13f8 100644 --- a/pru_cape/Makefile +++ b/pru_cape/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | SUBDIRS=pru_fw pru_demo | 1 | SUBDIRS=pru_fw pru_demo/StarterWare |
2 | 2 | ||
3 | all: $(SUBDIRS) | 3 | all: $(SUBDIRS) |
4 | 4 | ||
diff --git a/pru_cape/ReadMe.txt b/pru_cape/ReadMe.txt index 6c2279f..f6836c7 100644 --- a/pru_cape/ReadMe.txt +++ b/pru_cape/ReadMe.txt | |||
@@ -9,15 +9,30 @@ DESCRIPTION | |||
9 | This directory includes demo software that is intended to run on the | 9 | This directory includes demo software that is intended to run on the |
10 | BeagleBone / BeagleBone Black PRU Cape. | 10 | BeagleBone / BeagleBone Black PRU Cape. |
11 | 11 | ||
12 | Pre-built binaries that can be run from an SD card or through CCS are | 12 | CCS/StarterWare |
13 | available in the "bin" directory. | 13 | ----------- |
14 | 14 | Pre-built CCS/StarterWare binaries that can be run from an SD card or through | |
15 | The "pru_demo" directory includes AM335x StarterWare-based ARM code to load | 15 | CCS are available in the "bin/app/", "bin/CCS/", and "bin/MLO/" directories. |
16 | and run the PRU firmware demos. This code provides an example of how to | 16 | |
17 | enable the PRU using a non-Linux OS. However, Linux or CCS can also be used | 17 | The "pru_demo/StarterWare/" directory includes AM335x StarterWare-based ARM |
18 | to run the PRU demos. | 18 | code to load and run the PRU firmware demos. This code provides an example |
19 | 19 | of how to enable the PRU using a non-Linux OS. However, Linux or CCS can | |
20 | The "pru_fw" directory includes the PRU demo firmware. | 20 | also be used to run the PRU demos. |
21 | |||
22 | Linux | ||
23 | ----- | ||
24 | The "pru_demo/Linux/" directory inludes a script (pru_demo.sh) that can be | ||
25 | copied to the BeagleBone or BeagleBone Black and be used to run the PRU demos | ||
26 | that are in the "pru_fw" directory. | ||
27 | |||
28 | The "bin/Linux" directory contains everything that you need to copy over to | ||
29 | the BeagleBone or BeagleBone Black in order to run the console demo while | ||
30 | running Linux as the host operating system (you will still need to update | ||
31 | the dtb file using the provided .dtsi files). | ||
32 | |||
33 | PRU Firmwares | ||
34 | ------------- | ||
35 | The "pru_fw" directory includes the PRU demo firmwares. | ||
21 | 36 | ||
22 | For more details about the PRU Cape and the demos included in this package, | 37 | For more details about the PRU Cape and the demos included in this package, |
23 | visit: | 38 | visit: |
diff --git a/pru_cape/bin/Linux/pru0_led.sh b/pru_cape/bin/Linux/pru0_led.sh new file mode 100755 index 0000000..4a63027 --- /dev/null +++ b/pru_cape/bin/Linux/pru0_led.sh | |||
@@ -0,0 +1,14 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | if [ -e /dev/rpmsg_pru30 ] | ||
4 | then | ||
5 | while true; do | ||
6 | read -p "PRU0: Input an LED color to toggle ('q' to quit)[r,g,b,o]: " rgbo | ||
7 | if [ $rgbo = 'q' ]; then | ||
8 | exit | ||
9 | fi | ||
10 | echo $rgbo > /dev/rpmsg_pru30 | ||
11 | done | ||
12 | else | ||
13 | echo "/dev/rpmsg_pru30 device does not exist" | ||
14 | fi | ||
diff --git a/pru_cape/bin/Linux/pru_demo.sh b/pru_cape/bin/Linux/pru_demo.sh new file mode 100755 index 0000000..b94ea49 --- /dev/null +++ b/pru_cape/bin/Linux/pru_demo.sh | |||
@@ -0,0 +1,96 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | led0_link="$(readlink -f ./pru_fw/PRU_LED0.out)" | ||
4 | led1_link="$(readlink -f ./pru_fw/PRU_LED1.out)" | ||
5 | switch_link="$(readlink -f ./pru_fw/PRU_Switch.out)" | ||
6 | audio_link="$(readlink -f ./pru_fw/PRU_Audio.out)" | ||
7 | uart_link="$(readlink -f ./pru_fw/PRU_Hardware_UART.out)" | ||
8 | temp0_link="$(readlink -f ./pru_fw/PRU_HDQ_TempSensor0.out)" | ||
9 | temp1_link="$(readlink -f ./pru_fw/PRU_HDQ_TempSensor1.out)" | ||
10 | rpmsg_led_link="$(readlink -f ./pru_fw/PRU_RPMsg_LED0.out)" | ||
11 | halt_link="$(readlink -f ./pru_fw/PRU_Halt.out)" | ||
12 | |||
13 | echo "" | ||
14 | echo "*******************************" | ||
15 | echo "* PRU Cape Demo *" | ||
16 | echo "*******************************" | ||
17 | echo "" | ||
18 | |||
19 | while true; do | ||
20 | echo "Which firmware would you like to load?" | ||
21 | echo "" | ||
22 | echo "1. LEDs" | ||
23 | echo "2. Switches" | ||
24 | echo "3. Audio" | ||
25 | echo "4. UART" | ||
26 | echo "5. Temp sensor" | ||
27 | echo "6. RPMsg Toggle LEDs" | ||
28 | echo "7. Halt" | ||
29 | echo "" | ||
30 | read -p "selection: " test_number | ||
31 | echo "" | ||
32 | |||
33 | case "$test_number" in | ||
34 | 1) fw0_link=${led0_link} | ||
35 | fw1_link=${led1_link} ;; | ||
36 | 2) fw0_link=${switch_link} | ||
37 | fw1_link=${halt_link} ;; | ||
38 | 3) fw0_link=${halt_link} | ||
39 | fw1_link=${audio_link} ;; | ||
40 | 4) fw0_link=${uart_link} | ||
41 | fw1_link=${halt_link} ;; | ||
42 | 5) fw0_link=${temp0_link} | ||
43 | fw1_link=${temp1_link} ;; | ||
44 | 6) fw0_link=${rpmsg_led_link} | ||
45 | fw1_link=${halt_link} ;; | ||
46 | 7) fw0_link=${halt_link} | ||
47 | fw1_link=${halt_link} ;; | ||
48 | *) echo "invalid selection" | ||
49 | echo "" | ||
50 | continue ;; | ||
51 | esac | ||
52 | |||
53 | if [ ${fw0_link} ] && [ ${fw1_link} ]; | ||
54 | then | ||
55 | rm /lib/firmware/am335x-pru0-fw &> /dev/null | ||
56 | rm /lib/firmware/am335x-pru1-fw &> /dev/null | ||
57 | |||
58 | if [ -e /sys/bus/platform/drivers/pru-rproc/4a334000.pru0 ]; then | ||
59 | echo 4a334000.pru0 > /sys/bus/platform/drivers/pru-rproc/unbind | ||
60 | fi | ||
61 | if [ -e /sys/bus/platform/drivers/pru-rproc/4a338000.pru1 ]; then | ||
62 | echo 4a338000.pru1 > /sys/bus/platform/drivers/pru-rproc/unbind | ||
63 | fi | ||
64 | |||
65 | ln -s ${fw0_link} /lib/firmware/am335x-pru0-fw | ||
66 | ln -s ${fw1_link} /lib/firmware/am335x-pru1-fw | ||
67 | echo 4a334000.pru0 > /sys/bus/platform/drivers/pru-rproc/bind | ||
68 | echo 4a338000.pru1 > /sys/bus/platform/drivers/pru-rproc/bind | ||
69 | echo "" | ||
70 | echo "Firmware " $test_number " is running" | ||
71 | echo "" | ||
72 | |||
73 | case "$test_number" in | ||
74 | 6) /bin/bash ./pru0_led.sh ;; | ||
75 | esac | ||
76 | |||
77 | else | ||
78 | echo "At least one of the firmware .out files does not seem to exist. Did you" | ||
79 | echo "build all of the firmwares in the pru_fw directory? Check the paths at" | ||
80 | echo "the top of this script and make sure the files exist." | ||
81 | echo "" | ||
82 | fi | ||
83 | |||
84 | loop=true | ||
85 | while $loop; do | ||
86 | read -p "Would you like to load a different firmware? y/n: " run_again | ||
87 | echo"" | ||
88 | |||
89 | case "$run_again" in | ||
90 | y) loop=false ;; | ||
91 | n) exit ;; | ||
92 | *) echo "invalid response" | ||
93 | echo "";; | ||
94 | esac | ||
95 | done | ||
96 | done | ||
diff --git a/pru_cape/bin/Linux/pru_fw/PRU_Audio.out b/pru_cape/bin/Linux/pru_fw/PRU_Audio.out new file mode 100644 index 0000000..0f68f54 --- /dev/null +++ b/pru_cape/bin/Linux/pru_fw/PRU_Audio.out | |||
Binary files differ | |||
diff --git a/pru_cape/bin/Linux/pru_fw/PRU_HDQ_TempSensor0.out b/pru_cape/bin/Linux/pru_fw/PRU_HDQ_TempSensor0.out new file mode 100644 index 0000000..b7c79ed --- /dev/null +++ b/pru_cape/bin/Linux/pru_fw/PRU_HDQ_TempSensor0.out | |||
Binary files differ | |||
diff --git a/pru_cape/bin/Linux/pru_fw/PRU_HDQ_TempSensor1.out b/pru_cape/bin/Linux/pru_fw/PRU_HDQ_TempSensor1.out new file mode 100644 index 0000000..e51e387 --- /dev/null +++ b/pru_cape/bin/Linux/pru_fw/PRU_HDQ_TempSensor1.out | |||
Binary files differ | |||
diff --git a/pru_cape/bin/Linux/pru_fw/PRU_Halt.out b/pru_cape/bin/Linux/pru_fw/PRU_Halt.out new file mode 100644 index 0000000..5b3e4c8 --- /dev/null +++ b/pru_cape/bin/Linux/pru_fw/PRU_Halt.out | |||
Binary files differ | |||
diff --git a/pru_cape/bin/Linux/pru_fw/PRU_Hardware_UART.out b/pru_cape/bin/Linux/pru_fw/PRU_Hardware_UART.out new file mode 100644 index 0000000..f4d8226 --- /dev/null +++ b/pru_cape/bin/Linux/pru_fw/PRU_Hardware_UART.out | |||
Binary files differ | |||
diff --git a/pru_cape/bin/Linux/pru_fw/PRU_LED0.out b/pru_cape/bin/Linux/pru_fw/PRU_LED0.out new file mode 100644 index 0000000..7a19630 --- /dev/null +++ b/pru_cape/bin/Linux/pru_fw/PRU_LED0.out | |||
Binary files differ | |||
diff --git a/pru_cape/bin/Linux/pru_fw/PRU_LED1.out b/pru_cape/bin/Linux/pru_fw/PRU_LED1.out new file mode 100644 index 0000000..e616b01 --- /dev/null +++ b/pru_cape/bin/Linux/pru_fw/PRU_LED1.out | |||
Binary files differ | |||
diff --git a/pru_cape/bin/Linux/pru_fw/PRU_RPMsg_LED0.out b/pru_cape/bin/Linux/pru_fw/PRU_RPMsg_LED0.out new file mode 100644 index 0000000..46b98fb --- /dev/null +++ b/pru_cape/bin/Linux/pru_fw/PRU_RPMsg_LED0.out | |||
Binary files differ | |||
diff --git a/pru_cape/bin/Linux/pru_fw/PRU_Switch.out b/pru_cape/bin/Linux/pru_fw/PRU_Switch.out new file mode 100644 index 0000000..c48fe5b --- /dev/null +++ b/pru_cape/bin/Linux/pru_fw/PRU_Switch.out | |||
Binary files differ | |||
diff --git a/pru_cape/pru_demo/.settings/org.eclipse.core.resources.prefs b/pru_cape/pru_demo/.settings/org.eclipse.core.resources.prefs deleted file mode 100755 index 9984460..0000000 --- a/pru_cape/pru_demo/.settings/org.eclipse.core.resources.prefs +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | eclipse.preferences.version=1 | ||
2 | encoding//Debug/gen/subdir_rules.mk=UTF-8 | ||
3 | encoding//Debug/gen/subdir_vars.mk=UTF-8 | ||
4 | encoding//Debug/makefile=UTF-8 | ||
5 | encoding//Debug/objects.mk=UTF-8 | ||
6 | encoding//Debug/sources.mk=UTF-8 | ||
7 | encoding//Debug/subdir_rules.mk=UTF-8 | ||
8 | encoding//Debug/subdir_vars.mk=UTF-8 | ||
9 | encoding//Release/gen/subdir_rules.mk=UTF-8 | ||
10 | encoding//Release/gen/subdir_vars.mk=UTF-8 | ||
11 | encoding//Release/makefile=UTF-8 | ||
12 | encoding//Release/objects.mk=UTF-8 | ||
13 | encoding//Release/sources.mk=UTF-8 | ||
14 | encoding//Release/subdir_rules.mk=UTF-8 | ||
15 | encoding//Release/subdir_vars.mk=UTF-8 | ||
diff --git a/pru_cape/pru_demo/Linux/pru0_led.sh b/pru_cape/pru_demo/Linux/pru0_led.sh new file mode 100755 index 0000000..4a63027 --- /dev/null +++ b/pru_cape/pru_demo/Linux/pru0_led.sh | |||
@@ -0,0 +1,14 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | if [ -e /dev/rpmsg_pru30 ] | ||
4 | then | ||
5 | while true; do | ||
6 | read -p "PRU0: Input an LED color to toggle ('q' to quit)[r,g,b,o]: " rgbo | ||
7 | if [ $rgbo = 'q' ]; then | ||
8 | exit | ||
9 | fi | ||
10 | echo $rgbo > /dev/rpmsg_pru30 | ||
11 | done | ||
12 | else | ||
13 | echo "/dev/rpmsg_pru30 device does not exist" | ||
14 | fi | ||
diff --git a/pru_cape/pru_demo/Linux/pru_demo.sh b/pru_cape/pru_demo/Linux/pru_demo.sh new file mode 100755 index 0000000..b94ea49 --- /dev/null +++ b/pru_cape/pru_demo/Linux/pru_demo.sh | |||
@@ -0,0 +1,96 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | led0_link="$(readlink -f ./pru_fw/PRU_LED0.out)" | ||
4 | led1_link="$(readlink -f ./pru_fw/PRU_LED1.out)" | ||
5 | switch_link="$(readlink -f ./pru_fw/PRU_Switch.out)" | ||
6 | audio_link="$(readlink -f ./pru_fw/PRU_Audio.out)" | ||
7 | uart_link="$(readlink -f ./pru_fw/PRU_Hardware_UART.out)" | ||
8 | temp0_link="$(readlink -f ./pru_fw/PRU_HDQ_TempSensor0.out)" | ||
9 | temp1_link="$(readlink -f ./pru_fw/PRU_HDQ_TempSensor1.out)" | ||
10 | rpmsg_led_link="$(readlink -f ./pru_fw/PRU_RPMsg_LED0.out)" | ||
11 | halt_link="$(readlink -f ./pru_fw/PRU_Halt.out)" | ||
12 | |||
13 | echo "" | ||
14 | echo "*******************************" | ||
15 | echo "* PRU Cape Demo *" | ||
16 | echo "*******************************" | ||
17 | echo "" | ||
18 | |||
19 | while true; do | ||
20 | echo "Which firmware would you like to load?" | ||
21 | echo "" | ||
22 | echo "1. LEDs" | ||
23 | echo "2. Switches" | ||
24 | echo "3. Audio" | ||
25 | echo "4. UART" | ||
26 | echo "5. Temp sensor" | ||
27 | echo "6. RPMsg Toggle LEDs" | ||
28 | echo "7. Halt" | ||
29 | echo "" | ||
30 | read -p "selection: " test_number | ||
31 | echo "" | ||
32 | |||
33 | case "$test_number" in | ||
34 | 1) fw0_link=${led0_link} | ||
35 | fw1_link=${led1_link} ;; | ||
36 | 2) fw0_link=${switch_link} | ||
37 | fw1_link=${halt_link} ;; | ||
38 | 3) fw0_link=${halt_link} | ||
39 | fw1_link=${audio_link} ;; | ||
40 | 4) fw0_link=${uart_link} | ||
41 | fw1_link=${halt_link} ;; | ||
42 | 5) fw0_link=${temp0_link} | ||
43 | fw1_link=${temp1_link} ;; | ||
44 | 6) fw0_link=${rpmsg_led_link} | ||
45 | fw1_link=${halt_link} ;; | ||
46 | 7) fw0_link=${halt_link} | ||
47 | fw1_link=${halt_link} ;; | ||
48 | *) echo "invalid selection" | ||
49 | echo "" | ||
50 | continue ;; | ||
51 | esac | ||
52 | |||
53 | if [ ${fw0_link} ] && [ ${fw1_link} ]; | ||
54 | then | ||
55 | rm /lib/firmware/am335x-pru0-fw &> /dev/null | ||
56 | rm /lib/firmware/am335x-pru1-fw &> /dev/null | ||
57 | |||
58 | if [ -e /sys/bus/platform/drivers/pru-rproc/4a334000.pru0 ]; then | ||
59 | echo 4a334000.pru0 > /sys/bus/platform/drivers/pru-rproc/unbind | ||
60 | fi | ||
61 | if [ -e /sys/bus/platform/drivers/pru-rproc/4a338000.pru1 ]; then | ||
62 | echo 4a338000.pru1 > /sys/bus/platform/drivers/pru-rproc/unbind | ||
63 | fi | ||
64 | |||
65 | ln -s ${fw0_link} /lib/firmware/am335x-pru0-fw | ||
66 | ln -s ${fw1_link} /lib/firmware/am335x-pru1-fw | ||
67 | echo 4a334000.pru0 > /sys/bus/platform/drivers/pru-rproc/bind | ||
68 | echo 4a338000.pru1 > /sys/bus/platform/drivers/pru-rproc/bind | ||
69 | echo "" | ||
70 | echo "Firmware " $test_number " is running" | ||
71 | echo "" | ||
72 | |||
73 | case "$test_number" in | ||
74 | 6) /bin/bash ./pru0_led.sh ;; | ||
75 | esac | ||
76 | |||
77 | else | ||
78 | echo "At least one of the firmware .out files does not seem to exist. Did you" | ||
79 | echo "build all of the firmwares in the pru_fw directory? Check the paths at" | ||
80 | echo "the top of this script and make sure the files exist." | ||
81 | echo "" | ||
82 | fi | ||
83 | |||
84 | loop=true | ||
85 | while $loop; do | ||
86 | read -p "Would you like to load a different firmware? y/n: " run_again | ||
87 | echo"" | ||
88 | |||
89 | case "$run_again" in | ||
90 | y) loop=false ;; | ||
91 | n) exit ;; | ||
92 | *) echo "invalid response" | ||
93 | echo "";; | ||
94 | esac | ||
95 | done | ||
96 | done | ||
diff --git a/pru_cape/pru_demo/.ccsproject b/pru_cape/pru_demo/StarterWare/.ccsproject index 1885e0c..1885e0c 100644 --- a/pru_cape/pru_demo/.ccsproject +++ b/pru_cape/pru_demo/StarterWare/.ccsproject | |||
diff --git a/pru_cape/pru_demo/.cproject b/pru_cape/pru_demo/StarterWare/.cproject index d309519..d309519 100644 --- a/pru_cape/pru_demo/.cproject +++ b/pru_cape/pru_demo/StarterWare/.cproject | |||
diff --git a/pru_cape/pru_demo/.launches/PRU_Demo.launch b/pru_cape/pru_demo/StarterWare/.launches/PRU_Demo.launch index c68eb6c..c68eb6c 100755 --- a/pru_cape/pru_demo/.launches/PRU_Demo.launch +++ b/pru_cape/pru_demo/StarterWare/.launches/PRU_Demo.launch | |||
diff --git a/pru_cape/pru_demo/.project b/pru_cape/pru_demo/StarterWare/.project index fedab59..fedab59 100644 --- a/pru_cape/pru_demo/.project +++ b/pru_cape/pru_demo/StarterWare/.project | |||
diff --git a/pru_cape/pru_demo/.settings/org.eclipse.cdt.codan.core.prefs b/pru_cape/pru_demo/StarterWare/.settings/org.eclipse.cdt.codan.core.prefs index 98b6350..98b6350 100644 --- a/pru_cape/pru_demo/.settings/org.eclipse.cdt.codan.core.prefs +++ b/pru_cape/pru_demo/StarterWare/.settings/org.eclipse.cdt.codan.core.prefs | |||
diff --git a/pru_cape/pru_demo/.settings/org.eclipse.cdt.core.prefs b/pru_cape/pru_demo/StarterWare/.settings/org.eclipse.cdt.core.prefs index fcd6442..fcd6442 100644 --- a/pru_cape/pru_demo/.settings/org.eclipse.cdt.core.prefs +++ b/pru_cape/pru_demo/StarterWare/.settings/org.eclipse.cdt.core.prefs | |||
diff --git a/pru_cape/pru_demo/.settings/org.eclipse.cdt.debug.core.prefs b/pru_cape/pru_demo/StarterWare/.settings/org.eclipse.cdt.debug.core.prefs index 58d4fb2..58d4fb2 100644 --- a/pru_cape/pru_demo/.settings/org.eclipse.cdt.debug.core.prefs +++ b/pru_cape/pru_demo/StarterWare/.settings/org.eclipse.cdt.debug.core.prefs | |||
diff --git a/pru_cape/pru_demo/AM335x.cmd b/pru_cape/pru_demo/StarterWare/AM335x.cmd index d299658..d299658 100644 --- a/pru_cape/pru_demo/AM335x.cmd +++ b/pru_cape/pru_demo/StarterWare/AM335x.cmd | |||
diff --git a/pru_cape/pru_demo/AM335x.lds b/pru_cape/pru_demo/StarterWare/AM335x.lds index 122ad6f..122ad6f 100644 --- a/pru_cape/pru_demo/AM335x.lds +++ b/pru_cape/pru_demo/StarterWare/AM335x.lds | |||
diff --git a/pru_cape/pru_demo/Makefile b/pru_cape/pru_demo/StarterWare/Makefile index b6e7ee3..b6e7ee3 100644 --- a/pru_cape/pru_demo/Makefile +++ b/pru_cape/pru_demo/StarterWare/Makefile | |||
diff --git a/pru_cape/pru_demo/hw_pru_ctrl.h b/pru_cape/pru_demo/StarterWare/hw_pru_ctrl.h index bb95f7c..bb95f7c 100644 --- a/pru_cape/pru_demo/hw_pru_ctrl.h +++ b/pru_cape/pru_demo/StarterWare/hw_pru_ctrl.h | |||
diff --git a/pru_cape/pru_demo/hw_pruss.h b/pru_cape/pru_demo/StarterWare/hw_pruss.h index 9f765c6..9f765c6 100644 --- a/pru_cape/pru_demo/hw_pruss.h +++ b/pru_cape/pru_demo/StarterWare/hw_pruss.h | |||
diff --git a/pru_cape/pru_demo/pru.c b/pru_cape/pru_demo/StarterWare/pru.c index 03a023c..03a023c 100644 --- a/pru_cape/pru_demo/pru.c +++ b/pru_cape/pru_demo/StarterWare/pru.c | |||
diff --git a/pru_cape/pru_demo/pru.h b/pru_cape/pru_demo/StarterWare/pru.h index 39a2d54..39a2d54 100644 --- a/pru_cape/pru_demo/pru.h +++ b/pru_cape/pru_demo/StarterWare/pru.h | |||
diff --git a/pru_cape/pru_demo/pru_cape_demo.c b/pru_cape/pru_demo/StarterWare/pru_cape_demo.c index b9fe73a..b9fe73a 100644 --- a/pru_cape/pru_demo/pru_cape_demo.c +++ b/pru_cape/pru_demo/StarterWare/pru_cape_demo.c | |||
diff --git a/pru_cape/pru_demo/pru_cape_demo.h b/pru_cape/pru_demo/StarterWare/pru_cape_demo.h index 9b4fa5e..9b4fa5e 100644 --- a/pru_cape/pru_demo/pru_cape_demo.h +++ b/pru_cape/pru_demo/StarterWare/pru_cape_demo.h | |||
diff --git a/pru_cape/pru_demo/pru_cape_demo_ccs.cmd b/pru_cape/pru_demo/StarterWare/pru_cape_demo_ccs.cmd index a1aeae1..a1aeae1 100644 --- a/pru_cape/pru_demo/pru_cape_demo_ccs.cmd +++ b/pru_cape/pru_demo/StarterWare/pru_cape_demo_ccs.cmd | |||
diff --git a/pru_cape/pru_demo/pru_cape_demo_make.cmd b/pru_cape/pru_demo/StarterWare/pru_cape_demo_make.cmd index efd2bc6..efd2bc6 100644 --- a/pru_cape/pru_demo/pru_cape_demo_make.cmd +++ b/pru_cape/pru_demo/StarterWare/pru_cape_demo_make.cmd | |||
diff --git a/pru_cape/pru_demo/startup_ARMCA8.S b/pru_cape/pru_demo/StarterWare/startup_ARMCA8.S index 7c132e1..7c132e1 100644 --- a/pru_cape/pru_demo/startup_ARMCA8.S +++ b/pru_cape/pru_demo/StarterWare/startup_ARMCA8.S | |||
diff --git a/pru_cape/pru_fw/Makefile b/pru_cape/pru_fw/Makefile index 656bbae..ff7a16d 100644 --- a/pru_cape/pru_fw/Makefile +++ b/pru_cape/pru_fw/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | SUBDIRS=PRU_Audio PRU_Hardware_UART PRU_HDQ_TempSensor0 PRU_HDQ_TempSensor1 PRU_LED0 PRU_LED1 PRU_RPMsg_LED0 PRU_Switch | 1 | SUBDIRS=PRU_Audio PRU_Halt PRU_Hardware_UART PRU_HDQ_TempSensor0 PRU_HDQ_TempSensor1 PRU_LED0 PRU_LED1 PRU_RPMsg_LED0 PRU_Switch |
2 | 2 | ||
3 | all: $(SUBDIRS) | 3 | all: $(SUBDIRS) |
4 | 4 | ||
diff --git a/pru_cape/pru_fw/PRU_Halt/.ccsproject b/pru_cape/pru_fw/PRU_Halt/.ccsproject new file mode 100644 index 0000000..fdd920a --- /dev/null +++ b/pru_cape/pru_fw/PRU_Halt/.ccsproject | |||
@@ -0,0 +1,14 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8" ?> | ||
2 | <?ccsproject version="1.0"?> | ||
3 | <projectOptions> | ||
4 | <deviceVariant value="TMS192C2026.AM3359.BeagleBone_Black"/> | ||
5 | <deviceFamily value="PRU"/> | ||
6 | <deviceEndianness value="little"/> | ||
7 | <codegenToolVersion value="2.1.1"/> | ||
8 | <isElfFormat value="true"/> | ||
9 | <linkerCommandFile value="AM335x.cmd"/> | ||
10 | <rts value="libc.a"/> | ||
11 | <createSlaveProjects value=""/> | ||
12 | <templateProperties value="id=com.ti.common.project.core.emptyProjectWithMainTemplate,"/> | ||
13 | <isTargetManual value="false"/> | ||
14 | </projectOptions> | ||
diff --git a/pru_cape/pru_fw/PRU_Halt/.cproject b/pru_cape/pru_fw/PRU_Halt/.cproject new file mode 100644 index 0000000..a8a0ba5 --- /dev/null +++ b/pru_cape/pru_fw/PRU_Halt/.cproject | |||
@@ -0,0 +1,176 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
2 | <?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage"> | ||
3 | <storageModule configRelations="2" moduleId="org.eclipse.cdt.core.settings"> | ||
4 | <cconfiguration id="com.ti.ccstudio.buildDefinitions.PRU.Debug.614178575"> | ||
5 | <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.PRU.Debug.614178575" moduleId="org.eclipse.cdt.core.settings" name="Debug"> | ||
6 | <externalSettings/> | ||
7 | <extensions> | ||
8 | <extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> | ||
9 | <extension id="com.ti.ccstudio.errorparser.LinkErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> | ||
10 | <extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> | ||
11 | <extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/> | ||
12 | </extensions> | ||
13 | </storageModule> | ||
14 | <storageModule moduleId="cdtBuildSystem" version="4.0.0"> | ||
15 | <configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" id="com.ti.ccstudio.buildDefinitions.PRU.Debug.614178575" name="Debug" parent="com.ti.ccstudio.buildDefinitions.PRU.Debug" postbuildStep="" prebuildStep=""> | ||
16 | <folderInfo id="com.ti.ccstudio.buildDefinitions.PRU.Debug.614178575." name="/" resourcePath=""> | ||
17 | <toolChain id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.DebugToolchain.536157771" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.DebugToolchain" targetTool="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerDebug.1299505767"> | ||
18 | <option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.376359355" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList"> | ||
19 | <listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=TMS192C2026.AM3359.BeagleBone_Black"/> | ||
20 | <listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/> | ||
21 | <listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/> | ||
22 | <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.5.0"/> | ||
23 | <listOptionValue builtIn="false" value="LINKER_COMMAND_FILE=AM335x.cmd"/> | ||
24 | <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/> | ||
25 | <listOptionValue builtIn="false" value="OUTPUT_TYPE=executable"/> | ||
26 | </option> | ||
27 | <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1937529153" name="Compiler version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="2.1.1" valueType="string"/> | ||
28 | <targetPlatform id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformDebug.936828213" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformDebug"/> | ||
29 | <builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderDebug.1189881378" keepEnvironmentInBuildfile="false" name="GNU Make" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderDebug"/> | ||
30 | <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerDebug.1644366720" name="PRU Compiler" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerDebug"> | ||
31 | <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE.117461329" name="Pre-define NAME (--define, -D)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE" valueType="definedSymbols"> | ||
32 | <listOptionValue builtIn="false" value="am3359"/> | ||
33 | <listOptionValue builtIn="false" value="pru0"/> | ||
34 | </option> | ||
35 | <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.SILICON_VERSION.1846276643" name="Silicon version (--silicon_version, -v)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.SILICON_VERSION" value="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.SILICON_VERSION.3" valueType="enumerated"/> | ||
36 | <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.45214419" name="Enables use of the hardware MAC available on some PRU cores (--hardware_mac)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC" value="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.on" valueType="enumerated"/> | ||
37 | <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEBUGGING_MODEL.680240372" name="Debugging model" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEBUGGING_MODEL" value="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEBUGGING_MODEL.SYMDEBUG__DWARF" valueType="enumerated"/> | ||
38 | <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.257427855" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList"> | ||
39 | <listOptionValue builtIn="false" value="225"/> | ||
40 | </option> | ||
41 | <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER.632084015" name="Emit diagnostic identifier numbers (--display_error_number, -pden)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/> | ||
42 | <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WRAP.388902530" name="Wrap diagnostic messages (--diag_wrap)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WRAP" value="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WRAP.off" valueType="enumerated"/> | ||
43 | <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.1185758259" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath"> | ||
44 | <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/> | ||
45 | <listOptionValue builtIn="false" value="../../../../include"/> | ||
46 | <listOptionValue builtIn="false" value="../../../../include/am335x"/> | ||
47 | </option> | ||
48 | <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.671570124" name="Specify the endianness of both code and data [See 'General' page to edit] (--endian)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN" value="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.little" valueType="enumerated"/> | ||
49 | <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS.1027558961" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS"/> | ||
50 | <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS.1553921923" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS"/> | ||
51 | <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS.1257113137" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS"/> | ||
52 | <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS.837325716" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS"/> | ||
53 | </tool> | ||
54 | <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerDebug.1299505767" name="PRU Linker" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerDebug"> | ||
55 | <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE.1157254505" name="Pre-define preprocessor macro _name_ to _value_ (--define)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE" valueType="definedSymbols"> | ||
56 | <listOptionValue builtIn="false" value="PRU_CORE=1"/> | ||
57 | </option> | ||
58 | <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE.40488764" name="Set C system stack size (--stack_size, -stack)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE" value="0x100" valueType="string"/> | ||
59 | <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE.828950085" name="Heap size for C/C++ dynamic memory allocation (--heap_size, -heap)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE" value="0x100" valueType="string"/> | ||
60 | <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE.808417910" name="Specify output file name (--output_file, -o)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE" value=""${ProjName}.out"" valueType="string"/> | ||
61 | <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE.1631661357" name="Link information (map) listed into <file> (--map_file, -m)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE" value=""${ProjName}.map"" valueType="string"/> | ||
62 | <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO.1722968950" name="Detailed link information data-base into <file> (--xml_link_info, -xml_link_info)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO" value=""${ProjName}_linkInfo.xml"" valueType="string"/> | ||
63 | <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DISPLAY_ERROR_NUMBER.199720355" name="Emit diagnostic identifier numbers (--display_error_number)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/> | ||
64 | <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DIAG_WRAP.774705752" name="Wrap diagnostic messages (--diag_wrap)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DIAG_WRAP" value="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DIAG_WRAP.off" valueType="enumerated"/> | ||
65 | <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH.437700947" name="Add <dir> to library search path (--search_path, -i)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH" valueType="libPaths"> | ||
66 | <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/lib""/> | ||
67 | <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/> | ||
68 | </option> | ||
69 | <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY.1540335348" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY" valueType="libs"> | ||
70 | <listOptionValue builtIn="false" value=""libc.a""/> | ||
71 | </option> | ||
72 | <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS.1286595725" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS"/> | ||
73 | <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS.529868079" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS"/> | ||
74 | <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS.696806416" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS"/> | ||
75 | </tool> | ||
76 | <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.425266673" name="PRU Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex"/> | ||
77 | </toolChain> | ||
78 | </folderInfo> | ||
79 | </configuration> | ||
80 | </storageModule> | ||
81 | <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/> | ||
82 | </cconfiguration> | ||
83 | <cconfiguration id="com.ti.ccstudio.buildDefinitions.PRU.Release.1581813610"> | ||
84 | <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.PRU.Release.1581813610" moduleId="org.eclipse.cdt.core.settings" name="Release"> | ||
85 | <externalSettings/> | ||
86 | <extensions> | ||
87 | <extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> | ||
88 | <extension id="com.ti.ccstudio.errorparser.LinkErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> | ||
89 | <extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> | ||
90 | <extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/> | ||
91 | </extensions> | ||
92 | </storageModule> | ||
93 | <storageModule moduleId="cdtBuildSystem" version="4.0.0"> | ||
94 | <configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" id="com.ti.ccstudio.buildDefinitions.PRU.Release.1581813610" name="Release" parent="com.ti.ccstudio.buildDefinitions.PRU.Release" postbuildStep="" prebuildStep=""> | ||
95 | <folderInfo id="com.ti.ccstudio.buildDefinitions.PRU.Release.1581813610." name="/" resourcePath=""> | ||
96 | <toolChain id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.ReleaseToolchain.385009472" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.ReleaseToolchain" targetTool="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease.642950271"> | ||
97 | <option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.301986259" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList"> | ||
98 | <listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=TMS192C2026.AM3359.BeagleBone_Black"/> | ||
99 | <listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/> | ||
100 | <listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/> | ||
101 | <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.5.0"/> | ||
102 | <listOptionValue builtIn="false" value="LINKER_COMMAND_FILE=AM335x.cmd"/> | ||
103 | <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/> | ||
104 | <listOptionValue builtIn="false" value="OUTPUT_TYPE=executable"/> | ||
105 | </option> | ||
106 | <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.176832845" name="Compiler version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="2.1.1" valueType="string"/> | ||
107 | <targetPlatform id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformRelease.635970319" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformRelease"/> | ||
108 | <builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderRelease.2081559792" keepEnvironmentInBuildfile="false" name="GNU Make" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderRelease"/> | ||
109 | <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerRelease.1907900182" name="PRU Compiler" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerRelease"> | ||
110 | <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE.619343062" name="Pre-define NAME (--define, -D)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE" valueType="definedSymbols"> | ||
111 | <listOptionValue builtIn="false" value="am3359"/> | ||
112 | <listOptionValue builtIn="false" value="pru0"/> | ||
113 | </option> | ||
114 | <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.SILICON_VERSION.2145377494" name="Silicon version (--silicon_version, -v)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.SILICON_VERSION" value="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.SILICON_VERSION.3" valueType="enumerated"/> | ||
115 | <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.1641753448" name="Enables use of the hardware MAC available on some PRU cores (--hardware_mac)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC" value="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.on" valueType="enumerated"/> | ||
116 | <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.1268448583" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList"> | ||
117 | <listOptionValue builtIn="false" value="225"/> | ||
118 | </option> | ||
119 | <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER.709624648" name="Emit diagnostic identifier numbers (--display_error_number, -pden)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/> | ||
120 | <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WRAP.1614779796" name="Wrap diagnostic messages (--diag_wrap)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WRAP" value="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WRAP.off" valueType="enumerated"/> | ||
121 | <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.334211511" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath"> | ||
122 | <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/> | ||
123 | <listOptionValue builtIn="false" value="../../../../include"/> | ||
124 | <listOptionValue builtIn="false" value="../../../../include/am335x"/> | ||
125 | </option> | ||
126 | <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.331765495" name="Specify the endianness of both code and data [See 'General' page to edit] (--endian)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN" value="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.little" valueType="enumerated"/> | ||
127 | <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS.1687422787" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS"/> | ||
128 | <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS.69242823" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS"/> | ||
129 | <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS.895681112" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS"/> | ||
130 | <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS.1433273477" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS"/> | ||
131 | </tool> | ||
132 | <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease.642950271" name="PRU Linker" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease"> | ||
133 | <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE.171941081" name="Pre-define preprocessor macro _name_ to _value_ (--define)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE" valueType="definedSymbols"> | ||
134 | <listOptionValue builtIn="false" value="PRU_CORE=1"/> | ||
135 | </option> | ||
136 | <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE.592457050" name="Set C system stack size (--stack_size, -stack)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE" value="0x100" valueType="string"/> | ||
137 | <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE.323900902" name="Heap size for C/C++ dynamic memory allocation (--heap_size, -heap)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE" value="0x100" valueType="string"/> | ||
138 | <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE.1284919935" name="Specify output file name (--output_file, -o)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE" value=""${ProjName}.out"" valueType="string"/> | ||
139 | <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE.362104958" name="Link information (map) listed into <file> (--map_file, -m)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE" value=""${ProjName}.map"" valueType="string"/> | ||
140 | <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO.1552289743" name="Detailed link information data-base into <file> (--xml_link_info, -xml_link_info)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO" value=""${ProjName}_linkInfo.xml"" valueType="string"/> | ||
141 | <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DISPLAY_ERROR_NUMBER.1702120111" name="Emit diagnostic identifier numbers (--display_error_number)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/> | ||
142 | <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DIAG_WRAP.1047216947" name="Wrap diagnostic messages (--diag_wrap)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DIAG_WRAP" value="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DIAG_WRAP.off" valueType="enumerated"/> | ||
143 | <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH.2064376881" name="Add <dir> to library search path (--search_path, -i)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH" valueType="libPaths"> | ||
144 | <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/lib""/> | ||
145 | <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/> | ||
146 | </option> | ||
147 | <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY.684486880" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY" valueType="libs"> | ||
148 | <listOptionValue builtIn="false" value=""libc.a""/> | ||
149 | </option> | ||
150 | <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS.1039230199" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS"/> | ||
151 | <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS.1957442777" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS"/> | ||
152 | <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS.317796099" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS"/> | ||
153 | </tool> | ||
154 | <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.1599302473" name="PRU Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex"/> | ||
155 | </toolChain> | ||
156 | </folderInfo> | ||
157 | </configuration> | ||
158 | </storageModule> | ||
159 | <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/> | ||
160 | </cconfiguration> | ||
161 | </storageModule> | ||
162 | <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/> | ||
163 | <storageModule moduleId="cdtBuildSystem" version="4.0.0"> | ||
164 | <project id="PRU_Halt0.com.ti.ccstudio.buildDefinitions.PRU.ProjectType.13413847" name="PRU" projectType="com.ti.ccstudio.buildDefinitions.PRU.ProjectType"/> | ||
165 | </storageModule> | ||
166 | <storageModule moduleId="scannerConfiguration"/> | ||
167 | <storageModule moduleId="org.eclipse.cdt.core.language.mapping"> | ||
168 | <project-mappings> | ||
169 | <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.asmSource" language="com.ti.ccstudio.core.TIASMLanguage"/> | ||
170 | <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cHeader" language="com.ti.ccstudio.core.TIGCCLanguage"/> | ||
171 | <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cSource" language="com.ti.ccstudio.core.TIGCCLanguage"/> | ||
172 | <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxHeader" language="com.ti.ccstudio.core.TIGPPLanguage"/> | ||
173 | <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxSource" language="com.ti.ccstudio.core.TIGPPLanguage"/> | ||
174 | </project-mappings> | ||
175 | </storageModule> | ||
176 | </cproject> | ||
diff --git a/pru_cape/pru_fw/PRU_Halt/.project b/pru_cape/pru_fw/PRU_Halt/.project new file mode 100644 index 0000000..5766e4d --- /dev/null +++ b/pru_cape/pru_fw/PRU_Halt/.project | |||
@@ -0,0 +1,27 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <projectDescription> | ||
3 | <name>PRU_Halt</name> | ||
4 | <comment></comment> | ||
5 | <projects> | ||
6 | </projects> | ||
7 | <buildSpec> | ||
8 | <buildCommand> | ||
9 | <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name> | ||
10 | <arguments> | ||
11 | </arguments> | ||
12 | </buildCommand> | ||
13 | <buildCommand> | ||
14 | <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name> | ||
15 | <triggers>full,incremental,</triggers> | ||
16 | <arguments> | ||
17 | </arguments> | ||
18 | </buildCommand> | ||
19 | </buildSpec> | ||
20 | <natures> | ||
21 | <nature>com.ti.ccstudio.core.ccsNature</nature> | ||
22 | <nature>org.eclipse.cdt.core.cnature</nature> | ||
23 | <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature> | ||
24 | <nature>org.eclipse.cdt.core.ccnature</nature> | ||
25 | <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature> | ||
26 | </natures> | ||
27 | </projectDescription> | ||
diff --git a/pru_cape/pru_fw/PRU_Halt/.settings/org.eclipse.cdt.codan.core.prefs b/pru_cape/pru_fw/PRU_Halt/.settings/org.eclipse.cdt.codan.core.prefs new file mode 100644 index 0000000..f653028 --- /dev/null +++ b/pru_cape/pru_fw/PRU_Halt/.settings/org.eclipse.cdt.codan.core.prefs | |||
@@ -0,0 +1,3 @@ | |||
1 | eclipse.preferences.version=1 | ||
2 | inEditor=false | ||
3 | onBuild=false | ||
diff --git a/pru_cape/pru_fw/PRU_Halt/.settings/org.eclipse.cdt.debug.core.prefs b/pru_cape/pru_fw/PRU_Halt/.settings/org.eclipse.cdt.debug.core.prefs new file mode 100644 index 0000000..2adc7b1 --- /dev/null +++ b/pru_cape/pru_fw/PRU_Halt/.settings/org.eclipse.cdt.debug.core.prefs | |||
@@ -0,0 +1,2 @@ | |||
1 | eclipse.preferences.version=1 | ||
2 | org.eclipse.cdt.debug.core.toggleBreakpointModel=com.ti.ccstudio.debug.CCSBreakpointMarker | ||
diff --git a/pru_cape/pru_fw/PRU_Halt/AM335x_PRU.cmd b/pru_cape/pru_fw/PRU_Halt/AM335x_PRU.cmd new file mode 100644 index 0000000..b62f044 --- /dev/null +++ b/pru_cape/pru_fw/PRU_Halt/AM335x_PRU.cmd | |||
@@ -0,0 +1,86 @@ | |||
1 | /****************************************************************************/ | ||
2 | /* AM335x_PRU.cmd */ | ||
3 | /* Copyright (c) 2015 Texas Instruments Incorporated */ | ||
4 | /* */ | ||
5 | /* Description: This file is a linker command file that can be used for */ | ||
6 | /* linking PRU programs built with the C compiler and */ | ||
7 | /* the resulting .out file on an AM335x device. */ | ||
8 | /****************************************************************************/ | ||
9 | |||
10 | -cr /* Link using C conventions */ | ||
11 | |||
12 | /* Specify the System Memory Map */ | ||
13 | MEMORY | ||
14 | { | ||
15 | PAGE 0: | ||
16 | PRU_IMEM : org = 0x00000000 len = 0x00002000 /* 8kB PRU0 Instruction RAM */ | ||
17 | |||
18 | PAGE 1: | ||
19 | |||
20 | /* RAM */ | ||
21 | |||
22 | PRU_DMEM_0_1 : org = 0x00000000 len = 0x00002000 CREGISTER=24 /* 8kB PRU Data RAM 0_1 */ | ||
23 | PRU_DMEM_1_0 : org = 0x00002000 len = 0x00002000 CREGISTER=25 /* 8kB PRU Data RAM 1_0 */ | ||
24 | |||
25 | PAGE 2: | ||
26 | PRU_SHAREDMEM : org = 0x00010000 len = 0x00003000 CREGISTER=28 /* 12kB Shared RAM */ | ||
27 | |||
28 | DDR : org = 0x80000000 len = 0x00000100 CREGISTER=31 | ||
29 | L3OCMC : org = 0x40000000 len = 0x00010000 CREGISTER=30 | ||
30 | |||
31 | |||
32 | /* Peripherals */ | ||
33 | |||
34 | PRU_CFG : org = 0x00026000 len = 0x00000044 CREGISTER=4 | ||
35 | PRU_ECAP : org = 0x00030000 len = 0x00000060 CREGISTER=3 | ||
36 | PRU_IEP : org = 0x0002E000 len = 0x0000031C CREGISTER=26 | ||
37 | PRU_INTC : org = 0x00020000 len = 0x00001504 CREGISTER=0 | ||
38 | PRU_UART : org = 0x00028000 len = 0x00000038 CREGISTER=7 | ||
39 | |||
40 | DCAN0 : org = 0x481CC000 len = 0x000001E8 CREGISTER=14 | ||
41 | DCAN1 : org = 0x481D0000 len = 0x000001E8 CREGISTER=15 | ||
42 | DMTIMER2 : org = 0x48040000 len = 0x0000005C CREGISTER=1 | ||
43 | PWMSS0 : org = 0x48300000 len = 0x000002C4 CREGISTER=18 | ||
44 | PWMSS1 : org = 0x48302000 len = 0x000002C4 CREGISTER=19 | ||
45 | PWMSS2 : org = 0x48304000 len = 0x000002C4 CREGISTER=20 | ||
46 | GEMAC : org = 0x4A100000 len = 0x0000128C CREGISTER=9 | ||
47 | I2C1 : org = 0x4802A000 len = 0x000000D8 CREGISTER=2 | ||
48 | I2C2 : org = 0x4819C000 len = 0x000000D8 CREGISTER=17 | ||
49 | MBX0 : org = 0x480C8000 len = 0x00000140 CREGISTER=22 | ||
50 | MCASP0_DMA : org = 0x46000000 len = 0x00000100 CREGISTER=8 | ||
51 | MCSPI0 : org = 0x48030000 len = 0x000001A4 CREGISTER=6 | ||
52 | MCSPI1 : org = 0x481A0000 len = 0x000001A4 CREGISTER=16 | ||
53 | MMCHS0 : org = 0x48060000 len = 0x00000300 CREGISTER=5 | ||
54 | SPINLOCK : org = 0x480CA000 len = 0x00000880 CREGISTER=23 | ||
55 | TPCC : org = 0x49000000 len = 0x00001098 CREGISTER=29 | ||
56 | UART1 : org = 0x48022000 len = 0x00000088 CREGISTER=11 | ||
57 | UART2 : org = 0x48024000 len = 0x00000088 CREGISTER=12 | ||
58 | |||
59 | RSVD10 : org = 0x48318000 len = 0x00000100 CREGISTER=10 | ||
60 | RSVD13 : org = 0x48310000 len = 0x00000100 CREGISTER=13 | ||
61 | RSVD21 : org = 0x00032400 len = 0x00000100 CREGISTER=21 | ||
62 | RSVD27 : org = 0x00032000 len = 0x00000100 CREGISTER=27 | ||
63 | |||
64 | } | ||
65 | |||
66 | /* Specify the sections allocation into memory */ | ||
67 | SECTIONS { | ||
68 | /* Forces _c_int00 to the start of PRU IRAM. Not necessary when loading | ||
69 | an ELF file, but useful when loading a binary */ | ||
70 | .text:_c_int00* > 0x0, PAGE 0 | ||
71 | |||
72 | .text > PRU_IMEM, PAGE 0 | ||
73 | .stack > PRU_DMEM_0_1, PAGE 1 | ||
74 | .bss > PRU_DMEM_0_1, PAGE 1 | ||
75 | .cio > PRU_DMEM_0_1, PAGE 1 | ||
76 | .data > PRU_DMEM_0_1, PAGE 1 | ||
77 | .switch > PRU_DMEM_0_1, PAGE 1 | ||
78 | .sysmem > PRU_DMEM_0_1, PAGE 1 | ||
79 | .cinit > PRU_DMEM_0_1, PAGE 1 | ||
80 | .rodata > PRU_DMEM_0_1, PAGE 1 | ||
81 | .rofardata > PRU_DMEM_0_1, PAGE 1 | ||
82 | .farbss > PRU_DMEM_0_1, PAGE 1 | ||
83 | .fardata > PRU_DMEM_0_1, PAGE 1 | ||
84 | |||
85 | .resource_table > PRU_DMEM_0_1, PAGE 1 | ||
86 | } | ||
diff --git a/pru_cape/pru_fw/PRU_Halt/Makefile b/pru_cape/pru_fw/PRU_Halt/Makefile new file mode 100644 index 0000000..a5e200c --- /dev/null +++ b/pru_cape/pru_fw/PRU_Halt/Makefile | |||
@@ -0,0 +1,106 @@ | |||
1 | # PRU_CGT environment variable must point to the TI PRU code gen tools directory. E.g.: | ||
2 | #(Desktop Linux) export PRU_CGT=/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2 | ||
3 | #(Windows) set PRU_CGT=C:/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2 | ||
4 | #(ARM Linux*) export PRU_CGT=/usr/share/ti/cgt-pru | ||
5 | # | ||
6 | # *ARM Linux also needs to create a symbolic link to the /usr/bin/ directory in | ||
7 | # order to use the same Makefile | ||
8 | #(ARM Linux) ln -s /usr/bin/ /usr/share/ti/cgt-pru/bin | ||
9 | |||
10 | ifndef PRU_CGT | ||
11 | define ERROR_BODY | ||
12 | |||
13 | ******************************************************************************* | ||
14 | PRU_CGT environment variable is not set. Examples given: | ||
15 | (Desktop Linux) export PRU_CGT=/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2 | ||
16 | (Windows) set PRU_CGT=C:/path/to/pru/code/gen/tools/ti-cgt-pru_2.1.2 | ||
17 | (ARM Linux*) export PRU_CGT=/usr/share/ti/cgt-pru | ||
18 | |||
19 | *ARM Linux also needs to create a symbolic link to the /usr/bin/ directory in | ||
20 | order to use the same Makefile | ||
21 | (ARM Linux) ln -s /usr/bin/ /usr/share/ti/cgt-pru/bin | ||
22 | ******************************************************************************* | ||
23 | |||
24 | endef | ||
25 | $(error $(ERROR_BODY)) | ||
26 | endif | ||
27 | |||
28 | MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) | ||
29 | CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH)))) | ||
30 | PROJ_NAME=$(CURRENT_DIR) | ||
31 | LINKER_COMMAND_FILE=./AM335x_PRU.cmd | ||
32 | HEX_COMMAND_FILE=./PRU_HexUtil.cmd | ||
33 | LIBS=--library=../../../lib/rpmsg_lib.lib | ||
34 | INCLUDE=--include_path=../../../include --include_path=../../../include/am335x | ||
35 | STACK_SIZE=0x100 | ||
36 | HEAP_SIZE=0x100 | ||
37 | GEN_DIR=gen | ||
38 | |||
39 | #Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide) | ||
40 | CFLAGS=-v3 -O2 --display_error_number --endian=little --hardware_mac=on --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa | ||
41 | #Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide) | ||
42 | LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE) | ||
43 | |||
44 | HEX_FILE=$(GEN_DIR)/$(PROJ_NAME)_image.object | ||
45 | TARGET=$(GEN_DIR)/$(PROJ_NAME).out | ||
46 | MAP=$(GEN_DIR)/$(PROJ_NAME).map | ||
47 | SOURCES=$(wildcard *.c) | ||
48 | #Using .object instead of .obj in order to not conflict with the CCS build process | ||
49 | OBJECTS=$(patsubst %,$(GEN_DIR)/%,$(SOURCES:.c=.object)) | ||
50 | |||
51 | all: printStart $(HEX_FILE) printEnd | ||
52 | |||
53 | printStart: | ||
54 | @echo '' | ||
55 | @echo '************************************************************' | ||
56 | @echo 'Building project: $(PROJ_NAME)' | ||
57 | |||
58 | printEnd: | ||
59 | @echo '' | ||
60 | @echo 'Output files can be found in the "$(GEN_DIR)" directory' | ||
61 | @echo '' | ||
62 | @echo 'Finished building project: $(PROJ_NAME)' | ||
63 | @echo '************************************************************' | ||
64 | @echo '' | ||
65 | |||
66 | # Invokes the hex utility | ||
67 | $(HEX_FILE): $(TARGET) | ||
68 | @echo '' | ||
69 | @echo 'Invoking PRU Hex Utility' | ||
70 | $(PRU_CGT)/bin/hexpru -o $@ $< $(HEX_COMMAND_FILE) | ||
71 | @echo 'Finished building: $@' | ||
72 | |||
73 | # Invokes the linker (-z flag) to make the .out file | ||
74 | $(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE) | ||
75 | @echo '' | ||
76 | @echo 'Building target: $@' | ||
77 | @echo 'Invoking: PRU Linker' | ||
78 | $(PRU_CGT)/bin/clpru $(CFLAGS) -z -i$(PRU_CGT)/lib -i$(PRU_CGT)/include $(LFLAGS) -o $(TARGET) $(OBJECTS) -m$(MAP) $(LINKER_COMMAND_FILE) --library=libc.a $(LIBS) | ||
79 | @echo 'Finished building target: $@' | ||
80 | |||
81 | # Invokes the compiler on all c files in the directory to create the object files | ||
82 | $(GEN_DIR)/%.object: %.c | ||
83 | @mkdir -p $(GEN_DIR) | ||
84 | @echo '' | ||
85 | @echo 'Building file: $<' | ||
86 | @echo 'Invoking: PRU Compiler' | ||
87 | $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $< | ||
88 | |||
89 | .PHONY: all clean | ||
90 | |||
91 | # Remove the $(GEN_DIR) directory | ||
92 | clean: | ||
93 | @echo '' | ||
94 | @echo '************************************************************' | ||
95 | @echo 'Cleaning project: $(PROJ_NAME)' | ||
96 | @echo '' | ||
97 | @echo 'Removing files in the "$(GEN_DIR)" directory' | ||
98 | @rm -rf $(GEN_DIR) | ||
99 | @echo '' | ||
100 | @echo 'Finished cleaning project: $(PROJ_NAME)' | ||
101 | @echo '************************************************************' | ||
102 | @echo '' | ||
103 | |||
104 | # Includes the dependencies that the compiler creates (-ppd and -ppa flags) | ||
105 | -include $(OBJECTS:%.object=%.pp) | ||
106 | |||
diff --git a/pru_cape/pru_fw/PRU_Halt/PRU_HexUtil.cmd b/pru_cape/pru_fw/PRU_Halt/PRU_HexUtil.cmd new file mode 100644 index 0000000..da8b805 --- /dev/null +++ b/pru_cape/pru_fw/PRU_Halt/PRU_HexUtil.cmd | |||
@@ -0,0 +1,14 @@ | |||
1 | --host_image | ||
2 | --image | ||
3 | --host_image:target=ARM | ||
4 | --host_image:endianness=little | ||
5 | --host_image:hidden_symbols | ||
6 | |||
7 | ROMS { | ||
8 | PAGE 0: | ||
9 | .text: o = 0x0, l = 0x2000 | ||
10 | PAGE 1: | ||
11 | .data: o = 0x0, l = 0x2000 | ||
12 | PAGE 2: | ||
13 | .shared: o = 0x10000, l = 0x3000 | ||
14 | } | ||
diff --git a/pru_cape/pru_fw/PRU_Halt/main.c b/pru_cape/pru_fw/PRU_Halt/main.c new file mode 100644 index 0000000..d3df38b --- /dev/null +++ b/pru_cape/pru_fw/PRU_Halt/main.c | |||
@@ -0,0 +1,40 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/ | ||
3 | * | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions | ||
7 | * are met: | ||
8 | * | ||
9 | * * Redistributions of source code must retain the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer. | ||
11 | * | ||
12 | * * Redistributions in binary form must reproduce the above copyright | ||
13 | * notice, this list of conditions and the following disclaimer in the | ||
14 | * documentation and/or other materials provided with the | ||
15 | * distribution. | ||
16 | * | ||
17 | * * Neither the name of Texas Instruments Incorporated nor the names of | ||
18 | * its contributors may be used to endorse or promote products derived | ||
19 | * from this software without specific prior written permission. | ||
20 | * | ||
21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
22 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
23 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
24 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
25 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
26 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
27 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
28 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
29 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
30 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
31 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
32 | */ | ||
33 | |||
34 | #include <stdint.h> | ||
35 | #include "resource_table_empty.h" | ||
36 | |||
37 | int main(void) | ||
38 | { | ||
39 | __halt(); | ||
40 | } | ||
diff --git a/pru_cape/pru_fw/PRU_Halt/resource_table_empty.h b/pru_cape/pru_fw/PRU_Halt/resource_table_empty.h new file mode 100644 index 0000000..c14bd2b --- /dev/null +++ b/pru_cape/pru_fw/PRU_Halt/resource_table_empty.h | |||
@@ -0,0 +1,72 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/ | ||
3 | * | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions | ||
7 | * are met: | ||
8 | * | ||
9 | * * Redistributions of source code must retain the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer. | ||
11 | * | ||
12 | * * Redistributions in binary form must reproduce the above copyright | ||
13 | * notice, this list of conditions and the following disclaimer in the | ||
14 | * documentation and/or other materials provided with the | ||
15 | * distribution. | ||
16 | * | ||
17 | * * Neither the name of Texas Instruments Incorporated nor the names of | ||
18 | * its contributors may be used to endorse or promote products derived | ||
19 | * from this software without specific prior written permission. | ||
20 | * | ||
21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
22 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
23 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
24 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
25 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
26 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
27 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
28 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
29 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
30 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
31 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
32 | */ | ||
33 | |||
34 | /* | ||
35 | * ======== resource_table_empty.h ======== | ||
36 | * | ||
37 | * Define the resource table entries for all PRU cores. This will be | ||
38 | * incorporated into corresponding base images, and used by the remoteproc | ||
39 | * on the host-side to allocated/reserve resources. Note the remoteproc | ||
40 | * driver requires that all PRU firmware be built with a resource table. | ||
41 | * | ||
42 | * This file contains an empty resource table. It can be used either as: | ||
43 | * | ||
44 | * 1) A template, or | ||
45 | * 2) As-is if a PRU application does not need to configure PRU_INTC | ||
46 | * or interact with the rpmsg driver | ||
47 | * | ||
48 | */ | ||
49 | |||
50 | #ifndef _RSC_TABLE_PRU_H_ | ||
51 | #define _RSC_TABLE_PRU_H_ | ||
52 | |||
53 | #include <stddef.h> | ||
54 | #include <rsc_types.h> | ||
55 | |||
56 | struct my_resource_table { | ||
57 | struct resource_table base; | ||
58 | |||
59 | uint32_t offset[1]; /* Should match 'num' in actual definition */ | ||
60 | }; | ||
61 | |||
62 | #pragma DATA_SECTION(pru_remoteproc_ResourceTable, ".resource_table") | ||
63 | #pragma RETAIN(pru_remoteproc_ResourceTable) | ||
64 | struct my_resource_table pru_remoteproc_ResourceTable = { | ||
65 | 1, /* we're the first version that implements this */ | ||
66 | 0, /* number of entries in the table */ | ||
67 | 0, 0, /* reserved, must be zero */ | ||
68 | 0, /* offset[0] */ | ||
69 | }; | ||
70 | |||
71 | #endif /* _RSC_TABLE_PRU_H_ */ | ||
72 | |||