summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: eb4c8e0)
raw | patch | inline | side by side (parent: eb4c8e0)
author | Jason Reeder <jreeder@ti.com> | |
Tue, 13 Oct 2015 16:10:37 +0000 (11:10 -0500) | ||
committer | Jason Reeder <jreeder@ti.com> | |
Tue, 13 Oct 2015 16:10:37 +0000 (11:10 -0500) |
Added example folders for the AM335x and AM437x devices
and copied the existing examples into these two folders.
Signed-off-by: Jason Reeder <jreeder@ti.com>
and copied the existing examples into these two folders.
Signed-off-by: Jason Reeder <jreeder@ti.com>
273 files changed:
diff --git a/examples/PRU_Direct_Connect0/.settings/org.eclipse.core.resources.prefs b/examples/PRU_Direct_Connect0/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,13 +0,0 @@
-eclipse.preferences.version=1
-encoding//Debug/gen/subdir_rules.mk=UTF-8
-encoding//Debug/gen/subdir_vars.mk=UTF-8
-encoding//Debug/makefile=UTF-8
-encoding//Debug/objects.mk=UTF-8
-encoding//Debug/sources.mk=UTF-8
-encoding//Debug/subdir_rules.mk=UTF-8
-encoding//Debug/subdir_vars.mk=UTF-8
-encoding//Release/makefile=UTF-8
-encoding//Release/objects.mk=UTF-8
-encoding//Release/sources.mk=UTF-8
-encoding//Release/subdir_rules.mk=UTF-8
-encoding//Release/subdir_vars.mk=UTF-8
diff --git a/examples/PRU_Direct_Connect1/.settings/org.eclipse.core.resources.prefs b/examples/PRU_Direct_Connect1/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,13 +0,0 @@
-eclipse.preferences.version=1
-encoding//Debug/gen/subdir_rules.mk=UTF-8
-encoding//Debug/gen/subdir_vars.mk=UTF-8
-encoding//Debug/makefile=UTF-8
-encoding//Debug/objects.mk=UTF-8
-encoding//Debug/sources.mk=UTF-8
-encoding//Debug/subdir_rules.mk=UTF-8
-encoding//Debug/subdir_vars.mk=UTF-8
-encoding//Release/makefile=UTF-8
-encoding//Release/objects.mk=UTF-8
-encoding//Release/sources.mk=UTF-8
-encoding//Release/subdir_rules.mk=UTF-8
-encoding//Release/subdir_vars.mk=UTF-8
diff --git a/examples/PRU_Hardware_UART/.settings/org.eclipse.core.resources.prefs b/examples/PRU_Hardware_UART/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,13 +0,0 @@
-eclipse.preferences.version=1
-encoding//Debug/gen/subdir_rules.mk=UTF-8
-encoding//Debug/gen/subdir_vars.mk=UTF-8
-encoding//Debug/makefile=UTF-8
-encoding//Debug/objects.mk=UTF-8
-encoding//Debug/sources.mk=UTF-8
-encoding//Debug/subdir_rules.mk=UTF-8
-encoding//Debug/subdir_vars.mk=UTF-8
-encoding//Release/makefile=UTF-8
-encoding//Release/objects.mk=UTF-8
-encoding//Release/sources.mk=UTF-8
-encoding//Release/subdir_rules.mk=UTF-8
-encoding//Release/subdir_vars.mk=UTF-8
diff --git a/examples/PRU_IEP/.settings/org.eclipse.core.resources.prefs b/examples/PRU_IEP/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,13 +0,0 @@
-eclipse.preferences.version=1
-encoding//Debug/gen/subdir_rules.mk=UTF-8
-encoding//Debug/gen/subdir_vars.mk=UTF-8
-encoding//Debug/makefile=UTF-8
-encoding//Debug/objects.mk=UTF-8
-encoding//Debug/sources.mk=UTF-8
-encoding//Debug/subdir_rules.mk=UTF-8
-encoding//Debug/subdir_vars.mk=UTF-8
-encoding//Release/makefile=UTF-8
-encoding//Release/objects.mk=UTF-8
-encoding//Release/sources.mk=UTF-8
-encoding//Release/subdir_rules.mk=UTF-8
-encoding//Release/subdir_vars.mk=UTF-8
diff --git a/examples/PRU_IEP/Makefile b/examples/PRU_IEP/Makefile
+++ /dev/null
@@ -1,86 +0,0 @@
-# PRU_CGT environment variable must point to the TI PRU compiler directory. E.g.:
-#(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
-#(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
-ifndef PRU_CGT
-define ERROR_BODY
-
-************************************************************
-PRU_CGT environment variable is not set. Examples given:
-(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
-(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
-************************************************************
-
-endef
-$(error $(ERROR_BODY))
-endif
-
-MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
-CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
-PROJ_NAME=$(CURRENT_DIR)
-LINKER_COMMAND_FILE=./AM335x_PRU.cmd
-LIBS=--library=../../lib/rpmsg_lib.lib
-INCLUDE=--include_path=../../include
-STACK_SIZE=0x100
-HEAP_SIZE=0x100
-GEN_DIR=gen
-
-#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
-CFLAGS=-v3 -O2 --display_error_number --endian=little --hardware_mac=on --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
-#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
-LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
-
-TARGET=$(GEN_DIR)/$(PROJ_NAME).out
-MAP=$(GEN_DIR)/$(PROJ_NAME).map
-SOURCES=$(wildcard *.c)
-#Using .object instead of .obj in order to not conflict with the CCS build process
-OBJECTS=$(patsubst %,$(GEN_DIR)/%,$(SOURCES:.c=.object))
-
-all: printStart $(TARGET) printEnd
-
-printStart:
- @echo ''
- @echo '************************************************************'
- @echo 'Building project: $(PROJ_NAME)'
-
-printEnd:
- @echo ''
- @echo 'Finished building project: $(PROJ_NAME)'
- @echo '************************************************************'
- @echo ''
-
-# Invokes the linker (-z flag) to make the .out file
-$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
- @echo ''
- @echo 'Building target: $@'
- @echo 'Invoking: PRU Linker'
- $(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)
- @echo 'Finished building target: $@'
- @echo ''
- @echo 'Output files can be found in the "$(GEN_DIR)" directory'
-
-# Invokes the compiler on all c files in the directory to create the object files
-$(GEN_DIR)/%.object: %.c
- @mkdir -p $(GEN_DIR)
- @echo ''
- @echo 'Building file: $<'
- @echo 'Invoking: PRU Compiler'
- $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
-
-.PHONY: all clean
-
-# Remove the $(GEN_DIR) directory
-clean:
- @echo ''
- @echo '************************************************************'
- @echo 'Cleaning project: $(PROJ_NAME)'
- @echo ''
- @echo 'Removing files in the "$(GEN_DIR)" directory'
- @rm -rf $(GEN_DIR)
- @echo ''
- @echo 'Finished cleaning project: $(PROJ_NAME)'
- @echo '************************************************************'
- @echo ''
-
-# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
--include $(OBJECTS:%.object=%.pp)
-
diff --git a/examples/PRU_MAC_Multiply_Accum/.settings/org.eclipse.core.resources.prefs b/examples/PRU_MAC_Multiply_Accum/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,13 +0,0 @@
-eclipse.preferences.version=1
-encoding//Debug/gen/subdir_rules.mk=UTF-8
-encoding//Debug/gen/subdir_vars.mk=UTF-8
-encoding//Debug/makefile=UTF-8
-encoding//Debug/objects.mk=UTF-8
-encoding//Debug/sources.mk=UTF-8
-encoding//Debug/subdir_rules.mk=UTF-8
-encoding//Debug/subdir_vars.mk=UTF-8
-encoding//Release/makefile=UTF-8
-encoding//Release/objects.mk=UTF-8
-encoding//Release/sources.mk=UTF-8
-encoding//Release/subdir_rules.mk=UTF-8
-encoding//Release/subdir_vars.mk=UTF-8
diff --git a/examples/PRU_MAC_Multiply_Accum/Makefile b/examples/PRU_MAC_Multiply_Accum/Makefile
+++ /dev/null
@@ -1,86 +0,0 @@
-# PRU_CGT environment variable must point to the TI PRU compiler directory. E.g.:
-#(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
-#(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
-ifndef PRU_CGT
-define ERROR_BODY
-
-************************************************************
-PRU_CGT environment variable is not set. Examples given:
-(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
-(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
-************************************************************
-
-endef
-$(error $(ERROR_BODY))
-endif
-
-MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
-CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
-PROJ_NAME=$(CURRENT_DIR)
-LINKER_COMMAND_FILE=./AM335x_PRU.cmd
-LIBS=--library=../../lib/rpmsg_lib.lib
-INCLUDE=--include_path=../../include
-STACK_SIZE=0x100
-HEAP_SIZE=0x100
-GEN_DIR=gen
-
-#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
-CFLAGS=-v3 -O2 --display_error_number --endian=little --hardware_mac=on --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
-#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
-LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
-
-TARGET=$(GEN_DIR)/$(PROJ_NAME).out
-MAP=$(GEN_DIR)/$(PROJ_NAME).map
-SOURCES=$(wildcard *.c)
-#Using .object instead of .obj in order to not conflict with the CCS build process
-OBJECTS=$(patsubst %,$(GEN_DIR)/%,$(SOURCES:.c=.object))
-
-all: printStart $(TARGET) printEnd
-
-printStart:
- @echo ''
- @echo '************************************************************'
- @echo 'Building project: $(PROJ_NAME)'
-
-printEnd:
- @echo ''
- @echo 'Finished building project: $(PROJ_NAME)'
- @echo '************************************************************'
- @echo ''
-
-# Invokes the linker (-z flag) to make the .out file
-$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
- @echo ''
- @echo 'Building target: $@'
- @echo 'Invoking: PRU Linker'
- $(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)
- @echo 'Finished building target: $@'
- @echo ''
- @echo 'Output files can be found in the "$(GEN_DIR)" directory'
-
-# Invokes the compiler on all c files in the directory to create the object files
-$(GEN_DIR)/%.object: %.c
- @mkdir -p $(GEN_DIR)
- @echo ''
- @echo 'Building file: $<'
- @echo 'Invoking: PRU Compiler'
- $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
-
-.PHONY: all clean
-
-# Remove the $(GEN_DIR) directory
-clean:
- @echo ''
- @echo '************************************************************'
- @echo 'Cleaning project: $(PROJ_NAME)'
- @echo ''
- @echo 'Removing files in the "$(GEN_DIR)" directory'
- @rm -rf $(GEN_DIR)
- @echo ''
- @echo 'Finished cleaning project: $(PROJ_NAME)'
- @echo '************************************************************'
- @echo ''
-
-# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
--include $(OBJECTS:%.object=%.pp)
-
diff --git a/examples/PRU_PRUtoARM_Interrupt/.settings/org.eclipse.core.resources.prefs b/examples/PRU_PRUtoARM_Interrupt/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,13 +0,0 @@
-eclipse.preferences.version=1
-encoding//Debug/gen/subdir_rules.mk=UTF-8
-encoding//Debug/gen/subdir_vars.mk=UTF-8
-encoding//Debug/makefile=UTF-8
-encoding//Debug/objects.mk=UTF-8
-encoding//Debug/sources.mk=UTF-8
-encoding//Debug/subdir_rules.mk=UTF-8
-encoding//Debug/subdir_vars.mk=UTF-8
-encoding//Release/makefile=UTF-8
-encoding//Release/objects.mk=UTF-8
-encoding//Release/sources.mk=UTF-8
-encoding//Release/subdir_rules.mk=UTF-8
-encoding//Release/subdir_vars.mk=UTF-8
diff --git a/examples/PRU_PRUtoARM_Interrupt/Makefile b/examples/PRU_PRUtoARM_Interrupt/Makefile
+++ /dev/null
@@ -1,86 +0,0 @@
-# PRU_CGT environment variable must point to the TI PRU compiler directory. E.g.:
-#(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
-#(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
-ifndef PRU_CGT
-define ERROR_BODY
-
-************************************************************
-PRU_CGT environment variable is not set. Examples given:
-(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
-(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
-************************************************************
-
-endef
-$(error $(ERROR_BODY))
-endif
-
-MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
-CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
-PROJ_NAME=$(CURRENT_DIR)
-LINKER_COMMAND_FILE=./AM335x_PRU.cmd
-LIBS=--library=../../lib/rpmsg_lib.lib
-INCLUDE=--include_path=../../include
-STACK_SIZE=0x100
-HEAP_SIZE=0x100
-GEN_DIR=gen
-
-#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
-CFLAGS=-v3 -O2 --display_error_number --endian=little --hardware_mac=on --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
-#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
-LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
-
-TARGET=$(GEN_DIR)/$(PROJ_NAME).out
-MAP=$(GEN_DIR)/$(PROJ_NAME).map
-SOURCES=$(wildcard *.c)
-#Using .object instead of .obj in order to not conflict with the CCS build process
-OBJECTS=$(patsubst %,$(GEN_DIR)/%,$(SOURCES:.c=.object))
-
-all: printStart $(TARGET) printEnd
-
-printStart:
- @echo ''
- @echo '************************************************************'
- @echo 'Building project: $(PROJ_NAME)'
-
-printEnd:
- @echo ''
- @echo 'Finished building project: $(PROJ_NAME)'
- @echo '************************************************************'
- @echo ''
-
-# Invokes the linker (-z flag) to make the .out file
-$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
- @echo ''
- @echo 'Building target: $@'
- @echo 'Invoking: PRU Linker'
- $(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)
- @echo 'Finished building target: $@'
- @echo ''
- @echo 'Output files can be found in the "$(GEN_DIR)" directory'
-
-# Invokes the compiler on all c files in the directory to create the object files
-$(GEN_DIR)/%.object: %.c
- @mkdir -p $(GEN_DIR)
- @echo ''
- @echo 'Building file: $<'
- @echo 'Invoking: PRU Compiler'
- $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
-
-.PHONY: all clean
-
-# Remove the $(GEN_DIR) directory
-clean:
- @echo ''
- @echo '************************************************************'
- @echo 'Cleaning project: $(PROJ_NAME)'
- @echo ''
- @echo 'Removing files in the "$(GEN_DIR)" directory'
- @rm -rf $(GEN_DIR)
- @echo ''
- @echo 'Finished cleaning project: $(PROJ_NAME)'
- @echo '************************************************************'
- @echo ''
-
-# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
--include $(OBJECTS:%.object=%.pp)
-
diff --git a/examples/PRU_RPMsg_Echo_Interrupt0/Makefile b/examples/PRU_RPMsg_Echo_Interrupt0/Makefile
+++ /dev/null
@@ -1,86 +0,0 @@
-# PRU_CGT environment variable must point to the TI PRU compiler directory. E.g.:
-#(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
-#(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
-ifndef PRU_CGT
-define ERROR_BODY
-
-************************************************************
-PRU_CGT environment variable is not set. Examples given:
-(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
-(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
-************************************************************
-
-endef
-$(error $(ERROR_BODY))
-endif
-
-MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
-CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
-PROJ_NAME=$(CURRENT_DIR)
-LINKER_COMMAND_FILE=./AM335x_PRU.cmd
-LIBS=--library=../../lib/rpmsg_lib.lib
-INCLUDE=--include_path=../../include
-STACK_SIZE=0x100
-HEAP_SIZE=0x100
-GEN_DIR=gen
-
-#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
-CFLAGS=-v3 -O2 --display_error_number --endian=little --hardware_mac=on --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
-#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
-LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
-
-TARGET=$(GEN_DIR)/$(PROJ_NAME).out
-MAP=$(GEN_DIR)/$(PROJ_NAME).map
-SOURCES=$(wildcard *.c)
-#Using .object instead of .obj in order to not conflict with the CCS build process
-OBJECTS=$(patsubst %,$(GEN_DIR)/%,$(SOURCES:.c=.object))
-
-all: printStart $(TARGET) printEnd
-
-printStart:
- @echo ''
- @echo '************************************************************'
- @echo 'Building project: $(PROJ_NAME)'
-
-printEnd:
- @echo ''
- @echo 'Finished building project: $(PROJ_NAME)'
- @echo '************************************************************'
- @echo ''
-
-# Invokes the linker (-z flag) to make the .out file
-$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
- @echo ''
- @echo 'Building target: $@'
- @echo 'Invoking: PRU Linker'
- $(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)
- @echo 'Finished building target: $@'
- @echo ''
- @echo 'Output files can be found in the "$(GEN_DIR)" directory'
-
-# Invokes the compiler on all c files in the directory to create the object files
-$(GEN_DIR)/%.object: %.c
- @mkdir -p $(GEN_DIR)
- @echo ''
- @echo 'Building file: $<'
- @echo 'Invoking: PRU Compiler'
- $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
-
-.PHONY: all clean
-
-# Remove the $(GEN_DIR) directory
-clean:
- @echo ''
- @echo '************************************************************'
- @echo 'Cleaning project: $(PROJ_NAME)'
- @echo ''
- @echo 'Removing files in the "$(GEN_DIR)" directory'
- @rm -rf $(GEN_DIR)
- @echo ''
- @echo 'Finished cleaning project: $(PROJ_NAME)'
- @echo '************************************************************'
- @echo ''
-
-# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
--include $(OBJECTS:%.object=%.pp)
-
diff --git a/examples/PRU_RPMsg_Echo_Interrupt1/Makefile b/examples/PRU_RPMsg_Echo_Interrupt1/Makefile
+++ /dev/null
@@ -1,86 +0,0 @@
-# PRU_CGT environment variable must point to the TI PRU compiler directory. E.g.:
-#(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
-#(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
-ifndef PRU_CGT
-define ERROR_BODY
-
-************************************************************
-PRU_CGT environment variable is not set. Examples given:
-(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
-(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
-************************************************************
-
-endef
-$(error $(ERROR_BODY))
-endif
-
-MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
-CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
-PROJ_NAME=$(CURRENT_DIR)
-LINKER_COMMAND_FILE=./AM335x_PRU.cmd
-LIBS=--library=../../lib/rpmsg_lib.lib
-INCLUDE=--include_path=../../include
-STACK_SIZE=0x100
-HEAP_SIZE=0x100
-GEN_DIR=gen
-
-#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
-CFLAGS=-v3 -O2 --display_error_number --endian=little --hardware_mac=on --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
-#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
-LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
-
-TARGET=$(GEN_DIR)/$(PROJ_NAME).out
-MAP=$(GEN_DIR)/$(PROJ_NAME).map
-SOURCES=$(wildcard *.c)
-#Using .object instead of .obj in order to not conflict with the CCS build process
-OBJECTS=$(patsubst %,$(GEN_DIR)/%,$(SOURCES:.c=.object))
-
-all: printStart $(TARGET) printEnd
-
-printStart:
- @echo ''
- @echo '************************************************************'
- @echo 'Building project: $(PROJ_NAME)'
-
-printEnd:
- @echo ''
- @echo 'Finished building project: $(PROJ_NAME)'
- @echo '************************************************************'
- @echo ''
-
-# Invokes the linker (-z flag) to make the .out file
-$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
- @echo ''
- @echo 'Building target: $@'
- @echo 'Invoking: PRU Linker'
- $(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)
- @echo 'Finished building target: $@'
- @echo ''
- @echo 'Output files can be found in the "$(GEN_DIR)" directory'
-
-# Invokes the compiler on all c files in the directory to create the object files
-$(GEN_DIR)/%.object: %.c
- @mkdir -p $(GEN_DIR)
- @echo ''
- @echo 'Building file: $<'
- @echo 'Invoking: PRU Compiler'
- $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
-
-.PHONY: all clean
-
-# Remove the $(GEN_DIR) directory
-clean:
- @echo ''
- @echo '************************************************************'
- @echo 'Cleaning project: $(PROJ_NAME)'
- @echo ''
- @echo 'Removing files in the "$(GEN_DIR)" directory'
- @rm -rf $(GEN_DIR)
- @echo ''
- @echo 'Finished cleaning project: $(PROJ_NAME)'
- @echo '************************************************************'
- @echo ''
-
-# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
--include $(OBJECTS:%.object=%.pp)
-
diff --git a/examples/PRU_RPMsg_Echo_Polling0/Makefile b/examples/PRU_RPMsg_Echo_Polling0/Makefile
+++ /dev/null
@@ -1,86 +0,0 @@
-# PRU_CGT environment variable must point to the TI PRU compiler directory. E.g.:
-#(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
-#(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
-ifndef PRU_CGT
-define ERROR_BODY
-
-************************************************************
-PRU_CGT environment variable is not set. Examples given:
-(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
-(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
-************************************************************
-
-endef
-$(error $(ERROR_BODY))
-endif
-
-MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
-CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
-PROJ_NAME=$(CURRENT_DIR)
-LINKER_COMMAND_FILE=./AM335x_PRU.cmd
-LIBS=--library=../../lib/rpmsg_lib.lib
-INCLUDE=--include_path=../../include
-STACK_SIZE=0x100
-HEAP_SIZE=0x100
-GEN_DIR=gen
-
-#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
-CFLAGS=-v3 -O2 --display_error_number --endian=little --hardware_mac=on --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
-#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
-LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
-
-TARGET=$(GEN_DIR)/$(PROJ_NAME).out
-MAP=$(GEN_DIR)/$(PROJ_NAME).map
-SOURCES=$(wildcard *.c)
-#Using .object instead of .obj in order to not conflict with the CCS build process
-OBJECTS=$(patsubst %,$(GEN_DIR)/%,$(SOURCES:.c=.object))
-
-all: printStart $(TARGET) printEnd
-
-printStart:
- @echo ''
- @echo '************************************************************'
- @echo 'Building project: $(PROJ_NAME)'
-
-printEnd:
- @echo ''
- @echo 'Finished building project: $(PROJ_NAME)'
- @echo '************************************************************'
- @echo ''
-
-# Invokes the linker (-z flag) to make the .out file
-$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
- @echo ''
- @echo 'Building target: $@'
- @echo 'Invoking: PRU Linker'
- $(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)
- @echo 'Finished building target: $@'
- @echo ''
- @echo 'Output files can be found in the "$(GEN_DIR)" directory'
-
-# Invokes the compiler on all c files in the directory to create the object files
-$(GEN_DIR)/%.object: %.c
- @mkdir -p $(GEN_DIR)
- @echo ''
- @echo 'Building file: $<'
- @echo 'Invoking: PRU Compiler'
- $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
-
-.PHONY: all clean
-
-# Remove the $(GEN_DIR) directory
-clean:
- @echo ''
- @echo '************************************************************'
- @echo 'Cleaning project: $(PROJ_NAME)'
- @echo ''
- @echo 'Removing files in the "$(GEN_DIR)" directory'
- @rm -rf $(GEN_DIR)
- @echo ''
- @echo 'Finished cleaning project: $(PROJ_NAME)'
- @echo '************************************************************'
- @echo ''
-
-# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
--include $(OBJECTS:%.object=%.pp)
-
diff --git a/examples/PRU_RPMsg_Echo_Polling1/Makefile b/examples/PRU_RPMsg_Echo_Polling1/Makefile
+++ /dev/null
@@ -1,86 +0,0 @@
-# PRU_CGT environment variable must point to the TI PRU compiler directory. E.g.:
-#(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
-#(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
-ifndef PRU_CGT
-define ERROR_BODY
-
-************************************************************
-PRU_CGT environment variable is not set. Examples given:
-(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
-(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
-************************************************************
-
-endef
-$(error $(ERROR_BODY))
-endif
-
-MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
-CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
-PROJ_NAME=$(CURRENT_DIR)
-LINKER_COMMAND_FILE=./AM335x_PRU.cmd
-LIBS=--library=../../lib/rpmsg_lib.lib
-INCLUDE=--include_path=../../include
-STACK_SIZE=0x100
-HEAP_SIZE=0x100
-GEN_DIR=gen
-
-#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
-CFLAGS=-v3 -O2 --display_error_number --endian=little --hardware_mac=on --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
-#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
-LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
-
-TARGET=$(GEN_DIR)/$(PROJ_NAME).out
-MAP=$(GEN_DIR)/$(PROJ_NAME).map
-SOURCES=$(wildcard *.c)
-#Using .object instead of .obj in order to not conflict with the CCS build process
-OBJECTS=$(patsubst %,$(GEN_DIR)/%,$(SOURCES:.c=.object))
-
-all: printStart $(TARGET) printEnd
-
-printStart:
- @echo ''
- @echo '************************************************************'
- @echo 'Building project: $(PROJ_NAME)'
-
-printEnd:
- @echo ''
- @echo 'Finished building project: $(PROJ_NAME)'
- @echo '************************************************************'
- @echo ''
-
-# Invokes the linker (-z flag) to make the .out file
-$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
- @echo ''
- @echo 'Building target: $@'
- @echo 'Invoking: PRU Linker'
- $(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)
- @echo 'Finished building target: $@'
- @echo ''
- @echo 'Output files can be found in the "$(GEN_DIR)" directory'
-
-# Invokes the compiler on all c files in the directory to create the object files
-$(GEN_DIR)/%.object: %.c
- @mkdir -p $(GEN_DIR)
- @echo ''
- @echo 'Building file: $<'
- @echo 'Invoking: PRU Compiler'
- $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
-
-.PHONY: all clean
-
-# Remove the $(GEN_DIR) directory
-clean:
- @echo ''
- @echo '************************************************************'
- @echo 'Cleaning project: $(PROJ_NAME)'
- @echo ''
- @echo 'Removing files in the "$(GEN_DIR)" directory'
- @rm -rf $(GEN_DIR)
- @echo ''
- @echo 'Finished cleaning project: $(PROJ_NAME)'
- @echo '************************************************************'
- @echo ''
-
-# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
--include $(OBJECTS:%.object=%.pp)
-
diff --git a/examples/PRU_access_const_table/.settings/org.eclipse.core.resources.prefs b/examples/PRU_access_const_table/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,15 +0,0 @@
-eclipse.preferences.version=1
-encoding//Debug/gen/subdir_rules.mk=UTF-8
-encoding//Debug/gen/subdir_vars.mk=UTF-8
-encoding//Debug/makefile=UTF-8
-encoding//Debug/objects.mk=UTF-8
-encoding//Debug/sources.mk=UTF-8
-encoding//Debug/subdir_rules.mk=UTF-8
-encoding//Debug/subdir_vars.mk=UTF-8
-encoding//Release/gen/subdir_rules.mk=UTF-8
-encoding//Release/gen/subdir_vars.mk=UTF-8
-encoding//Release/makefile=UTF-8
-encoding//Release/objects.mk=UTF-8
-encoding//Release/sources.mk=UTF-8
-encoding//Release/subdir_rules.mk=UTF-8
-encoding//Release/subdir_vars.mk=UTF-8
diff --git a/examples/PRU_access_const_table/Makefile b/examples/PRU_access_const_table/Makefile
+++ /dev/null
@@ -1,86 +0,0 @@
-# PRU_CGT environment variable must point to the TI PRU compiler directory. E.g.:
-#(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
-#(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
-ifndef PRU_CGT
-define ERROR_BODY
-
-************************************************************
-PRU_CGT environment variable is not set. Examples given:
-(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
-(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
-************************************************************
-
-endef
-$(error $(ERROR_BODY))
-endif
-
-MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
-CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
-PROJ_NAME=$(CURRENT_DIR)
-LINKER_COMMAND_FILE=./AM335x_PRU.cmd
-LIBS=--library=../../lib/rpmsg_lib.lib
-INCLUDE=--include_path=../../include
-STACK_SIZE=0x100
-HEAP_SIZE=0x100
-GEN_DIR=gen
-
-#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
-CFLAGS=-v3 -O2 --display_error_number --endian=little --hardware_mac=on --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
-#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
-LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
-
-TARGET=$(GEN_DIR)/$(PROJ_NAME).out
-MAP=$(GEN_DIR)/$(PROJ_NAME).map
-SOURCES=$(wildcard *.c)
-#Using .object instead of .obj in order to not conflict with the CCS build process
-OBJECTS=$(patsubst %,$(GEN_DIR)/%,$(SOURCES:.c=.object))
-
-all: printStart $(TARGET) printEnd
-
-printStart:
- @echo ''
- @echo '************************************************************'
- @echo 'Building project: $(PROJ_NAME)'
-
-printEnd:
- @echo ''
- @echo 'Finished building project: $(PROJ_NAME)'
- @echo '************************************************************'
- @echo ''
-
-# Invokes the linker (-z flag) to make the .out file
-$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
- @echo ''
- @echo 'Building target: $@'
- @echo 'Invoking: PRU Linker'
- $(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)
- @echo 'Finished building target: $@'
- @echo ''
- @echo 'Output files can be found in the "$(GEN_DIR)" directory'
-
-# Invokes the compiler on all c files in the directory to create the object files
-$(GEN_DIR)/%.object: %.c
- @mkdir -p $(GEN_DIR)
- @echo ''
- @echo 'Building file: $<'
- @echo 'Invoking: PRU Compiler'
- $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
-
-.PHONY: all clean
-
-# Remove the $(GEN_DIR) directory
-clean:
- @echo ''
- @echo '************************************************************'
- @echo 'Cleaning project: $(PROJ_NAME)'
- @echo ''
- @echo 'Removing files in the "$(GEN_DIR)" directory'
- @rm -rf $(GEN_DIR)
- @echo ''
- @echo 'Finished cleaning project: $(PROJ_NAME)'
- @echo '************************************************************'
- @echo ''
-
-# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
--include $(OBJECTS:%.object=%.pp)
-
diff --git a/examples/PRU_edmaConfig/.settings/org.eclipse.core.resources.prefs b/examples/PRU_edmaConfig/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,13 +0,0 @@
-eclipse.preferences.version=1
-encoding//Debug/gen/subdir_rules.mk=UTF-8
-encoding//Debug/gen/subdir_vars.mk=UTF-8
-encoding//Debug/makefile=UTF-8
-encoding//Debug/objects.mk=UTF-8
-encoding//Debug/sources.mk=UTF-8
-encoding//Debug/subdir_rules.mk=UTF-8
-encoding//Debug/subdir_vars.mk=UTF-8
-encoding//Release/makefile=UTF-8
-encoding//Release/objects.mk=UTF-8
-encoding//Release/sources.mk=UTF-8
-encoding//Release/subdir_rules.mk=UTF-8
-encoding//Release/subdir_vars.mk=UTF-8
diff --git a/examples/PRU_edmaConfig/Makefile b/examples/PRU_edmaConfig/Makefile
+++ /dev/null
@@ -1,86 +0,0 @@
-# PRU_CGT environment variable must point to the TI PRU compiler directory. E.g.:
-#(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
-#(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
-ifndef PRU_CGT
-define ERROR_BODY
-
-************************************************************
-PRU_CGT environment variable is not set. Examples given:
-(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
-(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
-************************************************************
-
-endef
-$(error $(ERROR_BODY))
-endif
-
-MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
-CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
-PROJ_NAME=$(CURRENT_DIR)
-LINKER_COMMAND_FILE=./AM335x_PRU.cmd
-LIBS=--library=../../lib/rpmsg_lib.lib
-INCLUDE=--include_path=../../include
-STACK_SIZE=0x100
-HEAP_SIZE=0x100
-GEN_DIR=gen
-
-#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
-CFLAGS=-v3 -O2 --display_error_number --endian=little --hardware_mac=on --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
-#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
-LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
-
-TARGET=$(GEN_DIR)/$(PROJ_NAME).out
-MAP=$(GEN_DIR)/$(PROJ_NAME).map
-SOURCES=$(wildcard *.c)
-#Using .object instead of .obj in order to not conflict with the CCS build process
-OBJECTS=$(patsubst %,$(GEN_DIR)/%,$(SOURCES:.c=.object))
-
-all: printStart $(TARGET) printEnd
-
-printStart:
- @echo ''
- @echo '************************************************************'
- @echo 'Building project: $(PROJ_NAME)'
-
-printEnd:
- @echo ''
- @echo 'Finished building project: $(PROJ_NAME)'
- @echo '************************************************************'
- @echo ''
-
-# Invokes the linker (-z flag) to make the .out file
-$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
- @echo ''
- @echo 'Building target: $@'
- @echo 'Invoking: PRU Linker'
- $(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)
- @echo 'Finished building target: $@'
- @echo ''
- @echo 'Output files can be found in the "$(GEN_DIR)" directory'
-
-# Invokes the compiler on all c files in the directory to create the object files
-$(GEN_DIR)/%.object: %.c
- @mkdir -p $(GEN_DIR)
- @echo ''
- @echo 'Building file: $<'
- @echo 'Invoking: PRU Compiler'
- $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
-
-.PHONY: all clean
-
-# Remove the $(GEN_DIR) directory
-clean:
- @echo ''
- @echo '************************************************************'
- @echo 'Cleaning project: $(PROJ_NAME)'
- @echo ''
- @echo 'Removing files in the "$(GEN_DIR)" directory'
- @rm -rf $(GEN_DIR)
- @echo ''
- @echo 'Finished cleaning project: $(PROJ_NAME)'
- @echo '************************************************************'
- @echo ''
-
-# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
--include $(OBJECTS:%.object=%.pp)
-
diff --git a/examples/PRU_gpioToggle/.settings/org.eclipse.core.resources.prefs b/examples/PRU_gpioToggle/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,13 +0,0 @@
-eclipse.preferences.version=1
-encoding//Debug/gen/subdir_rules.mk=UTF-8
-encoding//Debug/gen/subdir_vars.mk=UTF-8
-encoding//Debug/makefile=UTF-8
-encoding//Debug/objects.mk=UTF-8
-encoding//Debug/sources.mk=UTF-8
-encoding//Debug/subdir_rules.mk=UTF-8
-encoding//Debug/subdir_vars.mk=UTF-8
-encoding//Release/makefile=UTF-8
-encoding//Release/objects.mk=UTF-8
-encoding//Release/sources.mk=UTF-8
-encoding//Release/subdir_rules.mk=UTF-8
-encoding//Release/subdir_vars.mk=UTF-8
diff --git a/examples/PRU_gpioToggle/Makefile b/examples/PRU_gpioToggle/Makefile
+++ /dev/null
@@ -1,86 +0,0 @@
-# PRU_CGT environment variable must point to the TI PRU compiler directory. E.g.:
-#(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
-#(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
-ifndef PRU_CGT
-define ERROR_BODY
-
-************************************************************
-PRU_CGT environment variable is not set. Examples given:
-(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
-(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
-************************************************************
-
-endef
-$(error $(ERROR_BODY))
-endif
-
-MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
-CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
-PROJ_NAME=$(CURRENT_DIR)
-LINKER_COMMAND_FILE=./AM335x_PRU.cmd
-LIBS=--library=../../lib/rpmsg_lib.lib
-INCLUDE=--include_path=../../include
-STACK_SIZE=0x100
-HEAP_SIZE=0x100
-GEN_DIR=gen
-
-#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
-CFLAGS=-v3 -O2 --display_error_number --endian=little --hardware_mac=on --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
-#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
-LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
-
-TARGET=$(GEN_DIR)/$(PROJ_NAME).out
-MAP=$(GEN_DIR)/$(PROJ_NAME).map
-SOURCES=$(wildcard *.c)
-#Using .object instead of .obj in order to not conflict with the CCS build process
-OBJECTS=$(patsubst %,$(GEN_DIR)/%,$(SOURCES:.c=.object))
-
-all: printStart $(TARGET) printEnd
-
-printStart:
- @echo ''
- @echo '************************************************************'
- @echo 'Building project: $(PROJ_NAME)'
-
-printEnd:
- @echo ''
- @echo 'Finished building project: $(PROJ_NAME)'
- @echo '************************************************************'
- @echo ''
-
-# Invokes the linker (-z flag) to make the .out file
-$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
- @echo ''
- @echo 'Building target: $@'
- @echo 'Invoking: PRU Linker'
- $(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)
- @echo 'Finished building target: $@'
- @echo ''
- @echo 'Output files can be found in the "$(GEN_DIR)" directory'
-
-# Invokes the compiler on all c files in the directory to create the object files
-$(GEN_DIR)/%.object: %.c
- @mkdir -p $(GEN_DIR)
- @echo ''
- @echo 'Building file: $<'
- @echo 'Invoking: PRU Compiler'
- $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
-
-.PHONY: all clean
-
-# Remove the $(GEN_DIR) directory
-clean:
- @echo ''
- @echo '************************************************************'
- @echo 'Cleaning project: $(PROJ_NAME)'
- @echo ''
- @echo 'Removing files in the "$(GEN_DIR)" directory'
- @rm -rf $(GEN_DIR)
- @echo ''
- @echo 'Finished cleaning project: $(PROJ_NAME)'
- @echo '************************************************************'
- @echo ''
-
-# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
--include $(OBJECTS:%.object=%.pp)
-
diff --git a/examples/am335x/Makefile b/examples/am335x/Makefile
--- /dev/null
+++ b/examples/am335x/Makefile
@@ -0,0 +1,16 @@
+SUBDIRS=PRU_access_const_table PRU_ARMtoPRU_Interrupt PRU_Direct_Connect0 PRU_Direct_Connect1 PRU_edmaConfig PRU_gpioToggle PRU_Hardware_UART \
+PRU_IEP PRU_MAC_Multiply_Accum PRU_PRUtoARM_Interrupt PRU_RPMsg_Echo_Interrupt0 PRU_RPMsg_Echo_Interrupt1 PRU_RPMsg_Echo_Polling0 \
+PRU_RPMsg_Echo_Polling1
+
+all: $(SUBDIRS)
+
+$(SUBDIRS):
+ @$(MAKE) -C $@
+
+clean:
+ @for d in $(SUBDIRS); do (cd $$d; $(MAKE) clean ); done
+
+.PHONY: all clean $(SUBDIRS)
+
+
+
diff --git a/examples/PRU_ARMtoPRU_Interrupt/.ccsproject b/examples/am335x/PRU_ARMtoPRU_Interrupt/.ccsproject
similarity index 100%
rename from examples/PRU_ARMtoPRU_Interrupt/.ccsproject
rename to examples/am335x/PRU_ARMtoPRU_Interrupt/.ccsproject
rename from examples/PRU_ARMtoPRU_Interrupt/.ccsproject
rename to examples/am335x/PRU_ARMtoPRU_Interrupt/.ccsproject
diff --git a/examples/PRU_ARMtoPRU_Interrupt/.cproject b/examples/am335x/PRU_ARMtoPRU_Interrupt/.cproject
similarity index 81%
rename from examples/PRU_ARMtoPRU_Interrupt/.cproject
rename to examples/am335x/PRU_ARMtoPRU_Interrupt/.cproject
index 1ed9f8b2efb4b33deccd7a150ebc2b9bf3765fb1..9e53ee2621e1672efe15ff00653efe3ca05006b7 100755 (executable)
rename from examples/PRU_ARMtoPRU_Interrupt/.cproject
rename to examples/am335x/PRU_ARMtoPRU_Interrupt/.cproject
index 1ed9f8b2efb4b33deccd7a150ebc2b9bf3765fb1..9e53ee2621e1672efe15ff00653efe3ca05006b7 100755 (executable)
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.1690476770" 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"/>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.1537159561" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
<listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
- <listOptionValue builtIn="false" value=""../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am335x""/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEBUGGING_MODEL.80637195" 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"/>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.1668915038" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">
<listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/>
<listOptionValue builtIn="false" value="OUTPUT_TYPE=executable"/>
</option>
- <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1479743757" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="2.1.1" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1479743757" name="Compiler version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="2.1.1" valueType="string"/>
<targetPlatform id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformRelease.875364820" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformRelease"/>
- <builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderRelease.1928834436" name="GNU Make.Release" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderRelease"/>
+ <builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderRelease.1928834436" keepEnvironmentInBuildfile="false" name="GNU Make" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderRelease"/>
<tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerRelease.1201454687" name="PRU Compiler" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerRelease">
- <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE.1537058429" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE" valueType="definedSymbols">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE.1537058429" name="Pre-define NAME (--define, -D)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE" valueType="definedSymbols">
<listOptionValue builtIn="false" value="am3359"/>
<listOptionValue builtIn="false" value="pru0"/>
</option>
- <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.SILICON_VERSION.1177742041" 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"/>
- <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.1994094587" 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"/>
- <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.150166514" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.SILICON_VERSION.1177742041" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.1994094587" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.150166514" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
<listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
- <listOptionValue builtIn="false" value="../../../include"/>
+ <listOptionValue builtIn="false" value="../../../../include"/>
+ <listOptionValue builtIn="false" value=""../../../../include/am335x""/>
</option>
- <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.2134786666" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.2134786666" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">
<listOptionValue builtIn="false" value="225"/>
</option>
- <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER.1673667419" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
- <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WRAP.1414331176" 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"/>
- <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.236984554" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN" value="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.little" valueType="enumerated"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER.1673667419" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WRAP.1414331176" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.236984554" 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"/>
<inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS.130546161" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS"/>
<inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS.1064329877" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS"/>
<inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS.829971995" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS"/>
<inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS.707657859" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS"/>
</tool>
<tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease.1743896766" name="PRU Linker" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease">
- <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE.656706476" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE" valueType="definedSymbols">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE.656706476" name="Pre-define preprocessor macro _name_ to _value_ (--define)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE" valueType="definedSymbols">
<listOptionValue builtIn="false" value="PRU_CORE=1"/>
</option>
- <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE.1628122308" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE" value="0x100" valueType="string"/>
- <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE.1564003578" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE" value="0x100" valueType="string"/>
- <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE.723786236" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE" value=""${ProjName}.out"" valueType="string"/>
- <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE.625666443" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE" value=""${ProjName}.map"" valueType="string"/>
- <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY.1882618722" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY" valueType="libs">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE.1628122308" name="Set C system stack size (--stack_size, -stack)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE" value="0x100" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE.1564003578" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE.723786236" name="Specify output file name (--output_file, -o)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE" value=""${ProjName}.out"" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE.625666443" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY.1882618722" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY" valueType="libs">
<listOptionValue builtIn="false" value=""libc.a""/>
</option>
- <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH.89486428" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH" valueType="libPaths">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH.89486428" name="Add <dir> to library search path (--search_path, -i)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH" valueType="libPaths">
<listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/lib""/>
<listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
</option>
- <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO.1215745698" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO" value=""${ProjName}_linkInfo.xml"" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO.1215745698" 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"/>
<inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS.2089176103" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS"/>
<inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS.2141734312" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS"/>
<inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS.675064744" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS"/>
</tool>
<tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.2108551798" name="PRU Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex">
- <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.OUTPUT_FILE.1736396407" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.OUTPUT_FILE" value=""${BuildArtifactFileBaseName}.hex"" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.OUTPUT_FILE.1736396407" name="Specify output file names (--outfile, -o)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.OUTPUT_FILE" value=""${BuildArtifactFileBaseName}.hex"" valueType="string"/>
</tool>
</toolChain>
</folderInfo>
diff --git a/examples/PRU_ARMtoPRU_Interrupt/.project b/examples/am335x/PRU_ARMtoPRU_Interrupt/.project
similarity index 100%
rename from examples/PRU_ARMtoPRU_Interrupt/.project
rename to examples/am335x/PRU_ARMtoPRU_Interrupt/.project
rename from examples/PRU_ARMtoPRU_Interrupt/.project
rename to examples/am335x/PRU_ARMtoPRU_Interrupt/.project
diff --git a/examples/PRU_ARMtoPRU_Interrupt/.settings/org.eclipse.cdt.codan.core.prefs b/examples/am335x/PRU_ARMtoPRU_Interrupt/.settings/org.eclipse.cdt.codan.core.prefs
similarity index 100%
rename from examples/PRU_ARMtoPRU_Interrupt/.settings/org.eclipse.cdt.codan.core.prefs
rename to examples/am335x/PRU_ARMtoPRU_Interrupt/.settings/org.eclipse.cdt.codan.core.prefs
rename from examples/PRU_ARMtoPRU_Interrupt/.settings/org.eclipse.cdt.codan.core.prefs
rename to examples/am335x/PRU_ARMtoPRU_Interrupt/.settings/org.eclipse.cdt.codan.core.prefs
diff --git a/examples/PRU_ARMtoPRU_Interrupt/.settings/org.eclipse.cdt.debug.core.prefs b/examples/am335x/PRU_ARMtoPRU_Interrupt/.settings/org.eclipse.cdt.debug.core.prefs
similarity index 100%
rename from examples/PRU_ARMtoPRU_Interrupt/.settings/org.eclipse.cdt.debug.core.prefs
rename to examples/am335x/PRU_ARMtoPRU_Interrupt/.settings/org.eclipse.cdt.debug.core.prefs
rename from examples/PRU_ARMtoPRU_Interrupt/.settings/org.eclipse.cdt.debug.core.prefs
rename to examples/am335x/PRU_ARMtoPRU_Interrupt/.settings/org.eclipse.cdt.debug.core.prefs
diff --git a/examples/PRU_ARMtoPRU_Interrupt/AM335x_PRU.cmd b/examples/am335x/PRU_ARMtoPRU_Interrupt/AM335x_PRU.cmd
similarity index 100%
rename from examples/PRU_ARMtoPRU_Interrupt/AM335x_PRU.cmd
rename to examples/am335x/PRU_ARMtoPRU_Interrupt/AM335x_PRU.cmd
rename from examples/PRU_ARMtoPRU_Interrupt/AM335x_PRU.cmd
rename to examples/am335x/PRU_ARMtoPRU_Interrupt/AM335x_PRU.cmd
diff --git a/examples/PRU_Direct_Connect0/Makefile b/examples/am335x/PRU_ARMtoPRU_Interrupt/Makefile
similarity index 96%
rename from examples/PRU_Direct_Connect0/Makefile
rename to examples/am335x/PRU_ARMtoPRU_Interrupt/Makefile
index 2a6aa2e955a709b2734e1fb995bf993f00f747f5..bd3b84fa09e9535f3046a8091eaa884268cafb21 100644 (file)
rename from examples/PRU_Direct_Connect0/Makefile
rename to examples/am335x/PRU_ARMtoPRU_Interrupt/Makefile
index 2a6aa2e955a709b2734e1fb995bf993f00f747f5..bd3b84fa09e9535f3046a8091eaa884268cafb21 100644 (file)
CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
PROJ_NAME=$(CURRENT_DIR)
LINKER_COMMAND_FILE=./AM335x_PRU.cmd
-LIBS=--library=../../lib/rpmsg_lib.lib
-INCLUDE=--include_path=../../include
+LIBS=--library=../../../lib/rpmsg_lib.lib
+INCLUDE=--include_path=../../../include --include_path=../../../include/am335x
STACK_SIZE=0x100
HEAP_SIZE=0x100
GEN_DIR=gen
diff --git a/examples/PRU_ARMtoPRU_Interrupt/PRU_ARMtoPRU_Interrupt.c b/examples/am335x/PRU_ARMtoPRU_Interrupt/PRU_ARMtoPRU_Interrupt.c
similarity index 100%
rename from examples/PRU_ARMtoPRU_Interrupt/PRU_ARMtoPRU_Interrupt.c
rename to examples/am335x/PRU_ARMtoPRU_Interrupt/PRU_ARMtoPRU_Interrupt.c
rename from examples/PRU_ARMtoPRU_Interrupt/PRU_ARMtoPRU_Interrupt.c
rename to examples/am335x/PRU_ARMtoPRU_Interrupt/PRU_ARMtoPRU_Interrupt.c
diff --git a/examples/PRU_ARMtoPRU_Interrupt/resource_table_empty.h b/examples/am335x/PRU_ARMtoPRU_Interrupt/resource_table_empty.h
similarity index 100%
rename from examples/PRU_ARMtoPRU_Interrupt/resource_table_empty.h
rename to examples/am335x/PRU_ARMtoPRU_Interrupt/resource_table_empty.h
rename from examples/PRU_ARMtoPRU_Interrupt/resource_table_empty.h
rename to examples/am335x/PRU_ARMtoPRU_Interrupt/resource_table_empty.h
diff --git a/examples/PRU_Direct_Connect0/.ccsproject b/examples/am335x/PRU_Direct_Connect0/.ccsproject
similarity index 100%
rename from examples/PRU_Direct_Connect0/.ccsproject
rename to examples/am335x/PRU_Direct_Connect0/.ccsproject
rename from examples/PRU_Direct_Connect0/.ccsproject
rename to examples/am335x/PRU_Direct_Connect0/.ccsproject
similarity index 98%
rename from examples/PRU_Direct_Connect0/.cproject
rename to examples/am335x/PRU_Direct_Connect0/.cproject
index 188ced795d07205106705e6d28925b52f5b6232d..1aad1f2b114c59b1213c357f89940a610f27ca26 100755 (executable)
rename from examples/PRU_Direct_Connect0/.cproject
rename to examples/am335x/PRU_Direct_Connect0/.cproject
index 188ced795d07205106705e6d28925b52f5b6232d..1aad1f2b114c59b1213c357f89940a610f27ca26 100755 (executable)
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.1939447194" 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"/>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.1618408849" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
<listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
- <listOptionValue builtIn="false" value=""../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am335x""/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEBUGGING_MODEL.1320913795" 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"/>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.2034402428" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.71353940" 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"/>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.328076040" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
<listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
- <listOptionValue builtIn="false" value="../../../include"/>
+ <listOptionValue builtIn="false" value="../../../../include"/>
+ <listOptionValue builtIn="false" value=""../../../../include/am335x""/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.1269560954" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">
<listOptionValue builtIn="false" value="225"/>
similarity index 100%
rename from examples/PRU_Direct_Connect0/.project
rename to examples/am335x/PRU_Direct_Connect0/.project
rename from examples/PRU_Direct_Connect0/.project
rename to examples/am335x/PRU_Direct_Connect0/.project
diff --git a/examples/PRU_Direct_Connect0/.settings/org.eclipse.cdt.codan.core.prefs b/examples/am335x/PRU_Direct_Connect0/.settings/org.eclipse.cdt.codan.core.prefs
similarity index 100%
rename from examples/PRU_Direct_Connect0/.settings/org.eclipse.cdt.codan.core.prefs
rename to examples/am335x/PRU_Direct_Connect0/.settings/org.eclipse.cdt.codan.core.prefs
rename from examples/PRU_Direct_Connect0/.settings/org.eclipse.cdt.codan.core.prefs
rename to examples/am335x/PRU_Direct_Connect0/.settings/org.eclipse.cdt.codan.core.prefs
diff --git a/examples/PRU_Direct_Connect0/.settings/org.eclipse.cdt.debug.core.prefs b/examples/am335x/PRU_Direct_Connect0/.settings/org.eclipse.cdt.debug.core.prefs
similarity index 100%
rename from examples/PRU_Direct_Connect0/.settings/org.eclipse.cdt.debug.core.prefs
rename to examples/am335x/PRU_Direct_Connect0/.settings/org.eclipse.cdt.debug.core.prefs
rename from examples/PRU_Direct_Connect0/.settings/org.eclipse.cdt.debug.core.prefs
rename to examples/am335x/PRU_Direct_Connect0/.settings/org.eclipse.cdt.debug.core.prefs
diff --git a/examples/PRU_Direct_Connect0/AM335x_PRU.cmd b/examples/am335x/PRU_Direct_Connect0/AM335x_PRU.cmd
similarity index 100%
rename from examples/PRU_Direct_Connect0/AM335x_PRU.cmd
rename to examples/am335x/PRU_Direct_Connect0/AM335x_PRU.cmd
rename from examples/PRU_Direct_Connect0/AM335x_PRU.cmd
rename to examples/am335x/PRU_Direct_Connect0/AM335x_PRU.cmd
diff --git a/examples/PRU_ARMtoPRU_Interrupt/Makefile b/examples/am335x/PRU_Direct_Connect0/Makefile
similarity index 96%
rename from examples/PRU_ARMtoPRU_Interrupt/Makefile
rename to examples/am335x/PRU_Direct_Connect0/Makefile
index 2a6aa2e955a709b2734e1fb995bf993f00f747f5..bd3b84fa09e9535f3046a8091eaa884268cafb21 100644 (file)
rename from examples/PRU_ARMtoPRU_Interrupt/Makefile
rename to examples/am335x/PRU_Direct_Connect0/Makefile
index 2a6aa2e955a709b2734e1fb995bf993f00f747f5..bd3b84fa09e9535f3046a8091eaa884268cafb21 100644 (file)
CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
PROJ_NAME=$(CURRENT_DIR)
LINKER_COMMAND_FILE=./AM335x_PRU.cmd
-LIBS=--library=../../lib/rpmsg_lib.lib
-INCLUDE=--include_path=../../include
+LIBS=--library=../../../lib/rpmsg_lib.lib
+INCLUDE=--include_path=../../../include --include_path=../../../include/am335x
STACK_SIZE=0x100
HEAP_SIZE=0x100
GEN_DIR=gen
diff --git a/examples/PRU_Direct_Connect0/PRU0_Direct_Connect.c b/examples/am335x/PRU_Direct_Connect0/PRU0_Direct_Connect.c
similarity index 100%
rename from examples/PRU_Direct_Connect0/PRU0_Direct_Connect.c
rename to examples/am335x/PRU_Direct_Connect0/PRU0_Direct_Connect.c
rename from examples/PRU_Direct_Connect0/PRU0_Direct_Connect.c
rename to examples/am335x/PRU_Direct_Connect0/PRU0_Direct_Connect.c
diff --git a/examples/PRU_Direct_Connect0/rsc_table_pru0.h b/examples/am335x/PRU_Direct_Connect0/rsc_table_pru0.h
similarity index 100%
rename from examples/PRU_Direct_Connect0/rsc_table_pru0.h
rename to examples/am335x/PRU_Direct_Connect0/rsc_table_pru0.h
rename from examples/PRU_Direct_Connect0/rsc_table_pru0.h
rename to examples/am335x/PRU_Direct_Connect0/rsc_table_pru0.h
diff --git a/examples/PRU_Direct_Connect1/.ccsproject b/examples/am335x/PRU_Direct_Connect1/.ccsproject
similarity index 100%
rename from examples/PRU_Direct_Connect1/.ccsproject
rename to examples/am335x/PRU_Direct_Connect1/.ccsproject
rename from examples/PRU_Direct_Connect1/.ccsproject
rename to examples/am335x/PRU_Direct_Connect1/.ccsproject
similarity index 98%
rename from examples/PRU_Direct_Connect1/.cproject
rename to examples/am335x/PRU_Direct_Connect1/.cproject
index e29951cdf2dfab51952a227bc78b2fa67a5eb630..8a65c8fb5dda7754cd0f027890e9e0d8d4a65f02 100755 (executable)
rename from examples/PRU_Direct_Connect1/.cproject
rename to examples/am335x/PRU_Direct_Connect1/.cproject
index e29951cdf2dfab51952a227bc78b2fa67a5eb630..8a65c8fb5dda7754cd0f027890e9e0d8d4a65f02 100755 (executable)
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.1297886249" 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"/>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.43389645" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
<listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
- <listOptionValue builtIn="false" value=""../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am335x""/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEBUGGING_MODEL.2069675128" 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"/>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.41437765" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.1070652236" 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"/>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.1239059204" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
<listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
- <listOptionValue builtIn="false" value="../../../include"/>
+ <listOptionValue builtIn="false" value=""../../../../include/am335x""/>
+ <listOptionValue builtIn="false" value="../../../../include"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.849804421" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">
<listOptionValue builtIn="false" value="225"/>
similarity index 100%
rename from examples/PRU_Direct_Connect1/.project
rename to examples/am335x/PRU_Direct_Connect1/.project
rename from examples/PRU_Direct_Connect1/.project
rename to examples/am335x/PRU_Direct_Connect1/.project
diff --git a/examples/PRU_Direct_Connect1/.settings/org.eclipse.cdt.codan.core.prefs b/examples/am335x/PRU_Direct_Connect1/.settings/org.eclipse.cdt.codan.core.prefs
similarity index 100%
rename from examples/PRU_Direct_Connect1/.settings/org.eclipse.cdt.codan.core.prefs
rename to examples/am335x/PRU_Direct_Connect1/.settings/org.eclipse.cdt.codan.core.prefs
rename from examples/PRU_Direct_Connect1/.settings/org.eclipse.cdt.codan.core.prefs
rename to examples/am335x/PRU_Direct_Connect1/.settings/org.eclipse.cdt.codan.core.prefs
diff --git a/examples/PRU_Direct_Connect1/.settings/org.eclipse.cdt.debug.core.prefs b/examples/am335x/PRU_Direct_Connect1/.settings/org.eclipse.cdt.debug.core.prefs
similarity index 100%
rename from examples/PRU_Direct_Connect1/.settings/org.eclipse.cdt.debug.core.prefs
rename to examples/am335x/PRU_Direct_Connect1/.settings/org.eclipse.cdt.debug.core.prefs
rename from examples/PRU_Direct_Connect1/.settings/org.eclipse.cdt.debug.core.prefs
rename to examples/am335x/PRU_Direct_Connect1/.settings/org.eclipse.cdt.debug.core.prefs
diff --git a/examples/PRU_Direct_Connect1/AM335x_PRU.cmd b/examples/am335x/PRU_Direct_Connect1/AM335x_PRU.cmd
similarity index 100%
rename from examples/PRU_Direct_Connect1/AM335x_PRU.cmd
rename to examples/am335x/PRU_Direct_Connect1/AM335x_PRU.cmd
rename from examples/PRU_Direct_Connect1/AM335x_PRU.cmd
rename to examples/am335x/PRU_Direct_Connect1/AM335x_PRU.cmd
similarity index 96%
rename from examples/PRU_Direct_Connect1/Makefile
rename to examples/am335x/PRU_Direct_Connect1/Makefile
index 2a6aa2e955a709b2734e1fb995bf993f00f747f5..bd3b84fa09e9535f3046a8091eaa884268cafb21 100644 (file)
rename from examples/PRU_Direct_Connect1/Makefile
rename to examples/am335x/PRU_Direct_Connect1/Makefile
index 2a6aa2e955a709b2734e1fb995bf993f00f747f5..bd3b84fa09e9535f3046a8091eaa884268cafb21 100644 (file)
CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
PROJ_NAME=$(CURRENT_DIR)
LINKER_COMMAND_FILE=./AM335x_PRU.cmd
-LIBS=--library=../../lib/rpmsg_lib.lib
-INCLUDE=--include_path=../../include
+LIBS=--library=../../../lib/rpmsg_lib.lib
+INCLUDE=--include_path=../../../include --include_path=../../../include/am335x
STACK_SIZE=0x100
HEAP_SIZE=0x100
GEN_DIR=gen
diff --git a/examples/PRU_Direct_Connect1/PRU1_Direct_Connect.c b/examples/am335x/PRU_Direct_Connect1/PRU1_Direct_Connect.c
similarity index 100%
rename from examples/PRU_Direct_Connect1/PRU1_Direct_Connect.c
rename to examples/am335x/PRU_Direct_Connect1/PRU1_Direct_Connect.c
rename from examples/PRU_Direct_Connect1/PRU1_Direct_Connect.c
rename to examples/am335x/PRU_Direct_Connect1/PRU1_Direct_Connect.c
diff --git a/examples/PRU_Direct_Connect1/resource_table_empty.h b/examples/am335x/PRU_Direct_Connect1/resource_table_empty.h
similarity index 100%
rename from examples/PRU_Direct_Connect1/resource_table_empty.h
rename to examples/am335x/PRU_Direct_Connect1/resource_table_empty.h
rename from examples/PRU_Direct_Connect1/resource_table_empty.h
rename to examples/am335x/PRU_Direct_Connect1/resource_table_empty.h
similarity index 100%
rename from examples/PRU_Hardware_UART/.ccsproject
rename to examples/am335x/PRU_Hardware_UART/.ccsproject
rename from examples/PRU_Hardware_UART/.ccsproject
rename to examples/am335x/PRU_Hardware_UART/.ccsproject
similarity index 98%
rename from examples/PRU_Hardware_UART/.cproject
rename to examples/am335x/PRU_Hardware_UART/.cproject
index 68b0c409e84f5f8fea6843cd9b84d379cc8590a4..020559b77b4cb7f228fa092570122d1fb8d5e516 100755 (executable)
rename from examples/PRU_Hardware_UART/.cproject
rename to examples/am335x/PRU_Hardware_UART/.cproject
index 68b0c409e84f5f8fea6843cd9b84d379cc8590a4..020559b77b4cb7f228fa092570122d1fb8d5e516 100755 (executable)
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.839765946" 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"/>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.184409319" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
<listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
- <listOptionValue builtIn="false" value=""../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am335x""/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEBUGGING_MODEL.1766507315" 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"/>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.148501411" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.1499195821" 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"/>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.1550994631" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
<listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
- <listOptionValue builtIn="false" value="../../../include"/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am335x""/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.457113060" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">
<listOptionValue builtIn="false" value="225"/>
similarity index 100%
rename from examples/PRU_Hardware_UART/.project
rename to examples/am335x/PRU_Hardware_UART/.project
rename from examples/PRU_Hardware_UART/.project
rename to examples/am335x/PRU_Hardware_UART/.project
diff --git a/examples/PRU_Hardware_UART/.settings/org.eclipse.cdt.codan.core.prefs b/examples/am335x/PRU_Hardware_UART/.settings/org.eclipse.cdt.codan.core.prefs
similarity index 100%
rename from examples/PRU_Hardware_UART/.settings/org.eclipse.cdt.codan.core.prefs
rename to examples/am335x/PRU_Hardware_UART/.settings/org.eclipse.cdt.codan.core.prefs
rename from examples/PRU_Hardware_UART/.settings/org.eclipse.cdt.codan.core.prefs
rename to examples/am335x/PRU_Hardware_UART/.settings/org.eclipse.cdt.codan.core.prefs
diff --git a/examples/PRU_Hardware_UART/.settings/org.eclipse.cdt.debug.core.prefs b/examples/am335x/PRU_Hardware_UART/.settings/org.eclipse.cdt.debug.core.prefs
similarity index 100%
rename from examples/PRU_Hardware_UART/.settings/org.eclipse.cdt.debug.core.prefs
rename to examples/am335x/PRU_Hardware_UART/.settings/org.eclipse.cdt.debug.core.prefs
rename from examples/PRU_Hardware_UART/.settings/org.eclipse.cdt.debug.core.prefs
rename to examples/am335x/PRU_Hardware_UART/.settings/org.eclipse.cdt.debug.core.prefs
diff --git a/examples/PRU_Hardware_UART/AM335x_PRU.cmd b/examples/am335x/PRU_Hardware_UART/AM335x_PRU.cmd
similarity index 100%
rename from examples/PRU_Hardware_UART/AM335x_PRU.cmd
rename to examples/am335x/PRU_Hardware_UART/AM335x_PRU.cmd
rename from examples/PRU_Hardware_UART/AM335x_PRU.cmd
rename to examples/am335x/PRU_Hardware_UART/AM335x_PRU.cmd
similarity index 96%
rename from examples/PRU_Hardware_UART/Makefile
rename to examples/am335x/PRU_Hardware_UART/Makefile
index 2a6aa2e955a709b2734e1fb995bf993f00f747f5..bd3b84fa09e9535f3046a8091eaa884268cafb21 100644 (file)
rename from examples/PRU_Hardware_UART/Makefile
rename to examples/am335x/PRU_Hardware_UART/Makefile
index 2a6aa2e955a709b2734e1fb995bf993f00f747f5..bd3b84fa09e9535f3046a8091eaa884268cafb21 100644 (file)
CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
PROJ_NAME=$(CURRENT_DIR)
LINKER_COMMAND_FILE=./AM335x_PRU.cmd
-LIBS=--library=../../lib/rpmsg_lib.lib
-INCLUDE=--include_path=../../include
+LIBS=--library=../../../lib/rpmsg_lib.lib
+INCLUDE=--include_path=../../../include --include_path=../../../include/am335x
STACK_SIZE=0x100
HEAP_SIZE=0x100
GEN_DIR=gen
diff --git a/examples/PRU_Hardware_UART/PRU_Hardware_UART.c b/examples/am335x/PRU_Hardware_UART/PRU_Hardware_UART.c
similarity index 100%
rename from examples/PRU_Hardware_UART/PRU_Hardware_UART.c
rename to examples/am335x/PRU_Hardware_UART/PRU_Hardware_UART.c
rename from examples/PRU_Hardware_UART/PRU_Hardware_UART.c
rename to examples/am335x/PRU_Hardware_UART/PRU_Hardware_UART.c
diff --git a/examples/PRU_Hardware_UART/resource_table_empty.h b/examples/am335x/PRU_Hardware_UART/resource_table_empty.h
similarity index 100%
rename from examples/PRU_Hardware_UART/resource_table_empty.h
rename to examples/am335x/PRU_Hardware_UART/resource_table_empty.h
rename from examples/PRU_Hardware_UART/resource_table_empty.h
rename to examples/am335x/PRU_Hardware_UART/resource_table_empty.h
similarity index 100%
rename from examples/PRU_IEP/.ccsproject
rename to examples/am335x/PRU_IEP/.ccsproject
rename from examples/PRU_IEP/.ccsproject
rename to examples/am335x/PRU_IEP/.ccsproject
similarity index 98%
rename from examples/PRU_IEP/.cproject
rename to examples/am335x/PRU_IEP/.cproject
index d650923ac69ed480bbc20c81a36fc151cad0a133..c49921e978daa59e30f50866b0067a7dfa8cc153 100755 (executable)
rename from examples/PRU_IEP/.cproject
rename to examples/am335x/PRU_IEP/.cproject
index d650923ac69ed480bbc20c81a36fc151cad0a133..c49921e978daa59e30f50866b0067a7dfa8cc153 100755 (executable)
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.633140884" 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"/>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.710278699" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
<listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
- <listOptionValue builtIn="false" value=""../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am335x""/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEBUGGING_MODEL.779600876" 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"/>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.1317383543" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.1811714916" 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"/>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.1760474180" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
<listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
- <listOptionValue builtIn="false" value="../../../include"/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am335x""/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.1830640835" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">
<listOptionValue builtIn="false" value="225"/>
similarity index 100%
rename from examples/PRU_IEP/.project
rename to examples/am335x/PRU_IEP/.project
rename from examples/PRU_IEP/.project
rename to examples/am335x/PRU_IEP/.project
diff --git a/examples/PRU_IEP/.settings/org.eclipse.cdt.codan.core.prefs b/examples/am335x/PRU_IEP/.settings/org.eclipse.cdt.codan.core.prefs
similarity index 100%
rename from examples/PRU_IEP/.settings/org.eclipse.cdt.codan.core.prefs
rename to examples/am335x/PRU_IEP/.settings/org.eclipse.cdt.codan.core.prefs
rename from examples/PRU_IEP/.settings/org.eclipse.cdt.codan.core.prefs
rename to examples/am335x/PRU_IEP/.settings/org.eclipse.cdt.codan.core.prefs
diff --git a/examples/PRU_IEP/.settings/org.eclipse.cdt.debug.core.prefs b/examples/am335x/PRU_IEP/.settings/org.eclipse.cdt.debug.core.prefs
similarity index 100%
rename from examples/PRU_IEP/.settings/org.eclipse.cdt.debug.core.prefs
rename to examples/am335x/PRU_IEP/.settings/org.eclipse.cdt.debug.core.prefs
rename from examples/PRU_IEP/.settings/org.eclipse.cdt.debug.core.prefs
rename to examples/am335x/PRU_IEP/.settings/org.eclipse.cdt.debug.core.prefs
similarity index 100%
rename from examples/PRU_IEP/AM335x_PRU.cmd
rename to examples/am335x/PRU_IEP/AM335x_PRU.cmd
rename from examples/PRU_IEP/AM335x_PRU.cmd
rename to examples/am335x/PRU_IEP/AM335x_PRU.cmd
diff --git a/examples/am335x/PRU_IEP/Makefile b/examples/am335x/PRU_IEP/Makefile
--- /dev/null
@@ -0,0 +1,86 @@
+# PRU_CGT environment variable must point to the TI PRU compiler directory. E.g.:
+#(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+#(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+ifndef PRU_CGT
+define ERROR_BODY
+
+************************************************************
+PRU_CGT environment variable is not set. Examples given:
+(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
+CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
+PROJ_NAME=$(CURRENT_DIR)
+LINKER_COMMAND_FILE=./AM335x_PRU.cmd
+LIBS=--library=../../../lib/rpmsg_lib.lib
+INCLUDE=--include_path=../../../include --include_path=../../../include/am335x
+STACK_SIZE=0x100
+HEAP_SIZE=0x100
+GEN_DIR=gen
+
+#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+CFLAGS=-v3 -O2 --display_error_number --endian=little --hardware_mac=on --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
+#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
+
+TARGET=$(GEN_DIR)/$(PROJ_NAME).out
+MAP=$(GEN_DIR)/$(PROJ_NAME).map
+SOURCES=$(wildcard *.c)
+#Using .object instead of .obj in order to not conflict with the CCS build process
+OBJECTS=$(patsubst %,$(GEN_DIR)/%,$(SOURCES:.c=.object))
+
+all: printStart $(TARGET) printEnd
+
+printStart:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Building project: $(PROJ_NAME)'
+
+printEnd:
+ @echo ''
+ @echo 'Finished building project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Invokes the linker (-z flag) to make the .out file
+$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
+ @echo ''
+ @echo 'Building target: $@'
+ @echo 'Invoking: PRU Linker'
+ $(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)
+ @echo 'Finished building target: $@'
+ @echo ''
+ @echo 'Output files can be found in the "$(GEN_DIR)" directory'
+
+# Invokes the compiler on all c files in the directory to create the object files
+$(GEN_DIR)/%.object: %.c
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+.PHONY: all clean
+
+# Remove the $(GEN_DIR) directory
+clean:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Cleaning project: $(PROJ_NAME)'
+ @echo ''
+ @echo 'Removing files in the "$(GEN_DIR)" directory'
+ @rm -rf $(GEN_DIR)
+ @echo ''
+ @echo 'Finished cleaning project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
+-include $(OBJECTS:%.object=%.pp)
+
similarity index 100%
rename from examples/PRU_IEP/PRU_IEP.c
rename to examples/am335x/PRU_IEP/PRU_IEP.c
rename from examples/PRU_IEP/PRU_IEP.c
rename to examples/am335x/PRU_IEP/PRU_IEP.c
similarity index 100%
rename from examples/PRU_IEP/rsc_table_pru.h
rename to examples/am335x/PRU_IEP/rsc_table_pru.h
rename from examples/PRU_IEP/rsc_table_pru.h
rename to examples/am335x/PRU_IEP/rsc_table_pru.h
diff --git a/examples/PRU_MAC_Multiply_Accum/.ccsproject b/examples/am335x/PRU_MAC_Multiply_Accum/.ccsproject
similarity index 100%
rename from examples/PRU_MAC_Multiply_Accum/.ccsproject
rename to examples/am335x/PRU_MAC_Multiply_Accum/.ccsproject
rename from examples/PRU_MAC_Multiply_Accum/.ccsproject
rename to examples/am335x/PRU_MAC_Multiply_Accum/.ccsproject
diff --git a/examples/PRU_MAC_Multiply_Accum/.cproject b/examples/am335x/PRU_MAC_Multiply_Accum/.cproject
similarity index 98%
rename from examples/PRU_MAC_Multiply_Accum/.cproject
rename to examples/am335x/PRU_MAC_Multiply_Accum/.cproject
index 6580a71d36765d477159fd83dc0267faa5e134d7..86152b6e446c04fbeeb8191d8802f0465a74d955 100755 (executable)
rename from examples/PRU_MAC_Multiply_Accum/.cproject
rename to examples/am335x/PRU_MAC_Multiply_Accum/.cproject
index 6580a71d36765d477159fd83dc0267faa5e134d7..86152b6e446c04fbeeb8191d8802f0465a74d955 100755 (executable)
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.OPT_LEVEL.1457650724" name="Optimization level (--opt_level, -O)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.OPT_LEVEL" value="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.OPT_LEVEL.3" valueType="enumerated"/>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.899256339" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
<listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
- <listOptionValue builtIn="false" value=""../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am335x""/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEBUGGING_MODEL.717867170" 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"/>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.613395226" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.271391480" 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"/>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.537997755" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
<listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
- <listOptionValue builtIn="false" value="../../../include"/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am335x""/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.1359309419" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">
<listOptionValue builtIn="false" value="225"/>
diff --git a/examples/PRU_MAC_Multiply_Accum/.project b/examples/am335x/PRU_MAC_Multiply_Accum/.project
similarity index 100%
rename from examples/PRU_MAC_Multiply_Accum/.project
rename to examples/am335x/PRU_MAC_Multiply_Accum/.project
rename from examples/PRU_MAC_Multiply_Accum/.project
rename to examples/am335x/PRU_MAC_Multiply_Accum/.project
diff --git a/examples/PRU_MAC_Multiply_Accum/.settings/org.eclipse.cdt.codan.core.prefs b/examples/am335x/PRU_MAC_Multiply_Accum/.settings/org.eclipse.cdt.codan.core.prefs
similarity index 100%
rename from examples/PRU_MAC_Multiply_Accum/.settings/org.eclipse.cdt.codan.core.prefs
rename to examples/am335x/PRU_MAC_Multiply_Accum/.settings/org.eclipse.cdt.codan.core.prefs
rename from examples/PRU_MAC_Multiply_Accum/.settings/org.eclipse.cdt.codan.core.prefs
rename to examples/am335x/PRU_MAC_Multiply_Accum/.settings/org.eclipse.cdt.codan.core.prefs
diff --git a/examples/PRU_MAC_Multiply_Accum/.settings/org.eclipse.cdt.debug.core.prefs b/examples/am335x/PRU_MAC_Multiply_Accum/.settings/org.eclipse.cdt.debug.core.prefs
similarity index 100%
rename from examples/PRU_MAC_Multiply_Accum/.settings/org.eclipse.cdt.debug.core.prefs
rename to examples/am335x/PRU_MAC_Multiply_Accum/.settings/org.eclipse.cdt.debug.core.prefs
rename from examples/PRU_MAC_Multiply_Accum/.settings/org.eclipse.cdt.debug.core.prefs
rename to examples/am335x/PRU_MAC_Multiply_Accum/.settings/org.eclipse.cdt.debug.core.prefs
diff --git a/examples/PRU_MAC_Multiply_Accum/AM335x_PRU.cmd b/examples/am335x/PRU_MAC_Multiply_Accum/AM335x_PRU.cmd
similarity index 100%
rename from examples/PRU_MAC_Multiply_Accum/AM335x_PRU.cmd
rename to examples/am335x/PRU_MAC_Multiply_Accum/AM335x_PRU.cmd
rename from examples/PRU_MAC_Multiply_Accum/AM335x_PRU.cmd
rename to examples/am335x/PRU_MAC_Multiply_Accum/AM335x_PRU.cmd
diff --git a/examples/am335x/PRU_MAC_Multiply_Accum/Makefile b/examples/am335x/PRU_MAC_Multiply_Accum/Makefile
--- /dev/null
@@ -0,0 +1,86 @@
+# PRU_CGT environment variable must point to the TI PRU compiler directory. E.g.:
+#(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+#(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+ifndef PRU_CGT
+define ERROR_BODY
+
+************************************************************
+PRU_CGT environment variable is not set. Examples given:
+(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
+CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
+PROJ_NAME=$(CURRENT_DIR)
+LINKER_COMMAND_FILE=./AM335x_PRU.cmd
+LIBS=--library=../../../lib/rpmsg_lib.lib
+INCLUDE=--include_path=../../../include --include_path=../../../include/am335x
+STACK_SIZE=0x100
+HEAP_SIZE=0x100
+GEN_DIR=gen
+
+#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+CFLAGS=-v3 -O2 --display_error_number --endian=little --hardware_mac=on --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
+#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
+
+TARGET=$(GEN_DIR)/$(PROJ_NAME).out
+MAP=$(GEN_DIR)/$(PROJ_NAME).map
+SOURCES=$(wildcard *.c)
+#Using .object instead of .obj in order to not conflict with the CCS build process
+OBJECTS=$(patsubst %,$(GEN_DIR)/%,$(SOURCES:.c=.object))
+
+all: printStart $(TARGET) printEnd
+
+printStart:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Building project: $(PROJ_NAME)'
+
+printEnd:
+ @echo ''
+ @echo 'Finished building project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Invokes the linker (-z flag) to make the .out file
+$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
+ @echo ''
+ @echo 'Building target: $@'
+ @echo 'Invoking: PRU Linker'
+ $(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)
+ @echo 'Finished building target: $@'
+ @echo ''
+ @echo 'Output files can be found in the "$(GEN_DIR)" directory'
+
+# Invokes the compiler on all c files in the directory to create the object files
+$(GEN_DIR)/%.object: %.c
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+.PHONY: all clean
+
+# Remove the $(GEN_DIR) directory
+clean:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Cleaning project: $(PROJ_NAME)'
+ @echo ''
+ @echo 'Removing files in the "$(GEN_DIR)" directory'
+ @rm -rf $(GEN_DIR)
+ @echo ''
+ @echo 'Finished cleaning project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
+-include $(OBJECTS:%.object=%.pp)
+
diff --git a/examples/PRU_MAC_Multiply_Accum/PRU_MAC_Multiply_Accum.c b/examples/am335x/PRU_MAC_Multiply_Accum/PRU_MAC_Multiply_Accum.c
similarity index 100%
rename from examples/PRU_MAC_Multiply_Accum/PRU_MAC_Multiply_Accum.c
rename to examples/am335x/PRU_MAC_Multiply_Accum/PRU_MAC_Multiply_Accum.c
rename from examples/PRU_MAC_Multiply_Accum/PRU_MAC_Multiply_Accum.c
rename to examples/am335x/PRU_MAC_Multiply_Accum/PRU_MAC_Multiply_Accum.c
diff --git a/examples/PRU_MAC_Multiply_Accum/resource_table_empty.h b/examples/am335x/PRU_MAC_Multiply_Accum/resource_table_empty.h
similarity index 100%
rename from examples/PRU_MAC_Multiply_Accum/resource_table_empty.h
rename to examples/am335x/PRU_MAC_Multiply_Accum/resource_table_empty.h
rename from examples/PRU_MAC_Multiply_Accum/resource_table_empty.h
rename to examples/am335x/PRU_MAC_Multiply_Accum/resource_table_empty.h
diff --git a/examples/PRU_PRUtoARM_Interrupt/.ccsproject b/examples/am335x/PRU_PRUtoARM_Interrupt/.ccsproject
similarity index 100%
rename from examples/PRU_PRUtoARM_Interrupt/.ccsproject
rename to examples/am335x/PRU_PRUtoARM_Interrupt/.ccsproject
rename from examples/PRU_PRUtoARM_Interrupt/.ccsproject
rename to examples/am335x/PRU_PRUtoARM_Interrupt/.ccsproject
diff --git a/examples/PRU_PRUtoARM_Interrupt/.cproject b/examples/am335x/PRU_PRUtoARM_Interrupt/.cproject
similarity index 98%
rename from examples/PRU_PRUtoARM_Interrupt/.cproject
rename to examples/am335x/PRU_PRUtoARM_Interrupt/.cproject
index 3c1b4258438ef5159060df52a7c76e174778492d..ea6726f91a17b8ec1a6cb8130cf4ba2c61782c56 100755 (executable)
rename from examples/PRU_PRUtoARM_Interrupt/.cproject
rename to examples/am335x/PRU_PRUtoARM_Interrupt/.cproject
index 3c1b4258438ef5159060df52a7c76e174778492d..ea6726f91a17b8ec1a6cb8130cf4ba2c61782c56 100755 (executable)
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.1888814542" 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"/>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.1224686711" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
<listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
- <listOptionValue builtIn="false" value=""../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am335x""/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEBUGGING_MODEL.99032397" 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"/>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.1026211261" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.2027634281" 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"/>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.846830207" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
<listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
- <listOptionValue builtIn="false" value="../../../include"/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am335x""/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.394875502" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">
<listOptionValue builtIn="false" value="225"/>
diff --git a/examples/PRU_PRUtoARM_Interrupt/.project b/examples/am335x/PRU_PRUtoARM_Interrupt/.project
similarity index 100%
rename from examples/PRU_PRUtoARM_Interrupt/.project
rename to examples/am335x/PRU_PRUtoARM_Interrupt/.project
rename from examples/PRU_PRUtoARM_Interrupt/.project
rename to examples/am335x/PRU_PRUtoARM_Interrupt/.project
diff --git a/examples/PRU_PRUtoARM_Interrupt/.settings/org.eclipse.cdt.codan.core.prefs b/examples/am335x/PRU_PRUtoARM_Interrupt/.settings/org.eclipse.cdt.codan.core.prefs
similarity index 100%
rename from examples/PRU_PRUtoARM_Interrupt/.settings/org.eclipse.cdt.codan.core.prefs
rename to examples/am335x/PRU_PRUtoARM_Interrupt/.settings/org.eclipse.cdt.codan.core.prefs
rename from examples/PRU_PRUtoARM_Interrupt/.settings/org.eclipse.cdt.codan.core.prefs
rename to examples/am335x/PRU_PRUtoARM_Interrupt/.settings/org.eclipse.cdt.codan.core.prefs
diff --git a/examples/PRU_PRUtoARM_Interrupt/.settings/org.eclipse.cdt.debug.core.prefs b/examples/am335x/PRU_PRUtoARM_Interrupt/.settings/org.eclipse.cdt.debug.core.prefs
similarity index 100%
rename from examples/PRU_PRUtoARM_Interrupt/.settings/org.eclipse.cdt.debug.core.prefs
rename to examples/am335x/PRU_PRUtoARM_Interrupt/.settings/org.eclipse.cdt.debug.core.prefs
rename from examples/PRU_PRUtoARM_Interrupt/.settings/org.eclipse.cdt.debug.core.prefs
rename to examples/am335x/PRU_PRUtoARM_Interrupt/.settings/org.eclipse.cdt.debug.core.prefs
diff --git a/examples/PRU_PRUtoARM_Interrupt/AM335x_PRU.cmd b/examples/am335x/PRU_PRUtoARM_Interrupt/AM335x_PRU.cmd
similarity index 100%
rename from examples/PRU_PRUtoARM_Interrupt/AM335x_PRU.cmd
rename to examples/am335x/PRU_PRUtoARM_Interrupt/AM335x_PRU.cmd
rename from examples/PRU_PRUtoARM_Interrupt/AM335x_PRU.cmd
rename to examples/am335x/PRU_PRUtoARM_Interrupt/AM335x_PRU.cmd
diff --git a/examples/am335x/PRU_PRUtoARM_Interrupt/Makefile b/examples/am335x/PRU_PRUtoARM_Interrupt/Makefile
--- /dev/null
@@ -0,0 +1,86 @@
+# PRU_CGT environment variable must point to the TI PRU compiler directory. E.g.:
+#(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+#(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+ifndef PRU_CGT
+define ERROR_BODY
+
+************************************************************
+PRU_CGT environment variable is not set. Examples given:
+(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
+CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
+PROJ_NAME=$(CURRENT_DIR)
+LINKER_COMMAND_FILE=./AM335x_PRU.cmd
+LIBS=--library=../../../lib/rpmsg_lib.lib
+INCLUDE=--include_path=../../../include --include_path=../../../include/am335x
+STACK_SIZE=0x100
+HEAP_SIZE=0x100
+GEN_DIR=gen
+
+#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+CFLAGS=-v3 -O2 --display_error_number --endian=little --hardware_mac=on --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
+#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
+
+TARGET=$(GEN_DIR)/$(PROJ_NAME).out
+MAP=$(GEN_DIR)/$(PROJ_NAME).map
+SOURCES=$(wildcard *.c)
+#Using .object instead of .obj in order to not conflict with the CCS build process
+OBJECTS=$(patsubst %,$(GEN_DIR)/%,$(SOURCES:.c=.object))
+
+all: printStart $(TARGET) printEnd
+
+printStart:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Building project: $(PROJ_NAME)'
+
+printEnd:
+ @echo ''
+ @echo 'Finished building project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Invokes the linker (-z flag) to make the .out file
+$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
+ @echo ''
+ @echo 'Building target: $@'
+ @echo 'Invoking: PRU Linker'
+ $(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)
+ @echo 'Finished building target: $@'
+ @echo ''
+ @echo 'Output files can be found in the "$(GEN_DIR)" directory'
+
+# Invokes the compiler on all c files in the directory to create the object files
+$(GEN_DIR)/%.object: %.c
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+.PHONY: all clean
+
+# Remove the $(GEN_DIR) directory
+clean:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Cleaning project: $(PROJ_NAME)'
+ @echo ''
+ @echo 'Removing files in the "$(GEN_DIR)" directory'
+ @rm -rf $(GEN_DIR)
+ @echo ''
+ @echo 'Finished cleaning project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
+-include $(OBJECTS:%.object=%.pp)
+
diff --git a/examples/PRU_PRUtoARM_Interrupt/PRU_PRUtoARM_Interrupt.c b/examples/am335x/PRU_PRUtoARM_Interrupt/PRU_PRUtoARM_Interrupt.c
similarity index 100%
rename from examples/PRU_PRUtoARM_Interrupt/PRU_PRUtoARM_Interrupt.c
rename to examples/am335x/PRU_PRUtoARM_Interrupt/PRU_PRUtoARM_Interrupt.c
rename from examples/PRU_PRUtoARM_Interrupt/PRU_PRUtoARM_Interrupt.c
rename to examples/am335x/PRU_PRUtoARM_Interrupt/PRU_PRUtoARM_Interrupt.c
diff --git a/examples/PRU_PRUtoARM_Interrupt/resource_table_empty.h b/examples/am335x/PRU_PRUtoARM_Interrupt/resource_table_empty.h
similarity index 100%
rename from examples/PRU_PRUtoARM_Interrupt/resource_table_empty.h
rename to examples/am335x/PRU_PRUtoARM_Interrupt/resource_table_empty.h
rename from examples/PRU_PRUtoARM_Interrupt/resource_table_empty.h
rename to examples/am335x/PRU_PRUtoARM_Interrupt/resource_table_empty.h
diff --git a/examples/PRU_RPMsg_Echo_Interrupt0/.ccsproject b/examples/am335x/PRU_RPMsg_Echo_Interrupt0/.ccsproject
similarity index 100%
rename from examples/PRU_RPMsg_Echo_Interrupt0/.ccsproject
rename to examples/am335x/PRU_RPMsg_Echo_Interrupt0/.ccsproject
rename from examples/PRU_RPMsg_Echo_Interrupt0/.ccsproject
rename to examples/am335x/PRU_RPMsg_Echo_Interrupt0/.ccsproject
diff --git a/examples/PRU_RPMsg_Echo_Interrupt0/.cproject b/examples/am335x/PRU_RPMsg_Echo_Interrupt0/.cproject
similarity index 98%
rename from examples/PRU_RPMsg_Echo_Interrupt0/.cproject
rename to examples/am335x/PRU_RPMsg_Echo_Interrupt0/.cproject
index 70e98a2d0c889bf9d51e55a3fa6351b7dec4cce8..f850dce21b818e4a963dba6ac39c07ce35b13f8d 100644 (file)
rename from examples/PRU_RPMsg_Echo_Interrupt0/.cproject
rename to examples/am335x/PRU_RPMsg_Echo_Interrupt0/.cproject
index 70e98a2d0c889bf9d51e55a3fa6351b7dec4cce8..f850dce21b818e4a963dba6ac39c07ce35b13f8d 100644 (file)
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WRAP.1553196566" 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"/>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.1272880075" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
<listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
- <listOptionValue builtIn="false" value=""../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am335x""/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.712772910" 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"/>
<inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS.317570379" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY.90817631" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY" valueType="libs">
<listOptionValue builtIn="false" value=""libc.a""/>
- <listOptionValue builtIn="false" value=""../../../lib/rpmsg_lib.lib""/>
+ <listOptionValue builtIn="false" value=""../../../../lib/rpmsg_lib.lib""/>
</option>
<inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS.1919231166" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS"/>
<inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS.1281498973" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS"/>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER.1565459652" 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"/>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WRAP.1882729868" 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"/>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.1510210793" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
- <listOptionValue builtIn="false" value=""../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am335x""/>
<listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.536718487" 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"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY.115869410" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY" valueType="libs">
<listOptionValue builtIn="false" value=""libc.a""/>
- <listOptionValue builtIn="false" value=""../../../lib/rpmsg_lib.lib""/>
+ <listOptionValue builtIn="false" value=""../../../../lib/rpmsg_lib.lib""/>
</option>
<inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS.1615007517" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS"/>
<inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS.2079574711" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS"/>
diff --git a/examples/PRU_RPMsg_Echo_Interrupt0/.project b/examples/am335x/PRU_RPMsg_Echo_Interrupt0/.project
similarity index 100%
rename from examples/PRU_RPMsg_Echo_Interrupt0/.project
rename to examples/am335x/PRU_RPMsg_Echo_Interrupt0/.project
rename from examples/PRU_RPMsg_Echo_Interrupt0/.project
rename to examples/am335x/PRU_RPMsg_Echo_Interrupt0/.project
diff --git a/examples/PRU_RPMsg_Echo_Interrupt0/.settings/org.eclipse.cdt.codan.core.prefs b/examples/am335x/PRU_RPMsg_Echo_Interrupt0/.settings/org.eclipse.cdt.codan.core.prefs
similarity index 100%
rename from examples/PRU_RPMsg_Echo_Interrupt0/.settings/org.eclipse.cdt.codan.core.prefs
rename to examples/am335x/PRU_RPMsg_Echo_Interrupt0/.settings/org.eclipse.cdt.codan.core.prefs
rename from examples/PRU_RPMsg_Echo_Interrupt0/.settings/org.eclipse.cdt.codan.core.prefs
rename to examples/am335x/PRU_RPMsg_Echo_Interrupt0/.settings/org.eclipse.cdt.codan.core.prefs
diff --git a/examples/PRU_RPMsg_Echo_Interrupt0/.settings/org.eclipse.cdt.debug.core.prefs b/examples/am335x/PRU_RPMsg_Echo_Interrupt0/.settings/org.eclipse.cdt.debug.core.prefs
similarity index 100%
rename from examples/PRU_RPMsg_Echo_Interrupt0/.settings/org.eclipse.cdt.debug.core.prefs
rename to examples/am335x/PRU_RPMsg_Echo_Interrupt0/.settings/org.eclipse.cdt.debug.core.prefs
rename from examples/PRU_RPMsg_Echo_Interrupt0/.settings/org.eclipse.cdt.debug.core.prefs
rename to examples/am335x/PRU_RPMsg_Echo_Interrupt0/.settings/org.eclipse.cdt.debug.core.prefs
diff --git a/examples/PRU_RPMsg_Echo_Interrupt0/AM335x_PRU.cmd b/examples/am335x/PRU_RPMsg_Echo_Interrupt0/AM335x_PRU.cmd
similarity index 100%
rename from examples/PRU_RPMsg_Echo_Interrupt0/AM335x_PRU.cmd
rename to examples/am335x/PRU_RPMsg_Echo_Interrupt0/AM335x_PRU.cmd
rename from examples/PRU_RPMsg_Echo_Interrupt0/AM335x_PRU.cmd
rename to examples/am335x/PRU_RPMsg_Echo_Interrupt0/AM335x_PRU.cmd
diff --git a/examples/am335x/PRU_RPMsg_Echo_Interrupt0/Makefile b/examples/am335x/PRU_RPMsg_Echo_Interrupt0/Makefile
--- /dev/null
@@ -0,0 +1,86 @@
+# PRU_CGT environment variable must point to the TI PRU compiler directory. E.g.:
+#(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+#(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+ifndef PRU_CGT
+define ERROR_BODY
+
+************************************************************
+PRU_CGT environment variable is not set. Examples given:
+(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
+CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
+PROJ_NAME=$(CURRENT_DIR)
+LINKER_COMMAND_FILE=./AM335x_PRU.cmd
+LIBS=--library=../../../lib/rpmsg_lib.lib
+INCLUDE=--include_path=../../../include --include_path=../../../include/am335x
+STACK_SIZE=0x100
+HEAP_SIZE=0x100
+GEN_DIR=gen
+
+#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+CFLAGS=-v3 -O2 --display_error_number --endian=little --hardware_mac=on --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
+#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
+
+TARGET=$(GEN_DIR)/$(PROJ_NAME).out
+MAP=$(GEN_DIR)/$(PROJ_NAME).map
+SOURCES=$(wildcard *.c)
+#Using .object instead of .obj in order to not conflict with the CCS build process
+OBJECTS=$(patsubst %,$(GEN_DIR)/%,$(SOURCES:.c=.object))
+
+all: printStart $(TARGET) printEnd
+
+printStart:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Building project: $(PROJ_NAME)'
+
+printEnd:
+ @echo ''
+ @echo 'Finished building project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Invokes the linker (-z flag) to make the .out file
+$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
+ @echo ''
+ @echo 'Building target: $@'
+ @echo 'Invoking: PRU Linker'
+ $(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)
+ @echo 'Finished building target: $@'
+ @echo ''
+ @echo 'Output files can be found in the "$(GEN_DIR)" directory'
+
+# Invokes the compiler on all c files in the directory to create the object files
+$(GEN_DIR)/%.object: %.c
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+.PHONY: all clean
+
+# Remove the $(GEN_DIR) directory
+clean:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Cleaning project: $(PROJ_NAME)'
+ @echo ''
+ @echo 'Removing files in the "$(GEN_DIR)" directory'
+ @rm -rf $(GEN_DIR)
+ @echo ''
+ @echo 'Finished cleaning project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
+-include $(OBJECTS:%.object=%.pp)
+
diff --git a/examples/PRU_RPMsg_Echo_Interrupt0/main.c b/examples/am335x/PRU_RPMsg_Echo_Interrupt0/main.c
similarity index 96%
rename from examples/PRU_RPMsg_Echo_Interrupt0/main.c
rename to examples/am335x/PRU_RPMsg_Echo_Interrupt0/main.c
index 2f4bd36c2a8ae82194771d331a79c85ff8ed10a7..6d0d213a9cc43d7bbff0eaffefefad7f24d3509f 100644 (file)
rename from examples/PRU_RPMsg_Echo_Interrupt0/main.c
rename to examples/am335x/PRU_RPMsg_Echo_Interrupt0/main.c
index 2f4bd36c2a8ae82194771d331a79c85ff8ed10a7..6d0d213a9cc43d7bbff0eaffefefad7f24d3509f 100644 (file)
CT_MBX.IRQ[MB_USER].ENABLE_SET |= 1 << (MB_FROM_ARM_HOST * 2);
/* Initialize pru_virtqueue corresponding to vring0 (PRU to ARM Host direction) */
- pru_virtqueue_init(&transport.virtqueue0, &resourceTable.rpmsg_vring0, MB_TO_ARM_HOST, MB_FROM_ARM_HOST);
+ pru_virtqueue_init(&transport.virtqueue0, &resourceTable.rpmsg_vring0, &CT_MBX.MESSAGE[MB_TO_ARM_HOST], &CT_MBX.MESSAGE[MB_FROM_ARM_HOST]);
/* Initialize pru_virtqueue corresponding to vring1 (ARM Host to PRU direction) */
- pru_virtqueue_init(&transport.virtqueue1, &resourceTable.rpmsg_vring1, MB_TO_ARM_HOST, MB_FROM_ARM_HOST);
+ pru_virtqueue_init(&transport.virtqueue1, &resourceTable.rpmsg_vring1, &CT_MBX.MESSAGE[MB_TO_ARM_HOST], &CT_MBX.MESSAGE[MB_FROM_ARM_HOST]);
/* Create the RPMsg channel between the PRU and ARM user space using the transport structure. */
while(pru_rpmsg_channel(RPMSG_NS_CREATE, &transport, CHAN_NAME, CHAN_DESC, CHAN_PORT) != PRU_RPMSG_SUCCESS);
diff --git a/examples/PRU_RPMsg_Echo_Interrupt0/resource_table_0.h b/examples/am335x/PRU_RPMsg_Echo_Interrupt0/resource_table_0.h
similarity index 100%
rename from examples/PRU_RPMsg_Echo_Interrupt0/resource_table_0.h
rename to examples/am335x/PRU_RPMsg_Echo_Interrupt0/resource_table_0.h
rename from examples/PRU_RPMsg_Echo_Interrupt0/resource_table_0.h
rename to examples/am335x/PRU_RPMsg_Echo_Interrupt0/resource_table_0.h
diff --git a/examples/PRU_RPMsg_Echo_Interrupt1/.ccsproject b/examples/am335x/PRU_RPMsg_Echo_Interrupt1/.ccsproject
similarity index 100%
rename from examples/PRU_RPMsg_Echo_Interrupt1/.ccsproject
rename to examples/am335x/PRU_RPMsg_Echo_Interrupt1/.ccsproject
rename from examples/PRU_RPMsg_Echo_Interrupt1/.ccsproject
rename to examples/am335x/PRU_RPMsg_Echo_Interrupt1/.ccsproject
diff --git a/examples/PRU_RPMsg_Echo_Interrupt1/.cproject b/examples/am335x/PRU_RPMsg_Echo_Interrupt1/.cproject
similarity index 98%
rename from examples/PRU_RPMsg_Echo_Interrupt1/.cproject
rename to examples/am335x/PRU_RPMsg_Echo_Interrupt1/.cproject
index 7eca8c2c8e529b4367a01f5ef74e9b2a3c9ee0b9..d89cff0135530384a3008b0965777631c23302ac 100644 (file)
rename from examples/PRU_RPMsg_Echo_Interrupt1/.cproject
rename to examples/am335x/PRU_RPMsg_Echo_Interrupt1/.cproject
index 7eca8c2c8e529b4367a01f5ef74e9b2a3c9ee0b9..d89cff0135530384a3008b0965777631c23302ac 100644 (file)
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WRAP.1267144444" 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"/>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.2101445291" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
<listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
- <listOptionValue builtIn="false" value=""../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am335x""/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.1425938227" 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"/>
<inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS.1075964976" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY.2135563672" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY" valueType="libs">
<listOptionValue builtIn="false" value=""libc.a""/>
- <listOptionValue builtIn="false" value=""../../../lib/rpmsg_lib.lib""/>
+ <listOptionValue builtIn="false" value=""../../../../lib/rpmsg_lib.lib""/>
</option>
<inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS.2034040630" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS"/>
<inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS.449824406" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS"/>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WRAP.1222441952" 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"/>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.53129817" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
<listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
- <listOptionValue builtIn="false" value=""../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am335x""/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.550644205" 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"/>
<inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS.1317998059" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY.462629876" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY" valueType="libs">
<listOptionValue builtIn="false" value=""libc.a""/>
- <listOptionValue builtIn="false" value=""../../../lib/rpmsg_lib.lib""/>
+ <listOptionValue builtIn="false" value=""../../../../lib/rpmsg_lib.lib""/>
</option>
<inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS.606545729" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS"/>
<inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS.1860958344" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS"/>
diff --git a/examples/PRU_RPMsg_Echo_Interrupt1/.project b/examples/am335x/PRU_RPMsg_Echo_Interrupt1/.project
similarity index 100%
rename from examples/PRU_RPMsg_Echo_Interrupt1/.project
rename to examples/am335x/PRU_RPMsg_Echo_Interrupt1/.project
rename from examples/PRU_RPMsg_Echo_Interrupt1/.project
rename to examples/am335x/PRU_RPMsg_Echo_Interrupt1/.project
diff --git a/examples/PRU_RPMsg_Echo_Interrupt1/.settings/org.eclipse.cdt.codan.core.prefs b/examples/am335x/PRU_RPMsg_Echo_Interrupt1/.settings/org.eclipse.cdt.codan.core.prefs
similarity index 100%
rename from examples/PRU_RPMsg_Echo_Interrupt1/.settings/org.eclipse.cdt.codan.core.prefs
rename to examples/am335x/PRU_RPMsg_Echo_Interrupt1/.settings/org.eclipse.cdt.codan.core.prefs
rename from examples/PRU_RPMsg_Echo_Interrupt1/.settings/org.eclipse.cdt.codan.core.prefs
rename to examples/am335x/PRU_RPMsg_Echo_Interrupt1/.settings/org.eclipse.cdt.codan.core.prefs
diff --git a/examples/PRU_RPMsg_Echo_Interrupt1/.settings/org.eclipse.cdt.debug.core.prefs b/examples/am335x/PRU_RPMsg_Echo_Interrupt1/.settings/org.eclipse.cdt.debug.core.prefs
similarity index 100%
rename from examples/PRU_RPMsg_Echo_Interrupt1/.settings/org.eclipse.cdt.debug.core.prefs
rename to examples/am335x/PRU_RPMsg_Echo_Interrupt1/.settings/org.eclipse.cdt.debug.core.prefs
rename from examples/PRU_RPMsg_Echo_Interrupt1/.settings/org.eclipse.cdt.debug.core.prefs
rename to examples/am335x/PRU_RPMsg_Echo_Interrupt1/.settings/org.eclipse.cdt.debug.core.prefs
diff --git a/examples/PRU_RPMsg_Echo_Interrupt1/AM335x_PRU.cmd b/examples/am335x/PRU_RPMsg_Echo_Interrupt1/AM335x_PRU.cmd
similarity index 100%
rename from examples/PRU_RPMsg_Echo_Interrupt1/AM335x_PRU.cmd
rename to examples/am335x/PRU_RPMsg_Echo_Interrupt1/AM335x_PRU.cmd
rename from examples/PRU_RPMsg_Echo_Interrupt1/AM335x_PRU.cmd
rename to examples/am335x/PRU_RPMsg_Echo_Interrupt1/AM335x_PRU.cmd
diff --git a/examples/am335x/PRU_RPMsg_Echo_Interrupt1/Makefile b/examples/am335x/PRU_RPMsg_Echo_Interrupt1/Makefile
--- /dev/null
@@ -0,0 +1,86 @@
+# PRU_CGT environment variable must point to the TI PRU compiler directory. E.g.:
+#(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+#(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+ifndef PRU_CGT
+define ERROR_BODY
+
+************************************************************
+PRU_CGT environment variable is not set. Examples given:
+(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
+CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
+PROJ_NAME=$(CURRENT_DIR)
+LINKER_COMMAND_FILE=./AM335x_PRU.cmd
+LIBS=--library=../../../lib/rpmsg_lib.lib
+INCLUDE=--include_path=../../../include --include_path=../../../include/am335x
+STACK_SIZE=0x100
+HEAP_SIZE=0x100
+GEN_DIR=gen
+
+#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+CFLAGS=-v3 -O2 --display_error_number --endian=little --hardware_mac=on --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
+#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
+
+TARGET=$(GEN_DIR)/$(PROJ_NAME).out
+MAP=$(GEN_DIR)/$(PROJ_NAME).map
+SOURCES=$(wildcard *.c)
+#Using .object instead of .obj in order to not conflict with the CCS build process
+OBJECTS=$(patsubst %,$(GEN_DIR)/%,$(SOURCES:.c=.object))
+
+all: printStart $(TARGET) printEnd
+
+printStart:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Building project: $(PROJ_NAME)'
+
+printEnd:
+ @echo ''
+ @echo 'Finished building project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Invokes the linker (-z flag) to make the .out file
+$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
+ @echo ''
+ @echo 'Building target: $@'
+ @echo 'Invoking: PRU Linker'
+ $(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)
+ @echo 'Finished building target: $@'
+ @echo ''
+ @echo 'Output files can be found in the "$(GEN_DIR)" directory'
+
+# Invokes the compiler on all c files in the directory to create the object files
+$(GEN_DIR)/%.object: %.c
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+.PHONY: all clean
+
+# Remove the $(GEN_DIR) directory
+clean:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Cleaning project: $(PROJ_NAME)'
+ @echo ''
+ @echo 'Removing files in the "$(GEN_DIR)" directory'
+ @rm -rf $(GEN_DIR)
+ @echo ''
+ @echo 'Finished cleaning project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
+-include $(OBJECTS:%.object=%.pp)
+
diff --git a/examples/PRU_RPMsg_Echo_Interrupt1/main.c b/examples/am335x/PRU_RPMsg_Echo_Interrupt1/main.c
similarity index 96%
rename from examples/PRU_RPMsg_Echo_Interrupt1/main.c
rename to examples/am335x/PRU_RPMsg_Echo_Interrupt1/main.c
index 27082bd287c51a4a3a3959c4910001477a482765..3c6d4dbfc965c15336a29acf2e20732914228707 100644 (file)
rename from examples/PRU_RPMsg_Echo_Interrupt1/main.c
rename to examples/am335x/PRU_RPMsg_Echo_Interrupt1/main.c
index 27082bd287c51a4a3a3959c4910001477a482765..3c6d4dbfc965c15336a29acf2e20732914228707 100644 (file)
CT_MBX.IRQ[MB_USER].ENABLE_SET |= 1 << (MB_FROM_ARM_HOST * 2);
/* Initialize pru_virtqueue corresponding to vring0 (PRU to ARM Host direction) */
- pru_virtqueue_init(&transport.virtqueue0, &resourceTable.rpmsg_vring0, MB_TO_ARM_HOST, MB_FROM_ARM_HOST);
+ pru_virtqueue_init(&transport.virtqueue0, &resourceTable.rpmsg_vring0, &CT_MBX.MESSAGE[MB_TO_ARM_HOST], &CT_MBX.MESSAGE[MB_FROM_ARM_HOST]);
/* Initialize pru_virtqueue corresponding to vring1 (ARM Host to PRU direction) */
- pru_virtqueue_init(&transport.virtqueue1, &resourceTable.rpmsg_vring1, MB_TO_ARM_HOST, MB_FROM_ARM_HOST);
+ pru_virtqueue_init(&transport.virtqueue1, &resourceTable.rpmsg_vring1, &CT_MBX.MESSAGE[MB_TO_ARM_HOST], &CT_MBX.MESSAGE[MB_FROM_ARM_HOST]);
/* Create the RPMsg channel between the PRU and ARM user space using the transport structure. */
while(pru_rpmsg_channel(RPMSG_NS_CREATE, &transport, CHAN_NAME, CHAN_DESC, CHAN_PORT) != PRU_RPMSG_SUCCESS);
diff --git a/examples/PRU_RPMsg_Echo_Interrupt1/resource_table_1.h b/examples/am335x/PRU_RPMsg_Echo_Interrupt1/resource_table_1.h
similarity index 100%
rename from examples/PRU_RPMsg_Echo_Interrupt1/resource_table_1.h
rename to examples/am335x/PRU_RPMsg_Echo_Interrupt1/resource_table_1.h
rename from examples/PRU_RPMsg_Echo_Interrupt1/resource_table_1.h
rename to examples/am335x/PRU_RPMsg_Echo_Interrupt1/resource_table_1.h
diff --git a/examples/PRU_RPMsg_Echo_Polling0/.ccsproject b/examples/am335x/PRU_RPMsg_Echo_Polling0/.ccsproject
similarity index 100%
rename from examples/PRU_RPMsg_Echo_Polling0/.ccsproject
rename to examples/am335x/PRU_RPMsg_Echo_Polling0/.ccsproject
rename from examples/PRU_RPMsg_Echo_Polling0/.ccsproject
rename to examples/am335x/PRU_RPMsg_Echo_Polling0/.ccsproject
diff --git a/examples/PRU_RPMsg_Echo_Polling0/.cproject b/examples/am335x/PRU_RPMsg_Echo_Polling0/.cproject
similarity index 98%
rename from examples/PRU_RPMsg_Echo_Polling0/.cproject
rename to examples/am335x/PRU_RPMsg_Echo_Polling0/.cproject
index 1e7e2336d3b4f5fe9b59f9c52b80c5f703b2de91..fcbbf5e5f93e52644d1b37fa803ee5b436b4eb45 100644 (file)
rename from examples/PRU_RPMsg_Echo_Polling0/.cproject
rename to examples/am335x/PRU_RPMsg_Echo_Polling0/.cproject
index 1e7e2336d3b4f5fe9b59f9c52b80c5f703b2de91..fcbbf5e5f93e52644d1b37fa803ee5b436b4eb45 100644 (file)
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WRAP.808494658" 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"/>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.1416152935" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
<listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
- <listOptionValue builtIn="false" value=""../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am335x""/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.1893677500" 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"/>
<inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS.220273277" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY.696960495" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY" valueType="libs">
<listOptionValue builtIn="false" value=""libc.a""/>
- <listOptionValue builtIn="false" value=""../../../lib/rpmsg_lib.lib""/>
+ <listOptionValue builtIn="false" value=""../../../../lib/rpmsg_lib.lib""/>
</option>
<inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS.163079653" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS"/>
<inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS.1613690288" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS"/>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WRAP.1292557947" 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"/>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.1323420905" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
<listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
- <listOptionValue builtIn="false" value=""../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am335x""/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.2026415318" 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"/>
<inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS.1978016321" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY.2132398807" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY" valueType="libs">
<listOptionValue builtIn="false" value=""libc.a""/>
- <listOptionValue builtIn="false" value=""../../../lib/rpmsg_lib.lib""/>
+ <listOptionValue builtIn="false" value=""../../../../lib/rpmsg_lib.lib""/>
</option>
<inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS.157547428" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS"/>
<inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS.782018221" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS"/>
diff --git a/examples/PRU_RPMsg_Echo_Polling0/.project b/examples/am335x/PRU_RPMsg_Echo_Polling0/.project
similarity index 100%
rename from examples/PRU_RPMsg_Echo_Polling0/.project
rename to examples/am335x/PRU_RPMsg_Echo_Polling0/.project
rename from examples/PRU_RPMsg_Echo_Polling0/.project
rename to examples/am335x/PRU_RPMsg_Echo_Polling0/.project
diff --git a/examples/PRU_RPMsg_Echo_Polling0/.settings/org.eclipse.cdt.codan.core.prefs b/examples/am335x/PRU_RPMsg_Echo_Polling0/.settings/org.eclipse.cdt.codan.core.prefs
similarity index 100%
rename from examples/PRU_RPMsg_Echo_Polling0/.settings/org.eclipse.cdt.codan.core.prefs
rename to examples/am335x/PRU_RPMsg_Echo_Polling0/.settings/org.eclipse.cdt.codan.core.prefs
rename from examples/PRU_RPMsg_Echo_Polling0/.settings/org.eclipse.cdt.codan.core.prefs
rename to examples/am335x/PRU_RPMsg_Echo_Polling0/.settings/org.eclipse.cdt.codan.core.prefs
diff --git a/examples/PRU_RPMsg_Echo_Polling0/.settings/org.eclipse.cdt.debug.core.prefs b/examples/am335x/PRU_RPMsg_Echo_Polling0/.settings/org.eclipse.cdt.debug.core.prefs
similarity index 100%
rename from examples/PRU_RPMsg_Echo_Polling0/.settings/org.eclipse.cdt.debug.core.prefs
rename to examples/am335x/PRU_RPMsg_Echo_Polling0/.settings/org.eclipse.cdt.debug.core.prefs
rename from examples/PRU_RPMsg_Echo_Polling0/.settings/org.eclipse.cdt.debug.core.prefs
rename to examples/am335x/PRU_RPMsg_Echo_Polling0/.settings/org.eclipse.cdt.debug.core.prefs
diff --git a/examples/PRU_RPMsg_Echo_Polling0/AM335x_PRU.cmd b/examples/am335x/PRU_RPMsg_Echo_Polling0/AM335x_PRU.cmd
similarity index 100%
rename from examples/PRU_RPMsg_Echo_Polling0/AM335x_PRU.cmd
rename to examples/am335x/PRU_RPMsg_Echo_Polling0/AM335x_PRU.cmd
rename from examples/PRU_RPMsg_Echo_Polling0/AM335x_PRU.cmd
rename to examples/am335x/PRU_RPMsg_Echo_Polling0/AM335x_PRU.cmd
diff --git a/examples/am335x/PRU_RPMsg_Echo_Polling0/Makefile b/examples/am335x/PRU_RPMsg_Echo_Polling0/Makefile
--- /dev/null
@@ -0,0 +1,86 @@
+# PRU_CGT environment variable must point to the TI PRU compiler directory. E.g.:
+#(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+#(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+ifndef PRU_CGT
+define ERROR_BODY
+
+************************************************************
+PRU_CGT environment variable is not set. Examples given:
+(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
+CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
+PROJ_NAME=$(CURRENT_DIR)
+LINKER_COMMAND_FILE=./AM335x_PRU.cmd
+LIBS=--library=../../../lib/rpmsg_lib.lib
+INCLUDE=--include_path=../../../include --include_path=../../../include/am335x
+STACK_SIZE=0x100
+HEAP_SIZE=0x100
+GEN_DIR=gen
+
+#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+CFLAGS=-v3 -O2 --display_error_number --endian=little --hardware_mac=on --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
+#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
+
+TARGET=$(GEN_DIR)/$(PROJ_NAME).out
+MAP=$(GEN_DIR)/$(PROJ_NAME).map
+SOURCES=$(wildcard *.c)
+#Using .object instead of .obj in order to not conflict with the CCS build process
+OBJECTS=$(patsubst %,$(GEN_DIR)/%,$(SOURCES:.c=.object))
+
+all: printStart $(TARGET) printEnd
+
+printStart:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Building project: $(PROJ_NAME)'
+
+printEnd:
+ @echo ''
+ @echo 'Finished building project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Invokes the linker (-z flag) to make the .out file
+$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
+ @echo ''
+ @echo 'Building target: $@'
+ @echo 'Invoking: PRU Linker'
+ $(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)
+ @echo 'Finished building target: $@'
+ @echo ''
+ @echo 'Output files can be found in the "$(GEN_DIR)" directory'
+
+# Invokes the compiler on all c files in the directory to create the object files
+$(GEN_DIR)/%.object: %.c
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+.PHONY: all clean
+
+# Remove the $(GEN_DIR) directory
+clean:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Cleaning project: $(PROJ_NAME)'
+ @echo ''
+ @echo 'Removing files in the "$(GEN_DIR)" directory'
+ @rm -rf $(GEN_DIR)
+ @echo ''
+ @echo 'Finished cleaning project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
+-include $(OBJECTS:%.object=%.pp)
+
diff --git a/examples/PRU_RPMsg_Echo_Polling0/main.c b/examples/am335x/PRU_RPMsg_Echo_Polling0/main.c
similarity index 95%
rename from examples/PRU_RPMsg_Echo_Polling0/main.c
rename to examples/am335x/PRU_RPMsg_Echo_Polling0/main.c
index 39438f26dda7ead812398fb3c425a5b293799773..ed04f9b611f3103375d7697e8cf82fa2ac9e951a 100644 (file)
rename from examples/PRU_RPMsg_Echo_Polling0/main.c
rename to examples/am335x/PRU_RPMsg_Echo_Polling0/main.c
index 39438f26dda7ead812398fb3c425a5b293799773..ed04f9b611f3103375d7697e8cf82fa2ac9e951a 100644 (file)
CT_CFG.SYSCFG_bit.STANDBY_INIT = 0;
/* Initialize pru_virtqueue corresponding to vring0 (PRU to ARM Host direction) */
- pru_virtqueue_init(&transport.virtqueue0, &resourceTable.rpmsg_vring0, MB_TO_ARM_HOST, MB_FROM_ARM_HOST);
+ pru_virtqueue_init(&transport.virtqueue0, &resourceTable.rpmsg_vring0, &CT_MBX.MESSAGE[MB_TO_ARM_HOST], &CT_MBX.MESSAGE[MB_FROM_ARM_HOST]);
/* Initialize pru_virtqueue corresponding to vring1 (ARM Host to PRU direction) */
- pru_virtqueue_init(&transport.virtqueue1, &resourceTable.rpmsg_vring1, MB_TO_ARM_HOST, MB_FROM_ARM_HOST);
+ pru_virtqueue_init(&transport.virtqueue1, &resourceTable.rpmsg_vring1, &CT_MBX.MESSAGE[MB_TO_ARM_HOST], &CT_MBX.MESSAGE[MB_FROM_ARM_HOST]);
/* Create the RPMsg channel between the PRU and ARM user space using the transport structure.
* The name 'rpmsg-pru' corresponds to the rpmsg_pru driver found
diff --git a/examples/PRU_RPMsg_Echo_Polling0/resource_table_0.h b/examples/am335x/PRU_RPMsg_Echo_Polling0/resource_table_0.h
similarity index 100%
rename from examples/PRU_RPMsg_Echo_Polling0/resource_table_0.h
rename to examples/am335x/PRU_RPMsg_Echo_Polling0/resource_table_0.h
rename from examples/PRU_RPMsg_Echo_Polling0/resource_table_0.h
rename to examples/am335x/PRU_RPMsg_Echo_Polling0/resource_table_0.h
diff --git a/examples/PRU_RPMsg_Echo_Polling1/.ccsproject b/examples/am335x/PRU_RPMsg_Echo_Polling1/.ccsproject
similarity index 100%
rename from examples/PRU_RPMsg_Echo_Polling1/.ccsproject
rename to examples/am335x/PRU_RPMsg_Echo_Polling1/.ccsproject
rename from examples/PRU_RPMsg_Echo_Polling1/.ccsproject
rename to examples/am335x/PRU_RPMsg_Echo_Polling1/.ccsproject
diff --git a/examples/PRU_RPMsg_Echo_Polling1/.cproject b/examples/am335x/PRU_RPMsg_Echo_Polling1/.cproject
similarity index 98%
rename from examples/PRU_RPMsg_Echo_Polling1/.cproject
rename to examples/am335x/PRU_RPMsg_Echo_Polling1/.cproject
index 28a7f983fbbe92b183a95cba0f5fbf336141d5b4..ff4df5de49b2d48917021fcc60f94a1686308f39 100644 (file)
rename from examples/PRU_RPMsg_Echo_Polling1/.cproject
rename to examples/am335x/PRU_RPMsg_Echo_Polling1/.cproject
index 28a7f983fbbe92b183a95cba0f5fbf336141d5b4..ff4df5de49b2d48917021fcc60f94a1686308f39 100644 (file)
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WRAP.1269994054" 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"/>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.878533214" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
<listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
- <listOptionValue builtIn="false" value=""../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am335x""/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.955978303" 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"/>
<inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS.308946798" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY.1639907077" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY" valueType="libs">
<listOptionValue builtIn="false" value=""libc.a""/>
- <listOptionValue builtIn="false" value=""../../../lib/rpmsg_lib.lib""/>
+ <listOptionValue builtIn="false" value=""../../../../lib/rpmsg_lib.lib""/>
</option>
<inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS.1325756593" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS"/>
<inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS.190075599" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS"/>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WRAP.987155529" 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"/>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.110924166" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
<listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
- <listOptionValue builtIn="false" value=""../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am335x""/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.925905158" 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"/>
<inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS.1453712702" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY.325398184" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY" valueType="libs">
<listOptionValue builtIn="false" value=""libc.a""/>
- <listOptionValue builtIn="false" value=""../../../lib/rpmsg_lib.lib""/>
+ <listOptionValue builtIn="false" value=""../../../../lib/rpmsg_lib.lib""/>
</option>
<inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS.985065922" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS"/>
<inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS.515972833" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS"/>
diff --git a/examples/PRU_RPMsg_Echo_Polling1/.project b/examples/am335x/PRU_RPMsg_Echo_Polling1/.project
similarity index 100%
rename from examples/PRU_RPMsg_Echo_Polling1/.project
rename to examples/am335x/PRU_RPMsg_Echo_Polling1/.project
rename from examples/PRU_RPMsg_Echo_Polling1/.project
rename to examples/am335x/PRU_RPMsg_Echo_Polling1/.project
diff --git a/examples/PRU_RPMsg_Echo_Polling1/.settings/org.eclipse.cdt.codan.core.prefs b/examples/am335x/PRU_RPMsg_Echo_Polling1/.settings/org.eclipse.cdt.codan.core.prefs
similarity index 100%
rename from examples/PRU_RPMsg_Echo_Polling1/.settings/org.eclipse.cdt.codan.core.prefs
rename to examples/am335x/PRU_RPMsg_Echo_Polling1/.settings/org.eclipse.cdt.codan.core.prefs
rename from examples/PRU_RPMsg_Echo_Polling1/.settings/org.eclipse.cdt.codan.core.prefs
rename to examples/am335x/PRU_RPMsg_Echo_Polling1/.settings/org.eclipse.cdt.codan.core.prefs
diff --git a/examples/PRU_RPMsg_Echo_Polling1/.settings/org.eclipse.cdt.debug.core.prefs b/examples/am335x/PRU_RPMsg_Echo_Polling1/.settings/org.eclipse.cdt.debug.core.prefs
similarity index 100%
rename from examples/PRU_RPMsg_Echo_Polling1/.settings/org.eclipse.cdt.debug.core.prefs
rename to examples/am335x/PRU_RPMsg_Echo_Polling1/.settings/org.eclipse.cdt.debug.core.prefs
rename from examples/PRU_RPMsg_Echo_Polling1/.settings/org.eclipse.cdt.debug.core.prefs
rename to examples/am335x/PRU_RPMsg_Echo_Polling1/.settings/org.eclipse.cdt.debug.core.prefs
diff --git a/examples/PRU_RPMsg_Echo_Polling1/AM335x_PRU.cmd b/examples/am335x/PRU_RPMsg_Echo_Polling1/AM335x_PRU.cmd
similarity index 100%
rename from examples/PRU_RPMsg_Echo_Polling1/AM335x_PRU.cmd
rename to examples/am335x/PRU_RPMsg_Echo_Polling1/AM335x_PRU.cmd
rename from examples/PRU_RPMsg_Echo_Polling1/AM335x_PRU.cmd
rename to examples/am335x/PRU_RPMsg_Echo_Polling1/AM335x_PRU.cmd
diff --git a/examples/am335x/PRU_RPMsg_Echo_Polling1/Makefile b/examples/am335x/PRU_RPMsg_Echo_Polling1/Makefile
--- /dev/null
@@ -0,0 +1,86 @@
+# PRU_CGT environment variable must point to the TI PRU compiler directory. E.g.:
+#(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+#(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+ifndef PRU_CGT
+define ERROR_BODY
+
+************************************************************
+PRU_CGT environment variable is not set. Examples given:
+(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
+CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
+PROJ_NAME=$(CURRENT_DIR)
+LINKER_COMMAND_FILE=./AM335x_PRU.cmd
+LIBS=--library=../../../lib/rpmsg_lib.lib
+INCLUDE=--include_path=../../../include --include_path=../../../include/am335x
+STACK_SIZE=0x100
+HEAP_SIZE=0x100
+GEN_DIR=gen
+
+#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+CFLAGS=-v3 -O2 --display_error_number --endian=little --hardware_mac=on --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
+#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
+
+TARGET=$(GEN_DIR)/$(PROJ_NAME).out
+MAP=$(GEN_DIR)/$(PROJ_NAME).map
+SOURCES=$(wildcard *.c)
+#Using .object instead of .obj in order to not conflict with the CCS build process
+OBJECTS=$(patsubst %,$(GEN_DIR)/%,$(SOURCES:.c=.object))
+
+all: printStart $(TARGET) printEnd
+
+printStart:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Building project: $(PROJ_NAME)'
+
+printEnd:
+ @echo ''
+ @echo 'Finished building project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Invokes the linker (-z flag) to make the .out file
+$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
+ @echo ''
+ @echo 'Building target: $@'
+ @echo 'Invoking: PRU Linker'
+ $(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)
+ @echo 'Finished building target: $@'
+ @echo ''
+ @echo 'Output files can be found in the "$(GEN_DIR)" directory'
+
+# Invokes the compiler on all c files in the directory to create the object files
+$(GEN_DIR)/%.object: %.c
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+.PHONY: all clean
+
+# Remove the $(GEN_DIR) directory
+clean:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Cleaning project: $(PROJ_NAME)'
+ @echo ''
+ @echo 'Removing files in the "$(GEN_DIR)" directory'
+ @rm -rf $(GEN_DIR)
+ @echo ''
+ @echo 'Finished cleaning project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
+-include $(OBJECTS:%.object=%.pp)
+
diff --git a/examples/PRU_RPMsg_Echo_Polling1/main.c b/examples/am335x/PRU_RPMsg_Echo_Polling1/main.c
similarity index 95%
rename from examples/PRU_RPMsg_Echo_Polling1/main.c
rename to examples/am335x/PRU_RPMsg_Echo_Polling1/main.c
index 9401994a9f836c32ef03f7602a9688b8c5096376..f4cd5b8cf11dc8f237b6b49adb1b283b0bbbd10b 100644 (file)
rename from examples/PRU_RPMsg_Echo_Polling1/main.c
rename to examples/am335x/PRU_RPMsg_Echo_Polling1/main.c
index 9401994a9f836c32ef03f7602a9688b8c5096376..f4cd5b8cf11dc8f237b6b49adb1b283b0bbbd10b 100644 (file)
CT_CFG.SYSCFG_bit.STANDBY_INIT = 0;
/* Initialize pru_virtqueue corresponding to vring0 (PRU to ARM Host direction) */
- pru_virtqueue_init(&transport.virtqueue0, &resourceTable.rpmsg_vring0, MB_TO_ARM_HOST, MB_FROM_ARM_HOST);
+ pru_virtqueue_init(&transport.virtqueue0, &resourceTable.rpmsg_vring0, &CT_MBX.MESSAGE[MB_TO_ARM_HOST], &CT_MBX.MESSAGE[MB_FROM_ARM_HOST]);
/* Initialize pru_virtqueue corresponding to vring1 (ARM Host to PRU direction) */
- pru_virtqueue_init(&transport.virtqueue1, &resourceTable.rpmsg_vring1, MB_TO_ARM_HOST, MB_FROM_ARM_HOST);
+ pru_virtqueue_init(&transport.virtqueue1, &resourceTable.rpmsg_vring1, &CT_MBX.MESSAGE[MB_TO_ARM_HOST], &CT_MBX.MESSAGE[MB_FROM_ARM_HOST]);
/* Create the RPMsg channel between the PRU and ARM user space using the transport structure.
* The name 'rpmsg-pru' corresponds to the rpmsg_pru driver found
diff --git a/examples/PRU_RPMsg_Echo_Polling1/resource_table_1.h b/examples/am335x/PRU_RPMsg_Echo_Polling1/resource_table_1.h
similarity index 100%
rename from examples/PRU_RPMsg_Echo_Polling1/resource_table_1.h
rename to examples/am335x/PRU_RPMsg_Echo_Polling1/resource_table_1.h
rename from examples/PRU_RPMsg_Echo_Polling1/resource_table_1.h
rename to examples/am335x/PRU_RPMsg_Echo_Polling1/resource_table_1.h
diff --git a/examples/PRU_access_const_table/.ccsproject b/examples/am335x/PRU_access_const_table/.ccsproject
similarity index 100%
rename from examples/PRU_access_const_table/.ccsproject
rename to examples/am335x/PRU_access_const_table/.ccsproject
rename from examples/PRU_access_const_table/.ccsproject
rename to examples/am335x/PRU_access_const_table/.ccsproject
diff --git a/examples/PRU_access_const_table/.cproject b/examples/am335x/PRU_access_const_table/.cproject
similarity index 98%
rename from examples/PRU_access_const_table/.cproject
rename to examples/am335x/PRU_access_const_table/.cproject
index 8093051635e7b8077b0f5cad5d1f4c1eb4d3f06d..9986cef8a735c6a629f9d0ccc99c1388ee299308 100755 (executable)
rename from examples/PRU_access_const_table/.cproject
rename to examples/am335x/PRU_access_const_table/.cproject
index 8093051635e7b8077b0f5cad5d1f4c1eb4d3f06d..9986cef8a735c6a629f9d0ccc99c1388ee299308 100755 (executable)
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.1921551388" 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"/>\r
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.780390786" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">\r
<listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>\r
- <listOptionValue builtIn="false" value=""../../../include""/>\r
+ <listOptionValue builtIn="false" value=""../../../../include""/>\r
+ <listOptionValue builtIn="false" value=""../../../../include/am335x""/>\r
</option>\r
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEBUGGING_MODEL.536157321" 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"/>\r
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.1971334072" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">\r
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.1270930881" 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"/>\r
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.157855862" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">\r
<listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>\r
- <listOptionValue builtIn="false" value="../../../include"/>\r
+ <listOptionValue builtIn="false" value="../../../../include"/>\r
+ <listOptionValue builtIn="false" value="../../../../include/am335x"/>\r
</option>\r
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.102282231" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">\r
<listOptionValue builtIn="false" value="225"/>\r
diff --git a/examples/PRU_access_const_table/.project b/examples/am335x/PRU_access_const_table/.project
similarity index 100%
rename from examples/PRU_access_const_table/.project
rename to examples/am335x/PRU_access_const_table/.project
rename from examples/PRU_access_const_table/.project
rename to examples/am335x/PRU_access_const_table/.project
diff --git a/examples/PRU_access_const_table/.settings/org.eclipse.cdt.codan.core.prefs b/examples/am335x/PRU_access_const_table/.settings/org.eclipse.cdt.codan.core.prefs
similarity index 100%
rename from examples/PRU_access_const_table/.settings/org.eclipse.cdt.codan.core.prefs
rename to examples/am335x/PRU_access_const_table/.settings/org.eclipse.cdt.codan.core.prefs
rename from examples/PRU_access_const_table/.settings/org.eclipse.cdt.codan.core.prefs
rename to examples/am335x/PRU_access_const_table/.settings/org.eclipse.cdt.codan.core.prefs
diff --git a/examples/PRU_access_const_table/.settings/org.eclipse.cdt.debug.core.prefs b/examples/am335x/PRU_access_const_table/.settings/org.eclipse.cdt.debug.core.prefs
similarity index 100%
rename from examples/PRU_access_const_table/.settings/org.eclipse.cdt.debug.core.prefs
rename to examples/am335x/PRU_access_const_table/.settings/org.eclipse.cdt.debug.core.prefs
rename from examples/PRU_access_const_table/.settings/org.eclipse.cdt.debug.core.prefs
rename to examples/am335x/PRU_access_const_table/.settings/org.eclipse.cdt.debug.core.prefs
diff --git a/examples/PRU_access_const_table/AM335x_PRU.cmd b/examples/am335x/PRU_access_const_table/AM335x_PRU.cmd
similarity index 100%
rename from examples/PRU_access_const_table/AM335x_PRU.cmd
rename to examples/am335x/PRU_access_const_table/AM335x_PRU.cmd
rename from examples/PRU_access_const_table/AM335x_PRU.cmd
rename to examples/am335x/PRU_access_const_table/AM335x_PRU.cmd
diff --git a/examples/am335x/PRU_access_const_table/Makefile b/examples/am335x/PRU_access_const_table/Makefile
--- /dev/null
@@ -0,0 +1,86 @@
+# PRU_CGT environment variable must point to the TI PRU compiler directory. E.g.:
+#(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+#(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+ifndef PRU_CGT
+define ERROR_BODY
+
+************************************************************
+PRU_CGT environment variable is not set. Examples given:
+(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
+CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
+PROJ_NAME=$(CURRENT_DIR)
+LINKER_COMMAND_FILE=./AM335x_PRU.cmd
+LIBS=--library=../../../lib/rpmsg_lib.lib
+INCLUDE=--include_path=../../../include --include_path=../../../include/am335x
+STACK_SIZE=0x100
+HEAP_SIZE=0x100
+GEN_DIR=gen
+
+#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+CFLAGS=-v3 -O2 --display_error_number --endian=little --hardware_mac=on --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
+#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
+
+TARGET=$(GEN_DIR)/$(PROJ_NAME).out
+MAP=$(GEN_DIR)/$(PROJ_NAME).map
+SOURCES=$(wildcard *.c)
+#Using .object instead of .obj in order to not conflict with the CCS build process
+OBJECTS=$(patsubst %,$(GEN_DIR)/%,$(SOURCES:.c=.object))
+
+all: printStart $(TARGET) printEnd
+
+printStart:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Building project: $(PROJ_NAME)'
+
+printEnd:
+ @echo ''
+ @echo 'Finished building project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Invokes the linker (-z flag) to make the .out file
+$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
+ @echo ''
+ @echo 'Building target: $@'
+ @echo 'Invoking: PRU Linker'
+ $(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)
+ @echo 'Finished building target: $@'
+ @echo ''
+ @echo 'Output files can be found in the "$(GEN_DIR)" directory'
+
+# Invokes the compiler on all c files in the directory to create the object files
+$(GEN_DIR)/%.object: %.c
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+.PHONY: all clean
+
+# Remove the $(GEN_DIR) directory
+clean:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Cleaning project: $(PROJ_NAME)'
+ @echo ''
+ @echo 'Removing files in the "$(GEN_DIR)" directory'
+ @rm -rf $(GEN_DIR)
+ @echo ''
+ @echo 'Finished cleaning project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
+-include $(OBJECTS:%.object=%.pp)
+
diff --git a/examples/PRU_access_const_table/PRU_access_const_table.c b/examples/am335x/PRU_access_const_table/PRU_access_const_table.c
similarity index 100%
rename from examples/PRU_access_const_table/PRU_access_const_table.c
rename to examples/am335x/PRU_access_const_table/PRU_access_const_table.c
rename from examples/PRU_access_const_table/PRU_access_const_table.c
rename to examples/am335x/PRU_access_const_table/PRU_access_const_table.c
diff --git a/examples/PRU_access_const_table/resource_table_empty.h b/examples/am335x/PRU_access_const_table/resource_table_empty.h
similarity index 100%
rename from examples/PRU_access_const_table/resource_table_empty.h
rename to examples/am335x/PRU_access_const_table/resource_table_empty.h
rename from examples/PRU_access_const_table/resource_table_empty.h
rename to examples/am335x/PRU_access_const_table/resource_table_empty.h
similarity index 100%
rename from examples/PRU_edmaConfig/.ccsproject
rename to examples/am335x/PRU_edmaConfig/.ccsproject
rename from examples/PRU_edmaConfig/.ccsproject
rename to examples/am335x/PRU_edmaConfig/.ccsproject
similarity index 98%
rename from examples/PRU_edmaConfig/.cproject
rename to examples/am335x/PRU_edmaConfig/.cproject
index a1bc79b6fe7aa5b0b2a28436925e317dc7d5b5c1..c9d479ca3c2c82fe9860ec21378d0b8347901557 100755 (executable)
rename from examples/PRU_edmaConfig/.cproject
rename to examples/am335x/PRU_edmaConfig/.cproject
index a1bc79b6fe7aa5b0b2a28436925e317dc7d5b5c1..c9d479ca3c2c82fe9860ec21378d0b8347901557 100755 (executable)
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.1940019976" 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"/>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.481606437" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
<listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
- <listOptionValue builtIn="false" value=""../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am335x""/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEBUGGING_MODEL.1599796896" 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"/>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.637758918" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.948596204" 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"/>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.1049497590" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
<listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
- <listOptionValue builtIn="false" value="../../../include"/>
+ <listOptionValue builtIn="false" value="../../../../include"/>
+ <listOptionValue builtIn="false" value=""../../../../include/am335x""/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.1900776811" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">
<listOptionValue builtIn="false" value="225"/>
similarity index 100%
rename from examples/PRU_edmaConfig/.project
rename to examples/am335x/PRU_edmaConfig/.project
rename from examples/PRU_edmaConfig/.project
rename to examples/am335x/PRU_edmaConfig/.project
diff --git a/examples/PRU_edmaConfig/.settings/org.eclipse.cdt.codan.core.prefs b/examples/am335x/PRU_edmaConfig/.settings/org.eclipse.cdt.codan.core.prefs
similarity index 100%
rename from examples/PRU_edmaConfig/.settings/org.eclipse.cdt.codan.core.prefs
rename to examples/am335x/PRU_edmaConfig/.settings/org.eclipse.cdt.codan.core.prefs
rename from examples/PRU_edmaConfig/.settings/org.eclipse.cdt.codan.core.prefs
rename to examples/am335x/PRU_edmaConfig/.settings/org.eclipse.cdt.codan.core.prefs
diff --git a/examples/PRU_edmaConfig/.settings/org.eclipse.cdt.debug.core.prefs b/examples/am335x/PRU_edmaConfig/.settings/org.eclipse.cdt.debug.core.prefs
similarity index 100%
rename from examples/PRU_edmaConfig/.settings/org.eclipse.cdt.debug.core.prefs
rename to examples/am335x/PRU_edmaConfig/.settings/org.eclipse.cdt.debug.core.prefs
rename from examples/PRU_edmaConfig/.settings/org.eclipse.cdt.debug.core.prefs
rename to examples/am335x/PRU_edmaConfig/.settings/org.eclipse.cdt.debug.core.prefs
similarity index 100%
rename from examples/PRU_edmaConfig/AM335x_PRU.cmd
rename to examples/am335x/PRU_edmaConfig/AM335x_PRU.cmd
rename from examples/PRU_edmaConfig/AM335x_PRU.cmd
rename to examples/am335x/PRU_edmaConfig/AM335x_PRU.cmd
diff --git a/examples/am335x/PRU_edmaConfig/Makefile b/examples/am335x/PRU_edmaConfig/Makefile
--- /dev/null
@@ -0,0 +1,86 @@
+# PRU_CGT environment variable must point to the TI PRU compiler directory. E.g.:
+#(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+#(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+ifndef PRU_CGT
+define ERROR_BODY
+
+************************************************************
+PRU_CGT environment variable is not set. Examples given:
+(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
+CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
+PROJ_NAME=$(CURRENT_DIR)
+LINKER_COMMAND_FILE=./AM335x_PRU.cmd
+LIBS=--library=../../../lib/rpmsg_lib.lib
+INCLUDE=--include_path=../../../include --include_path=../../../include/am335x
+STACK_SIZE=0x100
+HEAP_SIZE=0x100
+GEN_DIR=gen
+
+#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+CFLAGS=-v3 -O2 --display_error_number --endian=little --hardware_mac=on --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
+#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
+
+TARGET=$(GEN_DIR)/$(PROJ_NAME).out
+MAP=$(GEN_DIR)/$(PROJ_NAME).map
+SOURCES=$(wildcard *.c)
+#Using .object instead of .obj in order to not conflict with the CCS build process
+OBJECTS=$(patsubst %,$(GEN_DIR)/%,$(SOURCES:.c=.object))
+
+all: printStart $(TARGET) printEnd
+
+printStart:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Building project: $(PROJ_NAME)'
+
+printEnd:
+ @echo ''
+ @echo 'Finished building project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Invokes the linker (-z flag) to make the .out file
+$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
+ @echo ''
+ @echo 'Building target: $@'
+ @echo 'Invoking: PRU Linker'
+ $(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)
+ @echo 'Finished building target: $@'
+ @echo ''
+ @echo 'Output files can be found in the "$(GEN_DIR)" directory'
+
+# Invokes the compiler on all c files in the directory to create the object files
+$(GEN_DIR)/%.object: %.c
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+.PHONY: all clean
+
+# Remove the $(GEN_DIR) directory
+clean:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Cleaning project: $(PROJ_NAME)'
+ @echo ''
+ @echo 'Removing files in the "$(GEN_DIR)" directory'
+ @rm -rf $(GEN_DIR)
+ @echo ''
+ @echo 'Finished cleaning project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
+-include $(OBJECTS:%.object=%.pp)
+
diff --git a/examples/PRU_edmaConfig/PRU_edmaConfig.c b/examples/am335x/PRU_edmaConfig/PRU_edmaConfig.c
similarity index 100%
rename from examples/PRU_edmaConfig/PRU_edmaConfig.c
rename to examples/am335x/PRU_edmaConfig/PRU_edmaConfig.c
rename from examples/PRU_edmaConfig/PRU_edmaConfig.c
rename to examples/am335x/PRU_edmaConfig/PRU_edmaConfig.c
diff --git a/examples/PRU_edmaConfig/resource_table_empty.h b/examples/am335x/PRU_edmaConfig/resource_table_empty.h
similarity index 100%
rename from examples/PRU_edmaConfig/resource_table_empty.h
rename to examples/am335x/PRU_edmaConfig/resource_table_empty.h
rename from examples/PRU_edmaConfig/resource_table_empty.h
rename to examples/am335x/PRU_edmaConfig/resource_table_empty.h
similarity index 100%
rename from examples/PRU_gpioToggle/.ccsproject
rename to examples/am335x/PRU_gpioToggle/.ccsproject
rename from examples/PRU_gpioToggle/.ccsproject
rename to examples/am335x/PRU_gpioToggle/.ccsproject
similarity index 98%
rename from examples/PRU_gpioToggle/.cproject
rename to examples/am335x/PRU_gpioToggle/.cproject
index cbaf96274224473ece3e5d77017d06443d08f2c6..bddd4330e2582b26f96438eaeb02b559219990ae 100755 (executable)
rename from examples/PRU_gpioToggle/.cproject
rename to examples/am335x/PRU_gpioToggle/.cproject
index cbaf96274224473ece3e5d77017d06443d08f2c6..bddd4330e2582b26f96438eaeb02b559219990ae 100755 (executable)
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.1604292976" 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"/>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.805001908" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
<listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
- <listOptionValue builtIn="false" value=""../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am335x""/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEBUGGING_MODEL.586463188" 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"/>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.570987400" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.545886324" 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"/>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.1249187079" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
<listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
- <listOptionValue builtIn="false" value="../../../include"/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am335x""/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.1586512721" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">
<listOptionValue builtIn="false" value="225"/>
similarity index 100%
rename from examples/PRU_gpioToggle/.project
rename to examples/am335x/PRU_gpioToggle/.project
rename from examples/PRU_gpioToggle/.project
rename to examples/am335x/PRU_gpioToggle/.project
diff --git a/examples/PRU_gpioToggle/.settings/org.eclipse.cdt.codan.core.prefs b/examples/am335x/PRU_gpioToggle/.settings/org.eclipse.cdt.codan.core.prefs
similarity index 100%
rename from examples/PRU_gpioToggle/.settings/org.eclipse.cdt.codan.core.prefs
rename to examples/am335x/PRU_gpioToggle/.settings/org.eclipse.cdt.codan.core.prefs
rename from examples/PRU_gpioToggle/.settings/org.eclipse.cdt.codan.core.prefs
rename to examples/am335x/PRU_gpioToggle/.settings/org.eclipse.cdt.codan.core.prefs
diff --git a/examples/PRU_gpioToggle/.settings/org.eclipse.cdt.debug.core.prefs b/examples/am335x/PRU_gpioToggle/.settings/org.eclipse.cdt.debug.core.prefs
similarity index 100%
rename from examples/PRU_gpioToggle/.settings/org.eclipse.cdt.debug.core.prefs
rename to examples/am335x/PRU_gpioToggle/.settings/org.eclipse.cdt.debug.core.prefs
rename from examples/PRU_gpioToggle/.settings/org.eclipse.cdt.debug.core.prefs
rename to examples/am335x/PRU_gpioToggle/.settings/org.eclipse.cdt.debug.core.prefs
similarity index 100%
rename from examples/PRU_gpioToggle/AM335x_PRU.cmd
rename to examples/am335x/PRU_gpioToggle/AM335x_PRU.cmd
rename from examples/PRU_gpioToggle/AM335x_PRU.cmd
rename to examples/am335x/PRU_gpioToggle/AM335x_PRU.cmd
diff --git a/examples/am335x/PRU_gpioToggle/Makefile b/examples/am335x/PRU_gpioToggle/Makefile
--- /dev/null
@@ -0,0 +1,86 @@
+# PRU_CGT environment variable must point to the TI PRU compiler directory. E.g.:
+#(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+#(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+ifndef PRU_CGT
+define ERROR_BODY
+
+************************************************************
+PRU_CGT environment variable is not set. Examples given:
+(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
+CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
+PROJ_NAME=$(CURRENT_DIR)
+LINKER_COMMAND_FILE=./AM335x_PRU.cmd
+LIBS=--library=../../../lib/rpmsg_lib.lib
+INCLUDE=--include_path=../../../include --include_path=../../../include/am335x
+STACK_SIZE=0x100
+HEAP_SIZE=0x100
+GEN_DIR=gen
+
+#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+CFLAGS=-v3 -O2 --display_error_number --endian=little --hardware_mac=on --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
+#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
+
+TARGET=$(GEN_DIR)/$(PROJ_NAME).out
+MAP=$(GEN_DIR)/$(PROJ_NAME).map
+SOURCES=$(wildcard *.c)
+#Using .object instead of .obj in order to not conflict with the CCS build process
+OBJECTS=$(patsubst %,$(GEN_DIR)/%,$(SOURCES:.c=.object))
+
+all: printStart $(TARGET) printEnd
+
+printStart:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Building project: $(PROJ_NAME)'
+
+printEnd:
+ @echo ''
+ @echo 'Finished building project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Invokes the linker (-z flag) to make the .out file
+$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
+ @echo ''
+ @echo 'Building target: $@'
+ @echo 'Invoking: PRU Linker'
+ $(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)
+ @echo 'Finished building target: $@'
+ @echo ''
+ @echo 'Output files can be found in the "$(GEN_DIR)" directory'
+
+# Invokes the compiler on all c files in the directory to create the object files
+$(GEN_DIR)/%.object: %.c
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+.PHONY: all clean
+
+# Remove the $(GEN_DIR) directory
+clean:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Cleaning project: $(PROJ_NAME)'
+ @echo ''
+ @echo 'Removing files in the "$(GEN_DIR)" directory'
+ @rm -rf $(GEN_DIR)
+ @echo ''
+ @echo 'Finished cleaning project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
+-include $(OBJECTS:%.object=%.pp)
+
diff --git a/examples/PRU_gpioToggle/PRU_gpioToggle.c b/examples/am335x/PRU_gpioToggle/PRU_gpioToggle.c
similarity index 100%
rename from examples/PRU_gpioToggle/PRU_gpioToggle.c
rename to examples/am335x/PRU_gpioToggle/PRU_gpioToggle.c
rename from examples/PRU_gpioToggle/PRU_gpioToggle.c
rename to examples/am335x/PRU_gpioToggle/PRU_gpioToggle.c
diff --git a/examples/PRU_gpioToggle/resource_table_empty.h b/examples/am335x/PRU_gpioToggle/resource_table_empty.h
similarity index 100%
rename from examples/PRU_gpioToggle/resource_table_empty.h
rename to examples/am335x/PRU_gpioToggle/resource_table_empty.h
rename from examples/PRU_gpioToggle/resource_table_empty.h
rename to examples/am335x/PRU_gpioToggle/resource_table_empty.h
diff --git a/examples/am437x/Makefile b/examples/am437x/Makefile
--- /dev/null
+++ b/examples/am437x/Makefile
@@ -0,0 +1,16 @@
+SUBDIRS=PRU_access_const_table PRU_ARMtoPRU_Interrupt PRU_Direct_Connect0 PRU_Direct_Connect1 PRU_edmaConfig PRU_gpioToggle PRU_Hardware_UART \
+PRU_IEP PRU_MAC_Multiply_Accum PRU_PRUtoARM_Interrupt PRU_RPMsg_Echo_Interrupt0 PRU_RPMsg_Echo_Interrupt1 PRU_RPMsg_Echo_Polling0 \
+PRU_RPMsg_Echo_Polling1
+
+all: $(SUBDIRS)
+
+$(SUBDIRS):
+ @$(MAKE) -C $@
+
+clean:
+ @for d in $(SUBDIRS); do (cd $$d; $(MAKE) clean ); done
+
+.PHONY: all clean $(SUBDIRS)
+
+
+
diff --git a/examples/am437x/PRU_ARMtoPRU_Interrupt/.ccsproject b/examples/am437x/PRU_ARMtoPRU_Interrupt/.ccsproject
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<?ccsproject version="1.0"?>
+<projectOptions>
+ <deviceVariant value="TMS192C2026.AM3359.BeagleBone_Black"/>
+ <deviceFamily value="PRU"/>
+ <deviceEndianness value="little"/>
+ <codegenToolVersion value="2.0.0.B2"/>
+ <isElfFormat value="true"/>
+ <rts value="libc.a"/>
+ <createSlaveProjects value=""/>
+ <templateProperties value="id=com.ti.common.project.core.emptyProjectTemplate,"/>
+ <isTargetManual value="false"/>
+</projectOptions>
diff --git a/examples/am437x/PRU_ARMtoPRU_Interrupt/.cproject b/examples/am437x/PRU_ARMtoPRU_Interrupt/.cproject
--- /dev/null
@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+ <storageModule configRelations="2" moduleId="org.eclipse.cdt.core.settings">
+ <cconfiguration id="com.ti.ccstudio.buildDefinitions.PRU.Debug.1820679446">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.PRU.Debug.1820679446" moduleId="org.eclipse.cdt.core.settings" name="Debug">
+ <externalSettings/>
+ <extensions>
+ <extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.LinkErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" id="com.ti.ccstudio.buildDefinitions.PRU.Debug.1820679446" name="Debug" parent="com.ti.ccstudio.buildDefinitions.PRU.Debug" postbuildStep="" prebuildStep="">
+ <folderInfo id="com.ti.ccstudio.buildDefinitions.PRU.Debug.1820679446." name="/" resourcePath="">
+ <toolChain id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.DebugToolchain.338923382" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.DebugToolchain" targetTool="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerDebug.90054371">
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.1117618053" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
+ <listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=TMS192C2026.AM4379.EVMAM437X"/>
+ <listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>
+ <listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>
+ <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.5.0"/>
+ <listOptionValue builtIn="false" value="LINKER_COMMAND_FILE=AM437x.cmd"/>
+ <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/>
+ <listOptionValue builtIn="false" value="OUTPUT_TYPE=executable"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.529428016" name="Compiler version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="2.1.1" valueType="string"/>
+ <targetPlatform id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformDebug.1827309272" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformDebug"/>
+ <builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderDebug.924673261" keepEnvironmentInBuildfile="false" name="GNU Make" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderDebug"/>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerDebug.1376681437" name="PRU Compiler" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerDebug">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE.274336854" name="Pre-define NAME (--define, -D)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="pru0"/>
+ <listOptionValue builtIn="false" value="am4379"/>
+ <listOptionValue builtIn="false" value="icss1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.SILICON_VERSION.210718691" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.626653854" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.944031744" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am437x""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEBUGGING_MODEL.594813794" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.1993593665" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">
+ <listOptionValue builtIn="false" value="225"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER.1721483775" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WRAP.1787866014" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.2098943146" 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"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS.272866140" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS.1376756286" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS.2093731087" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS.2068494477" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerDebug.90054371" name="PRU Linker" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerDebug">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE.39337189" name="Pre-define preprocessor macro _name_ to _value_ (--define)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="ICSS1_PRU_CORE=1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE.348900900" name="Set C system stack size (--stack_size, -stack)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE" value="0x100" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE.104518284" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE.1114179181" name="Specify output file name (--output_file, -o)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE" value=""${ProjName}.out"" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE.845401519" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY.137359677" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY" valueType="libs">
+ <listOptionValue builtIn="false" value=""libc.a""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH.359262531" name="Add <dir> to library search path (--search_path, -i)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH" valueType="libPaths">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/lib""/>
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO.961773930" 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"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS.1064796459" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS.1869963530" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS.1533487775" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.563017984" name="PRU Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.OUTPUT_FILE.5585984" name="Specify output file names (--outfile, -o)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.OUTPUT_FILE" value=""${BuildArtifactFileBaseName}.hex"" valueType="string"/>
+ </tool>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry excluding="AM335x_PRU.cmd|AM335x.cmd" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ <cconfiguration id="com.ti.ccstudio.buildDefinitions.PRU.Release.1374554491">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.PRU.Release.1374554491" moduleId="org.eclipse.cdt.core.settings" name="Release">
+ <externalSettings/>
+ <extensions>
+ <extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.LinkErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" id="com.ti.ccstudio.buildDefinitions.PRU.Release.1374554491" name="Release" parent="com.ti.ccstudio.buildDefinitions.PRU.Release" postbuildStep="" prebuildStep="">
+ <folderInfo id="com.ti.ccstudio.buildDefinitions.PRU.Release.1374554491." name="/" resourcePath="">
+ <toolChain id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.ReleaseToolchain.1864512190" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.ReleaseToolchain" targetTool="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease.684762653">
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.1625017199" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
+ <listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=TMS192C2026.AM4379.EVMAM437X"/>
+ <listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>
+ <listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>
+ <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.5.0"/>
+ <listOptionValue builtIn="false" value="LINKER_COMMAND_FILE="/>
+ <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/>
+ <listOptionValue builtIn="false" value="OUTPUT_TYPE=executable"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1505013839" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="2.1.1" valueType="string"/>
+ <targetPlatform id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformRelease.1199507042" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformRelease"/>
+ <builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderRelease.1345106296" name="GNU Make.Release" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderRelease"/>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerRelease.772118491" name="PRU Compiler" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerRelease">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE.1119115194" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="pru0"/>
+ <listOptionValue builtIn="false" value="am4379"/>
+ <listOptionValue builtIn="false" value="icss1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.SILICON_VERSION.67686825" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.609583426" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.333716273" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am437x""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.421454949" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">
+ <listOptionValue builtIn="false" value="225"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER.1059606467" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WRAP.894829767" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.1876644135" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN" value="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.little" valueType="enumerated"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS.146459191" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS.368395440" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS.1112957165" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS.2076678296" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease.684762653" name="PRU Linker" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE.1357962202" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="ICSS1_PRU_CORE=1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE.489412956" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE" value="0x100" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE.1123827909" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE" value="0x100" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE.707116396" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE" value=""${ProjName}.out"" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE.240232880" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE" value=""${ProjName}.map"" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY.674843171" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY" valueType="libs">
+ <listOptionValue builtIn="false" value=""libc.a""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH.394739548" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH" valueType="libPaths">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/lib""/>
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO.525786093" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO" value=""${ProjName}_linkInfo.xml"" valueType="string"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS.568014412" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS.383083080" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS.817301749" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.756950324" name="PRU Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.OUTPUT_FILE.226238281" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.OUTPUT_FILE" value=""${BuildArtifactFileBaseName}.hex"" valueType="string"/>
+ </tool>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry excluding="AM335x_PRU.cmd|AM437x.cmd|AM335x.cmd" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <project id="PRU_ARMtoPRU_Interrupt.com.ti.ccstudio.buildDefinitions.PRU.ProjectType.71443662" name="PRU" projectType="com.ti.ccstudio.buildDefinitions.PRU.ProjectType"/>
+ </storageModule>
+ <storageModule moduleId="scannerConfiguration"/>
+ <storageModule moduleId="org.eclipse.cdt.core.language.mapping">
+ <project-mappings>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.asmSource" language="com.ti.ccstudio.core.TIASMLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cHeader" language="com.ti.ccstudio.core.TIGCCLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cSource" language="com.ti.ccstudio.core.TIGCCLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxHeader" language="com.ti.ccstudio.core.TIGPPLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxSource" language="com.ti.ccstudio.core.TIGPPLanguage"/>
+ </project-mappings>
+ </storageModule>
+</cproject>
diff --git a/examples/am437x/PRU_ARMtoPRU_Interrupt/.project b/examples/am437x/PRU_ARMtoPRU_Interrupt/.project
--- /dev/null
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>PRU_ARMtoPRU_Interrupt</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+ <triggers>full,incremental,</triggers>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.ti.ccstudio.core.ccsNature</nature>
+ <nature>org.eclipse.cdt.core.cnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+ <nature>org.eclipse.cdt.core.ccnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+ </natures>
+</projectDescription>
diff --git a/examples/am437x/PRU_ARMtoPRU_Interrupt/.settings/org.eclipse.cdt.codan.core.prefs b/examples/am437x/PRU_ARMtoPRU_Interrupt/.settings/org.eclipse.cdt.codan.core.prefs
--- /dev/null
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+inEditor=false
+onBuild=false
diff --git a/examples/am437x/PRU_ARMtoPRU_Interrupt/.settings/org.eclipse.cdt.debug.core.prefs b/examples/am437x/PRU_ARMtoPRU_Interrupt/.settings/org.eclipse.cdt.debug.core.prefs
--- /dev/null
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+org.eclipse.cdt.debug.core.toggleBreakpointModel=com.ti.ccstudio.debug.CCSBreakpointMarker
diff --git a/examples/am437x/PRU_ARMtoPRU_Interrupt/AM437x_PRU_SS1.cmd b/examples/am437x/PRU_ARMtoPRU_Interrupt/AM437x_PRU_SS1.cmd
--- /dev/null
@@ -0,0 +1,84 @@
+/****************************************************************************/
+/* AM437x_PRU_SS1.cmd */
+/* Copyright (c) 2015 Texas Instruments Incorporated */
+/* */
+/* Description: This file is a linker command file that can be used for */
+/* linking PRU programs built with the C compiler and */
+/* the resulting .out file on an AM437x device. */
+/****************************************************************************/
+
+-cr /* Link using C conventions */
+
+/* Specify the System Memory Map */
+MEMORY
+{
+ PAGE 0:
+ PRU_IMEM : org = 0x00000000 len = 0x00003000 /* 12kB PRU-ICSS1 Instruction RAM */
+
+ PAGE 1:
+
+ /* RAM */
+
+ PRU_DMEM_0_1 : org = 0x00000000 len = 0x00002000 CREGISTER=24 /* 8kB PRU Data RAM 0_1 */
+ PRU_DMEM_1_0 : org = 0x00002000 len = 0x00002000 CREGISTER=25 /* 8kB PRU Data RAM 1_0 */
+ PRU_SHAREDMEM : org = 0x00010000 len = 0x00008000 CREGISTER=28 /* 32kB Shared RAM */
+
+ DDR : org = 0x80000000 len = 0x00000100 CREGISTER=31
+ L3OCMC : org = 0x40000000 len = 0x00010000 CREGISTER=30
+
+
+ /* Peripherals */
+
+ PRU_CFG : org = 0x00026000 len = 0x00000120 CREGISTER=4
+ PRU_ECAP : org = 0x00030000 len = 0x00000060 CREGISTER=3
+ PRU_IEP : org = 0x0002E000 len = 0x0000031C CREGISTER=26
+ PRU_INTC : org = 0x00020000 len = 0x00001504 CREGISTER=0
+ PRU_UART : org = 0x00028000 len = 0x00000038 CREGISTER=7
+
+ DCAN0 : org = 0x481CC000 len = 0x000001E8 CREGISTER=14
+ DCAN1 : org = 0x481D0000 len = 0x000001E8 CREGISTER=15
+ DMTIMER2 : org = 0x48040000 len = 0x0000005C CREGISTER=1
+ PWMSS0 : org = 0x48300000 len = 0x000002C4 CREGISTER=18
+ PWMSS1 : org = 0x48302000 len = 0x000002C4 CREGISTER=19
+ PWMSS2 : org = 0x48304000 len = 0x000002C4 CREGISTER=20
+ GEMAC : org = 0x4A100000 len = 0x0000128C CREGISTER=9
+ I2C1 : org = 0x4802A000 len = 0x000000D8 CREGISTER=2
+ I2C2 : org = 0x4819C000 len = 0x000000D8 CREGISTER=17
+ MBX0 : org = 0x480C8000 len = 0x00000140 CREGISTER=22
+ MCASP0_DMA : org = 0x46000000 len = 0x00000100 CREGISTER=8
+ MCSPI0 : org = 0x48030000 len = 0x000001A4 CREGISTER=6
+ MCSPI1 : org = 0x481A0000 len = 0x000001A4 CREGISTER=16
+ MMCSD0 : org = 0x48060000 len = 0x00000300 CREGISTER=5
+ SPINLOCK : org = 0x480CA000 len = 0x00000880 CREGISTER=23
+ TPCC : org = 0x49000000 len = 0x00001098 CREGISTER=29
+ UART1 : org = 0x48022000 len = 0x00000088 CREGISTER=11
+ UART2 : org = 0x48024000 len = 0x00000088 CREGISTER=12
+
+ RSVD10 : org = 0x48318000 len = 0x00000100 CREGISTER=10
+ RSVD13 : org = 0x48310000 len = 0x00000100 CREGISTER=13
+ RSVD21 : org = 0x00032400 len = 0x00000100 CREGISTER=21
+ RSVD27 : org = 0x00032000 len = 0x00000100 CREGISTER=27
+
+}
+
+/* Specify the sections allocation into memory */
+SECTIONS {
+ /* Forces _c_int00 to the start of PRU IRAM. Not necessary when loading
+ an ELF file, but useful when loading a binary */
+ .text:_c_int00* > 0x0, PAGE 0
+
+ .text > PRU_IMEM, PAGE 0
+ .stack > PRU_DMEM_0_1, PAGE 1
+ .bss > PRU_DMEM_0_1, PAGE 1
+ .cio > PRU_DMEM_0_1, PAGE 1
+ .data > PRU_DMEM_0_1, PAGE 1
+ .switch > PRU_DMEM_0_1, PAGE 1
+ .sysmem > PRU_DMEM_0_1, PAGE 1
+ .cinit > PRU_DMEM_0_1, PAGE 1
+ .rodata > PRU_DMEM_0_1, PAGE 1
+ .rofardata > PRU_DMEM_0_1, PAGE 1
+ .farbss > PRU_DMEM_0_1, PAGE 1
+ .fardata > PRU_DMEM_0_1, PAGE 1
+
+ .resource_table > PRU_DMEM_0_1, PAGE 1
+}
diff --git a/examples/am437x/PRU_ARMtoPRU_Interrupt/Makefile b/examples/am437x/PRU_ARMtoPRU_Interrupt/Makefile
--- /dev/null
@@ -0,0 +1,86 @@
+# PRU_CGT environment variable must point to the TI PRU compiler directory. E.g.:
+#(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+#(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+ifndef PRU_CGT
+define ERROR_BODY
+
+************************************************************
+PRU_CGT environment variable is not set. Examples given:
+(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
+CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
+PROJ_NAME=$(CURRENT_DIR)
+LINKER_COMMAND_FILE=./AM437x_PRU_SS1.cmd
+LIBS=--library=../../../lib/rpmsg_lib.lib
+INCLUDE=--include_path=../../../include --include_path=../../../include/am437x
+STACK_SIZE=0x100
+HEAP_SIZE=0x100
+GEN_DIR=gen
+
+#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+CFLAGS=-v3 -O2 --display_error_number --endian=little --hardware_mac=on --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
+#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
+
+TARGET=$(GEN_DIR)/$(PROJ_NAME).out
+MAP=$(GEN_DIR)/$(PROJ_NAME).map
+SOURCES=$(wildcard *.c)
+#Using .object instead of .obj in order to not conflict with the CCS build process
+OBJECTS=$(patsubst %,$(GEN_DIR)/%,$(SOURCES:.c=.object))
+
+all: printStart $(TARGET) printEnd
+
+printStart:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Building project: $(PROJ_NAME)'
+
+printEnd:
+ @echo ''
+ @echo 'Finished building project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Invokes the linker (-z flag) to make the .out file
+$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
+ @echo ''
+ @echo 'Building target: $@'
+ @echo 'Invoking: PRU Linker'
+ $(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)
+ @echo 'Finished building target: $@'
+ @echo ''
+ @echo 'Output files can be found in the "$(GEN_DIR)" directory'
+
+# Invokes the compiler on all c files in the directory to create the object files
+$(GEN_DIR)/%.object: %.c
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+.PHONY: all clean
+
+# Remove the $(GEN_DIR) directory
+clean:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Cleaning project: $(PROJ_NAME)'
+ @echo ''
+ @echo 'Removing files in the "$(GEN_DIR)" directory'
+ @rm -rf $(GEN_DIR)
+ @echo ''
+ @echo 'Finished cleaning project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
+-include $(OBJECTS:%.object=%.pp)
+
diff --git a/examples/am437x/PRU_ARMtoPRU_Interrupt/PRU_ARMtoPRU_Interrupt.c b/examples/am437x/PRU_ARMtoPRU_Interrupt/PRU_ARMtoPRU_Interrupt.c
--- /dev/null
@@ -0,0 +1,81 @@
+/*\r
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/ \r
+ * \r
+ * \r
+ * Redistribution and use in source and binary forms, with or without \r
+ * modification, are permitted provided that the following conditions \r
+ * are met:\r
+ * \r
+ * * Redistributions of source code must retain the above copyright \r
+ * notice, this list of conditions and the following disclaimer.\r
+ * \r
+ * * Redistributions in binary form must reproduce the above copyright\r
+ * notice, this list of conditions and the following disclaimer in the \r
+ * documentation and/or other materials provided with the \r
+ * distribution.\r
+ * \r
+ * * Neither the name of Texas Instruments Incorporated nor the names of\r
+ * its contributors may be used to endorse or promote products derived\r
+ * from this software without specific prior written permission.\r
+ * \r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \r
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \r
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT \r
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \r
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \r
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \r
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE \r
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ */\r
+\r
+#include <stdint.h>\r
+#include <pru_cfg.h>\r
+#include <pru_ctrl.h>\r
+#include <pru_intc.h>\r
+#include "resource_table_empty.h"\r
+\r
+volatile register uint32_t __R30;\r
+volatile register uint32_t __R31;\r
+\r
+/* Mapping Constant table register to variable */\r
+volatile far uint32_t CT_L3 __attribute__((cregister("L3OCMC", near), peripheral));\r
+volatile far uint32_t CT_DDR __attribute__((cregister("DDR", near), peripheral));\r
+\r
+/* PRU-to-ARM interrupt */\r
+#define PRU0_ARM_INTERRUPT (19+16)\r
+\r
+#define HOST_NUM 2\r
+#define CHAN_NUM 2\r
+\r
+void main(){\r
+ uint32_t *pDdr = (uint32_t *) &CT_DDR;\r
+ uint32_t score;\r
+\r
+ /* Clear SYSCFG[STANDBY_INIT] to enable OCP master port */\r
+ CT_CFG.SYSCFG_bit.STANDBY_INIT = 0;\r
+\r
+ /* Wait until receipt of interrupt on host 0 */\r
+ while((__R31 & 0x40000000) == 0){\r
+ }\r
+\r
+ /* Clear system event in SECR1 */\r
+ CT_INTC.SECR1 = 0x1;\r
+\r
+ /* Clear system event enable in ECR1 */\r
+ CT_INTC.ECR1 = 0x1;\r
+\r
+ /* Point C30 (L3) to 0x3000 offset and C31 (DDR) to 0x0 offset */\r
+ PRU0_CTRL.CTPPR1 = 0x00003000;\r
+\r
+ /* Load value from DDR, decrement, and store it in L3 */\r
+ score = pDdr[0];\r
+ score--;\r
+ CT_L3 = score;\r
+\r
+ /* Halt PRU core */\r
+ __halt();\r
+}\r
+\r
diff --git a/examples/am437x/PRU_ARMtoPRU_Interrupt/resource_table_empty.h b/examples/am437x/PRU_ARMtoPRU_Interrupt/resource_table_empty.h
--- /dev/null
@@ -0,0 +1,72 @@
+/*\r
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/ \r
+ * \r
+ * \r
+ * Redistribution and use in source and binary forms, with or without \r
+ * modification, are permitted provided that the following conditions \r
+ * are met:\r
+ * \r
+ * * Redistributions of source code must retain the above copyright \r
+ * notice, this list of conditions and the following disclaimer.\r
+ * \r
+ * * Redistributions in binary form must reproduce the above copyright\r
+ * notice, this list of conditions and the following disclaimer in the \r
+ * documentation and/or other materials provided with the \r
+ * distribution.\r
+ * \r
+ * * Neither the name of Texas Instruments Incorporated nor the names of\r
+ * its contributors may be used to endorse or promote products derived\r
+ * from this software without specific prior written permission.\r
+ * \r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \r
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \r
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT \r
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \r
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \r
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \r
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE \r
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ */\r
+\r
+/*\r
+ * ======== resource_table_empty.h ========\r
+ *\r
+ * Define the resource table entries for all PRU cores. This will be\r
+ * incorporated into corresponding base images, and used by the remoteproc\r
+ * on the host-side to allocated/reserve resources. Note the remoteproc\r
+ * driver requires that all PRU firmware be built with a resource table.\r
+ *\r
+ * This file contains an empty resource table. It can be used either as:\r
+ *\r
+ * 1) A template, or\r
+ * 2) As-is if a PRU application does not need to configure PRU_INTC\r
+ * or interact with the rpmsg driver\r
+ *\r
+ */\r
+\r
+#ifndef _RSC_TABLE_PRU_H_\r
+#define _RSC_TABLE_PRU_H_\r
+\r
+#include <stddef.h>\r
+#include <rsc_types.h>\r
+\r
+struct my_resource_table {\r
+ struct resource_table base;\r
+\r
+ uint32_t offset[1]; /* Should match 'num' in actual definition */\r
+};\r
+\r
+#pragma DATA_SECTION(pru_remoteproc_ResourceTable, ".resource_table")\r
+#pragma RETAIN(pru_remoteproc_ResourceTable)\r
+struct my_resource_table pru_remoteproc_ResourceTable = {\r
+ 1, /* we're the first version that implements this */\r
+ 0, /* number of entries in the table */\r
+ 0, 0, /* reserved, must be zero */\r
+ 0, /* offset[0] */\r
+};\r
+\r
+#endif /* _RSC_TABLE_PRU_H_ */\r
+\r
diff --git a/examples/am437x/PRU_Direct_Connect0/.ccsproject b/examples/am437x/PRU_Direct_Connect0/.ccsproject
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<?ccsproject version="1.0"?>
+<projectOptions>
+ <deviceVariant value="TMS192C2026.AM3359.BeagleBone_Black"/>
+ <deviceFamily value="PRU"/>
+ <deviceEndianness value="little"/>
+ <codegenToolVersion value="2.0.0.B2"/>
+ <isElfFormat value="true"/>
+ <rts value="libc.a"/>
+ <createSlaveProjects value=""/>
+ <templateProperties value="id=com.ti.common.project.core.emptyProjectTemplate,"/>
+ <isTargetManual value="false"/>
+</projectOptions>
diff --git a/examples/am437x/PRU_Direct_Connect0/.cproject b/examples/am437x/PRU_Direct_Connect0/.cproject
--- /dev/null
@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+ <storageModule configRelations="2" moduleId="org.eclipse.cdt.core.settings">
+ <cconfiguration id="com.ti.ccstudio.buildDefinitions.PRU.Debug.2116598492">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.PRU.Debug.2116598492" moduleId="org.eclipse.cdt.core.settings" name="Debug">
+ <externalSettings/>
+ <extensions>
+ <extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.LinkErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" id="com.ti.ccstudio.buildDefinitions.PRU.Debug.2116598492" name="Debug" parent="com.ti.ccstudio.buildDefinitions.PRU.Debug" postbuildStep="" prebuildStep="">
+ <folderInfo id="com.ti.ccstudio.buildDefinitions.PRU.Debug.2116598492." name="/" resourcePath="">
+ <toolChain id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.DebugToolchain.1581145012" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.DebugToolchain" targetTool="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerDebug.1517339161">
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.1488321436" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
+ <listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=TMS192C2026.AM4379.EVMAM437X"/>
+ <listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>
+ <listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>
+ <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.5.0"/>
+ <listOptionValue builtIn="false" value="LINKER_COMMAND_FILE="/>
+ <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/>
+ <listOptionValue builtIn="false" value="OUTPUT_TYPE=executable"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1268677120" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="2.1.1" valueType="string"/>
+ <targetPlatform id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformDebug.1422441643" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformDebug"/>
+ <builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderDebug.822512038" name="GNU Make.Debug" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderDebug"/>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerDebug.1901369897" name="PRU Compiler" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerDebug">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE.1787876650" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="pru0"/>
+ <listOptionValue builtIn="false" value="am4379"/>
+ <listOptionValue builtIn="false" value="icss1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.SILICON_VERSION.56113736" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.1305450096" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.767575278" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am437x""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEBUGGING_MODEL.896381400" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.1764364763" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">
+ <listOptionValue builtIn="false" value="225"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER.1394970601" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WRAP.1451713514" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.806475693" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN" value="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.little" valueType="enumerated"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS.520156653" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS.152960494" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS.157205512" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS.768778635" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerDebug.1517339161" name="PRU Linker" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerDebug">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE.227897608" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="ICSS1_PRU_CORE=1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE.469845805" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE" value="0x100" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE.2143850429" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE" value="0x100" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE.156451033" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE" value=""${ProjName}.out"" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE.1024671965" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE" value=""${ProjName}.map"" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY.986291428" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY" valueType="libs">
+ <listOptionValue builtIn="false" value=""libc.a""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH.879545013" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH" valueType="libPaths">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/lib""/>
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO.1110511662" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO" value=""${ProjName}_linkInfo.xml"" valueType="string"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS.1861085224" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS.392861757" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS.2042477400" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.1842485950" name="PRU Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.OUTPUT_FILE.455070672" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.OUTPUT_FILE" value=""${BuildArtifactFileBaseName}.hex"" valueType="string"/>
+ </tool>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry excluding="AM437x.cmd|AM335x_PRU.cmd|AM335x.cmd" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ <cconfiguration id="com.ti.ccstudio.buildDefinitions.PRU.Release.1986182789">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.PRU.Release.1986182789" moduleId="org.eclipse.cdt.core.settings" name="Release">
+ <externalSettings/>
+ <extensions>
+ <extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.LinkErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" id="com.ti.ccstudio.buildDefinitions.PRU.Release.1986182789" name="Release" parent="com.ti.ccstudio.buildDefinitions.PRU.Release" postbuildStep="" prebuildStep="">
+ <folderInfo id="com.ti.ccstudio.buildDefinitions.PRU.Release.1986182789." name="/" resourcePath="">
+ <toolChain id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.ReleaseToolchain.870685797" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.ReleaseToolchain" targetTool="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease.1305727985">
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.2063053287" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
+ <listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=TMS192C2026.AM4379.EVMAM437X"/>
+ <listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>
+ <listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>
+ <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.5.0"/>
+ <listOptionValue builtIn="false" value="LINKER_COMMAND_FILE="/>
+ <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/>
+ <listOptionValue builtIn="false" value="OUTPUT_TYPE=executable"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.99967516" name="Compiler version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="2.1.1" valueType="string"/>
+ <targetPlatform id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformRelease.1276657089" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformRelease"/>
+ <builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderRelease.507069186" keepEnvironmentInBuildfile="false" name="GNU Make" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderRelease"/>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerRelease.123453209" name="PRU Compiler" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerRelease">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE.1722401231" name="Pre-define NAME (--define, -D)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="pru0"/>
+ <listOptionValue builtIn="false" value="am4379"/>
+ <listOptionValue builtIn="false" value="icss1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.SILICON_VERSION.1687649832" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.1110470242" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.660736577" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am437x""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.1786032659" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">
+ <listOptionValue builtIn="false" value="225"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER.805428578" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WRAP.1127981824" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.341566661" 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"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS.902732050" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS.682179165" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS.534640485" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS.164241182" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease.1305727985" name="PRU Linker" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE.1321135231" name="Pre-define preprocessor macro _name_ to _value_ (--define)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="ICSS1_PRU_CORE=1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE.666557430" name="Set C system stack size (--stack_size, -stack)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE" value="0x100" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE.792363287" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE.1427651310" name="Specify output file name (--output_file, -o)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE" value=""${ProjName}.out"" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE.127404582" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY.1686342972" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY" valueType="libs">
+ <listOptionValue builtIn="false" value=""libc.a""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH.2051269405" name="Add <dir> to library search path (--search_path, -i)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH" valueType="libPaths">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/lib""/>
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO.2025813428" 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"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS.1576071416" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS.195010810" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS.1830174152" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.1709290966" name="PRU Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.OUTPUT_FILE.1003086331" name="Specify output file names (--outfile, -o)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.OUTPUT_FILE" value=""${BuildArtifactFileBaseName}.hex"" valueType="string"/>
+ </tool>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry excluding="AM335x_PRU.cmd|AM335x.cmd" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <project id="PRU_Direct_Connect0.com.ti.ccstudio.buildDefinitions.PRU.ProjectType.951448892" name="PRU" projectType="com.ti.ccstudio.buildDefinitions.PRU.ProjectType"/>
+ </storageModule>
+ <storageModule moduleId="scannerConfiguration"/>
+ <storageModule moduleId="org.eclipse.cdt.core.language.mapping">
+ <project-mappings>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.asmSource" language="com.ti.ccstudio.core.TIASMLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cHeader" language="com.ti.ccstudio.core.TIGCCLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cSource" language="com.ti.ccstudio.core.TIGCCLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxHeader" language="com.ti.ccstudio.core.TIGPPLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxSource" language="com.ti.ccstudio.core.TIGPPLanguage"/>
+ </project-mappings>
+ </storageModule>
+</cproject>
diff --git a/examples/am437x/PRU_Direct_Connect0/.project b/examples/am437x/PRU_Direct_Connect0/.project
--- /dev/null
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>PRU_Direct_Connect0</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+ <triggers>full,incremental,</triggers>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.ti.ccstudio.core.ccsNature</nature>
+ <nature>org.eclipse.cdt.core.cnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+ <nature>org.eclipse.cdt.core.ccnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+ </natures>
+</projectDescription>
diff --git a/examples/am437x/PRU_Direct_Connect0/.settings/org.eclipse.cdt.codan.core.prefs b/examples/am437x/PRU_Direct_Connect0/.settings/org.eclipse.cdt.codan.core.prefs
--- /dev/null
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+inEditor=false
+onBuild=false
diff --git a/examples/am437x/PRU_Direct_Connect0/.settings/org.eclipse.cdt.debug.core.prefs b/examples/am437x/PRU_Direct_Connect0/.settings/org.eclipse.cdt.debug.core.prefs
--- /dev/null
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+org.eclipse.cdt.debug.core.toggleBreakpointModel=com.ti.ccstudio.debug.CCSBreakpointMarker
diff --git a/examples/am437x/PRU_Direct_Connect0/AM437x_PRU_SS1.cmd b/examples/am437x/PRU_Direct_Connect0/AM437x_PRU_SS1.cmd
--- /dev/null
@@ -0,0 +1,84 @@
+/****************************************************************************/
+/* AM437x_PRU_SS1.cmd */
+/* Copyright (c) 2015 Texas Instruments Incorporated */
+/* */
+/* Description: This file is a linker command file that can be used for */
+/* linking PRU programs built with the C compiler and */
+/* the resulting .out file on an AM437x device. */
+/****************************************************************************/
+
+-cr /* Link using C conventions */
+
+/* Specify the System Memory Map */
+MEMORY
+{
+ PAGE 0:
+ PRU_IMEM : org = 0x00000000 len = 0x00003000 /* 12kB PRU-ICSS1 Instruction RAM */
+
+ PAGE 1:
+
+ /* RAM */
+
+ PRU_DMEM_0_1 : org = 0x00000000 len = 0x00002000 CREGISTER=24 /* 8kB PRU Data RAM 0_1 */
+ PRU_DMEM_1_0 : org = 0x00002000 len = 0x00002000 CREGISTER=25 /* 8kB PRU Data RAM 1_0 */
+ PRU_SHAREDMEM : org = 0x00010000 len = 0x00008000 CREGISTER=28 /* 32kB Shared RAM */
+
+ DDR : org = 0x80000000 len = 0x00000100 CREGISTER=31
+ L3OCMC : org = 0x40000000 len = 0x00010000 CREGISTER=30
+
+
+ /* Peripherals */
+
+ PRU_CFG : org = 0x00026000 len = 0x00000120 CREGISTER=4
+ PRU_ECAP : org = 0x00030000 len = 0x00000060 CREGISTER=3
+ PRU_IEP : org = 0x0002E000 len = 0x0000031C CREGISTER=26
+ PRU_INTC : org = 0x00020000 len = 0x00001504 CREGISTER=0
+ PRU_UART : org = 0x00028000 len = 0x00000038 CREGISTER=7
+
+ DCAN0 : org = 0x481CC000 len = 0x000001E8 CREGISTER=14
+ DCAN1 : org = 0x481D0000 len = 0x000001E8 CREGISTER=15
+ DMTIMER2 : org = 0x48040000 len = 0x0000005C CREGISTER=1
+ PWMSS0 : org = 0x48300000 len = 0x000002C4 CREGISTER=18
+ PWMSS1 : org = 0x48302000 len = 0x000002C4 CREGISTER=19
+ PWMSS2 : org = 0x48304000 len = 0x000002C4 CREGISTER=20
+ GEMAC : org = 0x4A100000 len = 0x0000128C CREGISTER=9
+ I2C1 : org = 0x4802A000 len = 0x000000D8 CREGISTER=2
+ I2C2 : org = 0x4819C000 len = 0x000000D8 CREGISTER=17
+ MBX0 : org = 0x480C8000 len = 0x00000140 CREGISTER=22
+ MCASP0_DMA : org = 0x46000000 len = 0x00000100 CREGISTER=8
+ MCSPI0 : org = 0x48030000 len = 0x000001A4 CREGISTER=6
+ MCSPI1 : org = 0x481A0000 len = 0x000001A4 CREGISTER=16
+ MMCSD0 : org = 0x48060000 len = 0x00000300 CREGISTER=5
+ SPINLOCK : org = 0x480CA000 len = 0x00000880 CREGISTER=23
+ TPCC : org = 0x49000000 len = 0x00001098 CREGISTER=29
+ UART1 : org = 0x48022000 len = 0x00000088 CREGISTER=11
+ UART2 : org = 0x48024000 len = 0x00000088 CREGISTER=12
+
+ RSVD10 : org = 0x48318000 len = 0x00000100 CREGISTER=10
+ RSVD13 : org = 0x48310000 len = 0x00000100 CREGISTER=13
+ RSVD21 : org = 0x00032400 len = 0x00000100 CREGISTER=21
+ RSVD27 : org = 0x00032000 len = 0x00000100 CREGISTER=27
+
+}
+
+/* Specify the sections allocation into memory */
+SECTIONS {
+ /* Forces _c_int00 to the start of PRU IRAM. Not necessary when loading
+ an ELF file, but useful when loading a binary */
+ .text:_c_int00* > 0x0, PAGE 0
+
+ .text > PRU_IMEM, PAGE 0
+ .stack > PRU_DMEM_0_1, PAGE 1
+ .bss > PRU_DMEM_0_1, PAGE 1
+ .cio > PRU_DMEM_0_1, PAGE 1
+ .data > PRU_DMEM_0_1, PAGE 1
+ .switch > PRU_DMEM_0_1, PAGE 1
+ .sysmem > PRU_DMEM_0_1, PAGE 1
+ .cinit > PRU_DMEM_0_1, PAGE 1
+ .rodata > PRU_DMEM_0_1, PAGE 1
+ .rofardata > PRU_DMEM_0_1, PAGE 1
+ .farbss > PRU_DMEM_0_1, PAGE 1
+ .fardata > PRU_DMEM_0_1, PAGE 1
+
+ .resource_table > PRU_DMEM_0_1, PAGE 1
+}
diff --git a/examples/am437x/PRU_Direct_Connect0/Makefile b/examples/am437x/PRU_Direct_Connect0/Makefile
--- /dev/null
@@ -0,0 +1,86 @@
+# PRU_CGT environment variable must point to the TI PRU compiler directory. E.g.:
+#(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+#(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+ifndef PRU_CGT
+define ERROR_BODY
+
+************************************************************
+PRU_CGT environment variable is not set. Examples given:
+(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
+CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
+PROJ_NAME=$(CURRENT_DIR)
+LINKER_COMMAND_FILE=./AM437x_PRU_SS1.cmd
+LIBS=--library=../../../lib/rpmsg_lib.lib
+INCLUDE=--include_path=../../../include --include_path=../../../include/am437x
+STACK_SIZE=0x100
+HEAP_SIZE=0x100
+GEN_DIR=gen
+
+#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+CFLAGS=-v3 -O2 --display_error_number --endian=little --hardware_mac=on --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
+#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
+
+TARGET=$(GEN_DIR)/$(PROJ_NAME).out
+MAP=$(GEN_DIR)/$(PROJ_NAME).map
+SOURCES=$(wildcard *.c)
+#Using .object instead of .obj in order to not conflict with the CCS build process
+OBJECTS=$(patsubst %,$(GEN_DIR)/%,$(SOURCES:.c=.object))
+
+all: printStart $(TARGET) printEnd
+
+printStart:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Building project: $(PROJ_NAME)'
+
+printEnd:
+ @echo ''
+ @echo 'Finished building project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Invokes the linker (-z flag) to make the .out file
+$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
+ @echo ''
+ @echo 'Building target: $@'
+ @echo 'Invoking: PRU Linker'
+ $(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)
+ @echo 'Finished building target: $@'
+ @echo ''
+ @echo 'Output files can be found in the "$(GEN_DIR)" directory'
+
+# Invokes the compiler on all c files in the directory to create the object files
+$(GEN_DIR)/%.object: %.c
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+.PHONY: all clean
+
+# Remove the $(GEN_DIR) directory
+clean:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Cleaning project: $(PROJ_NAME)'
+ @echo ''
+ @echo 'Removing files in the "$(GEN_DIR)" directory'
+ @rm -rf $(GEN_DIR)
+ @echo ''
+ @echo 'Finished cleaning project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
+-include $(OBJECTS:%.object=%.pp)
+
diff --git a/examples/am437x/PRU_Direct_Connect0/PRU0_Direct_Connect.c b/examples/am437x/PRU_Direct_Connect0/PRU0_Direct_Connect.c
--- /dev/null
@@ -0,0 +1,91 @@
+/*
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <stdint.h>
+#include <pru_intc.h>
+#include "rsc_table_pru0.h"
+
+#define PRU0
+
+volatile register uint32_t __R30;
+volatile register uint32_t __R31;
+
+typedef struct{
+ uint32_t reg5;
+ uint32_t reg6;
+ uint32_t reg7;
+ uint32_t reg8;
+ uint32_t reg9;
+ uint32_t reg10;
+} bufferData;
+
+bufferData dmemBuf;
+
+/* PRU-to-ARM interrupt */
+#define PRU1_PRU0_INTERRUPT (18)
+#define PRU0_ARM_INTERRUPT (19+16)
+
+void main(){
+ bufferData buf;
+
+ /* Clear the status of all interrupts */
+ CT_INTC.SECR0 = 0xFFFFFFFF;
+ CT_INTC.SECR1 = 0xFFFFFFFF;
+
+ /* Load the buffer with default values to transfer */
+ dmemBuf.reg5 = 0xDEADBEEF;
+ dmemBuf.reg6 = 0xAAAAAAAA;
+ dmemBuf.reg7 = 0x12345678;
+ dmemBuf.reg8 = 0xBBBBBBBB;
+ dmemBuf.reg9 = 0x87654321;
+ dmemBuf.reg10 = 0xCCCCCCCC;
+
+ /* Load data from DRAM */
+ buf = dmemBuf;
+
+ /* Poll until R31.30 (PRU0 interrupt) is set
+ * This signals PRU1 is initialized */
+ while((__R31 & (1<<30)) == 0){
+ }
+
+ /* XFR registers R5-R10 from PRU0 to PRU1 */
+ /* 14 is the device_id that signifies a PRU to PRU transfer */
+ __xout(14, 5, 0, buf);
+
+ /* Clear the status of the interrupt */
+ CT_INTC.SICR = PRU1_PRU0_INTERRUPT;
+
+ /* Halt the PRU core */
+ __halt();
+}
+
diff --git a/examples/am437x/PRU_Direct_Connect0/rsc_table_pru0.h b/examples/am437x/PRU_Direct_Connect0/rsc_table_pru0.h
--- /dev/null
@@ -0,0 +1,105 @@
+/*\r
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/ \r
+ * \r
+ * \r
+ * Redistribution and use in source and binary forms, with or without \r
+ * modification, are permitted provided that the following conditions \r
+ * are met:\r
+ * \r
+ * * Redistributions of source code must retain the above copyright \r
+ * notice, this list of conditions and the following disclaimer.\r
+ * \r
+ * * Redistributions in binary form must reproduce the above copyright\r
+ * notice, this list of conditions and the following disclaimer in the \r
+ * documentation and/or other materials provided with the \r
+ * distribution.\r
+ * \r
+ * * Neither the name of Texas Instruments Incorporated nor the names of\r
+ * its contributors may be used to endorse or promote products derived\r
+ * from this software without specific prior written permission.\r
+ * \r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \r
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \r
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT \r
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \r
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \r
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \r
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE \r
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ */\r
+\r
+/*\r
+ * ======== rsc_table_pru.h ========\r
+ *\r
+ * Define the resource table entries for PRU0. This will be\r
+ * incorporated into corresponding base images, and used by the remoteproc\r
+ * on the host-side to allocated/reserve resources. Note the remoteproc\r
+ * driver requires that all PRU firmware be built with a resource table.\r
+ *\r
+ *\r
+ */\r
+\r
+#ifndef _RSC_TABLE_PRU_H_\r
+#define _RSC_TABLE_PRU_H_\r
+\r
+#include <stddef.h>\r
+#include <rsc_types.h>\r
+#include "pru_virtio_ids.h"\r
+\r
+/*\r
+ * Sizes of the virtqueues (expressed in number of buffers supported,\r
+ * and must be power of 2)\r
+ */\r
+#define PRU_RPMSG_VQ0_SIZE 2\r
+#define PRU_RPMSG_VQ1_SIZE 2\r
+\r
+/* flip up bits whose indices represent features we support */\r
+#define RPMSG_PRU_C0_FEATURES 1\r
+\r
+/* Definition for unused interrupts */\r
+#define HOST_UNUSED 255\r
+\r
+/* Mapping sysevts to a channel. Each pair contains a sysevt, channel */\r
+struct ch_map pru_intc_map[] = { {17, 1}, {18, 0}, {19, 2}, {20, 3}, {21, 0},\r
+ {22, 1}, {24, 4}, {25, 5}, {26, 6}, {27, 7},\r
+ };\r
+\r
+struct my_resource_table {\r
+ struct resource_table base;\r
+\r
+ uint32_t offset[1]; /* Should match 'num' in actual definition */\r
+\r
+ /* intc definition */\r
+ struct fw_rsc_custom pru_ints;\r
+};\r
+\r
+#pragma DATA_SECTION(am335x_pru_remoteproc_ResourceTable, ".resource_table")\r
+#pragma RETAIN(am335x_pru_remoteproc_ResourceTable)\r
+struct my_resource_table am335x_pru_remoteproc_ResourceTable = {\r
+ 1, /* we're the first version that implements this */\r
+ 1, /* number of entries in the table */\r
+ 0, 0, /* reserved, must be zero */\r
+ /* offsets to entries */\r
+ {\r
+ offsetof(struct my_resource_table, pru_ints),\r
+ },\r
+\r
+ {\r
+ TYPE_CUSTOM, TYPE_PRU_INTS,\r
+ sizeof(struct fw_rsc_custom_ints),\r
+ { /* PRU_INTS version */\r
+ 0x0000,\r
+ /* Channel-to-host mapping, 255 for unused */\r
+ 0, 1, 2, 3, 0, 6, 1, 7, HOST_UNUSED, HOST_UNUSED,\r
+ /* Number of evts being mapped to channels */\r
+ (sizeof(pru_intc_map) / sizeof(struct ch_map)),\r
+ /* Pointer to the structure containing mapped events */\r
+ pru_intc_map,\r
+ },\r
+ },\r
+};\r
+\r
+#endif /* _RSC_TABLE_PRU_H_ */\r
diff --git a/examples/am437x/PRU_Direct_Connect1/.ccsproject b/examples/am437x/PRU_Direct_Connect1/.ccsproject
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<?ccsproject version="1.0"?>
+<projectOptions>
+ <deviceVariant value="TMS192C2026.AM3359.BeagleBone_Black"/>
+ <deviceFamily value="PRU"/>
+ <deviceEndianness value="little"/>
+ <codegenToolVersion value="2.0.0.B2"/>
+ <isElfFormat value="true"/>
+ <rts value="libc.a"/>
+ <createSlaveProjects value=""/>
+ <templateProperties value="id=com.ti.common.project.core.emptyProjectWithMainTemplate,"/>
+ <isTargetManual value="false"/>
+</projectOptions>
diff --git a/examples/am437x/PRU_Direct_Connect1/.cproject b/examples/am437x/PRU_Direct_Connect1/.cproject
--- /dev/null
@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+ <storageModule configRelations="2" moduleId="org.eclipse.cdt.core.settings">
+ <cconfiguration id="com.ti.ccstudio.buildDefinitions.PRU.Debug.1466620349">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.PRU.Debug.1466620349" moduleId="org.eclipse.cdt.core.settings" name="Debug">
+ <externalSettings/>
+ <extensions>
+ <extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.LinkErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" id="com.ti.ccstudio.buildDefinitions.PRU.Debug.1466620349" name="Debug" parent="com.ti.ccstudio.buildDefinitions.PRU.Debug" postbuildStep="" prebuildStep="">
+ <folderInfo id="com.ti.ccstudio.buildDefinitions.PRU.Debug.1466620349." name="/" resourcePath="">
+ <toolChain id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.DebugToolchain.541843117" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.DebugToolchain" targetTool="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerDebug.1895593178">
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.577619732" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
+ <listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=TMS192C2026.AM4379.EVMAM437X"/>
+ <listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>
+ <listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>
+ <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.5.0"/>
+ <listOptionValue builtIn="false" value="LINKER_COMMAND_FILE="/>
+ <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/>
+ <listOptionValue builtIn="false" value="OUTPUT_TYPE=executable"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1679322540" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="2.1.1" valueType="string"/>
+ <targetPlatform id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformDebug.1313174647" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformDebug"/>
+ <builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderDebug.1654910100" name="GNU Make.Debug" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderDebug"/>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerDebug.1266109052" name="PRU Compiler" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerDebug">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE.1652957614" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="pru0"/>
+ <listOptionValue builtIn="false" value="am4379"/>
+ <listOptionValue builtIn="false" value="icss1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.SILICON_VERSION.1004591579" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.748167181" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.989514925" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am437x""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEBUGGING_MODEL.437476752" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.941832352" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">
+ <listOptionValue builtIn="false" value="225"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER.1644044502" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WRAP.1889808097" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.1726271717" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN" value="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.little" valueType="enumerated"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS.2133057117" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS.237840006" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS.36517401" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS.1749962391" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerDebug.1895593178" name="PRU Linker" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerDebug">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE.1432267935" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="ICSS1_PRU_CORE=1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE.1988716898" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE" value="0x100" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE.1185840822" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE" value="0x100" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE.1435968206" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE" value=""${ProjName}.out"" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE.234377619" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE" value=""${ProjName}.map"" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY.652219974" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY" valueType="libs">
+ <listOptionValue builtIn="false" value=""libc.a""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH.64310252" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH" valueType="libPaths">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/lib""/>
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO.2111783803" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO" value=""${ProjName}_linkInfo.xml"" valueType="string"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS.1580000133" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS.457580204" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS.2025560215" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.739621471" name="PRU Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.OUTPUT_FILE.562813298" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.OUTPUT_FILE" value=""${BuildArtifactFileBaseName}.hex"" valueType="string"/>
+ </tool>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry excluding="AM437x.cmd|AM335x_PRU.cmd|AM335x.cmd" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ <cconfiguration id="com.ti.ccstudio.buildDefinitions.PRU.Release.1199553821">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.PRU.Release.1199553821" moduleId="org.eclipse.cdt.core.settings" name="Release">
+ <externalSettings/>
+ <extensions>
+ <extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.LinkErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" id="com.ti.ccstudio.buildDefinitions.PRU.Release.1199553821" name="Release" parent="com.ti.ccstudio.buildDefinitions.PRU.Release" postbuildStep="" prebuildStep="">
+ <folderInfo id="com.ti.ccstudio.buildDefinitions.PRU.Release.1199553821." name="/" resourcePath="">
+ <toolChain id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.ReleaseToolchain.2022067208" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.ReleaseToolchain" targetTool="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease.1527014369">
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.200359033" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
+ <listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=TMS192C2026.AM4379.EVMAM437X"/>
+ <listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>
+ <listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>
+ <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.5.0"/>
+ <listOptionValue builtIn="false" value="LINKER_COMMAND_FILE="/>
+ <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/>
+ <listOptionValue builtIn="false" value="OUTPUT_TYPE=executable"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1209776294" name="Compiler version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="2.1.1" valueType="string"/>
+ <targetPlatform id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformRelease.61359468" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformRelease"/>
+ <builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderRelease.427217542" keepEnvironmentInBuildfile="false" name="GNU Make" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderRelease"/>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerRelease.1701781294" name="PRU Compiler" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerRelease">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE.174614393" name="Pre-define NAME (--define, -D)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="pru0"/>
+ <listOptionValue builtIn="false" value="am4379"/>
+ <listOptionValue builtIn="false" value="icss1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.SILICON_VERSION.1146605482" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.471567749" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.950019702" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am437x""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.298353761" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">
+ <listOptionValue builtIn="false" value="225"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER.682005808" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WRAP.2115093045" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.988674143" 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"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS.333210994" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS.1775430397" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS.2068670716" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS.996350575" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease.1527014369" name="PRU Linker" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE.1369151291" name="Pre-define preprocessor macro _name_ to _value_ (--define)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="ICSS1_PRU_CORE=1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE.2137843582" name="Set C system stack size (--stack_size, -stack)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE" value="0x100" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE.2122085774" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE.1530750620" name="Specify output file name (--output_file, -o)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE" value=""${ProjName}.out"" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE.1209437538" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY.1233582741" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY" valueType="libs">
+ <listOptionValue builtIn="false" value=""libc.a""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH.704746867" name="Add <dir> to library search path (--search_path, -i)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH" valueType="libPaths">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/lib""/>
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO.1027992130" 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"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS.896190272" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS.1981443093" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS.1790285280" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.1905146193" name="PRU Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.OUTPUT_FILE.1665219358" name="Specify output file names (--outfile, -o)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.OUTPUT_FILE" value=""${BuildArtifactFileBaseName}.hex"" valueType="string"/>
+ </tool>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry excluding="AM335x_PRU.cmd|AM335x.cmd" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <project id="PRU_Direct_Connect1.com.ti.ccstudio.buildDefinitions.PRU.ProjectType.1644590196" name="PRU" projectType="com.ti.ccstudio.buildDefinitions.PRU.ProjectType"/>
+ </storageModule>
+ <storageModule moduleId="scannerConfiguration"/>
+ <storageModule moduleId="org.eclipse.cdt.core.language.mapping">
+ <project-mappings>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.asmSource" language="com.ti.ccstudio.core.TIASMLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cHeader" language="com.ti.ccstudio.core.TIGCCLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cSource" language="com.ti.ccstudio.core.TIGCCLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxHeader" language="com.ti.ccstudio.core.TIGPPLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxSource" language="com.ti.ccstudio.core.TIGPPLanguage"/>
+ </project-mappings>
+ </storageModule>
+</cproject>
diff --git a/examples/am437x/PRU_Direct_Connect1/.project b/examples/am437x/PRU_Direct_Connect1/.project
--- /dev/null
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>PRU_Direct_Connect1</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+ <triggers>full,incremental,</triggers>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.ti.ccstudio.core.ccsNature</nature>
+ <nature>org.eclipse.cdt.core.cnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+ <nature>org.eclipse.cdt.core.ccnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+ </natures>
+</projectDescription>
diff --git a/examples/am437x/PRU_Direct_Connect1/.settings/org.eclipse.cdt.codan.core.prefs b/examples/am437x/PRU_Direct_Connect1/.settings/org.eclipse.cdt.codan.core.prefs
--- /dev/null
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+inEditor=false
+onBuild=false
diff --git a/examples/am437x/PRU_Direct_Connect1/.settings/org.eclipse.cdt.debug.core.prefs b/examples/am437x/PRU_Direct_Connect1/.settings/org.eclipse.cdt.debug.core.prefs
--- /dev/null
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+org.eclipse.cdt.debug.core.toggleBreakpointModel=com.ti.ccstudio.debug.CCSBreakpointMarker
diff --git a/examples/am437x/PRU_Direct_Connect1/AM437x_PRU_SS1.cmd b/examples/am437x/PRU_Direct_Connect1/AM437x_PRU_SS1.cmd
--- /dev/null
@@ -0,0 +1,84 @@
+/****************************************************************************/
+/* AM437x_PRU_SS1.cmd */
+/* Copyright (c) 2015 Texas Instruments Incorporated */
+/* */
+/* Description: This file is a linker command file that can be used for */
+/* linking PRU programs built with the C compiler and */
+/* the resulting .out file on an AM437x device. */
+/****************************************************************************/
+
+-cr /* Link using C conventions */
+
+/* Specify the System Memory Map */
+MEMORY
+{
+ PAGE 0:
+ PRU_IMEM : org = 0x00000000 len = 0x00003000 /* 12kB PRU-ICSS1 Instruction RAM */
+
+ PAGE 1:
+
+ /* RAM */
+
+ PRU_DMEM_0_1 : org = 0x00000000 len = 0x00002000 CREGISTER=24 /* 8kB PRU Data RAM 0_1 */
+ PRU_DMEM_1_0 : org = 0x00002000 len = 0x00002000 CREGISTER=25 /* 8kB PRU Data RAM 1_0 */
+ PRU_SHAREDMEM : org = 0x00010000 len = 0x00008000 CREGISTER=28 /* 32kB Shared RAM */
+
+ DDR : org = 0x80000000 len = 0x00000100 CREGISTER=31
+ L3OCMC : org = 0x40000000 len = 0x00010000 CREGISTER=30
+
+
+ /* Peripherals */
+
+ PRU_CFG : org = 0x00026000 len = 0x00000120 CREGISTER=4
+ PRU_ECAP : org = 0x00030000 len = 0x00000060 CREGISTER=3
+ PRU_IEP : org = 0x0002E000 len = 0x0000031C CREGISTER=26
+ PRU_INTC : org = 0x00020000 len = 0x00001504 CREGISTER=0
+ PRU_UART : org = 0x00028000 len = 0x00000038 CREGISTER=7
+
+ DCAN0 : org = 0x481CC000 len = 0x000001E8 CREGISTER=14
+ DCAN1 : org = 0x481D0000 len = 0x000001E8 CREGISTER=15
+ DMTIMER2 : org = 0x48040000 len = 0x0000005C CREGISTER=1
+ PWMSS0 : org = 0x48300000 len = 0x000002C4 CREGISTER=18
+ PWMSS1 : org = 0x48302000 len = 0x000002C4 CREGISTER=19
+ PWMSS2 : org = 0x48304000 len = 0x000002C4 CREGISTER=20
+ GEMAC : org = 0x4A100000 len = 0x0000128C CREGISTER=9
+ I2C1 : org = 0x4802A000 len = 0x000000D8 CREGISTER=2
+ I2C2 : org = 0x4819C000 len = 0x000000D8 CREGISTER=17
+ MBX0 : org = 0x480C8000 len = 0x00000140 CREGISTER=22
+ MCASP0_DMA : org = 0x46000000 len = 0x00000100 CREGISTER=8
+ MCSPI0 : org = 0x48030000 len = 0x000001A4 CREGISTER=6
+ MCSPI1 : org = 0x481A0000 len = 0x000001A4 CREGISTER=16
+ MMCSD0 : org = 0x48060000 len = 0x00000300 CREGISTER=5
+ SPINLOCK : org = 0x480CA000 len = 0x00000880 CREGISTER=23
+ TPCC : org = 0x49000000 len = 0x00001098 CREGISTER=29
+ UART1 : org = 0x48022000 len = 0x00000088 CREGISTER=11
+ UART2 : org = 0x48024000 len = 0x00000088 CREGISTER=12
+
+ RSVD10 : org = 0x48318000 len = 0x00000100 CREGISTER=10
+ RSVD13 : org = 0x48310000 len = 0x00000100 CREGISTER=13
+ RSVD21 : org = 0x00032400 len = 0x00000100 CREGISTER=21
+ RSVD27 : org = 0x00032000 len = 0x00000100 CREGISTER=27
+
+}
+
+/* Specify the sections allocation into memory */
+SECTIONS {
+ /* Forces _c_int00 to the start of PRU IRAM. Not necessary when loading
+ an ELF file, but useful when loading a binary */
+ .text:_c_int00* > 0x0, PAGE 0
+
+ .text > PRU_IMEM, PAGE 0
+ .stack > PRU_DMEM_0_1, PAGE 1
+ .bss > PRU_DMEM_0_1, PAGE 1
+ .cio > PRU_DMEM_0_1, PAGE 1
+ .data > PRU_DMEM_0_1, PAGE 1
+ .switch > PRU_DMEM_0_1, PAGE 1
+ .sysmem > PRU_DMEM_0_1, PAGE 1
+ .cinit > PRU_DMEM_0_1, PAGE 1
+ .rodata > PRU_DMEM_0_1, PAGE 1
+ .rofardata > PRU_DMEM_0_1, PAGE 1
+ .farbss > PRU_DMEM_0_1, PAGE 1
+ .fardata > PRU_DMEM_0_1, PAGE 1
+
+ .resource_table > PRU_DMEM_0_1, PAGE 1
+}
diff --git a/examples/am437x/PRU_Direct_Connect1/Makefile b/examples/am437x/PRU_Direct_Connect1/Makefile
--- /dev/null
@@ -0,0 +1,86 @@
+# PRU_CGT environment variable must point to the TI PRU compiler directory. E.g.:
+#(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+#(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+ifndef PRU_CGT
+define ERROR_BODY
+
+************************************************************
+PRU_CGT environment variable is not set. Examples given:
+(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
+CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
+PROJ_NAME=$(CURRENT_DIR)
+LINKER_COMMAND_FILE=./AM437x_PRU_SS1.cmd
+LIBS=--library=../../../lib/rpmsg_lib.lib
+INCLUDE=--include_path=../../../include --include_path=../../../include/am437x
+STACK_SIZE=0x100
+HEAP_SIZE=0x100
+GEN_DIR=gen
+
+#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+CFLAGS=-v3 -O2 --display_error_number --endian=little --hardware_mac=on --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
+#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
+
+TARGET=$(GEN_DIR)/$(PROJ_NAME).out
+MAP=$(GEN_DIR)/$(PROJ_NAME).map
+SOURCES=$(wildcard *.c)
+#Using .object instead of .obj in order to not conflict with the CCS build process
+OBJECTS=$(patsubst %,$(GEN_DIR)/%,$(SOURCES:.c=.object))
+
+all: printStart $(TARGET) printEnd
+
+printStart:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Building project: $(PROJ_NAME)'
+
+printEnd:
+ @echo ''
+ @echo 'Finished building project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Invokes the linker (-z flag) to make the .out file
+$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
+ @echo ''
+ @echo 'Building target: $@'
+ @echo 'Invoking: PRU Linker'
+ $(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)
+ @echo 'Finished building target: $@'
+ @echo ''
+ @echo 'Output files can be found in the "$(GEN_DIR)" directory'
+
+# Invokes the compiler on all c files in the directory to create the object files
+$(GEN_DIR)/%.object: %.c
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+.PHONY: all clean
+
+# Remove the $(GEN_DIR) directory
+clean:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Cleaning project: $(PROJ_NAME)'
+ @echo ''
+ @echo 'Removing files in the "$(GEN_DIR)" directory'
+ @rm -rf $(GEN_DIR)
+ @echo ''
+ @echo 'Finished cleaning project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
+-include $(OBJECTS:%.object=%.pp)
+
diff --git a/examples/am437x/PRU_Direct_Connect1/PRU1_Direct_Connect.c b/examples/am437x/PRU_Direct_Connect1/PRU1_Direct_Connect.c
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <stdint.h>
+#include "resource_table_empty.h"
+
+#define PRU1
+
+volatile register uint32_t __R30;
+volatile register uint32_t __R31;
+
+typedef struct{
+ uint32_t reg5;
+ uint32_t reg6;
+ uint32_t reg7;
+ uint32_t reg8;
+ uint32_t reg9;
+ uint32_t reg10;
+} bufferData;
+
+bufferData dmemBuf;
+
+/* PRU-to-ARM interrupt */
+#define PRU1_PRU0_INTERRUPT (18)
+#define PRU0_ARM_INTERRUPT (19+16)
+#define PRU1_ARM_INTERRUPT (20+16)
+
+void main(){
+ bufferData buf;
+
+ /* Let PRU0 know that I am awake */
+ __R31 = PRU1_PRU0_INTERRUPT+16;
+
+ /* XFR registers R5-R10 from PRU0 to PRU1 */
+ /* 14 is the device_id that signifies a PRU to PRU transfer */
+ __xin(14, 5, 0, buf);
+
+ /* Store register values back into DRAM */
+ dmemBuf = buf;
+
+ /* Halt the PRU core */
+ __halt();
+}
+
diff --git a/examples/am437x/PRU_Direct_Connect1/resource_table_empty.h b/examples/am437x/PRU_Direct_Connect1/resource_table_empty.h
--- /dev/null
@@ -0,0 +1,72 @@
+/*\r
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/ \r
+ * \r
+ * \r
+ * Redistribution and use in source and binary forms, with or without \r
+ * modification, are permitted provided that the following conditions \r
+ * are met:\r
+ * \r
+ * * Redistributions of source code must retain the above copyright \r
+ * notice, this list of conditions and the following disclaimer.\r
+ * \r
+ * * Redistributions in binary form must reproduce the above copyright\r
+ * notice, this list of conditions and the following disclaimer in the \r
+ * documentation and/or other materials provided with the \r
+ * distribution.\r
+ * \r
+ * * Neither the name of Texas Instruments Incorporated nor the names of\r
+ * its contributors may be used to endorse or promote products derived\r
+ * from this software without specific prior written permission.\r
+ * \r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \r
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \r
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT \r
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \r
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \r
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \r
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE \r
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ */\r
+\r
+/*\r
+ * ======== resource_table_empty.h ========\r
+ *\r
+ * Define the resource table entries for all PRU cores. This will be\r
+ * incorporated into corresponding base images, and used by the remoteproc\r
+ * on the host-side to allocated/reserve resources. Note the remoteproc\r
+ * driver requires that all PRU firmware be built with a resource table.\r
+ *\r
+ * This file contains an empty resource table. It can be used either as:\r
+ *\r
+ * 1) A template, or\r
+ * 2) As-is if a PRU application does not need to configure PRU_INTC\r
+ * or interact with the rpmsg driver\r
+ *\r
+ */\r
+\r
+#ifndef _RSC_TABLE_PRU_H_\r
+#define _RSC_TABLE_PRU_H_\r
+\r
+#include <stddef.h>\r
+#include <rsc_types.h>\r
+\r
+struct my_resource_table {\r
+ struct resource_table base;\r
+\r
+ uint32_t offset[1]; /* Should match 'num' in actual definition */\r
+};\r
+\r
+#pragma DATA_SECTION(pru_remoteproc_ResourceTable, ".resource_table")\r
+#pragma RETAIN(pru_remoteproc_ResourceTable)\r
+struct my_resource_table pru_remoteproc_ResourceTable = {\r
+ 1, /* we're the first version that implements this */\r
+ 0, /* number of entries in the table */\r
+ 0, 0, /* reserved, must be zero */\r
+ 0, /* offset[0] */\r
+};\r
+\r
+#endif /* _RSC_TABLE_PRU_H_ */\r
+\r
diff --git a/examples/am437x/PRU_Hardware_UART/.ccsproject b/examples/am437x/PRU_Hardware_UART/.ccsproject
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<?ccsproject version="1.0"?>
+<projectOptions>
+ <deviceVariant value="TMS192C2026.AM3359.BeagleBone_Black"/>
+ <deviceFamily value="PRU"/>
+ <deviceEndianness value="little"/>
+ <codegenToolVersion value="2.0.0.B2"/>
+ <isElfFormat value="true"/>
+ <rts value="libc.a"/>
+ <createSlaveProjects value=""/>
+ <templateProperties value="id=com.ti.common.project.core.emptyProjectTemplate,"/>
+ <isTargetManual value="false"/>
+</projectOptions>
diff --git a/examples/am437x/PRU_Hardware_UART/.cproject b/examples/am437x/PRU_Hardware_UART/.cproject
--- /dev/null
@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+ <storageModule configRelations="2" moduleId="org.eclipse.cdt.core.settings">
+ <cconfiguration id="com.ti.ccstudio.buildDefinitions.PRU.Debug.243027815">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.PRU.Debug.243027815" moduleId="org.eclipse.cdt.core.settings" name="Debug">
+ <externalSettings/>
+ <extensions>
+ <extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.LinkErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" id="com.ti.ccstudio.buildDefinitions.PRU.Debug.243027815" name="Debug" parent="com.ti.ccstudio.buildDefinitions.PRU.Debug" postbuildStep="" prebuildStep="">
+ <folderInfo id="com.ti.ccstudio.buildDefinitions.PRU.Debug.243027815." name="/" resourcePath="">
+ <toolChain id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.DebugToolchain.2130442111" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.DebugToolchain" targetTool="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerDebug.115390889">
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.1359295205" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
+ <listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=TMS192C2026.AM4379.EVMAM437X"/>
+ <listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>
+ <listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>
+ <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.5.0"/>
+ <listOptionValue builtIn="false" value="LINKER_COMMAND_FILE="/>
+ <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/>
+ <listOptionValue builtIn="false" value="OUTPUT_TYPE=executable"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1852811710" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="2.1.1" valueType="string"/>
+ <targetPlatform id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformDebug.638883729" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformDebug"/>
+ <builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderDebug.183972041" name="GNU Make.Debug" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderDebug"/>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerDebug.488347457" name="PRU Compiler" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerDebug">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE.2049982699" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="pru0"/>
+ <listOptionValue builtIn="false" value="am4379"/>
+ <listOptionValue builtIn="false" value="icss1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.SILICON_VERSION.552433322" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.2080436809" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.606068131" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am437x""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEBUGGING_MODEL.1892599114" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.731635496" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">
+ <listOptionValue builtIn="false" value="225"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER.1384512348" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WRAP.585507852" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.1102135091" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN" value="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.little" valueType="enumerated"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS.1751611030" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS.1968404940" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS.35293528" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS.1318579407" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerDebug.115390889" name="PRU Linker" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerDebug">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE.86798109" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="ICSS1_PRU_CORE=1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE.1791042242" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE" value="0x100" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE.320581145" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE" value="0x100" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE.371478600" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE" value=""${ProjName}.out"" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE.852143942" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE" value=""${ProjName}.map"" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY.1295335708" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY" valueType="libs">
+ <listOptionValue builtIn="false" value=""libc.a""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH.807638296" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH" valueType="libPaths">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/lib""/>
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO.1727171164" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO" value=""${ProjName}_linkInfo.xml"" valueType="string"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS.1676306139" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS.808520225" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS.1471732613" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.1933797312" name="PRU Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.OUTPUT_FILE.140841217" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.OUTPUT_FILE" value=""${BuildArtifactFileBaseName}.hex"" valueType="string"/>
+ </tool>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry excluding="AM437x.cmd|AM335x_PRU.cmd|AM335x.cmd" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ <cconfiguration id="com.ti.ccstudio.buildDefinitions.PRU.Release.236552719">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.PRU.Release.236552719" moduleId="org.eclipse.cdt.core.settings" name="Release">
+ <externalSettings/>
+ <extensions>
+ <extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.LinkErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" id="com.ti.ccstudio.buildDefinitions.PRU.Release.236552719" name="Release" parent="com.ti.ccstudio.buildDefinitions.PRU.Release" postbuildStep="" prebuildStep="">
+ <folderInfo id="com.ti.ccstudio.buildDefinitions.PRU.Release.236552719." name="/" resourcePath="">
+ <toolChain id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.ReleaseToolchain.715853832" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.ReleaseToolchain" targetTool="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease.1349512981">
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.1609122722" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
+ <listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=TMS192C2026.AM4379.EVMAM437X"/>
+ <listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>
+ <listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>
+ <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.5.0"/>
+ <listOptionValue builtIn="false" value="LINKER_COMMAND_FILE="/>
+ <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/>
+ <listOptionValue builtIn="false" value="OUTPUT_TYPE=executable"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.50114838" name="Compiler version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="2.1.1" valueType="string"/>
+ <targetPlatform id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformRelease.1549430064" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformRelease"/>
+ <builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderRelease.989864429" keepEnvironmentInBuildfile="false" name="GNU Make" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderRelease"/>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerRelease.1987805455" name="PRU Compiler" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerRelease">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE.1046409888" name="Pre-define NAME (--define, -D)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="pru0"/>
+ <listOptionValue builtIn="false" value="am4379"/>
+ <listOptionValue builtIn="false" value="icss1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.SILICON_VERSION.111537092" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.2031563841" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.1984891729" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am437x""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.498362464" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">
+ <listOptionValue builtIn="false" value="225"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER.226015805" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WRAP.1434239906" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.866327651" 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"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS.1922206151" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS.1677225061" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS.990927193" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS.1418498019" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease.1349512981" name="PRU Linker" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE.11681202" name="Pre-define preprocessor macro _name_ to _value_ (--define)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="ICSS1_PRU_CORE=1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE.1224482408" name="Set C system stack size (--stack_size, -stack)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE" value="0x100" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE.1785807972" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE.1763249392" name="Specify output file name (--output_file, -o)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE" value=""${ProjName}.out"" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE.509610932" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY.1784196652" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY" valueType="libs">
+ <listOptionValue builtIn="false" value=""libc.a""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH.2061821691" name="Add <dir> to library search path (--search_path, -i)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH" valueType="libPaths">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/lib""/>
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO.756846919" 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"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS.558679838" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS.473845919" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS.2104598055" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.1542737680" name="PRU Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.OUTPUT_FILE.1172450857" name="Specify output file names (--outfile, -o)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.OUTPUT_FILE" value=""${BuildArtifactFileBaseName}.hex"" valueType="string"/>
+ </tool>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry excluding="AM335x_PRU.cmd|AM335x.cmd" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <project id="PRU_Hardware_UART.com.ti.ccstudio.buildDefinitions.PRU.ProjectType.2104023540" name="PRU" projectType="com.ti.ccstudio.buildDefinitions.PRU.ProjectType"/>
+ </storageModule>
+ <storageModule moduleId="scannerConfiguration"/>
+ <storageModule moduleId="org.eclipse.cdt.core.language.mapping">
+ <project-mappings>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.asmSource" language="com.ti.ccstudio.core.TIASMLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cHeader" language="com.ti.ccstudio.core.TIGCCLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cSource" language="com.ti.ccstudio.core.TIGCCLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxHeader" language="com.ti.ccstudio.core.TIGPPLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxSource" language="com.ti.ccstudio.core.TIGPPLanguage"/>
+ </project-mappings>
+ </storageModule>
+</cproject>
diff --git a/examples/am437x/PRU_Hardware_UART/.project b/examples/am437x/PRU_Hardware_UART/.project
--- /dev/null
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>PRU_Hardware_UART</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+ <triggers>full,incremental,</triggers>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.ti.ccstudio.core.ccsNature</nature>
+ <nature>org.eclipse.cdt.core.cnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+ <nature>org.eclipse.cdt.core.ccnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+ </natures>
+</projectDescription>
diff --git a/examples/am437x/PRU_Hardware_UART/.settings/org.eclipse.cdt.codan.core.prefs b/examples/am437x/PRU_Hardware_UART/.settings/org.eclipse.cdt.codan.core.prefs
--- /dev/null
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+inEditor=false
+onBuild=false
diff --git a/examples/am437x/PRU_Hardware_UART/.settings/org.eclipse.cdt.debug.core.prefs b/examples/am437x/PRU_Hardware_UART/.settings/org.eclipse.cdt.debug.core.prefs
--- /dev/null
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+org.eclipse.cdt.debug.core.toggleBreakpointModel=com.ti.ccstudio.debug.CCSBreakpointMarker
diff --git a/examples/am437x/PRU_Hardware_UART/AM437x_PRU_SS1.cmd b/examples/am437x/PRU_Hardware_UART/AM437x_PRU_SS1.cmd
--- /dev/null
@@ -0,0 +1,84 @@
+/****************************************************************************/
+/* AM437x_PRU_SS1.cmd */
+/* Copyright (c) 2015 Texas Instruments Incorporated */
+/* */
+/* Description: This file is a linker command file that can be used for */
+/* linking PRU programs built with the C compiler and */
+/* the resulting .out file on an AM437x device. */
+/****************************************************************************/
+
+-cr /* Link using C conventions */
+
+/* Specify the System Memory Map */
+MEMORY
+{
+ PAGE 0:
+ PRU_IMEM : org = 0x00000000 len = 0x00003000 /* 12kB PRU-ICSS1 Instruction RAM */
+
+ PAGE 1:
+
+ /* RAM */
+
+ PRU_DMEM_0_1 : org = 0x00000000 len = 0x00002000 CREGISTER=24 /* 8kB PRU Data RAM 0_1 */
+ PRU_DMEM_1_0 : org = 0x00002000 len = 0x00002000 CREGISTER=25 /* 8kB PRU Data RAM 1_0 */
+ PRU_SHAREDMEM : org = 0x00010000 len = 0x00008000 CREGISTER=28 /* 32kB Shared RAM */
+
+ DDR : org = 0x80000000 len = 0x00000100 CREGISTER=31
+ L3OCMC : org = 0x40000000 len = 0x00010000 CREGISTER=30
+
+
+ /* Peripherals */
+
+ PRU_CFG : org = 0x00026000 len = 0x00000120 CREGISTER=4
+ PRU_ECAP : org = 0x00030000 len = 0x00000060 CREGISTER=3
+ PRU_IEP : org = 0x0002E000 len = 0x0000031C CREGISTER=26
+ PRU_INTC : org = 0x00020000 len = 0x00001504 CREGISTER=0
+ PRU_UART : org = 0x00028000 len = 0x00000038 CREGISTER=7
+
+ DCAN0 : org = 0x481CC000 len = 0x000001E8 CREGISTER=14
+ DCAN1 : org = 0x481D0000 len = 0x000001E8 CREGISTER=15
+ DMTIMER2 : org = 0x48040000 len = 0x0000005C CREGISTER=1
+ PWMSS0 : org = 0x48300000 len = 0x000002C4 CREGISTER=18
+ PWMSS1 : org = 0x48302000 len = 0x000002C4 CREGISTER=19
+ PWMSS2 : org = 0x48304000 len = 0x000002C4 CREGISTER=20
+ GEMAC : org = 0x4A100000 len = 0x0000128C CREGISTER=9
+ I2C1 : org = 0x4802A000 len = 0x000000D8 CREGISTER=2
+ I2C2 : org = 0x4819C000 len = 0x000000D8 CREGISTER=17
+ MBX0 : org = 0x480C8000 len = 0x00000140 CREGISTER=22
+ MCASP0_DMA : org = 0x46000000 len = 0x00000100 CREGISTER=8
+ MCSPI0 : org = 0x48030000 len = 0x000001A4 CREGISTER=6
+ MCSPI1 : org = 0x481A0000 len = 0x000001A4 CREGISTER=16
+ MMCSD0 : org = 0x48060000 len = 0x00000300 CREGISTER=5
+ SPINLOCK : org = 0x480CA000 len = 0x00000880 CREGISTER=23
+ TPCC : org = 0x49000000 len = 0x00001098 CREGISTER=29
+ UART1 : org = 0x48022000 len = 0x00000088 CREGISTER=11
+ UART2 : org = 0x48024000 len = 0x00000088 CREGISTER=12
+
+ RSVD10 : org = 0x48318000 len = 0x00000100 CREGISTER=10
+ RSVD13 : org = 0x48310000 len = 0x00000100 CREGISTER=13
+ RSVD21 : org = 0x00032400 len = 0x00000100 CREGISTER=21
+ RSVD27 : org = 0x00032000 len = 0x00000100 CREGISTER=27
+
+}
+
+/* Specify the sections allocation into memory */
+SECTIONS {
+ /* Forces _c_int00 to the start of PRU IRAM. Not necessary when loading
+ an ELF file, but useful when loading a binary */
+ .text:_c_int00* > 0x0, PAGE 0
+
+ .text > PRU_IMEM, PAGE 0
+ .stack > PRU_DMEM_0_1, PAGE 1
+ .bss > PRU_DMEM_0_1, PAGE 1
+ .cio > PRU_DMEM_0_1, PAGE 1
+ .data > PRU_DMEM_0_1, PAGE 1
+ .switch > PRU_DMEM_0_1, PAGE 1
+ .sysmem > PRU_DMEM_0_1, PAGE 1
+ .cinit > PRU_DMEM_0_1, PAGE 1
+ .rodata > PRU_DMEM_0_1, PAGE 1
+ .rofardata > PRU_DMEM_0_1, PAGE 1
+ .farbss > PRU_DMEM_0_1, PAGE 1
+ .fardata > PRU_DMEM_0_1, PAGE 1
+
+ .resource_table > PRU_DMEM_0_1, PAGE 1
+}
diff --git a/examples/am437x/PRU_Hardware_UART/Makefile b/examples/am437x/PRU_Hardware_UART/Makefile
--- /dev/null
@@ -0,0 +1,86 @@
+# PRU_CGT environment variable must point to the TI PRU compiler directory. E.g.:
+#(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+#(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+ifndef PRU_CGT
+define ERROR_BODY
+
+************************************************************
+PRU_CGT environment variable is not set. Examples given:
+(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
+CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
+PROJ_NAME=$(CURRENT_DIR)
+LINKER_COMMAND_FILE=./AM437x_PRU_SS1.cmd
+LIBS=--library=../../../lib/rpmsg_lib.lib
+INCLUDE=--include_path=../../../include --include_path=../../../include/am437x
+STACK_SIZE=0x100
+HEAP_SIZE=0x100
+GEN_DIR=gen
+
+#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+CFLAGS=-v3 -O2 --display_error_number --endian=little --hardware_mac=on --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
+#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
+
+TARGET=$(GEN_DIR)/$(PROJ_NAME).out
+MAP=$(GEN_DIR)/$(PROJ_NAME).map
+SOURCES=$(wildcard *.c)
+#Using .object instead of .obj in order to not conflict with the CCS build process
+OBJECTS=$(patsubst %,$(GEN_DIR)/%,$(SOURCES:.c=.object))
+
+all: printStart $(TARGET) printEnd
+
+printStart:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Building project: $(PROJ_NAME)'
+
+printEnd:
+ @echo ''
+ @echo 'Finished building project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Invokes the linker (-z flag) to make the .out file
+$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
+ @echo ''
+ @echo 'Building target: $@'
+ @echo 'Invoking: PRU Linker'
+ $(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)
+ @echo 'Finished building target: $@'
+ @echo ''
+ @echo 'Output files can be found in the "$(GEN_DIR)" directory'
+
+# Invokes the compiler on all c files in the directory to create the object files
+$(GEN_DIR)/%.object: %.c
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+.PHONY: all clean
+
+# Remove the $(GEN_DIR) directory
+clean:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Cleaning project: $(PROJ_NAME)'
+ @echo ''
+ @echo 'Removing files in the "$(GEN_DIR)" directory'
+ @rm -rf $(GEN_DIR)
+ @echo ''
+ @echo 'Finished cleaning project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
+-include $(OBJECTS:%.object=%.pp)
+
diff --git a/examples/am437x/PRU_Hardware_UART/PRU_Hardware_UART.c b/examples/am437x/PRU_Hardware_UART/PRU_Hardware_UART.c
--- /dev/null
@@ -0,0 +1,130 @@
+/*\r
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/ \r
+ * \r
+ * \r
+ * Redistribution and use in source and binary forms, with or without \r
+ * modification, are permitted provided that the following conditions \r
+ * are met:\r
+ * \r
+ * * Redistributions of source code must retain the above copyright \r
+ * notice, this list of conditions and the following disclaimer.\r
+ * \r
+ * * Redistributions in binary form must reproduce the above copyright\r
+ * notice, this list of conditions and the following disclaimer in the \r
+ * documentation and/or other materials provided with the \r
+ * distribution.\r
+ * \r
+ * * Neither the name of Texas Instruments Incorporated nor the names of\r
+ * its contributors may be used to endorse or promote products derived\r
+ * from this software without specific prior written permission.\r
+ * \r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \r
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \r
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT \r
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \r
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \r
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \r
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE \r
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ */\r
+\r
+#include <stdint.h>\r
+#include <pru_uart.h>\r
+#include "resource_table_empty.h"\r
+\r
+/* The FIFO size on the PRU UART is 16 bytes; however, we are (arbitrarily)\r
+ * only going to send 8 at a time */\r
+#define FIFO_SIZE 16\r
+#define MAX_CHARS 8\r
+\r
+/* This hostBuffer structure is temporary but stores a data buffer */\r
+struct {\r
+ uint8_t msg; // Not used today\r
+ uint8_t data[FIFO_SIZE];\r
+} hostBuffer;\r
+\r
+/* Making this buffer global will force the received data into memory */\r
+uint8_t buffer[MAX_CHARS];\r
+\r
+void main(){\r
+ uint8_t tx;\r
+ uint8_t cnt;\r
+\r
+ /* TODO: If modifying this to send data through the pins then PinMuxing\r
+ * needs to be taken care of prior to running this code.\r
+ * This is usually done via a GEL file in CCS or by the Linux driver */\r
+\r
+\r
+ /*** INITIALIZATION ***/\r
+\r
+ /* Set up UART to function at 115200 baud - DLL divisor is 104 at 16x oversample\r
+ * 192MHz / 104 / 16 = ~115200 */\r
+ CT_UART.DLL = 104;\r
+ CT_UART.DLH = 0;\r
+ CT_UART.MDR = 0x0;\r
+\r
+ /* Enable Interrupts in UART module. This allows the main thread to poll for\r
+ * Receive Data Available and Transmit Holding Register Empty */\r
+ CT_UART.IER = 0x7;\r
+\r
+ /* If FIFOs are to be used, select desired trigger level and enable\r
+ * FIFOs by writing to FCR. FIFOEN bit in FCR must be set first before\r
+ * other bits are configured */\r
+ /* Enable FIFOs for now at 1-byte, and flush them */\r
+ CT_UART.FCR = (0x8) | (0x4) | (0x2) | (0x1);\r
+ //CT_UART.FCR = (0x80) | (0x4) | (0x2) | (0x01); // 8-byte RX FIFO trigger\r
+\r
+ /* Choose desired protocol settings by writing to LCR */\r
+ /* 8-bit word, 1 stop bit, no parity, no break control and no divisor latch */\r
+ CT_UART.LCR = 3;\r
+\r
+ /* Enable loopback for test */\r
+ CT_UART.MCR = 0x10;\r
+\r
+ /* Choose desired response to emulation suspend events by configuring\r
+ * FREE bit and enable UART by setting UTRST and URRST in PWREMU_MGMT */\r
+ /* Allow UART to run free, enable UART TX/RX */\r
+ CT_UART.PWREMU_MGMT = 0x6001;\r
+\r
+ /*** END INITIALIZATION ***/\r
+\r
+ /* Priming the 'hostbuffer' with a message */\r
+ hostBuffer.data[0] = 'H';\r
+ hostBuffer.data[1] = 'e';\r
+ hostBuffer.data[2] = 'l';\r
+ hostBuffer.data[3] = 'l';\r
+ hostBuffer.data[4] = 'o';\r
+ hostBuffer.data[5] = '!';\r
+ hostBuffer.data[6] = '\0';\r
+\r
+ /*** SEND SOME DATA ***/\r
+\r
+ /* Let's send/receive some dummy data */\r
+ for (cnt = 0; cnt < MAX_CHARS; cnt++){\r
+ /* Load character, ensure it is not string termination */\r
+ if ((tx = hostBuffer.data[cnt]) == '\0')\r
+ break;\r
+ CT_UART.THR = tx;\r
+\r
+ /* Because we are doing loopback, wait until LSR.DR == 1\r
+ * indicating there is data in the RX FIFO */\r
+ while ((CT_UART.LSR & 0x1) == 0x0);\r
+\r
+ /* Read the value from RBR */\r
+ buffer[cnt] = CT_UART.RBR;\r
+\r
+ /* Wait for TX FIFO to be empty */\r
+ while (!((CT_UART.FCR & 0x2) == 0x2));\r
+ }\r
+\r
+ /*** DONE SENDING DATA ***/\r
+\r
+ /* Disable UART before halting */\r
+ CT_UART.PWREMU_MGMT = 0x0;\r
+\r
+ /* Halt PRU core */\r
+ __halt();\r
+}\r
diff --git a/examples/am437x/PRU_Hardware_UART/resource_table_empty.h b/examples/am437x/PRU_Hardware_UART/resource_table_empty.h
--- /dev/null
@@ -0,0 +1,72 @@
+/*\r
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/ \r
+ * \r
+ * \r
+ * Redistribution and use in source and binary forms, with or without \r
+ * modification, are permitted provided that the following conditions \r
+ * are met:\r
+ * \r
+ * * Redistributions of source code must retain the above copyright \r
+ * notice, this list of conditions and the following disclaimer.\r
+ * \r
+ * * Redistributions in binary form must reproduce the above copyright\r
+ * notice, this list of conditions and the following disclaimer in the \r
+ * documentation and/or other materials provided with the \r
+ * distribution.\r
+ * \r
+ * * Neither the name of Texas Instruments Incorporated nor the names of\r
+ * its contributors may be used to endorse or promote products derived\r
+ * from this software without specific prior written permission.\r
+ * \r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \r
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \r
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT \r
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \r
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \r
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \r
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE \r
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ */\r
+\r
+/*\r
+ * ======== resource_table_empty.h ========\r
+ *\r
+ * Define the resource table entries for all PRU cores. This will be\r
+ * incorporated into corresponding base images, and used by the remoteproc\r
+ * on the host-side to allocated/reserve resources. Note the remoteproc\r
+ * driver requires that all PRU firmware be built with a resource table.\r
+ *\r
+ * This file contains an empty resource table. It can be used either as:\r
+ *\r
+ * 1) A template, or\r
+ * 2) As-is if a PRU application does not need to configure PRU_INTC\r
+ * or interact with the rpmsg driver\r
+ *\r
+ */\r
+\r
+#ifndef _RSC_TABLE_PRU_H_\r
+#define _RSC_TABLE_PRU_H_\r
+\r
+#include <stddef.h>\r
+#include <rsc_types.h>\r
+\r
+struct my_resource_table {\r
+ struct resource_table base;\r
+\r
+ uint32_t offset[1]; /* Should match 'num' in actual definition */\r
+};\r
+\r
+#pragma DATA_SECTION(pru_remoteproc_ResourceTable, ".resource_table")\r
+#pragma RETAIN(pru_remoteproc_ResourceTable)\r
+struct my_resource_table pru_remoteproc_ResourceTable = {\r
+ 1, /* we're the first version that implements this */\r
+ 0, /* number of entries in the table */\r
+ 0, 0, /* reserved, must be zero */\r
+ 0, /* offset[0] */\r
+};\r
+\r
+#endif /* _RSC_TABLE_PRU_H_ */\r
+\r
diff --git a/examples/am437x/PRU_IEP/.ccsproject b/examples/am437x/PRU_IEP/.ccsproject
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<?ccsproject version="1.0"?>
+<projectOptions>
+ <deviceVariant value="TMS192C2026.AM3359.BeagleBone_Black"/>
+ <deviceFamily value="PRU"/>
+ <deviceEndianness value="little"/>
+ <codegenToolVersion value="2.0.0.B2"/>
+ <isElfFormat value="true"/>
+ <rts value="libc.a"/>
+ <createSlaveProjects value=""/>
+ <templateProperties value="id=com.ti.common.project.core.emptyProjectTemplate,"/>
+ <isTargetManual value="false"/>
+</projectOptions>
diff --git a/examples/am437x/PRU_IEP/.cproject b/examples/am437x/PRU_IEP/.cproject
--- /dev/null
@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+ <storageModule configRelations="2" moduleId="org.eclipse.cdt.core.settings">
+ <cconfiguration id="com.ti.ccstudio.buildDefinitions.PRU.Debug.1632304714">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.PRU.Debug.1632304714" moduleId="org.eclipse.cdt.core.settings" name="Debug">
+ <externalSettings/>
+ <extensions>
+ <extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.LinkErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" id="com.ti.ccstudio.buildDefinitions.PRU.Debug.1632304714" name="Debug" parent="com.ti.ccstudio.buildDefinitions.PRU.Debug" postbuildStep="" prebuildStep="">
+ <folderInfo id="com.ti.ccstudio.buildDefinitions.PRU.Debug.1632304714." name="/" resourcePath="">
+ <toolChain id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.DebugToolchain.880851549" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.DebugToolchain" targetTool="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerDebug.514780393">
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.1268766211" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
+ <listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=TMS192C2026.AM4379.EVMAM437X"/>
+ <listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>
+ <listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>
+ <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.5.0"/>
+ <listOptionValue builtIn="false" value="LINKER_COMMAND_FILE="/>
+ <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/>
+ <listOptionValue builtIn="false" value="OUTPUT_TYPE=executable"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.492904919" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="2.1.1" valueType="string"/>
+ <targetPlatform id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformDebug.2079722581" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformDebug"/>
+ <builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderDebug.1610345002" name="GNU Make.Debug" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderDebug"/>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerDebug.1239524262" name="PRU Compiler" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerDebug">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE.1055155374" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="pru0"/>
+ <listOptionValue builtIn="false" value="am4379"/>
+ <listOptionValue builtIn="false" value="icss1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.SILICON_VERSION.1710228414" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.1434922325" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.768835219" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am437x""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEBUGGING_MODEL.1848386629" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.519354071" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">
+ <listOptionValue builtIn="false" value="225"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER.1824257965" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WRAP.644901684" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.644773322" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN" value="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.little" valueType="enumerated"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS.1400991240" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS.2039335035" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS.533966915" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS.1409118761" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerDebug.514780393" name="PRU Linker" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerDebug">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE.589501751" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="ICSS1_PRU_CORE=1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE.1693502592" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE" value="0x100" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE.345569818" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE" value="0x100" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE.1247175590" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE" value=""${ProjName}.out"" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE.785382620" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE" value=""${ProjName}.map"" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY.311292892" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY" valueType="libs">
+ <listOptionValue builtIn="false" value=""libc.a""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH.1032455662" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH" valueType="libPaths">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/lib""/>
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO.859833719" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO" value=""${ProjName}_linkInfo.xml"" valueType="string"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS.188394374" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS.367254540" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS.1159234878" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.1403600704" name="PRU Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.OUTPUT_FILE.624260245" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.OUTPUT_FILE" value=""${BuildArtifactFileBaseName}.hex"" valueType="string"/>
+ </tool>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry excluding="AM335x_PRU.cmd|AM437x.cmd|AM335x.cmd" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ <cconfiguration id="com.ti.ccstudio.buildDefinitions.PRU.Release.732835523">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.PRU.Release.732835523" moduleId="org.eclipse.cdt.core.settings" name="Release">
+ <externalSettings/>
+ <extensions>
+ <extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.LinkErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" id="com.ti.ccstudio.buildDefinitions.PRU.Release.732835523" name="Release" parent="com.ti.ccstudio.buildDefinitions.PRU.Release" postbuildStep="" prebuildStep="">
+ <folderInfo id="com.ti.ccstudio.buildDefinitions.PRU.Release.732835523." name="/" resourcePath="">
+ <toolChain id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.ReleaseToolchain.1224079787" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.ReleaseToolchain" targetTool="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease.1469521557">
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.167140315" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
+ <listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=TMS192C2026.AM4379.EVMAM437X"/>
+ <listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>
+ <listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>
+ <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.5.0"/>
+ <listOptionValue builtIn="false" value="LINKER_COMMAND_FILE="/>
+ <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/>
+ <listOptionValue builtIn="false" value="OUTPUT_TYPE=executable"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.458215693" name="Compiler version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="2.1.1" valueType="string"/>
+ <targetPlatform id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformRelease.1364669343" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformRelease"/>
+ <builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderRelease.1465266017" keepEnvironmentInBuildfile="false" name="GNU Make" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderRelease"/>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerRelease.1267275487" name="PRU Compiler" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerRelease">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE.1896264221" name="Pre-define NAME (--define, -D)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="pru0"/>
+ <listOptionValue builtIn="false" value="am4379"/>
+ <listOptionValue builtIn="false" value="icss1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.SILICON_VERSION.680886676" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.1104894659" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.867733706" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am437x""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.401465889" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">
+ <listOptionValue builtIn="false" value="225"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER.702168107" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WRAP.1059627912" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.1892847366" 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"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS.371234068" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS.1307145525" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS.1539640427" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS.185969838" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease.1469521557" name="PRU Linker" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE.860282756" name="Pre-define preprocessor macro _name_ to _value_ (--define)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="ICSS1_PRU_CORE=1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE.1130439613" name="Set C system stack size (--stack_size, -stack)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE" value="0x100" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE.768657708" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE.1155456536" name="Specify output file name (--output_file, -o)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE" value=""${ProjName}.out"" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE.1100733225" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY.1492926314" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY" valueType="libs">
+ <listOptionValue builtIn="false" value=""libc.a""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH.1444661842" name="Add <dir> to library search path (--search_path, -i)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH" valueType="libPaths">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/lib""/>
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO.686430886" 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"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS.1796307547" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS.1441813119" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS.904207505" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.1833170129" name="PRU Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.OUTPUT_FILE.1062191710" name="Specify output file names (--outfile, -o)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.OUTPUT_FILE" value=""${BuildArtifactFileBaseName}.hex"" valueType="string"/>
+ </tool>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry excluding="AM437x.cmd|AM335x_PRU.cmd|AM335x.cmd" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <project id="PRU_IEP.com.ti.ccstudio.buildDefinitions.PRU.ProjectType.1739957857" name="PRU" projectType="com.ti.ccstudio.buildDefinitions.PRU.ProjectType"/>
+ </storageModule>
+ <storageModule moduleId="scannerConfiguration"/>
+ <storageModule moduleId="org.eclipse.cdt.core.language.mapping">
+ <project-mappings>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.asmSource" language="com.ti.ccstudio.core.TIASMLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cHeader" language="com.ti.ccstudio.core.TIGCCLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cSource" language="com.ti.ccstudio.core.TIGCCLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxHeader" language="com.ti.ccstudio.core.TIGPPLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxSource" language="com.ti.ccstudio.core.TIGPPLanguage"/>
+ </project-mappings>
+ </storageModule>
+</cproject>
diff --git a/examples/am437x/PRU_IEP/.project b/examples/am437x/PRU_IEP/.project
--- /dev/null
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>PRU_IEP</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+ <triggers>full,incremental,</triggers>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.ti.ccstudio.core.ccsNature</nature>
+ <nature>org.eclipse.cdt.core.cnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+ <nature>org.eclipse.cdt.core.ccnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+ </natures>
+</projectDescription>
diff --git a/examples/am437x/PRU_IEP/.settings/org.eclipse.cdt.codan.core.prefs b/examples/am437x/PRU_IEP/.settings/org.eclipse.cdt.codan.core.prefs
--- /dev/null
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+inEditor=false
+onBuild=false
diff --git a/examples/am437x/PRU_IEP/.settings/org.eclipse.cdt.debug.core.prefs b/examples/am437x/PRU_IEP/.settings/org.eclipse.cdt.debug.core.prefs
--- /dev/null
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+org.eclipse.cdt.debug.core.toggleBreakpointModel=com.ti.ccstudio.debug.CCSBreakpointMarker
diff --git a/examples/am437x/PRU_IEP/AM437x_PRU_SS1.cmd b/examples/am437x/PRU_IEP/AM437x_PRU_SS1.cmd
--- /dev/null
@@ -0,0 +1,84 @@
+/****************************************************************************/
+/* AM437x_PRU_SS1.cmd */
+/* Copyright (c) 2015 Texas Instruments Incorporated */
+/* */
+/* Description: This file is a linker command file that can be used for */
+/* linking PRU programs built with the C compiler and */
+/* the resulting .out file on an AM437x device. */
+/****************************************************************************/
+
+-cr /* Link using C conventions */
+
+/* Specify the System Memory Map */
+MEMORY
+{
+ PAGE 0:
+ PRU_IMEM : org = 0x00000000 len = 0x00003000 /* 12kB PRU-ICSS1 Instruction RAM */
+
+ PAGE 1:
+
+ /* RAM */
+
+ PRU_DMEM_0_1 : org = 0x00000000 len = 0x00002000 CREGISTER=24 /* 8kB PRU Data RAM 0_1 */
+ PRU_DMEM_1_0 : org = 0x00002000 len = 0x00002000 CREGISTER=25 /* 8kB PRU Data RAM 1_0 */
+ PRU_SHAREDMEM : org = 0x00010000 len = 0x00008000 CREGISTER=28 /* 32kB Shared RAM */
+
+ DDR : org = 0x80000000 len = 0x00000100 CREGISTER=31
+ L3OCMC : org = 0x40000000 len = 0x00010000 CREGISTER=30
+
+
+ /* Peripherals */
+
+ PRU_CFG : org = 0x00026000 len = 0x00000120 CREGISTER=4
+ PRU_ECAP : org = 0x00030000 len = 0x00000060 CREGISTER=3
+ PRU_IEP : org = 0x0002E000 len = 0x0000031C CREGISTER=26
+ PRU_INTC : org = 0x00020000 len = 0x00001504 CREGISTER=0
+ PRU_UART : org = 0x00028000 len = 0x00000038 CREGISTER=7
+
+ DCAN0 : org = 0x481CC000 len = 0x000001E8 CREGISTER=14
+ DCAN1 : org = 0x481D0000 len = 0x000001E8 CREGISTER=15
+ DMTIMER2 : org = 0x48040000 len = 0x0000005C CREGISTER=1
+ PWMSS0 : org = 0x48300000 len = 0x000002C4 CREGISTER=18
+ PWMSS1 : org = 0x48302000 len = 0x000002C4 CREGISTER=19
+ PWMSS2 : org = 0x48304000 len = 0x000002C4 CREGISTER=20
+ GEMAC : org = 0x4A100000 len = 0x0000128C CREGISTER=9
+ I2C1 : org = 0x4802A000 len = 0x000000D8 CREGISTER=2
+ I2C2 : org = 0x4819C000 len = 0x000000D8 CREGISTER=17
+ MBX0 : org = 0x480C8000 len = 0x00000140 CREGISTER=22
+ MCASP0_DMA : org = 0x46000000 len = 0x00000100 CREGISTER=8
+ MCSPI0 : org = 0x48030000 len = 0x000001A4 CREGISTER=6
+ MCSPI1 : org = 0x481A0000 len = 0x000001A4 CREGISTER=16
+ MMCSD0 : org = 0x48060000 len = 0x00000300 CREGISTER=5
+ SPINLOCK : org = 0x480CA000 len = 0x00000880 CREGISTER=23
+ TPCC : org = 0x49000000 len = 0x00001098 CREGISTER=29
+ UART1 : org = 0x48022000 len = 0x00000088 CREGISTER=11
+ UART2 : org = 0x48024000 len = 0x00000088 CREGISTER=12
+
+ RSVD10 : org = 0x48318000 len = 0x00000100 CREGISTER=10
+ RSVD13 : org = 0x48310000 len = 0x00000100 CREGISTER=13
+ RSVD21 : org = 0x00032400 len = 0x00000100 CREGISTER=21
+ RSVD27 : org = 0x00032000 len = 0x00000100 CREGISTER=27
+
+}
+
+/* Specify the sections allocation into memory */
+SECTIONS {
+ /* Forces _c_int00 to the start of PRU IRAM. Not necessary when loading
+ an ELF file, but useful when loading a binary */
+ .text:_c_int00* > 0x0, PAGE 0
+
+ .text > PRU_IMEM, PAGE 0
+ .stack > PRU_DMEM_0_1, PAGE 1
+ .bss > PRU_DMEM_0_1, PAGE 1
+ .cio > PRU_DMEM_0_1, PAGE 1
+ .data > PRU_DMEM_0_1, PAGE 1
+ .switch > PRU_DMEM_0_1, PAGE 1
+ .sysmem > PRU_DMEM_0_1, PAGE 1
+ .cinit > PRU_DMEM_0_1, PAGE 1
+ .rodata > PRU_DMEM_0_1, PAGE 1
+ .rofardata > PRU_DMEM_0_1, PAGE 1
+ .farbss > PRU_DMEM_0_1, PAGE 1
+ .fardata > PRU_DMEM_0_1, PAGE 1
+
+ .resource_table > PRU_DMEM_0_1, PAGE 1
+}
diff --git a/examples/am437x/PRU_IEP/Makefile b/examples/am437x/PRU_IEP/Makefile
--- /dev/null
@@ -0,0 +1,86 @@
+# PRU_CGT environment variable must point to the TI PRU compiler directory. E.g.:
+#(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+#(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+ifndef PRU_CGT
+define ERROR_BODY
+
+************************************************************
+PRU_CGT environment variable is not set. Examples given:
+(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
+CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
+PROJ_NAME=$(CURRENT_DIR)
+LINKER_COMMAND_FILE=./AM437x_PRU_SS1.cmd
+LIBS=--library=../../../lib/rpmsg_lib.lib
+INCLUDE=--include_path=../../../include --include_path=../../../include/am437x
+STACK_SIZE=0x100
+HEAP_SIZE=0x100
+GEN_DIR=gen
+
+#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+CFLAGS=-v3 -O2 --display_error_number --endian=little --hardware_mac=on --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
+#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
+
+TARGET=$(GEN_DIR)/$(PROJ_NAME).out
+MAP=$(GEN_DIR)/$(PROJ_NAME).map
+SOURCES=$(wildcard *.c)
+#Using .object instead of .obj in order to not conflict with the CCS build process
+OBJECTS=$(patsubst %,$(GEN_DIR)/%,$(SOURCES:.c=.object))
+
+all: printStart $(TARGET) printEnd
+
+printStart:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Building project: $(PROJ_NAME)'
+
+printEnd:
+ @echo ''
+ @echo 'Finished building project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Invokes the linker (-z flag) to make the .out file
+$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
+ @echo ''
+ @echo 'Building target: $@'
+ @echo 'Invoking: PRU Linker'
+ $(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)
+ @echo 'Finished building target: $@'
+ @echo ''
+ @echo 'Output files can be found in the "$(GEN_DIR)" directory'
+
+# Invokes the compiler on all c files in the directory to create the object files
+$(GEN_DIR)/%.object: %.c
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+.PHONY: all clean
+
+# Remove the $(GEN_DIR) directory
+clean:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Cleaning project: $(PROJ_NAME)'
+ @echo ''
+ @echo 'Removing files in the "$(GEN_DIR)" directory'
+ @rm -rf $(GEN_DIR)
+ @echo ''
+ @echo 'Finished cleaning project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
+-include $(OBJECTS:%.object=%.pp)
+
diff --git a/examples/am437x/PRU_IEP/PRU_IEP.c b/examples/am437x/PRU_IEP/PRU_IEP.c
--- /dev/null
@@ -0,0 +1,98 @@
+/*\r
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/ \r
+ * \r
+ * \r
+ * Redistribution and use in source and binary forms, with or without \r
+ * modification, are permitted provided that the following conditions \r
+ * are met:\r
+ * \r
+ * * Redistributions of source code must retain the above copyright \r
+ * notice, this list of conditions and the following disclaimer.\r
+ * \r
+ * * Redistributions in binary form must reproduce the above copyright\r
+ * notice, this list of conditions and the following disclaimer in the \r
+ * documentation and/or other materials provided with the \r
+ * distribution.\r
+ * \r
+ * * Neither the name of Texas Instruments Incorporated nor the names of\r
+ * its contributors may be used to endorse or promote products derived\r
+ * from this software without specific prior written permission.\r
+ * \r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \r
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \r
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT \r
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \r
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \r
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \r
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE \r
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ */\r
+\r
+#include <stdint.h>\r
+#include <pru_cfg.h>\r
+#include <pru_intc.h>\r
+#include <pru_iep.h>\r
+#include "rsc_table_pru.h"\r
+\r
+volatile register uint32_t __R30;\r
+volatile register uint32_t __R31;\r
+\r
+void main(){\r
+ /* Clear SYSCFG[STANDBY_INIT] to enable OCP master port */\r
+ CT_CFG.SYSCFG_bit.STANDBY_INIT = 0;\r
+\r
+ /* Disable counter */\r
+ CT_IEP.TMR_GLB_CFG_bit.CNT_ENABLE = 0;\r
+\r
+ /* Reset Count register */\r
+ CT_IEP.TMR_CNT = 0x0;\r
+\r
+ /* Clear overflow status register */\r
+ CT_IEP.TMR_GLB_STS_bit.CNT_OVF = 0x1;\r
+\r
+ /* Set compare value */\r
+ CT_IEP.TMR_CMP0 = 0x77359400; // 10 seconds @ 200MHz\r
+\r
+ /* Clear compare status */\r
+ CT_IEP.TMR_CMP_STS_bit.CMP_HIT = 0xFF;\r
+\r
+ /* Disable compensation */\r
+ CT_IEP.TMR_COMPEN_bit.COMPEN_CNT = 0x0;\r
+\r
+ /* Enable CMP0 and reset on event */\r
+ CT_IEP.TMR_CMP_CFG_bit.CMP0_RST_CNT_EN = 0x1;\r
+ CT_IEP.TMR_CMP_CFG_bit.CMP_EN = 0x1;\r
+\r
+ /* Clear the status of all interrupts */\r
+ CT_INTC.SECR0 = 0xFFFFFFFF;\r
+ CT_INTC.SECR1 = 0xFFFFFFFF;\r
+\r
+ /* Enable counter */\r
+ CT_IEP.TMR_GLB_CFG = 0x11;\r
+\r
+ /* Poll until R31.31 is set */\r
+ do{\r
+ while((__R31 & 0x80000000) == 0){\r
+ }\r
+ /* Verify that the IEP is the source of the interrupt */\r
+ } while ((CT_INTC.SECR0 & (1 << 7)) == 0);\r
+\r
+ /* Disable counter */\r
+ CT_IEP.TMR_GLB_CFG_bit.CNT_ENABLE = 0x0;\r
+\r
+ /* Disable Compare0 */\r
+ CT_IEP.TMR_CMP_CFG = 0x0;\r
+\r
+ /* Clear Compare status */\r
+ CT_IEP.TMR_CMP_STS = 0xFF;\r
+\r
+ /* Clear the status of the interrupt */\r
+ CT_INTC.SECR0 = (1 << 7);\r
+\r
+ /* Halt the PRU core */\r
+ __halt();\r
+}\r
+\r
diff --git a/examples/am437x/PRU_IEP/rsc_table_pru.h b/examples/am437x/PRU_IEP/rsc_table_pru.h
--- /dev/null
@@ -0,0 +1,105 @@
+/*\r
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/ \r
+ * \r
+ * \r
+ * Redistribution and use in source and binary forms, with or without \r
+ * modification, are permitted provided that the following conditions \r
+ * are met:\r
+ * \r
+ * * Redistributions of source code must retain the above copyright \r
+ * notice, this list of conditions and the following disclaimer.\r
+ * \r
+ * * Redistributions in binary form must reproduce the above copyright\r
+ * notice, this list of conditions and the following disclaimer in the \r
+ * documentation and/or other materials provided with the \r
+ * distribution.\r
+ * \r
+ * * Neither the name of Texas Instruments Incorporated nor the names of\r
+ * its contributors may be used to endorse or promote products derived\r
+ * from this software without specific prior written permission.\r
+ * \r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \r
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \r
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT \r
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \r
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \r
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \r
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE \r
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ */\r
+\r
+/*\r
+ * ======== resource_table_empty.h ========\r
+ *\r
+ * Define the resource table entries for all PRU cores. This will be\r
+ * incorporated into corresponding base images, and used by the remoteproc\r
+ * on the host-side to allocated/reserve resources. Note the remoteproc\r
+ * driver requires that all PRU firmware be built with a resource table.\r
+ *\r
+ *\r
+ */\r
+\r
+#ifndef _RSC_TABLE_PRU_H_\r
+#define _RSC_TABLE_PRU_H_\r
+\r
+#include <stddef.h>\r
+#include <rsc_types.h>\r
+#include "pru_virtio_ids.h"\r
+\r
+/*\r
+ * Sizes of the virtqueues (expressed in number of buffers supported,\r
+ * and must be power of 2)\r
+ */\r
+#define PRU_RPMSG_VQ0_SIZE 2\r
+#define PRU_RPMSG_VQ1_SIZE 2\r
+\r
+/* flip up bits whose indices represent features we support */\r
+#define RPMSG_PRU_C0_FEATURES 1\r
+\r
+/* Definition for unused interrupts */\r
+#define HOST_UNUSED 255\r
+\r
+/* Mapping sysevts to a channel. Each pair contains a sysevt, channel */\r
+struct ch_map pru_intc_map[] = { {7, 1}\r
+ };\r
+\r
+struct my_resource_table {\r
+ struct resource_table base;\r
+\r
+ uint32_t offset[1]; /* Should match 'num' in actual definition */\r
+\r
+ /* intc definition */\r
+ struct fw_rsc_custom pru_ints;\r
+};\r
+\r
+#pragma DATA_SECTION(am335x_pru_remoteproc_ResourceTable, ".resource_table")\r
+#pragma RETAIN(am335x_pru_remoteproc_ResourceTable)\r
+struct my_resource_table am335x_pru_remoteproc_ResourceTable = {\r
+ 1, /* we're the first version that implements this */\r
+ 1, /* number of entries in the table */\r
+ 0, 0, /* reserved, must be zero */\r
+ /* offsets to entries */\r
+ {\r
+ offsetof(struct my_resource_table, pru_ints),\r
+ },\r
+\r
+ {\r
+ TYPE_CUSTOM, TYPE_PRU_INTS,\r
+ sizeof(struct fw_rsc_custom_ints),\r
+ { /* PRU_INTS version */\r
+ 0x0000,\r
+ /* Channel-to-host mapping, 255 for unused */\r
+ HOST_UNUSED, 1, HOST_UNUSED, HOST_UNUSED, HOST_UNUSED, HOST_UNUSED, HOST_UNUSED, HOST_UNUSED, HOST_UNUSED, HOST_UNUSED,\r
+ /* Number of evts being mapped to channels */\r
+ (sizeof(pru_intc_map) / sizeof(struct ch_map)),\r
+ /* Pointer to the structure containing mapped events */\r
+ pru_intc_map,\r
+ },\r
+ },\r
+};\r
+\r
+#endif /* _RSC_TABLE_PRU_H_ */\r
+\r
diff --git a/examples/am437x/PRU_MAC_Multiply_Accum/.ccsproject b/examples/am437x/PRU_MAC_Multiply_Accum/.ccsproject
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<?ccsproject version="1.0"?>
+<projectOptions>
+ <deviceVariant value="TMS192C2026.AM3359.BeagleBone_Black"/>
+ <deviceFamily value="PRU"/>
+ <deviceEndianness value="little"/>
+ <codegenToolVersion value="2.0.0.B2"/>
+ <isElfFormat value="true"/>
+ <rts value="libc.a"/>
+ <createSlaveProjects value=""/>
+ <templateProperties value="id=com.ti.common.project.core.emptyProjectTemplate,"/>
+ <isTargetManual value="false"/>
+</projectOptions>
diff --git a/examples/am437x/PRU_MAC_Multiply_Accum/.cproject b/examples/am437x/PRU_MAC_Multiply_Accum/.cproject
--- /dev/null
@@ -0,0 +1,186 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+ <storageModule configRelations="2" moduleId="org.eclipse.cdt.core.settings">
+ <cconfiguration id="com.ti.ccstudio.buildDefinitions.PRU.Debug.1447292159">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.PRU.Debug.1447292159" moduleId="org.eclipse.cdt.core.settings" name="Debug">
+ <externalSettings/>
+ <extensions>
+ <extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.LinkErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" id="com.ti.ccstudio.buildDefinitions.PRU.Debug.1447292159" name="Debug" parent="com.ti.ccstudio.buildDefinitions.PRU.Debug" postbuildStep="" prebuildStep="">
+ <folderInfo id="com.ti.ccstudio.buildDefinitions.PRU.Debug.1447292159." name="/" resourcePath="">
+ <toolChain id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.DebugToolchain.1157359054" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.DebugToolchain" targetTool="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerDebug.426176978">
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.2135885920" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
+ <listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=TMS192C2026.AM4379.EVMAM437X"/>
+ <listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>
+ <listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>
+ <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.5.0"/>
+ <listOptionValue builtIn="false" value="LINKER_COMMAND_FILE="/>
+ <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/>
+ <listOptionValue builtIn="false" value="OUTPUT_TYPE=executable"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.2102569800" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="2.1.1" valueType="string"/>
+ <targetPlatform id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformDebug.1678666148" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformDebug"/>
+ <builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderDebug.724722921" name="GNU Make.Debug" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderDebug"/>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerDebug.1175258536" name="PRU Compiler" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerDebug">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE.441001749" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="pru0"/>
+ <listOptionValue builtIn="false" value="am4379"/>
+ <listOptionValue builtIn="false" value="icss1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.SILICON_VERSION.1324174316" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.621123727" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.OPT_LEVEL.93951836" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.OPT_LEVEL" value="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.OPT_LEVEL.3" valueType="enumerated"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.1889782579" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am437x""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEBUGGING_MODEL.294169724" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.1662818731" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">
+ <listOptionValue builtIn="false" value="225"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER.230837358" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WRAP.1432731639" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.2139957210" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN" value="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.little" valueType="enumerated"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.KEEP_ASM.100479613" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.KEEP_ASM" value="true" valueType="boolean"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS.1059006082" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS.731720000" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS.835637708" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS.1931052664" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerDebug.426176978" name="PRU Linker" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerDebug">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE.1691037931" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="ICSS1_PRU_CORE=1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE.1129432352" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE" value="0x100" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE.811278076" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE" value="0x100" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE.70098031" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE" value=""${ProjName}.out"" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE.1345389457" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE" value=""${ProjName}.map"" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY.1947751827" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY" valueType="libs">
+ <listOptionValue builtIn="false" value=""libc.a""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH.1866910669" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH" valueType="libPaths">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/lib""/>
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO.1478298112" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO" value=""${ProjName}_linkInfo.xml"" valueType="string"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS.780791067" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS.525496352" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS.1879977612" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.19435042" name="PRU Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.OUTPUT_FILE.1871399638" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.OUTPUT_FILE" value=""${BuildArtifactFileBaseName}.hex"" valueType="string"/>
+ </tool>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry excluding="AM437x.cmd|AM335x_PRU.cmd|AM335x.cmd" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ <cconfiguration id="com.ti.ccstudio.buildDefinitions.PRU.Release.1305871433">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.PRU.Release.1305871433" moduleId="org.eclipse.cdt.core.settings" name="Release">
+ <externalSettings/>
+ <extensions>
+ <extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.LinkErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" id="com.ti.ccstudio.buildDefinitions.PRU.Release.1305871433" name="Release" parent="com.ti.ccstudio.buildDefinitions.PRU.Release" postbuildStep="" prebuildStep="">
+ <folderInfo id="com.ti.ccstudio.buildDefinitions.PRU.Release.1305871433." name="/" resourcePath="">
+ <toolChain id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.ReleaseToolchain.424353586" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.ReleaseToolchain" targetTool="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease.138236891">
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.972447406" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
+ <listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=TMS192C2026.AM4379.EVMAM437X"/>
+ <listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>
+ <listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>
+ <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.5.0"/>
+ <listOptionValue builtIn="false" value="LINKER_COMMAND_FILE="/>
+ <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/>
+ <listOptionValue builtIn="false" value="OUTPUT_TYPE=executable"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.739936302" name="Compiler version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="2.1.1" valueType="string"/>
+ <targetPlatform id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformRelease.1292419456" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformRelease"/>
+ <builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderRelease.1979987186" keepEnvironmentInBuildfile="false" name="GNU Make" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderRelease"/>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerRelease.1524257452" name="PRU Compiler" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerRelease">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE.979489795" name="Pre-define NAME (--define, -D)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="pru0"/>
+ <listOptionValue builtIn="false" value="am4379"/>
+ <listOptionValue builtIn="false" value="icss1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.SILICON_VERSION.2095557650" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.258708878" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.171985664" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am437x""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.1700076299" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">
+ <listOptionValue builtIn="false" value="225"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER.550095725" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WRAP.1102456825" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.737087699" 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"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS.683888227" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS.2057024179" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS.1337968074" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS.1104491072" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease.138236891" name="PRU Linker" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE.1759451661" name="Pre-define preprocessor macro _name_ to _value_ (--define)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="ICSS1_PRU_CORE=1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE.284731458" name="Set C system stack size (--stack_size, -stack)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE" value="0x100" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE.393807503" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE.715878180" name="Specify output file name (--output_file, -o)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE" value=""${ProjName}.out"" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE.1844191782" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY.1701380323" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY" valueType="libs">
+ <listOptionValue builtIn="false" value=""libc.a""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH.184650527" name="Add <dir> to library search path (--search_path, -i)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH" valueType="libPaths">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/lib""/>
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO.713804133" 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"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS.1881626545" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS.894051909" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS.2084175463" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.1387960702" name="PRU Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.OUTPUT_FILE.938767714" name="Specify output file names (--outfile, -o)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.OUTPUT_FILE" value=""${BuildArtifactFileBaseName}.hex"" valueType="string"/>
+ </tool>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry excluding="AM335x_PRU.cmd|AM335x.cmd" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <project id="PRU_MAC_Multiply_Accum.com.ti.ccstudio.buildDefinitions.PRU.ProjectType.1179404865" name="PRU" projectType="com.ti.ccstudio.buildDefinitions.PRU.ProjectType"/>
+ </storageModule>
+ <storageModule moduleId="scannerConfiguration"/>
+ <storageModule moduleId="org.eclipse.cdt.core.language.mapping">
+ <project-mappings>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.asmSource" language="com.ti.ccstudio.core.TIASMLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cHeader" language="com.ti.ccstudio.core.TIGCCLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cSource" language="com.ti.ccstudio.core.TIGCCLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxHeader" language="com.ti.ccstudio.core.TIGPPLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxSource" language="com.ti.ccstudio.core.TIGPPLanguage"/>
+ </project-mappings>
+ </storageModule>
+</cproject>
diff --git a/examples/am437x/PRU_MAC_Multiply_Accum/.project b/examples/am437x/PRU_MAC_Multiply_Accum/.project
--- /dev/null
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>PRU_MAC_Multiply_Accum</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+ <triggers>full,incremental,</triggers>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.ti.ccstudio.core.ccsNature</nature>
+ <nature>org.eclipse.cdt.core.cnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+ <nature>org.eclipse.cdt.core.ccnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+ </natures>
+</projectDescription>
diff --git a/examples/am437x/PRU_MAC_Multiply_Accum/.settings/org.eclipse.cdt.codan.core.prefs b/examples/am437x/PRU_MAC_Multiply_Accum/.settings/org.eclipse.cdt.codan.core.prefs
--- /dev/null
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+inEditor=false
+onBuild=false
diff --git a/examples/am437x/PRU_MAC_Multiply_Accum/.settings/org.eclipse.cdt.debug.core.prefs b/examples/am437x/PRU_MAC_Multiply_Accum/.settings/org.eclipse.cdt.debug.core.prefs
--- /dev/null
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+org.eclipse.cdt.debug.core.toggleBreakpointModel=com.ti.ccstudio.debug.CCSBreakpointMarker
diff --git a/examples/am437x/PRU_MAC_Multiply_Accum/AM437x_PRU_SS1.cmd b/examples/am437x/PRU_MAC_Multiply_Accum/AM437x_PRU_SS1.cmd
--- /dev/null
@@ -0,0 +1,84 @@
+/****************************************************************************/
+/* AM437x_PRU_SS1.cmd */
+/* Copyright (c) 2015 Texas Instruments Incorporated */
+/* */
+/* Description: This file is a linker command file that can be used for */
+/* linking PRU programs built with the C compiler and */
+/* the resulting .out file on an AM437x device. */
+/****************************************************************************/
+
+-cr /* Link using C conventions */
+
+/* Specify the System Memory Map */
+MEMORY
+{
+ PAGE 0:
+ PRU_IMEM : org = 0x00000000 len = 0x00003000 /* 12kB PRU-ICSS1 Instruction RAM */
+
+ PAGE 1:
+
+ /* RAM */
+
+ PRU_DMEM_0_1 : org = 0x00000000 len = 0x00002000 CREGISTER=24 /* 8kB PRU Data RAM 0_1 */
+ PRU_DMEM_1_0 : org = 0x00002000 len = 0x00002000 CREGISTER=25 /* 8kB PRU Data RAM 1_0 */
+ PRU_SHAREDMEM : org = 0x00010000 len = 0x00008000 CREGISTER=28 /* 32kB Shared RAM */
+
+ DDR : org = 0x80000000 len = 0x00000100 CREGISTER=31
+ L3OCMC : org = 0x40000000 len = 0x00010000 CREGISTER=30
+
+
+ /* Peripherals */
+
+ PRU_CFG : org = 0x00026000 len = 0x00000120 CREGISTER=4
+ PRU_ECAP : org = 0x00030000 len = 0x00000060 CREGISTER=3
+ PRU_IEP : org = 0x0002E000 len = 0x0000031C CREGISTER=26
+ PRU_INTC : org = 0x00020000 len = 0x00001504 CREGISTER=0
+ PRU_UART : org = 0x00028000 len = 0x00000038 CREGISTER=7
+
+ DCAN0 : org = 0x481CC000 len = 0x000001E8 CREGISTER=14
+ DCAN1 : org = 0x481D0000 len = 0x000001E8 CREGISTER=15
+ DMTIMER2 : org = 0x48040000 len = 0x0000005C CREGISTER=1
+ PWMSS0 : org = 0x48300000 len = 0x000002C4 CREGISTER=18
+ PWMSS1 : org = 0x48302000 len = 0x000002C4 CREGISTER=19
+ PWMSS2 : org = 0x48304000 len = 0x000002C4 CREGISTER=20
+ GEMAC : org = 0x4A100000 len = 0x0000128C CREGISTER=9
+ I2C1 : org = 0x4802A000 len = 0x000000D8 CREGISTER=2
+ I2C2 : org = 0x4819C000 len = 0x000000D8 CREGISTER=17
+ MBX0 : org = 0x480C8000 len = 0x00000140 CREGISTER=22
+ MCASP0_DMA : org = 0x46000000 len = 0x00000100 CREGISTER=8
+ MCSPI0 : org = 0x48030000 len = 0x000001A4 CREGISTER=6
+ MCSPI1 : org = 0x481A0000 len = 0x000001A4 CREGISTER=16
+ MMCSD0 : org = 0x48060000 len = 0x00000300 CREGISTER=5
+ SPINLOCK : org = 0x480CA000 len = 0x00000880 CREGISTER=23
+ TPCC : org = 0x49000000 len = 0x00001098 CREGISTER=29
+ UART1 : org = 0x48022000 len = 0x00000088 CREGISTER=11
+ UART2 : org = 0x48024000 len = 0x00000088 CREGISTER=12
+
+ RSVD10 : org = 0x48318000 len = 0x00000100 CREGISTER=10
+ RSVD13 : org = 0x48310000 len = 0x00000100 CREGISTER=13
+ RSVD21 : org = 0x00032400 len = 0x00000100 CREGISTER=21
+ RSVD27 : org = 0x00032000 len = 0x00000100 CREGISTER=27
+
+}
+
+/* Specify the sections allocation into memory */
+SECTIONS {
+ /* Forces _c_int00 to the start of PRU IRAM. Not necessary when loading
+ an ELF file, but useful when loading a binary */
+ .text:_c_int00* > 0x0, PAGE 0
+
+ .text > PRU_IMEM, PAGE 0
+ .stack > PRU_DMEM_0_1, PAGE 1
+ .bss > PRU_DMEM_0_1, PAGE 1
+ .cio > PRU_DMEM_0_1, PAGE 1
+ .data > PRU_DMEM_0_1, PAGE 1
+ .switch > PRU_DMEM_0_1, PAGE 1
+ .sysmem > PRU_DMEM_0_1, PAGE 1
+ .cinit > PRU_DMEM_0_1, PAGE 1
+ .rodata > PRU_DMEM_0_1, PAGE 1
+ .rofardata > PRU_DMEM_0_1, PAGE 1
+ .farbss > PRU_DMEM_0_1, PAGE 1
+ .fardata > PRU_DMEM_0_1, PAGE 1
+
+ .resource_table > PRU_DMEM_0_1, PAGE 1
+}
diff --git a/examples/am437x/PRU_MAC_Multiply_Accum/Makefile b/examples/am437x/PRU_MAC_Multiply_Accum/Makefile
--- /dev/null
@@ -0,0 +1,86 @@
+# PRU_CGT environment variable must point to the TI PRU compiler directory. E.g.:
+#(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+#(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+ifndef PRU_CGT
+define ERROR_BODY
+
+************************************************************
+PRU_CGT environment variable is not set. Examples given:
+(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
+CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
+PROJ_NAME=$(CURRENT_DIR)
+LINKER_COMMAND_FILE=./AM437x_PRU_SS1.cmd
+LIBS=--library=../../../lib/rpmsg_lib.lib
+INCLUDE=--include_path=../../../include --include_path=../../../include/am437x
+STACK_SIZE=0x100
+HEAP_SIZE=0x100
+GEN_DIR=gen
+
+#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+CFLAGS=-v3 -O2 --display_error_number --endian=little --hardware_mac=on --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
+#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
+
+TARGET=$(GEN_DIR)/$(PROJ_NAME).out
+MAP=$(GEN_DIR)/$(PROJ_NAME).map
+SOURCES=$(wildcard *.c)
+#Using .object instead of .obj in order to not conflict with the CCS build process
+OBJECTS=$(patsubst %,$(GEN_DIR)/%,$(SOURCES:.c=.object))
+
+all: printStart $(TARGET) printEnd
+
+printStart:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Building project: $(PROJ_NAME)'
+
+printEnd:
+ @echo ''
+ @echo 'Finished building project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Invokes the linker (-z flag) to make the .out file
+$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
+ @echo ''
+ @echo 'Building target: $@'
+ @echo 'Invoking: PRU Linker'
+ $(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)
+ @echo 'Finished building target: $@'
+ @echo ''
+ @echo 'Output files can be found in the "$(GEN_DIR)" directory'
+
+# Invokes the compiler on all c files in the directory to create the object files
+$(GEN_DIR)/%.object: %.c
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+.PHONY: all clean
+
+# Remove the $(GEN_DIR) directory
+clean:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Cleaning project: $(PROJ_NAME)'
+ @echo ''
+ @echo 'Removing files in the "$(GEN_DIR)" directory'
+ @rm -rf $(GEN_DIR)
+ @echo ''
+ @echo 'Finished cleaning project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
+-include $(OBJECTS:%.object=%.pp)
+
diff --git a/examples/am437x/PRU_MAC_Multiply_Accum/PRU_MAC_Multiply_Accum.c b/examples/am437x/PRU_MAC_Multiply_Accum/PRU_MAC_Multiply_Accum.c
--- /dev/null
@@ -0,0 +1,79 @@
+/*\r
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/ \r
+ * \r
+ * \r
+ * Redistribution and use in source and binary forms, with or without \r
+ * modification, are permitted provided that the following conditions \r
+ * are met:\r
+ * \r
+ * * Redistributions of source code must retain the above copyright \r
+ * notice, this list of conditions and the following disclaimer.\r
+ * \r
+ * * Redistributions in binary form must reproduce the above copyright\r
+ * notice, this list of conditions and the following disclaimer in the \r
+ * documentation and/or other materials provided with the \r
+ * distribution.\r
+ * \r
+ * * Neither the name of Texas Instruments Incorporated nor the names of\r
+ * its contributors may be used to endorse or promote products derived\r
+ * from this software without specific prior written permission.\r
+ * \r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \r
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \r
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT \r
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \r
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \r
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \r
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE \r
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ */\r
+\r
+// ***************************************\r
+// * Global Structure Definitions *\r
+// ***************************************\r
+\r
+#include <stdint.h>\r
+#include "resource_table_empty.h"\r
+\r
+/* R31 is used to generate the "I'm done" back to the ARM */\r
+volatile register uint8_t __R31;\r
+\r
+/* Accessing the operands structure within the multiplyParams structure\r
+ * forces the compiler to pair the registers together */\r
+typedef struct {\r
+ uint32_t op1;\r
+ uint32_t op2;\r
+} operands;\r
+\r
+#define NUMMACS 256\r
+\r
+operands buf[NUMMACS];\r
+\r
+/* Need to create a while loop inside main to wait for interrupt from host.\r
+ * The interrupt will signify that a buffer of data has been passed and is\r
+ * ready for MAC processing. This will be passed by rpmsg driver.\r
+ */\r
+void main(){\r
+ uint32_t i;\r
+ uint16_t numMacs = NUMMACS; // Arbitrary number\r
+ uint64_t result = 0;\r
+ volatile uint64_t storeValue = 0;\r
+\r
+ for (i = 0; i < numMacs; i++){\r
+ buf[i].op1 = i;\r
+ buf[i].op2 = i+1;\r
+ }\r
+\r
+ /* Perform numMacs MAC operations */\r
+ for (i = 0; i < numMacs; i++){\r
+ result += (uint64_t)buf[i].op1 * (uint64_t)buf[i].op2;\r
+ }\r
+\r
+ storeValue = result;\r
+\r
+ /* Nothing to do so halt */\r
+ __halt();\r
+}\r
diff --git a/examples/am437x/PRU_MAC_Multiply_Accum/resource_table_empty.h b/examples/am437x/PRU_MAC_Multiply_Accum/resource_table_empty.h
--- /dev/null
@@ -0,0 +1,72 @@
+/*\r
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/ \r
+ * \r
+ * \r
+ * Redistribution and use in source and binary forms, with or without \r
+ * modification, are permitted provided that the following conditions \r
+ * are met:\r
+ * \r
+ * * Redistributions of source code must retain the above copyright \r
+ * notice, this list of conditions and the following disclaimer.\r
+ * \r
+ * * Redistributions in binary form must reproduce the above copyright\r
+ * notice, this list of conditions and the following disclaimer in the \r
+ * documentation and/or other materials provided with the \r
+ * distribution.\r
+ * \r
+ * * Neither the name of Texas Instruments Incorporated nor the names of\r
+ * its contributors may be used to endorse or promote products derived\r
+ * from this software without specific prior written permission.\r
+ * \r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \r
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \r
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT \r
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \r
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \r
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \r
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE \r
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ */\r
+\r
+/*\r
+ * ======== resource_table_empty.h ========\r
+ *\r
+ * Define the resource table entries for all PRU cores. This will be\r
+ * incorporated into corresponding base images, and used by the remoteproc\r
+ * on the host-side to allocated/reserve resources. Note the remoteproc\r
+ * driver requires that all PRU firmware be built with a resource table.\r
+ *\r
+ * This file contains an empty resource table. It can be used either as:\r
+ *\r
+ * 1) A template, or\r
+ * 2) As-is if a PRU application does not need to configure PRU_INTC\r
+ * or interact with the rpmsg driver\r
+ *\r
+ */\r
+\r
+#ifndef _RSC_TABLE_PRU_H_\r
+#define _RSC_TABLE_PRU_H_\r
+\r
+#include <stddef.h>\r
+#include <rsc_types.h>\r
+\r
+struct my_resource_table {\r
+ struct resource_table base;\r
+\r
+ uint32_t offset[1]; /* Should match 'num' in actual definition */\r
+};\r
+\r
+#pragma DATA_SECTION(pru_remoteproc_ResourceTable, ".resource_table")\r
+#pragma RETAIN(pru_remoteproc_ResourceTable)\r
+struct my_resource_table pru_remoteproc_ResourceTable = {\r
+ 1, /* we're the first version that implements this */\r
+ 0, /* number of entries in the table */\r
+ 0, 0, /* reserved, must be zero */\r
+ 0, /* offset[0] */\r
+};\r
+\r
+#endif /* _RSC_TABLE_PRU_H_ */\r
+\r
diff --git a/examples/am437x/PRU_PRUtoARM_Interrupt/.ccsproject b/examples/am437x/PRU_PRUtoARM_Interrupt/.ccsproject
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<?ccsproject version="1.0"?>
+<projectOptions>
+ <deviceVariant value="TMS192C2026.AM3359.BeagleBone_Black"/>
+ <deviceFamily value="PRU"/>
+ <deviceEndianness value="little"/>
+ <codegenToolVersion value="2.0.0.B2"/>
+ <isElfFormat value="true"/>
+ <rts value="libc.a"/>
+ <createSlaveProjects value=""/>
+ <templateProperties value="id=com.ti.common.project.core.emptyProjectTemplate,"/>
+ <isTargetManual value="false"/>
+</projectOptions>
diff --git a/examples/am437x/PRU_PRUtoARM_Interrupt/.cproject b/examples/am437x/PRU_PRUtoARM_Interrupt/.cproject
--- /dev/null
@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+ <storageModule configRelations="2" moduleId="org.eclipse.cdt.core.settings">
+ <cconfiguration id="com.ti.ccstudio.buildDefinitions.PRU.Debug.1814981997">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.PRU.Debug.1814981997" moduleId="org.eclipse.cdt.core.settings" name="Debug">
+ <externalSettings/>
+ <extensions>
+ <extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.LinkErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" id="com.ti.ccstudio.buildDefinitions.PRU.Debug.1814981997" name="Debug" parent="com.ti.ccstudio.buildDefinitions.PRU.Debug" postbuildStep="" prebuildStep="">
+ <folderInfo id="com.ti.ccstudio.buildDefinitions.PRU.Debug.1814981997." name="/" resourcePath="">
+ <toolChain id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.DebugToolchain.141117303" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.DebugToolchain" targetTool="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerDebug.1634245588">
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.1323979801" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
+ <listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=TMS192C2026.AM4379.EVMAM437X"/>
+ <listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>
+ <listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>
+ <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.5.0"/>
+ <listOptionValue builtIn="false" value="LINKER_COMMAND_FILE="/>
+ <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/>
+ <listOptionValue builtIn="false" value="OUTPUT_TYPE=executable"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.2042139606" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="2.1.1" valueType="string"/>
+ <targetPlatform id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformDebug.625691553" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformDebug"/>
+ <builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderDebug.266312005" name="GNU Make.Debug" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderDebug"/>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerDebug.1271569103" name="PRU Compiler" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerDebug">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE.1098264287" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="pru0"/>
+ <listOptionValue builtIn="false" value="am4379"/>
+ <listOptionValue builtIn="false" value="icss1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.SILICON_VERSION.1528053071" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.1111152078" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.503340571" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am437x""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEBUGGING_MODEL.549395890" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.169339769" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">
+ <listOptionValue builtIn="false" value="225"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER.1547576477" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WRAP.559459923" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.907051659" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN" value="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.little" valueType="enumerated"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS.1401396372" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS.840341965" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS.1539111414" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS.1174706784" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerDebug.1634245588" name="PRU Linker" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerDebug">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE.1580172532" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="ICSS1_PRU_CORE=1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE.1817517572" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE" value="0x100" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE.763390601" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE" value="0x100" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE.1595762800" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE" value=""${ProjName}.out"" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE.634431043" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE" value=""${ProjName}.map"" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY.1286981331" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY" valueType="libs">
+ <listOptionValue builtIn="false" value=""libc.a""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH.1006817068" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH" valueType="libPaths">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/lib""/>
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO.953108053" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO" value=""${ProjName}_linkInfo.xml"" valueType="string"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS.1349062729" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS.1334541445" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS.923258030" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.1387995132" name="PRU Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.OUTPUT_FILE.894321710" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.OUTPUT_FILE" value=""${BuildArtifactFileBaseName}.hex"" valueType="string"/>
+ </tool>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry excluding="AM437x.cmd|AM335x_PRU.cmd|AM335x.cmd" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ <cconfiguration id="com.ti.ccstudio.buildDefinitions.PRU.Release.1896721750">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.PRU.Release.1896721750" moduleId="org.eclipse.cdt.core.settings" name="Release">
+ <externalSettings/>
+ <extensions>
+ <extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.LinkErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" id="com.ti.ccstudio.buildDefinitions.PRU.Release.1896721750" name="Release" parent="com.ti.ccstudio.buildDefinitions.PRU.Release" postbuildStep="" prebuildStep="">
+ <folderInfo id="com.ti.ccstudio.buildDefinitions.PRU.Release.1896721750." name="/" resourcePath="">
+ <toolChain id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.ReleaseToolchain.1515555839" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.ReleaseToolchain" targetTool="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease.1874285031">
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.1662652599" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
+ <listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=TMS192C2026.AM4379.EVMAM437X"/>
+ <listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>
+ <listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>
+ <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.5.0"/>
+ <listOptionValue builtIn="false" value="LINKER_COMMAND_FILE="/>
+ <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/>
+ <listOptionValue builtIn="false" value="OUTPUT_TYPE=executable"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.128013417" name="Compiler version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="2.1.1" valueType="string"/>
+ <targetPlatform id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformRelease.1667638552" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformRelease"/>
+ <builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderRelease.1453454700" keepEnvironmentInBuildfile="false" name="GNU Make" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderRelease"/>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerRelease.1062648013" name="PRU Compiler" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerRelease">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE.544862106" name="Pre-define NAME (--define, -D)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="pru0"/>
+ <listOptionValue builtIn="false" value="am4379"/>
+ <listOptionValue builtIn="false" value="icss1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.SILICON_VERSION.2024145514" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.1657417456" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.504898215" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am437x""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.679258001" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">
+ <listOptionValue builtIn="false" value="225"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER.915859365" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WRAP.965741747" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.1658391255" 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"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS.1185791134" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS.1124574754" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS.1023113068" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS.2091500508" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease.1874285031" name="PRU Linker" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE.277153588" name="Pre-define preprocessor macro _name_ to _value_ (--define)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="ICSS1_PRU_CORE=1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE.956589238" name="Set C system stack size (--stack_size, -stack)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE" value="0x100" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE.1416096265" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE.139592933" name="Specify output file name (--output_file, -o)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE" value=""${ProjName}.out"" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE.466477404" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY.473701305" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY" valueType="libs">
+ <listOptionValue builtIn="false" value=""libc.a""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH.1525120577" name="Add <dir> to library search path (--search_path, -i)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH" valueType="libPaths">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/lib""/>
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO.1460234193" 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"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS.1524701626" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS.1652843379" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS.39686266" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.834336000" name="PRU Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.OUTPUT_FILE.1505306972" name="Specify output file names (--outfile, -o)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.OUTPUT_FILE" value=""${BuildArtifactFileBaseName}.hex"" valueType="string"/>
+ </tool>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry excluding="AM335x_PRU.cmd|AM335x.cmd" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <project id="PRU_PRUtoARM_Interrupt.com.ti.ccstudio.buildDefinitions.PRU.ProjectType.676326553" name="PRU" projectType="com.ti.ccstudio.buildDefinitions.PRU.ProjectType"/>
+ </storageModule>
+ <storageModule moduleId="scannerConfiguration"/>
+ <storageModule moduleId="org.eclipse.cdt.core.language.mapping">
+ <project-mappings>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.asmSource" language="com.ti.ccstudio.core.TIASMLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cHeader" language="com.ti.ccstudio.core.TIGCCLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cSource" language="com.ti.ccstudio.core.TIGCCLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxHeader" language="com.ti.ccstudio.core.TIGPPLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxSource" language="com.ti.ccstudio.core.TIGPPLanguage"/>
+ </project-mappings>
+ </storageModule>
+</cproject>
diff --git a/examples/am437x/PRU_PRUtoARM_Interrupt/.project b/examples/am437x/PRU_PRUtoARM_Interrupt/.project
--- /dev/null
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>PRU_PRUtoARM_Interrupt</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+ <triggers>full,incremental,</triggers>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.ti.ccstudio.core.ccsNature</nature>
+ <nature>org.eclipse.cdt.core.cnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+ <nature>org.eclipse.cdt.core.ccnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+ </natures>
+</projectDescription>
diff --git a/examples/am437x/PRU_PRUtoARM_Interrupt/.settings/org.eclipse.cdt.codan.core.prefs b/examples/am437x/PRU_PRUtoARM_Interrupt/.settings/org.eclipse.cdt.codan.core.prefs
--- /dev/null
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+inEditor=false
+onBuild=false
diff --git a/examples/am437x/PRU_PRUtoARM_Interrupt/.settings/org.eclipse.cdt.debug.core.prefs b/examples/am437x/PRU_PRUtoARM_Interrupt/.settings/org.eclipse.cdt.debug.core.prefs
--- /dev/null
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+org.eclipse.cdt.debug.core.toggleBreakpointModel=com.ti.ccstudio.debug.CCSBreakpointMarker
diff --git a/examples/am437x/PRU_PRUtoARM_Interrupt/AM437x_PRU_SS1.cmd b/examples/am437x/PRU_PRUtoARM_Interrupt/AM437x_PRU_SS1.cmd
--- /dev/null
@@ -0,0 +1,84 @@
+/****************************************************************************/
+/* AM437x_PRU_SS1.cmd */
+/* Copyright (c) 2015 Texas Instruments Incorporated */
+/* */
+/* Description: This file is a linker command file that can be used for */
+/* linking PRU programs built with the C compiler and */
+/* the resulting .out file on an AM437x device. */
+/****************************************************************************/
+
+-cr /* Link using C conventions */
+
+/* Specify the System Memory Map */
+MEMORY
+{
+ PAGE 0:
+ PRU_IMEM : org = 0x00000000 len = 0x00003000 /* 12kB PRU-ICSS1 Instruction RAM */
+
+ PAGE 1:
+
+ /* RAM */
+
+ PRU_DMEM_0_1 : org = 0x00000000 len = 0x00002000 CREGISTER=24 /* 8kB PRU Data RAM 0_1 */
+ PRU_DMEM_1_0 : org = 0x00002000 len = 0x00002000 CREGISTER=25 /* 8kB PRU Data RAM 1_0 */
+ PRU_SHAREDMEM : org = 0x00010000 len = 0x00008000 CREGISTER=28 /* 32kB Shared RAM */
+
+ DDR : org = 0x80000000 len = 0x00000100 CREGISTER=31
+ L3OCMC : org = 0x40000000 len = 0x00010000 CREGISTER=30
+
+
+ /* Peripherals */
+
+ PRU_CFG : org = 0x00026000 len = 0x00000120 CREGISTER=4
+ PRU_ECAP : org = 0x00030000 len = 0x00000060 CREGISTER=3
+ PRU_IEP : org = 0x0002E000 len = 0x0000031C CREGISTER=26
+ PRU_INTC : org = 0x00020000 len = 0x00001504 CREGISTER=0
+ PRU_UART : org = 0x00028000 len = 0x00000038 CREGISTER=7
+
+ DCAN0 : org = 0x481CC000 len = 0x000001E8 CREGISTER=14
+ DCAN1 : org = 0x481D0000 len = 0x000001E8 CREGISTER=15
+ DMTIMER2 : org = 0x48040000 len = 0x0000005C CREGISTER=1
+ PWMSS0 : org = 0x48300000 len = 0x000002C4 CREGISTER=18
+ PWMSS1 : org = 0x48302000 len = 0x000002C4 CREGISTER=19
+ PWMSS2 : org = 0x48304000 len = 0x000002C4 CREGISTER=20
+ GEMAC : org = 0x4A100000 len = 0x0000128C CREGISTER=9
+ I2C1 : org = 0x4802A000 len = 0x000000D8 CREGISTER=2
+ I2C2 : org = 0x4819C000 len = 0x000000D8 CREGISTER=17
+ MBX0 : org = 0x480C8000 len = 0x00000140 CREGISTER=22
+ MCASP0_DMA : org = 0x46000000 len = 0x00000100 CREGISTER=8
+ MCSPI0 : org = 0x48030000 len = 0x000001A4 CREGISTER=6
+ MCSPI1 : org = 0x481A0000 len = 0x000001A4 CREGISTER=16
+ MMCSD0 : org = 0x48060000 len = 0x00000300 CREGISTER=5
+ SPINLOCK : org = 0x480CA000 len = 0x00000880 CREGISTER=23
+ TPCC : org = 0x49000000 len = 0x00001098 CREGISTER=29
+ UART1 : org = 0x48022000 len = 0x00000088 CREGISTER=11
+ UART2 : org = 0x48024000 len = 0x00000088 CREGISTER=12
+
+ RSVD10 : org = 0x48318000 len = 0x00000100 CREGISTER=10
+ RSVD13 : org = 0x48310000 len = 0x00000100 CREGISTER=13
+ RSVD21 : org = 0x00032400 len = 0x00000100 CREGISTER=21
+ RSVD27 : org = 0x00032000 len = 0x00000100 CREGISTER=27
+
+}
+
+/* Specify the sections allocation into memory */
+SECTIONS {
+ /* Forces _c_int00 to the start of PRU IRAM. Not necessary when loading
+ an ELF file, but useful when loading a binary */
+ .text:_c_int00* > 0x0, PAGE 0
+
+ .text > PRU_IMEM, PAGE 0
+ .stack > PRU_DMEM_0_1, PAGE 1
+ .bss > PRU_DMEM_0_1, PAGE 1
+ .cio > PRU_DMEM_0_1, PAGE 1
+ .data > PRU_DMEM_0_1, PAGE 1
+ .switch > PRU_DMEM_0_1, PAGE 1
+ .sysmem > PRU_DMEM_0_1, PAGE 1
+ .cinit > PRU_DMEM_0_1, PAGE 1
+ .rodata > PRU_DMEM_0_1, PAGE 1
+ .rofardata > PRU_DMEM_0_1, PAGE 1
+ .farbss > PRU_DMEM_0_1, PAGE 1
+ .fardata > PRU_DMEM_0_1, PAGE 1
+
+ .resource_table > PRU_DMEM_0_1, PAGE 1
+}
diff --git a/examples/am437x/PRU_PRUtoARM_Interrupt/Makefile b/examples/am437x/PRU_PRUtoARM_Interrupt/Makefile
--- /dev/null
@@ -0,0 +1,86 @@
+# PRU_CGT environment variable must point to the TI PRU compiler directory. E.g.:
+#(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+#(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+ifndef PRU_CGT
+define ERROR_BODY
+
+************************************************************
+PRU_CGT environment variable is not set. Examples given:
+(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
+CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
+PROJ_NAME=$(CURRENT_DIR)
+LINKER_COMMAND_FILE=./AM437x_PRU_SS1.cmd
+LIBS=--library=../../../lib/rpmsg_lib.lib
+INCLUDE=--include_path=../../../include --include_path=../../../include/am437x
+STACK_SIZE=0x100
+HEAP_SIZE=0x100
+GEN_DIR=gen
+
+#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+CFLAGS=-v3 -O2 --display_error_number --endian=little --hardware_mac=on --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
+#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
+
+TARGET=$(GEN_DIR)/$(PROJ_NAME).out
+MAP=$(GEN_DIR)/$(PROJ_NAME).map
+SOURCES=$(wildcard *.c)
+#Using .object instead of .obj in order to not conflict with the CCS build process
+OBJECTS=$(patsubst %,$(GEN_DIR)/%,$(SOURCES:.c=.object))
+
+all: printStart $(TARGET) printEnd
+
+printStart:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Building project: $(PROJ_NAME)'
+
+printEnd:
+ @echo ''
+ @echo 'Finished building project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Invokes the linker (-z flag) to make the .out file
+$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
+ @echo ''
+ @echo 'Building target: $@'
+ @echo 'Invoking: PRU Linker'
+ $(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)
+ @echo 'Finished building target: $@'
+ @echo ''
+ @echo 'Output files can be found in the "$(GEN_DIR)" directory'
+
+# Invokes the compiler on all c files in the directory to create the object files
+$(GEN_DIR)/%.object: %.c
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+.PHONY: all clean
+
+# Remove the $(GEN_DIR) directory
+clean:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Cleaning project: $(PROJ_NAME)'
+ @echo ''
+ @echo 'Removing files in the "$(GEN_DIR)" directory'
+ @rm -rf $(GEN_DIR)
+ @echo ''
+ @echo 'Finished cleaning project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
+-include $(OBJECTS:%.object=%.pp)
+
diff --git a/examples/am437x/PRU_PRUtoARM_Interrupt/PRU_PRUtoARM_Interrupt.c b/examples/am437x/PRU_PRUtoARM_Interrupt/PRU_PRUtoARM_Interrupt.c
--- /dev/null
@@ -0,0 +1,91 @@
+/*\r
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/ \r
+ * \r
+ * \r
+ * Redistribution and use in source and binary forms, with or without \r
+ * modification, are permitted provided that the following conditions \r
+ * are met:\r
+ * \r
+ * * Redistributions of source code must retain the above copyright \r
+ * notice, this list of conditions and the following disclaimer.\r
+ * \r
+ * * Redistributions in binary form must reproduce the above copyright\r
+ * notice, this list of conditions and the following disclaimer in the \r
+ * documentation and/or other materials provided with the \r
+ * distribution.\r
+ * \r
+ * * Neither the name of Texas Instruments Incorporated nor the names of\r
+ * its contributors may be used to endorse or promote products derived\r
+ * from this software without specific prior written permission.\r
+ * \r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \r
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \r
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT \r
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \r
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \r
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \r
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE \r
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ */\r
+\r
+#include <stdint.h>\r
+#include <pru_cfg.h>\r
+#include <pru_intc.h>\r
+#include <pru_ctrl.h>\r
+#include "resource_table_empty.h"\r
+\r
+volatile register uint32_t __R30;\r
+volatile register uint32_t __R31;\r
+\r
+/* Mapping Constant table register to variable */\r
+volatile far uint32_t CT_DDR __attribute__((cregister("DDR", near), peripheral));\r
+\r
+/* PRU-to-ARM interrupt */\r
+#define PRU0_ARM_INTERRUPT (19+16)\r
+\r
+#define HOST_NUM 2\r
+#define CHAN_NUM 2\r
+\r
+void main(){\r
+ uint32_t *pDdr = (uint32_t *) &CT_DDR;\r
+\r
+ /* Clear SYSCFG[STANDBY_INIT] to enable OCP master port */\r
+ CT_CFG.SYSCFG_bit.STANDBY_INIT = 0;\r
+\r
+ // Globally enable host interrupts\r
+ CT_INTC.GER = 0x1;\r
+\r
+ /* Clear any pending PRU-generated events */\r
+ __R31 = 0x00000000;\r
+\r
+ /* Start preparing message for host - make sure it's not 0xB */\r
+ pDdr[1] = 0x0001;\r
+\r
+ /* Enable Host interrupt 2 */\r
+ CT_INTC.HIEISR |= HOST_NUM;\r
+\r
+ /* Map channel 2 to host 2 */\r
+ CT_INTC.HMR0_bit.HINT_MAP_2 = HOST_NUM;\r
+\r
+ /* Map PRU0_ARM_INTERRUPT (event 19) to channel 2 */\r
+ CT_INTC.CMR4_bit.CH_MAP_19 = CHAN_NUM;\r
+\r
+ /* Ensure PRU0_ARM_INTERRUPT is cleared */\r
+ CT_INTC.SICR = (PRU0_ARM_INTERRUPT - 16);\r
+\r
+ /* Enable PRU0_ARM_INTERRUPT */\r
+ CT_INTC.EISR = (PRU0_ARM_INTERRUPT - 16);\r
+\r
+ /* Ensure CT_DDR (C31) is pointing to start of DDR memory (0x80000000) */\r
+ PRU0_CTRL.CTPPR1_bit.C31_POINTER = 0x0;\r
+\r
+ /* Write value of 0xB which Host will read after receiving the interrupt */\r
+ pDdr[1] = 0xB;\r
+\r
+ /* Halt the PRU */\r
+ __halt();\r
+}\r
+\r
diff --git a/examples/am437x/PRU_PRUtoARM_Interrupt/resource_table_empty.h b/examples/am437x/PRU_PRUtoARM_Interrupt/resource_table_empty.h
--- /dev/null
@@ -0,0 +1,72 @@
+/*\r
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/ \r
+ * \r
+ * \r
+ * Redistribution and use in source and binary forms, with or without \r
+ * modification, are permitted provided that the following conditions \r
+ * are met:\r
+ * \r
+ * * Redistributions of source code must retain the above copyright \r
+ * notice, this list of conditions and the following disclaimer.\r
+ * \r
+ * * Redistributions in binary form must reproduce the above copyright\r
+ * notice, this list of conditions and the following disclaimer in the \r
+ * documentation and/or other materials provided with the \r
+ * distribution.\r
+ * \r
+ * * Neither the name of Texas Instruments Incorporated nor the names of\r
+ * its contributors may be used to endorse or promote products derived\r
+ * from this software without specific prior written permission.\r
+ * \r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \r
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \r
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT \r
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \r
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \r
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \r
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE \r
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ */\r
+\r
+/*\r
+ * ======== resource_table_empty.h ========\r
+ *\r
+ * Define the resource table entries for all PRU cores. This will be\r
+ * incorporated into corresponding base images, and used by the remoteproc\r
+ * on the host-side to allocated/reserve resources. Note the remoteproc\r
+ * driver requires that all PRU firmware be built with a resource table.\r
+ *\r
+ * This file contains an empty resource table. It can be used either as:\r
+ *\r
+ * 1) A template, or\r
+ * 2) As-is if a PRU application does not need to configure PRU_INTC\r
+ * or interact with the rpmsg driver\r
+ *\r
+ */\r
+\r
+#ifndef _RSC_TABLE_PRU_H_\r
+#define _RSC_TABLE_PRU_H_\r
+\r
+#include <stddef.h>\r
+#include <rsc_types.h>\r
+\r
+struct my_resource_table {\r
+ struct resource_table base;\r
+\r
+ uint32_t offset[1]; /* Should match 'num' in actual definition */\r
+};\r
+\r
+#pragma DATA_SECTION(pru_remoteproc_ResourceTable, ".resource_table")\r
+#pragma RETAIN(pru_remoteproc_ResourceTable)\r
+struct my_resource_table pru_remoteproc_ResourceTable = {\r
+ 1, /* we're the first version that implements this */\r
+ 0, /* number of entries in the table */\r
+ 0, 0, /* reserved, must be zero */\r
+ 0, /* offset[0] */\r
+};\r
+\r
+#endif /* _RSC_TABLE_PRU_H_ */\r
+\r
diff --git a/examples/am437x/PRU_RPMsg_Echo_Interrupt0/.ccsproject b/examples/am437x/PRU_RPMsg_Echo_Interrupt0/.ccsproject
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<?ccsproject version="1.0"?>
+<projectOptions>
+ <deviceVariant value="TMS192C2026.AM3359.BeagleBone_Black"/>
+ <deviceFamily value="PRU"/>
+ <deviceEndianness value="little"/>
+ <codegenToolVersion value="2.1.1"/>
+ <isElfFormat value="true"/>
+ <linkerCommandFile value="AM335x.cmd"/>
+ <rts value="libc.a"/>
+ <createSlaveProjects value=""/>
+ <templateProperties value="id=com.ti.common.project.core.emptyProjectTemplate,"/>
+ <isTargetManual value="false"/>
+</projectOptions>
diff --git a/examples/am437x/PRU_RPMsg_Echo_Interrupt0/.cproject b/examples/am437x/PRU_RPMsg_Echo_Interrupt0/.cproject
--- /dev/null
@@ -0,0 +1,186 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+ <storageModule configRelations="2" moduleId="org.eclipse.cdt.core.settings">
+ <cconfiguration id="com.ti.ccstudio.buildDefinitions.PRU.Debug.1357205529">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.PRU.Debug.1357205529" moduleId="org.eclipse.cdt.core.settings" name="Debug">
+ <externalSettings/>
+ <extensions>
+ <extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.LinkErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" id="com.ti.ccstudio.buildDefinitions.PRU.Debug.1357205529" name="Debug" parent="com.ti.ccstudio.buildDefinitions.PRU.Debug" postbuildStep="" prebuildStep="">
+ <folderInfo id="com.ti.ccstudio.buildDefinitions.PRU.Debug.1357205529." name="/" resourcePath="">
+ <toolChain id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.DebugToolchain.665993357" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.DebugToolchain" targetTool="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerDebug.1108575326">
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.478501315" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
+ <listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=TMS192C2026.AM4379.EVMAM437X"/>
+ <listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>
+ <listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>
+ <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.5.0"/>
+ <listOptionValue builtIn="false" value="LINKER_COMMAND_FILE="/>
+ <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/>
+ <listOptionValue builtIn="false" value="OUTPUT_TYPE=executable"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.360663462" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="2.1.1" valueType="string"/>
+ <targetPlatform id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformDebug.914247086" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformDebug"/>
+ <builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderDebug.1637004444" name="GNU Make.Debug" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderDebug"/>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerDebug.1614342712" name="PRU Compiler" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerDebug">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE.1349238802" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="pru0"/>
+ <listOptionValue builtIn="false" value="am4379"/>
+ <listOptionValue builtIn="false" value="icss1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.SILICON_VERSION.1650866903" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.1343045213" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.784659724" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am437x""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEBUGGING_MODEL.613678139" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.674259208" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">
+ <listOptionValue builtIn="false" value="225"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER.1503194027" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WRAP.1699160420" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.675395895" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN" value="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.little" valueType="enumerated"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS.510383198" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS.557333934" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS.1730272100" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS.224028166" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerDebug.1108575326" name="PRU Linker" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerDebug">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE.1005973324" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="ICSS1_PRU_CORE=1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE.678245232" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE" value="0x100" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE.505627826" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE" value="0x100" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE.1630746696" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE" value=""${ProjName}.out"" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE.1163555792" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE" value=""${ProjName}.map"" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY.292918172" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY" valueType="libs">
+ <listOptionValue builtIn="false" value=""libc.a""/>
+ <listOptionValue builtIn="false" value=""../../../../lib/rpmsg_lib.lib""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH.583880960" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH" valueType="libPaths">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/lib""/>
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DISPLAY_ERROR_NUMBER.1460029071" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DIAG_WRAP.2115639679" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO.1192840603" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO" value=""${ProjName}_linkInfo.xml"" valueType="string"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS.1824862263" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS.998264992" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS.229248305" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.183962840" name="PRU Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex"/>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry excluding="AM437x.cmd|AM335x.cmd" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ <cconfiguration id="com.ti.ccstudio.buildDefinitions.PRU.Release.1954355010">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.PRU.Release.1954355010" moduleId="org.eclipse.cdt.core.settings" name="Release">
+ <externalSettings/>
+ <extensions>
+ <extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.LinkErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" id="com.ti.ccstudio.buildDefinitions.PRU.Release.1954355010" name="Release" parent="com.ti.ccstudio.buildDefinitions.PRU.Release" postbuildStep="" prebuildStep="">
+ <folderInfo id="com.ti.ccstudio.buildDefinitions.PRU.Release.1954355010." name="/" resourcePath="">
+ <toolChain id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.ReleaseToolchain.550509689" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.ReleaseToolchain" targetTool="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease.328332012">
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.2031956792" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
+ <listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=TMS192C2026.AM4379.EVMAM437X"/>
+ <listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>
+ <listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>
+ <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.5.0"/>
+ <listOptionValue builtIn="false" value="LINKER_COMMAND_FILE="/>
+ <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/>
+ <listOptionValue builtIn="false" value="OUTPUT_TYPE=executable"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.312929972" name="Compiler version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="2.1.1" valueType="string"/>
+ <targetPlatform id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformRelease.1838575837" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformRelease"/>
+ <builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderRelease.1779040237" keepEnvironmentInBuildfile="false" name="GNU Make" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderRelease"/>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerRelease.1894177738" name="PRU Compiler" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerRelease">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE.587183306" name="Pre-define NAME (--define, -D)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="pru0"/>
+ <listOptionValue builtIn="false" value="am4379"/>
+ <listOptionValue builtIn="false" value="icss1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.SILICON_VERSION.2015355499" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.1478320557" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.1944652899" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am437x""/>
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.1966589953" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">
+ <listOptionValue builtIn="false" value="225"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER.1624732249" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WRAP.1319247825" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.428812798" 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"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS.762578725" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS.960745019" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS.773001192" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS.102125603" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease.328332012" name="PRU Linker" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE.1605803156" name="Pre-define preprocessor macro _name_ to _value_ (--define)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="ICSS1_PRU_CORE=1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE.1544090278" name="Set C system stack size (--stack_size, -stack)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE" value="0x100" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE.1259405686" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE.2015635001" name="Specify output file name (--output_file, -o)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE" value=""${ProjName}.out"" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE.619047478" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY.902774068" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY" valueType="libs">
+ <listOptionValue builtIn="false" value=""libc.a""/>
+ <listOptionValue builtIn="false" value=""../../../../lib/rpmsg_lib.lib""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH.1716735809" name="Add <dir> to library search path (--search_path, -i)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH" valueType="libPaths">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/lib""/>
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DISPLAY_ERROR_NUMBER.1725267700" name="Emit diagnostic identifier numbers (--display_error_number)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DIAG_WRAP.905539125" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO.573304398" 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"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS.965840523" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS.537750131" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS.1073559291" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.1028433694" name="PRU Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex"/>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry excluding="AM335x.cmd" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <project id="PRU_RPMsg_Echo_Interrupt0.com.ti.ccstudio.buildDefinitions.PRU.ProjectType.1477410699" name="PRU" projectType="com.ti.ccstudio.buildDefinitions.PRU.ProjectType"/>
+ </storageModule>
+ <storageModule moduleId="scannerConfiguration"/>
+ <storageModule moduleId="org.eclipse.cdt.core.language.mapping">
+ <project-mappings>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.asmSource" language="com.ti.ccstudio.core.TIASMLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cHeader" language="com.ti.ccstudio.core.TIGCCLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cSource" language="com.ti.ccstudio.core.TIGCCLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxHeader" language="com.ti.ccstudio.core.TIGPPLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxSource" language="com.ti.ccstudio.core.TIGPPLanguage"/>
+ </project-mappings>
+ </storageModule>
+</cproject>
diff --git a/examples/am437x/PRU_RPMsg_Echo_Interrupt0/.project b/examples/am437x/PRU_RPMsg_Echo_Interrupt0/.project
--- /dev/null
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>PRU_RPMsg_Echo_Interrupt0</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+ <triggers>full,incremental,</triggers>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.ti.ccstudio.core.ccsNature</nature>
+ <nature>org.eclipse.cdt.core.cnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+ <nature>org.eclipse.cdt.core.ccnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+ </natures>
+</projectDescription>
diff --git a/examples/am437x/PRU_RPMsg_Echo_Interrupt0/.settings/org.eclipse.cdt.codan.core.prefs b/examples/am437x/PRU_RPMsg_Echo_Interrupt0/.settings/org.eclipse.cdt.codan.core.prefs
--- /dev/null
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+inEditor=false
+onBuild=false
diff --git a/examples/am437x/PRU_RPMsg_Echo_Interrupt0/.settings/org.eclipse.cdt.debug.core.prefs b/examples/am437x/PRU_RPMsg_Echo_Interrupt0/.settings/org.eclipse.cdt.debug.core.prefs
--- /dev/null
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+org.eclipse.cdt.debug.core.toggleBreakpointModel=com.ti.ccstudio.debug.CCSBreakpointMarker
diff --git a/examples/am437x/PRU_RPMsg_Echo_Interrupt0/AM437x_PRU_SS1.cmd b/examples/am437x/PRU_RPMsg_Echo_Interrupt0/AM437x_PRU_SS1.cmd
--- /dev/null
@@ -0,0 +1,84 @@
+/****************************************************************************/
+/* AM437x_PRU_SS1.cmd */
+/* Copyright (c) 2015 Texas Instruments Incorporated */
+/* */
+/* Description: This file is a linker command file that can be used for */
+/* linking PRU programs built with the C compiler and */
+/* the resulting .out file on an AM437x device. */
+/****************************************************************************/
+
+-cr /* Link using C conventions */
+
+/* Specify the System Memory Map */
+MEMORY
+{
+ PAGE 0:
+ PRU_IMEM : org = 0x00000000 len = 0x00003000 /* 12kB PRU-ICSS1 Instruction RAM */
+
+ PAGE 1:
+
+ /* RAM */
+
+ PRU_DMEM_0_1 : org = 0x00000000 len = 0x00002000 CREGISTER=24 /* 8kB PRU Data RAM 0_1 */
+ PRU_DMEM_1_0 : org = 0x00002000 len = 0x00002000 CREGISTER=25 /* 8kB PRU Data RAM 1_0 */
+ PRU_SHAREDMEM : org = 0x00010000 len = 0x00008000 CREGISTER=28 /* 32kB Shared RAM */
+
+ DDR : org = 0x80000000 len = 0x00000100 CREGISTER=31
+ L3OCMC : org = 0x40000000 len = 0x00010000 CREGISTER=30
+
+
+ /* Peripherals */
+
+ PRU_CFG : org = 0x00026000 len = 0x00000120 CREGISTER=4
+ PRU_ECAP : org = 0x00030000 len = 0x00000060 CREGISTER=3
+ PRU_IEP : org = 0x0002E000 len = 0x0000031C CREGISTER=26
+ PRU_INTC : org = 0x00020000 len = 0x00001504 CREGISTER=0
+ PRU_UART : org = 0x00028000 len = 0x00000038 CREGISTER=7
+
+ DCAN0 : org = 0x481CC000 len = 0x000001E8 CREGISTER=14
+ DCAN1 : org = 0x481D0000 len = 0x000001E8 CREGISTER=15
+ DMTIMER2 : org = 0x48040000 len = 0x0000005C CREGISTER=1
+ PWMSS0 : org = 0x48300000 len = 0x000002C4 CREGISTER=18
+ PWMSS1 : org = 0x48302000 len = 0x000002C4 CREGISTER=19
+ PWMSS2 : org = 0x48304000 len = 0x000002C4 CREGISTER=20
+ GEMAC : org = 0x4A100000 len = 0x0000128C CREGISTER=9
+ I2C1 : org = 0x4802A000 len = 0x000000D8 CREGISTER=2
+ I2C2 : org = 0x4819C000 len = 0x000000D8 CREGISTER=17
+ MBX0 : org = 0x480C8000 len = 0x00000140 CREGISTER=22
+ MCASP0_DMA : org = 0x46000000 len = 0x00000100 CREGISTER=8
+ MCSPI0 : org = 0x48030000 len = 0x000001A4 CREGISTER=6
+ MCSPI1 : org = 0x481A0000 len = 0x000001A4 CREGISTER=16
+ MMCSD0 : org = 0x48060000 len = 0x00000300 CREGISTER=5
+ SPINLOCK : org = 0x480CA000 len = 0x00000880 CREGISTER=23
+ TPCC : org = 0x49000000 len = 0x00001098 CREGISTER=29
+ UART1 : org = 0x48022000 len = 0x00000088 CREGISTER=11
+ UART2 : org = 0x48024000 len = 0x00000088 CREGISTER=12
+
+ RSVD10 : org = 0x48318000 len = 0x00000100 CREGISTER=10
+ RSVD13 : org = 0x48310000 len = 0x00000100 CREGISTER=13
+ RSVD21 : org = 0x00032400 len = 0x00000100 CREGISTER=21
+ RSVD27 : org = 0x00032000 len = 0x00000100 CREGISTER=27
+
+}
+
+/* Specify the sections allocation into memory */
+SECTIONS {
+ /* Forces _c_int00 to the start of PRU IRAM. Not necessary when loading
+ an ELF file, but useful when loading a binary */
+ .text:_c_int00* > 0x0, PAGE 0
+
+ .text > PRU_IMEM, PAGE 0
+ .stack > PRU_DMEM_0_1, PAGE 1
+ .bss > PRU_DMEM_0_1, PAGE 1
+ .cio > PRU_DMEM_0_1, PAGE 1
+ .data > PRU_DMEM_0_1, PAGE 1
+ .switch > PRU_DMEM_0_1, PAGE 1
+ .sysmem > PRU_DMEM_0_1, PAGE 1
+ .cinit > PRU_DMEM_0_1, PAGE 1
+ .rodata > PRU_DMEM_0_1, PAGE 1
+ .rofardata > PRU_DMEM_0_1, PAGE 1
+ .farbss > PRU_DMEM_0_1, PAGE 1
+ .fardata > PRU_DMEM_0_1, PAGE 1
+
+ .resource_table > PRU_DMEM_0_1, PAGE 1
+}
diff --git a/examples/am437x/PRU_RPMsg_Echo_Interrupt0/Makefile b/examples/am437x/PRU_RPMsg_Echo_Interrupt0/Makefile
--- /dev/null
@@ -0,0 +1,86 @@
+# PRU_CGT environment variable must point to the TI PRU compiler directory. E.g.:
+#(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+#(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+ifndef PRU_CGT
+define ERROR_BODY
+
+************************************************************
+PRU_CGT environment variable is not set. Examples given:
+(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
+CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
+PROJ_NAME=$(CURRENT_DIR)
+LINKER_COMMAND_FILE=./AM437x_PRU_SS1.cmd
+LIBS=--library=../../../lib/rpmsg_lib.lib
+INCLUDE=--include_path=../../../include --include_path=../../../include/am437x
+STACK_SIZE=0x100
+HEAP_SIZE=0x100
+GEN_DIR=gen
+
+#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+CFLAGS=-v3 -O2 --display_error_number --endian=little --hardware_mac=on --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
+#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
+
+TARGET=$(GEN_DIR)/$(PROJ_NAME).out
+MAP=$(GEN_DIR)/$(PROJ_NAME).map
+SOURCES=$(wildcard *.c)
+#Using .object instead of .obj in order to not conflict with the CCS build process
+OBJECTS=$(patsubst %,$(GEN_DIR)/%,$(SOURCES:.c=.object))
+
+all: printStart $(TARGET) printEnd
+
+printStart:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Building project: $(PROJ_NAME)'
+
+printEnd:
+ @echo ''
+ @echo 'Finished building project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Invokes the linker (-z flag) to make the .out file
+$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
+ @echo ''
+ @echo 'Building target: $@'
+ @echo 'Invoking: PRU Linker'
+ $(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)
+ @echo 'Finished building target: $@'
+ @echo ''
+ @echo 'Output files can be found in the "$(GEN_DIR)" directory'
+
+# Invokes the compiler on all c files in the directory to create the object files
+$(GEN_DIR)/%.object: %.c
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+.PHONY: all clean
+
+# Remove the $(GEN_DIR) directory
+clean:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Cleaning project: $(PROJ_NAME)'
+ @echo ''
+ @echo 'Removing files in the "$(GEN_DIR)" directory'
+ @rm -rf $(GEN_DIR)
+ @echo ''
+ @echo 'Finished cleaning project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
+-include $(OBJECTS:%.object=%.pp)
+
diff --git a/examples/am437x/PRU_RPMsg_Echo_Interrupt0/main.c b/examples/am437x/PRU_RPMsg_Echo_Interrupt0/main.c
--- /dev/null
@@ -0,0 +1,113 @@
+/*
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <stdint.h>
+#include <stdio.h>
+#include <pru_cfg.h>
+#include <pru_intc.h>
+#include <rsc_types.h>
+#include <pru_virtqueue.h>
+#include <pru_rpmsg.h>
+#include <sys_mailbox.h>
+#include "resource_table_0.h"
+
+volatile register uint32_t __R31;
+
+/* PRU0 is mailbox module user 1 */
+#define MB_USER 1
+/* Mbox0 - mail_u1_irq (mailbox interrupt for PRU0) is Int Number 60 */
+#define MB_INT_NUMBER 60
+
+/* Host-0 Interrupt sets bit 30 in register R31 */
+#define HOST_INT 0x40000000
+
+/* The mailboxes used for RPMsg are defined in the Linux device tree
+ * PRU0 uses mailboxes 2 (From ARM) and 3 (To ARM)
+ * PRU1 uses mailboxes 4 (From ARM) and 5 (To ARM)
+ */
+#define MB_TO_ARM_HOST 3
+#define MB_FROM_ARM_HOST 2
+
+/*
+ * Using the name 'rpmsg-pru' will probe the rpmsg_pru driver found
+ * at linux-x.y.z/drivers/rpmsg/rpmsg_pru.c
+ */
+#define CHAN_NAME "rpmsg-pru"
+#define CHAN_DESC "Channel 30"
+#define CHAN_PORT 30
+
+uint8_t payload[RPMSG_BUF_SIZE];
+
+/*
+ * main.c
+ */
+void main() {
+ struct pru_rpmsg_transport transport;
+ uint16_t src, dst, len;
+
+ /* allow OCP master port access by the PRU so the PRU can read external memories */
+ CT_CFG.SYSCFG_bit.STANDBY_INIT = 0;
+
+ /* clear the status of event MB_INT_NUMBER (the mailbox event) and enable the mailbox event */
+ CT_INTC.SICR_bit.STATUS_CLR_INDEX = MB_INT_NUMBER;
+ CT_MBX.IRQ[MB_USER].ENABLE_SET |= 1 << (MB_FROM_ARM_HOST * 2);
+
+ /* Initialize pru_virtqueue corresponding to vring0 (PRU to ARM Host direction) */
+ pru_virtqueue_init(&transport.virtqueue0, &resourceTable.rpmsg_vring0, &CT_MBX.MESSAGE[MB_TO_ARM_HOST], &CT_MBX.MESSAGE[MB_FROM_ARM_HOST]);
+
+ /* Initialize pru_virtqueue corresponding to vring1 (ARM Host to PRU direction) */
+ pru_virtqueue_init(&transport.virtqueue1, &resourceTable.rpmsg_vring1, &CT_MBX.MESSAGE[MB_TO_ARM_HOST], &CT_MBX.MESSAGE[MB_FROM_ARM_HOST]);
+
+ /* Create the RPMsg channel between the PRU and ARM user space using the transport structure. */
+ while(pru_rpmsg_channel(RPMSG_NS_CREATE, &transport, CHAN_NAME, CHAN_DESC, CHAN_PORT) != PRU_RPMSG_SUCCESS);
+ while(1){
+ /* Check bit 30 of register R31 to see if the mailbox interrupt has occurred */
+ if(__R31 & HOST_INT){
+ /* Clear the mailbox interrupt */
+ CT_MBX.IRQ[MB_USER].STATUS_CLR |= 1 << (MB_FROM_ARM_HOST * 2);
+ /* Clear the event status, event MB_INT_NUMBER corresponds to the mailbox interrupt */
+ CT_INTC.SICR_bit.STATUS_CLR_INDEX = MB_INT_NUMBER;
+ /* Use a while loop to read all of the current messages in the mailbox */
+ while(CT_MBX.MSGSTATUS_bit[MB_FROM_ARM_HOST].NBOFMSG > 0){
+ /* Check to see if the message corresponds to a receive event for the PRU */
+ if(CT_MBX.MESSAGE[MB_FROM_ARM_HOST] == 1){
+ /* Receive the message */
+ if(pru_rpmsg_receive(&transport, &src, &dst, payload, &len) == PRU_RPMSG_SUCCESS){
+ /* Echo the message back to the same address from which we just received */
+ pru_rpmsg_send(&transport, dst, src, payload, len);
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/examples/am437x/PRU_RPMsg_Echo_Interrupt0/resource_table_0.h b/examples/am437x/PRU_RPMsg_Echo_Interrupt0/resource_table_0.h
--- /dev/null
@@ -0,0 +1,148 @@
+/*\r
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/ \r
+ * \r
+ * \r
+ * Redistribution and use in source and binary forms, with or without \r
+ * modification, are permitted provided that the following conditions \r
+ * are met:\r
+ * \r
+ * * Redistributions of source code must retain the above copyright \r
+ * notice, this list of conditions and the following disclaimer.\r
+ * \r
+ * * Redistributions in binary form must reproduce the above copyright\r
+ * notice, this list of conditions and the following disclaimer in the \r
+ * documentation and/or other materials provided with the \r
+ * distribution.\r
+ * \r
+ * * Neither the name of Texas Instruments Incorporated nor the names of\r
+ * its contributors may be used to endorse or promote products derived\r
+ * from this software without specific prior written permission.\r
+ * \r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \r
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \r
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT \r
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \r
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \r
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \r
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE \r
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ */\r
+\r
+/*\r
+ * ======== rsc_table_am335x_pru.h ========\r
+ *\r
+ * Define the resource table entries for all PRU cores. This will be\r
+ * incorporated into corresponding base images, and used by the remoteproc\r
+ * on the host-side to allocated/reserve resources.\r
+ *\r
+ */\r
+\r
+\r
+#ifndef _RSC_TABLE_PRU_H_\r
+#define _RSC_TABLE_PRU_H_\r
+\r
+#include <stddef.h>\r
+#include <rsc_types.h>\r
+#include "pru_virtio_ids.h"\r
+\r
+/*\r
+ * Sizes of the virtqueues (expressed in number of buffers supported,\r
+ * and must be power of 2)\r
+ */\r
+#define PRU_RPMSG_VQ0_SIZE 16\r
+#define PRU_RPMSG_VQ1_SIZE 16\r
+\r
+/*\r
+ * The feature bitmap for virtio rpmsg\r
+ */\r
+#define VIRTIO_RPMSG_F_NS 0 //name service notifications\r
+\r
+/* This firmware supports name service notifications as one of its features */\r
+#define RPMSG_PRU_C0_FEATURES (1 << VIRTIO_RPMSG_F_NS)\r
+\r
+/* Definition for unused interrupts */\r
+#define HOST_UNUSED 255\r
+\r
+/* Mapping sysevts to a channel. Each pair contains a sysevt, channel\r
+ * Mapping event 60 (Mbox0 mailbox interrupt for pru0) to channel 0\r
+ * */\r
+struct ch_map pru_intc_map[] = { {60, 0},\r
+ };\r
+\r
+struct my_resource_table {\r
+ struct resource_table base;\r
+\r
+ uint32_t offset[2]; /* Should match 'num' in actual definition */\r
+\r
+ /* rpmsg vdev entry */\r
+ struct fw_rsc_vdev rpmsg_vdev;\r
+ struct fw_rsc_vdev_vring rpmsg_vring0;\r
+ struct fw_rsc_vdev_vring rpmsg_vring1;\r
+\r
+ /* intc definition */\r
+ struct fw_rsc_custom pru_ints;\r
+};\r
+\r
+#pragma DATA_SECTION(resourceTable, ".resource_table")\r
+#pragma RETAIN(resourceTable)\r
+struct my_resource_table resourceTable = {\r
+ 1, /* Resource table version: only version 1 is supported by the current driver */\r
+ 2, /* number of entries in the table */\r
+ 0, 0, /* reserved, must be zero */\r
+ /* offsets to entries */\r
+ {\r
+ offsetof(struct my_resource_table, rpmsg_vdev),\r
+ offsetof(struct my_resource_table, pru_ints),\r
+ },\r
+\r
+ /* rpmsg vdev entry */\r
+ {\r
+ (uint32_t)TYPE_VDEV, //type\r
+ (uint32_t)VIRTIO_ID_RPMSG, //id\r
+ (uint32_t)0, //notifyid\r
+ (uint32_t)RPMSG_PRU_C0_FEATURES, //dfeatures\r
+ (uint32_t)0, //gfeatures\r
+ (uint32_t)0, //config_len\r
+ (uint8_t)0, //status\r
+ (uint8_t)2, //num_of_vrings, only two is supported\r
+ { (uint8_t)0, (uint8_t)0 }, //reserved\r
+ /* no config data */\r
+ },\r
+ /* the two vrings */\r
+ {\r
+ 0, //da, will be populated by host, can't pass it in\r
+ 16, //align (bytes),\r
+ PRU_RPMSG_VQ0_SIZE, //num of descriptors\r
+ 0, //notifyid, will be populated, can't pass right now\r
+ 0 //reserved\r
+ },\r
+ {\r
+ 0, //da, will be populated by host, can't pass it in\r
+ 16, //align (bytes),\r
+ PRU_RPMSG_VQ1_SIZE, //num of descriptors\r
+ 0, //notifyid, will be populated, can't pass right now\r
+ 0 //reserved\r
+ },\r
+\r
+ {\r
+ TYPE_CUSTOM, TYPE_PRU_INTS,\r
+ sizeof(struct fw_rsc_custom_ints),\r
+ { /* PRU_INTS version */\r
+ 0x0000,\r
+ /* Channel-to-host mapping, 255 for unused\r
+ * Mapping Channel-0 to Host-0 (PRU0/1 R31 bit 30)\r
+ * */\r
+ 0, HOST_UNUSED, HOST_UNUSED, HOST_UNUSED, HOST_UNUSED,\r
+ HOST_UNUSED, HOST_UNUSED, HOST_UNUSED, HOST_UNUSED, HOST_UNUSED,\r
+ /* Number of evts being mapped to channels */\r
+ (sizeof(pru_intc_map) / sizeof(struct ch_map)),\r
+ /* Pointer to the structure containing mapped events */\r
+ pru_intc_map,\r
+ },\r
+ },\r
+};\r
+\r
+#endif /* _RSC_TABLE_PRU_H_ */\r
diff --git a/examples/am437x/PRU_RPMsg_Echo_Interrupt1/.ccsproject b/examples/am437x/PRU_RPMsg_Echo_Interrupt1/.ccsproject
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<?ccsproject version="1.0"?>
+<projectOptions>
+ <deviceVariant value="TMS192C2026.AM3359.BeagleBone_Black"/>
+ <deviceFamily value="PRU"/>
+ <deviceEndianness value="little"/>
+ <codegenToolVersion value="2.1.1"/>
+ <isElfFormat value="true"/>
+ <linkerCommandFile value="AM335x.cmd"/>
+ <rts value="libc.a"/>
+ <createSlaveProjects value=""/>
+ <templateProperties value="id=com.ti.common.project.core.emptyProjectTemplate,"/>
+ <isTargetManual value="false"/>
+</projectOptions>
diff --git a/examples/am437x/PRU_RPMsg_Echo_Interrupt1/.cproject b/examples/am437x/PRU_RPMsg_Echo_Interrupt1/.cproject
--- /dev/null
@@ -0,0 +1,186 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+ <storageModule configRelations="2" moduleId="org.eclipse.cdt.core.settings">
+ <cconfiguration id="com.ti.ccstudio.buildDefinitions.PRU.Debug.645362798">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.PRU.Debug.645362798" moduleId="org.eclipse.cdt.core.settings" name="Debug">
+ <externalSettings/>
+ <extensions>
+ <extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.LinkErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" id="com.ti.ccstudio.buildDefinitions.PRU.Debug.645362798" name="Debug" parent="com.ti.ccstudio.buildDefinitions.PRU.Debug" postbuildStep="" prebuildStep="">
+ <folderInfo id="com.ti.ccstudio.buildDefinitions.PRU.Debug.645362798." name="/" resourcePath="">
+ <toolChain id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.DebugToolchain.88413816" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.DebugToolchain" targetTool="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerDebug.1894086923">
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.1635905942" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
+ <listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=TMS192C2026.AM4379.EVMAM437X"/>
+ <listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>
+ <listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>
+ <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.5.0"/>
+ <listOptionValue builtIn="false" value="LINKER_COMMAND_FILE="/>
+ <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/>
+ <listOptionValue builtIn="false" value="OUTPUT_TYPE=executable"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1154076069" name="Compiler version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="2.1.1" valueType="string"/>
+ <targetPlatform id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformDebug.2009226045" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformDebug"/>
+ <builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderDebug.173985875" keepEnvironmentInBuildfile="false" name="GNU Make" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderDebug"/>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerDebug.745780347" name="PRU Compiler" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerDebug">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE.1772198968" name="Pre-define NAME (--define, -D)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="pru0"/>
+ <listOptionValue builtIn="false" value="am4379"/>
+ <listOptionValue builtIn="false" value="icss1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.SILICON_VERSION.881378260" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.1330996670" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.1453439606" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am437x""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEBUGGING_MODEL.1256600188" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.35369186" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">
+ <listOptionValue builtIn="false" value="225"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER.828080281" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WRAP.696058824" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.47864553" 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"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS.431967947" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS.1050074394" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS.1809759677" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS.2116979004" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerDebug.1894086923" name="PRU Linker" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerDebug">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE.1527937306" name="Pre-define preprocessor macro _name_ to _value_ (--define)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="ICSS1_PRU_CORE=1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE.123444226" name="Set C system stack size (--stack_size, -stack)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE" value="0x100" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE.196015433" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE.1321384692" name="Specify output file name (--output_file, -o)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE" value=""${ProjName}.out"" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE.1122842684" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY.935068327" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY" valueType="libs">
+ <listOptionValue builtIn="false" value=""libc.a""/>
+ <listOptionValue builtIn="false" value=""../../../../lib/rpmsg_lib.lib""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH.2066887287" name="Add <dir> to library search path (--search_path, -i)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH" valueType="libPaths">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/lib""/>
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DISPLAY_ERROR_NUMBER.2036063800" name="Emit diagnostic identifier numbers (--display_error_number)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DIAG_WRAP.37492712" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO.1103774377" 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"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS.312198263" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS.490919657" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS.103796102" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.1408704196" name="PRU Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex"/>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry excluding="AM437x.cmd|AM335x.cmd" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ <cconfiguration id="com.ti.ccstudio.buildDefinitions.PRU.Release.1722392756">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.PRU.Release.1722392756" moduleId="org.eclipse.cdt.core.settings" name="Release">
+ <externalSettings/>
+ <extensions>
+ <extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.LinkErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" id="com.ti.ccstudio.buildDefinitions.PRU.Release.1722392756" name="Release" parent="com.ti.ccstudio.buildDefinitions.PRU.Release" postbuildStep="" prebuildStep="">
+ <folderInfo id="com.ti.ccstudio.buildDefinitions.PRU.Release.1722392756." name="/" resourcePath="">
+ <toolChain id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.ReleaseToolchain.899055661" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.ReleaseToolchain" targetTool="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease.1436941667">
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.1422963494" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
+ <listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=TMS192C2026.AM4379.EVMAM437X"/>
+ <listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>
+ <listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>
+ <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.5.0"/>
+ <listOptionValue builtIn="false" value="LINKER_COMMAND_FILE="/>
+ <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/>
+ <listOptionValue builtIn="false" value="OUTPUT_TYPE=executable"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.384124874" name="Compiler version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="2.1.1" valueType="string"/>
+ <targetPlatform id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformRelease.314192191" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformRelease"/>
+ <builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderRelease.742466238" keepEnvironmentInBuildfile="false" name="GNU Make" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderRelease"/>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerRelease.674619710" name="PRU Compiler" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerRelease">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE.920107004" name="Pre-define NAME (--define, -D)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="pru0"/>
+ <listOptionValue builtIn="false" value="am4379"/>
+ <listOptionValue builtIn="false" value="icss1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.SILICON_VERSION.1614702058" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.760748452" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.614995386" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am437x""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.635593350" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">
+ <listOptionValue builtIn="false" value="225"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER.2008269114" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WRAP.1781644682" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.310955602" 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"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS.1311882512" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS.130432419" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS.1020142988" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS.2026441056" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease.1436941667" name="PRU Linker" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE.2067795662" name="Pre-define preprocessor macro _name_ to _value_ (--define)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="ICSS1_PRU_CORE=1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE.1809077057" name="Set C system stack size (--stack_size, -stack)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE" value="0x100" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE.450602402" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE.2082214268" name="Specify output file name (--output_file, -o)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE" value=""${ProjName}.out"" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE.1076879265" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY.218911506" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY" valueType="libs">
+ <listOptionValue builtIn="false" value=""libc.a""/>
+ <listOptionValue builtIn="false" value=""../../../../lib/rpmsg_lib.lib""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH.1867647557" name="Add <dir> to library search path (--search_path, -i)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH" valueType="libPaths">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/lib""/>
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DISPLAY_ERROR_NUMBER.1346870099" name="Emit diagnostic identifier numbers (--display_error_number)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DIAG_WRAP.1551182562" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO.1250922548" 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"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS.1182007739" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS.1950328036" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS.2138801768" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.319696368" name="PRU Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex"/>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry excluding="AM335x.cmd" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <project id="PRU_RPMsg_Echo_Interrupt1.com.ti.ccstudio.buildDefinitions.PRU.ProjectType.1927506433" name="PRU" projectType="com.ti.ccstudio.buildDefinitions.PRU.ProjectType"/>
+ </storageModule>
+ <storageModule moduleId="scannerConfiguration"/>
+ <storageModule moduleId="org.eclipse.cdt.core.language.mapping">
+ <project-mappings>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.asmSource" language="com.ti.ccstudio.core.TIASMLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cHeader" language="com.ti.ccstudio.core.TIGCCLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cSource" language="com.ti.ccstudio.core.TIGCCLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxHeader" language="com.ti.ccstudio.core.TIGPPLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxSource" language="com.ti.ccstudio.core.TIGPPLanguage"/>
+ </project-mappings>
+ </storageModule>
+</cproject>
diff --git a/examples/am437x/PRU_RPMsg_Echo_Interrupt1/.project b/examples/am437x/PRU_RPMsg_Echo_Interrupt1/.project
--- /dev/null
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>PRU_RPMsg_Echo_Interrupt1</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+ <triggers>full,incremental,</triggers>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.ti.ccstudio.core.ccsNature</nature>
+ <nature>org.eclipse.cdt.core.cnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+ <nature>org.eclipse.cdt.core.ccnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+ </natures>
+</projectDescription>
diff --git a/examples/am437x/PRU_RPMsg_Echo_Interrupt1/.settings/org.eclipse.cdt.codan.core.prefs b/examples/am437x/PRU_RPMsg_Echo_Interrupt1/.settings/org.eclipse.cdt.codan.core.prefs
--- /dev/null
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+inEditor=false
+onBuild=false
diff --git a/examples/am437x/PRU_RPMsg_Echo_Interrupt1/.settings/org.eclipse.cdt.debug.core.prefs b/examples/am437x/PRU_RPMsg_Echo_Interrupt1/.settings/org.eclipse.cdt.debug.core.prefs
--- /dev/null
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+org.eclipse.cdt.debug.core.toggleBreakpointModel=com.ti.ccstudio.debug.CCSBreakpointMarker
diff --git a/examples/am437x/PRU_RPMsg_Echo_Interrupt1/AM437x_PRU_SS1.cmd b/examples/am437x/PRU_RPMsg_Echo_Interrupt1/AM437x_PRU_SS1.cmd
--- /dev/null
@@ -0,0 +1,84 @@
+/****************************************************************************/
+/* AM437x_PRU_SS1.cmd */
+/* Copyright (c) 2015 Texas Instruments Incorporated */
+/* */
+/* Description: This file is a linker command file that can be used for */
+/* linking PRU programs built with the C compiler and */
+/* the resulting .out file on an AM437x device. */
+/****************************************************************************/
+
+-cr /* Link using C conventions */
+
+/* Specify the System Memory Map */
+MEMORY
+{
+ PAGE 0:
+ PRU_IMEM : org = 0x00000000 len = 0x00003000 /* 12kB PRU-ICSS1 Instruction RAM */
+
+ PAGE 1:
+
+ /* RAM */
+
+ PRU_DMEM_0_1 : org = 0x00000000 len = 0x00002000 CREGISTER=24 /* 8kB PRU Data RAM 0_1 */
+ PRU_DMEM_1_0 : org = 0x00002000 len = 0x00002000 CREGISTER=25 /* 8kB PRU Data RAM 1_0 */
+ PRU_SHAREDMEM : org = 0x00010000 len = 0x00008000 CREGISTER=28 /* 32kB Shared RAM */
+
+ DDR : org = 0x80000000 len = 0x00000100 CREGISTER=31
+ L3OCMC : org = 0x40000000 len = 0x00010000 CREGISTER=30
+
+
+ /* Peripherals */
+
+ PRU_CFG : org = 0x00026000 len = 0x00000120 CREGISTER=4
+ PRU_ECAP : org = 0x00030000 len = 0x00000060 CREGISTER=3
+ PRU_IEP : org = 0x0002E000 len = 0x0000031C CREGISTER=26
+ PRU_INTC : org = 0x00020000 len = 0x00001504 CREGISTER=0
+ PRU_UART : org = 0x00028000 len = 0x00000038 CREGISTER=7
+
+ DCAN0 : org = 0x481CC000 len = 0x000001E8 CREGISTER=14
+ DCAN1 : org = 0x481D0000 len = 0x000001E8 CREGISTER=15
+ DMTIMER2 : org = 0x48040000 len = 0x0000005C CREGISTER=1
+ PWMSS0 : org = 0x48300000 len = 0x000002C4 CREGISTER=18
+ PWMSS1 : org = 0x48302000 len = 0x000002C4 CREGISTER=19
+ PWMSS2 : org = 0x48304000 len = 0x000002C4 CREGISTER=20
+ GEMAC : org = 0x4A100000 len = 0x0000128C CREGISTER=9
+ I2C1 : org = 0x4802A000 len = 0x000000D8 CREGISTER=2
+ I2C2 : org = 0x4819C000 len = 0x000000D8 CREGISTER=17
+ MBX0 : org = 0x480C8000 len = 0x00000140 CREGISTER=22
+ MCASP0_DMA : org = 0x46000000 len = 0x00000100 CREGISTER=8
+ MCSPI0 : org = 0x48030000 len = 0x000001A4 CREGISTER=6
+ MCSPI1 : org = 0x481A0000 len = 0x000001A4 CREGISTER=16
+ MMCSD0 : org = 0x48060000 len = 0x00000300 CREGISTER=5
+ SPINLOCK : org = 0x480CA000 len = 0x00000880 CREGISTER=23
+ TPCC : org = 0x49000000 len = 0x00001098 CREGISTER=29
+ UART1 : org = 0x48022000 len = 0x00000088 CREGISTER=11
+ UART2 : org = 0x48024000 len = 0x00000088 CREGISTER=12
+
+ RSVD10 : org = 0x48318000 len = 0x00000100 CREGISTER=10
+ RSVD13 : org = 0x48310000 len = 0x00000100 CREGISTER=13
+ RSVD21 : org = 0x00032400 len = 0x00000100 CREGISTER=21
+ RSVD27 : org = 0x00032000 len = 0x00000100 CREGISTER=27
+
+}
+
+/* Specify the sections allocation into memory */
+SECTIONS {
+ /* Forces _c_int00 to the start of PRU IRAM. Not necessary when loading
+ an ELF file, but useful when loading a binary */
+ .text:_c_int00* > 0x0, PAGE 0
+
+ .text > PRU_IMEM, PAGE 0
+ .stack > PRU_DMEM_0_1, PAGE 1
+ .bss > PRU_DMEM_0_1, PAGE 1
+ .cio > PRU_DMEM_0_1, PAGE 1
+ .data > PRU_DMEM_0_1, PAGE 1
+ .switch > PRU_DMEM_0_1, PAGE 1
+ .sysmem > PRU_DMEM_0_1, PAGE 1
+ .cinit > PRU_DMEM_0_1, PAGE 1
+ .rodata > PRU_DMEM_0_1, PAGE 1
+ .rofardata > PRU_DMEM_0_1, PAGE 1
+ .farbss > PRU_DMEM_0_1, PAGE 1
+ .fardata > PRU_DMEM_0_1, PAGE 1
+
+ .resource_table > PRU_DMEM_0_1, PAGE 1
+}
diff --git a/examples/am437x/PRU_RPMsg_Echo_Interrupt1/Makefile b/examples/am437x/PRU_RPMsg_Echo_Interrupt1/Makefile
--- /dev/null
@@ -0,0 +1,86 @@
+# PRU_CGT environment variable must point to the TI PRU compiler directory. E.g.:
+#(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+#(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+ifndef PRU_CGT
+define ERROR_BODY
+
+************************************************************
+PRU_CGT environment variable is not set. Examples given:
+(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
+CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
+PROJ_NAME=$(CURRENT_DIR)
+LINKER_COMMAND_FILE=./AM437x_PRU_SS1.cmd
+LIBS=--library=../../../lib/rpmsg_lib.lib
+INCLUDE=--include_path=../../../include --include_path=../../../include/am437x
+STACK_SIZE=0x100
+HEAP_SIZE=0x100
+GEN_DIR=gen
+
+#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+CFLAGS=-v3 -O2 --display_error_number --endian=little --hardware_mac=on --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
+#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
+
+TARGET=$(GEN_DIR)/$(PROJ_NAME).out
+MAP=$(GEN_DIR)/$(PROJ_NAME).map
+SOURCES=$(wildcard *.c)
+#Using .object instead of .obj in order to not conflict with the CCS build process
+OBJECTS=$(patsubst %,$(GEN_DIR)/%,$(SOURCES:.c=.object))
+
+all: printStart $(TARGET) printEnd
+
+printStart:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Building project: $(PROJ_NAME)'
+
+printEnd:
+ @echo ''
+ @echo 'Finished building project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Invokes the linker (-z flag) to make the .out file
+$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
+ @echo ''
+ @echo 'Building target: $@'
+ @echo 'Invoking: PRU Linker'
+ $(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)
+ @echo 'Finished building target: $@'
+ @echo ''
+ @echo 'Output files can be found in the "$(GEN_DIR)" directory'
+
+# Invokes the compiler on all c files in the directory to create the object files
+$(GEN_DIR)/%.object: %.c
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+.PHONY: all clean
+
+# Remove the $(GEN_DIR) directory
+clean:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Cleaning project: $(PROJ_NAME)'
+ @echo ''
+ @echo 'Removing files in the "$(GEN_DIR)" directory'
+ @rm -rf $(GEN_DIR)
+ @echo ''
+ @echo 'Finished cleaning project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
+-include $(OBJECTS:%.object=%.pp)
+
diff --git a/examples/am437x/PRU_RPMsg_Echo_Interrupt1/main.c b/examples/am437x/PRU_RPMsg_Echo_Interrupt1/main.c
--- /dev/null
@@ -0,0 +1,113 @@
+/*
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <stdint.h>
+#include <stdio.h>
+#include <pru_cfg.h>
+#include <pru_intc.h>
+#include <rsc_types.h>
+#include <pru_virtqueue.h>
+#include <pru_rpmsg.h>
+#include <sys_mailbox.h>
+#include "resource_table_1.h"
+
+volatile register uint32_t __R31;
+
+/* PRU1 is mailbox module user 2 */
+#define MB_USER 2
+/* Mbox0 - mail_u2_irq (mailbox interrupt for PRU1) is Int Number 59 */
+#define MB_INT_NUMBER 59
+
+/* Host-1 Interrupt sets bit 31 in register R31 */
+#define HOST_INT 0x80000000
+
+/* The mailboxes used for RPMsg are defined in the Linux device tree
+ * PRU0 uses mailboxes 2 (From ARM) and 3 (To ARM)
+ * PRU1 uses mailboxes 4 (From ARM) and 5 (To ARM)
+ */
+#define MB_TO_ARM_HOST 5
+#define MB_FROM_ARM_HOST 4
+
+/*
+ * Using the name 'rpmsg-pru' will probe the rpmsg_pru driver found
+ * at linux-x.y.z/drivers/rpmsg/rpmsg_pru.c
+ */
+#define CHAN_NAME "rpmsg-pru"
+#define CHAN_DESC "Channel 31"
+#define CHAN_PORT 31
+
+uint8_t payload[RPMSG_BUF_SIZE];
+
+/*
+ * main.c
+ */
+void main() {
+ struct pru_rpmsg_transport transport;
+ uint16_t src, dst, len;
+
+ /* allow OCP master port access by the PRU so the PRU can read external memories */
+ CT_CFG.SYSCFG_bit.STANDBY_INIT = 0;
+
+ /* clear the status of event MB_INT_NUMBER (the mailbox event) and enable the mailbox event */
+ CT_INTC.SICR_bit.STATUS_CLR_INDEX = MB_INT_NUMBER;
+ CT_MBX.IRQ[MB_USER].ENABLE_SET |= 1 << (MB_FROM_ARM_HOST * 2);
+
+ /* Initialize pru_virtqueue corresponding to vring0 (PRU to ARM Host direction) */
+ pru_virtqueue_init(&transport.virtqueue0, &resourceTable.rpmsg_vring0, &CT_MBX.MESSAGE[MB_TO_ARM_HOST], &CT_MBX.MESSAGE[MB_FROM_ARM_HOST]);
+
+ /* Initialize pru_virtqueue corresponding to vring1 (ARM Host to PRU direction) */
+ pru_virtqueue_init(&transport.virtqueue1, &resourceTable.rpmsg_vring1, &CT_MBX.MESSAGE[MB_TO_ARM_HOST], &CT_MBX.MESSAGE[MB_FROM_ARM_HOST]);
+
+ /* Create the RPMsg channel between the PRU and ARM user space using the transport structure. */
+ while(pru_rpmsg_channel(RPMSG_NS_CREATE, &transport, CHAN_NAME, CHAN_DESC, CHAN_PORT) != PRU_RPMSG_SUCCESS);
+ while(1){
+ /* Check bit 31 of register R31 to see if the mailbox interrupt has occurred */
+ if(__R31 & HOST_INT){
+ /* Clear the mailbox interrupt */
+ CT_MBX.IRQ[MB_USER].STATUS_CLR |= 1 << (MB_FROM_ARM_HOST * 2);
+ /* Clear the event status, event MB_INT_NUMBER corresponds to the mailbox interrupt */
+ CT_INTC.SICR_bit.STATUS_CLR_INDEX = MB_INT_NUMBER;
+ /* Use a while loop to read all of the current messages in the mailbox */
+ while(CT_MBX.MSGSTATUS_bit[MB_FROM_ARM_HOST].NBOFMSG > 0){
+ /* Check to see if the message corresponds to a receive event for the PRU */
+ if(CT_MBX.MESSAGE[MB_FROM_ARM_HOST] == 1){
+ /* Receive the message */
+ if(pru_rpmsg_receive(&transport, &src, &dst, payload, &len) == PRU_RPMSG_SUCCESS){
+ /* Echo the message back to the same address from which we just received */
+ pru_rpmsg_send(&transport, dst, src, payload, len);
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/examples/am437x/PRU_RPMsg_Echo_Interrupt1/resource_table_1.h b/examples/am437x/PRU_RPMsg_Echo_Interrupt1/resource_table_1.h
--- /dev/null
@@ -0,0 +1,148 @@
+/*\r
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/ \r
+ * \r
+ * \r
+ * Redistribution and use in source and binary forms, with or without \r
+ * modification, are permitted provided that the following conditions \r
+ * are met:\r
+ * \r
+ * * Redistributions of source code must retain the above copyright \r
+ * notice, this list of conditions and the following disclaimer.\r
+ * \r
+ * * Redistributions in binary form must reproduce the above copyright\r
+ * notice, this list of conditions and the following disclaimer in the \r
+ * documentation and/or other materials provided with the \r
+ * distribution.\r
+ * \r
+ * * Neither the name of Texas Instruments Incorporated nor the names of\r
+ * its contributors may be used to endorse or promote products derived\r
+ * from this software without specific prior written permission.\r
+ * \r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \r
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \r
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT \r
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \r
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \r
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \r
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE \r
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ */\r
+\r
+/*\r
+ * ======== rsc_table_am335x_pru.h ========\r
+ *\r
+ * Define the resource table entries for all PRU cores. This will be\r
+ * incorporated into corresponding base images, and used by the remoteproc\r
+ * on the host-side to allocated/reserve resources.\r
+ *\r
+ */\r
+\r
+\r
+#ifndef _RSC_TABLE_PRU_H_\r
+#define _RSC_TABLE_PRU_H_\r
+\r
+#include <stddef.h>\r
+#include <rsc_types.h>\r
+#include "pru_virtio_ids.h"\r
+\r
+/*\r
+ * Sizes of the virtqueues (expressed in number of buffers supported,\r
+ * and must be power of 2)\r
+ */\r
+#define PRU_RPMSG_VQ0_SIZE 16\r
+#define PRU_RPMSG_VQ1_SIZE 16\r
+\r
+/*\r
+ * The feature bitmap for virtio rpmsg\r
+ */\r
+#define VIRTIO_RPMSG_F_NS 0 //name service notifications\r
+\r
+/* This firmware supports name service notifications as one of its features */\r
+#define RPMSG_PRU_C0_FEATURES (1 << VIRTIO_RPMSG_F_NS)\r
+\r
+/* Definition for unused interrupts */\r
+#define HOST_UNUSED 255\r
+\r
+/* Mapping sysevts to a channel. Each pair contains a sysevt, channel\r
+ * Mapping event 60 (Mbox0 mailbox interrupt for pru0) to channel 0\r
+ * */\r
+struct ch_map pru_intc_map[] = { {59, 1},\r
+ };\r
+\r
+struct my_resource_table {\r
+ struct resource_table base;\r
+\r
+ uint32_t offset[2]; /* Should match 'num' in actual definition */\r
+\r
+ /* rpmsg vdev entry */\r
+ struct fw_rsc_vdev rpmsg_vdev;\r
+ struct fw_rsc_vdev_vring rpmsg_vring0;\r
+ struct fw_rsc_vdev_vring rpmsg_vring1;\r
+\r
+ /* intc definition */\r
+ struct fw_rsc_custom pru_ints;\r
+};\r
+\r
+#pragma DATA_SECTION(resourceTable, ".resource_table")\r
+#pragma RETAIN(resourceTable)\r
+struct my_resource_table resourceTable = {\r
+ 1, /* Resource table version: only version 1 is supported by the current driver */\r
+ 2, /* number of entries in the table */\r
+ 0, 0, /* reserved, must be zero */\r
+ /* offsets to entries */\r
+ {\r
+ offsetof(struct my_resource_table, rpmsg_vdev),\r
+ offsetof(struct my_resource_table, pru_ints),\r
+ },\r
+\r
+ /* rpmsg vdev entry */\r
+ {\r
+ (uint32_t)TYPE_VDEV, //type\r
+ (uint32_t)VIRTIO_ID_RPMSG, //id\r
+ (uint32_t)0, //notifyid\r
+ (uint32_t)RPMSG_PRU_C0_FEATURES, //dfeatures\r
+ (uint32_t)0, //gfeatures\r
+ (uint32_t)0, //config_len\r
+ (uint8_t)0, //status\r
+ (uint8_t)2, //num_of_vrings, only two is supported\r
+ { (uint8_t)0, (uint8_t)0 }, //reserved\r
+ /* no config data */\r
+ },\r
+ /* the two vrings */\r
+ {\r
+ 0, //da, will be populated by host, can't pass it in\r
+ 16, //align (bytes),\r
+ PRU_RPMSG_VQ0_SIZE, //num of descriptors\r
+ 0, //notifyid, will be populated, can't pass right now\r
+ 0 //reserved\r
+ },\r
+ {\r
+ 0, //da, will be populated by host, can't pass it in\r
+ 16, //align (bytes),\r
+ PRU_RPMSG_VQ1_SIZE, //num of descriptors\r
+ 0, //notifyid, will be populated, can't pass right now\r
+ 0 //reserved\r
+ },\r
+\r
+ {\r
+ TYPE_CUSTOM, TYPE_PRU_INTS,\r
+ sizeof(struct fw_rsc_custom_ints),\r
+ { /* PRU_INTS version */\r
+ 0x0000,\r
+ /* Channel-to-host mapping, 255 for unused\r
+ * Mapping Channel-1 to Host-1 (PRU0/1 R31 bit 31)\r
+ * */\r
+ HOST_UNUSED, 1, HOST_UNUSED, HOST_UNUSED, HOST_UNUSED,\r
+ HOST_UNUSED, HOST_UNUSED, HOST_UNUSED, HOST_UNUSED, HOST_UNUSED,\r
+ /* Number of evts being mapped to channels */\r
+ (sizeof(pru_intc_map) / sizeof(struct ch_map)),\r
+ /* Pointer to the structure containing mapped events */\r
+ pru_intc_map,\r
+ },\r
+ },\r
+};\r
+\r
+#endif /* _RSC_TABLE_PRU_H_ */\r
diff --git a/examples/am437x/PRU_RPMsg_Echo_Polling0/.ccsproject b/examples/am437x/PRU_RPMsg_Echo_Polling0/.ccsproject
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<?ccsproject version="1.0"?>
+<projectOptions>
+ <deviceVariant value="TMS192C2026.AM3359.BeagleBone_Black"/>
+ <deviceFamily value="PRU"/>
+ <deviceEndianness value="little"/>
+ <codegenToolVersion value="2.1.1"/>
+ <isElfFormat value="true"/>
+ <linkerCommandFile value="AM335x.cmd"/>
+ <rts value="libc.a"/>
+ <createSlaveProjects value=""/>
+ <templateProperties value="id=com.ti.common.project.core.emptyProjectTemplate,"/>
+ <isTargetManual value="false"/>
+</projectOptions>
diff --git a/examples/am437x/PRU_RPMsg_Echo_Polling0/.cproject b/examples/am437x/PRU_RPMsg_Echo_Polling0/.cproject
--- /dev/null
@@ -0,0 +1,186 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+ <storageModule configRelations="2" moduleId="org.eclipse.cdt.core.settings">
+ <cconfiguration id="com.ti.ccstudio.buildDefinitions.PRU.Debug.381480084">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.PRU.Debug.381480084" moduleId="org.eclipse.cdt.core.settings" name="Debug">
+ <externalSettings/>
+ <extensions>
+ <extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.LinkErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" id="com.ti.ccstudio.buildDefinitions.PRU.Debug.381480084" name="Debug" parent="com.ti.ccstudio.buildDefinitions.PRU.Debug" postbuildStep="" prebuildStep="">
+ <folderInfo id="com.ti.ccstudio.buildDefinitions.PRU.Debug.381480084." name="/" resourcePath="">
+ <toolChain id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.DebugToolchain.1422453856" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.DebugToolchain" targetTool="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerDebug.810073805">
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.101467263" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
+ <listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=TMS192C2026.AM4379.EVMAM437X"/>
+ <listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>
+ <listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>
+ <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.5.0"/>
+ <listOptionValue builtIn="false" value="LINKER_COMMAND_FILE="/>
+ <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/>
+ <listOptionValue builtIn="false" value="OUTPUT_TYPE=executable"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.585511296" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="2.1.1" valueType="string"/>
+ <targetPlatform id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformDebug.243275953" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformDebug"/>
+ <builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderDebug.1038760013" name="GNU Make.Debug" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderDebug"/>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerDebug.380327121" name="PRU Compiler" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerDebug">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE.832861336" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="pru0"/>
+ <listOptionValue builtIn="false" value="am4379"/>
+ <listOptionValue builtIn="false" value="icss1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.SILICON_VERSION.384796803" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.1956772815" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.2032255647" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am437x""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEBUGGING_MODEL.1467500374" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.303067775" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">
+ <listOptionValue builtIn="false" value="225"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER.1780425248" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WRAP.394588401" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.714017277" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN" value="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.little" valueType="enumerated"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS.64420347" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS.264108151" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS.1457575436" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS.667379491" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerDebug.810073805" name="PRU Linker" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerDebug">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE.1784081043" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="ICSS1_PRU_CORE=1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE.2064471870" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE" value="0x100" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE.1564271765" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE" value="0x100" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE.1249769174" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE" value=""${ProjName}.out"" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE.234618990" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE" value=""${ProjName}.map"" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY.383923092" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY" valueType="libs">
+ <listOptionValue builtIn="false" value=""libc.a""/>
+ <listOptionValue builtIn="false" value=""../../../../lib/rpmsg_lib.lib""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH.174102620" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH" valueType="libPaths">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/lib""/>
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DISPLAY_ERROR_NUMBER.1096404047" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DIAG_WRAP.1218518829" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO.189939477" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO" value=""${ProjName}_linkInfo.xml"" valueType="string"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS.196147249" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS.1046811425" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS.1446259516" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.176919800" name="PRU Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex"/>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry excluding="AM437x.cmd|AM335x.cmd" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ <cconfiguration id="com.ti.ccstudio.buildDefinitions.PRU.Release.1778392550">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.PRU.Release.1778392550" moduleId="org.eclipse.cdt.core.settings" name="Release">
+ <externalSettings/>
+ <extensions>
+ <extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.LinkErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" id="com.ti.ccstudio.buildDefinitions.PRU.Release.1778392550" name="Release" parent="com.ti.ccstudio.buildDefinitions.PRU.Release" postbuildStep="" prebuildStep="">
+ <folderInfo id="com.ti.ccstudio.buildDefinitions.PRU.Release.1778392550." name="/" resourcePath="">
+ <toolChain id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.ReleaseToolchain.1853396661" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.ReleaseToolchain" targetTool="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease.7281695">
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.474799600" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
+ <listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=TMS192C2026.AM4379.EVMAM437X"/>
+ <listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>
+ <listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>
+ <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.5.0"/>
+ <listOptionValue builtIn="false" value="LINKER_COMMAND_FILE="/>
+ <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/>
+ <listOptionValue builtIn="false" value="OUTPUT_TYPE=executable"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1369155889" name="Compiler version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="2.1.1" valueType="string"/>
+ <targetPlatform id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformRelease.977049919" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformRelease"/>
+ <builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderRelease.1549366209" keepEnvironmentInBuildfile="false" name="GNU Make" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderRelease"/>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerRelease.2053277723" name="PRU Compiler" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerRelease">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE.1422818357" name="Pre-define NAME (--define, -D)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="pru0"/>
+ <listOptionValue builtIn="false" value="am4379"/>
+ <listOptionValue builtIn="false" value="icss1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.SILICON_VERSION.209464982" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.1922438586" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.2053195922" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am437x""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.1885835926" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">
+ <listOptionValue builtIn="false" value="225"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER.1504838610" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WRAP.244217983" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.267128945" 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"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS.1492398657" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS.1290324844" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS.2043680418" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS.1994602493" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease.7281695" name="PRU Linker" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE.833654525" name="Pre-define preprocessor macro _name_ to _value_ (--define)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="ICSS1_PRU_CORE=1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE.877096951" name="Set C system stack size (--stack_size, -stack)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE" value="0x100" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE.1985429769" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE.818580276" name="Specify output file name (--output_file, -o)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE" value=""${ProjName}.out"" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE.477289099" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY.854593965" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY" valueType="libs">
+ <listOptionValue builtIn="false" value=""libc.a""/>
+ <listOptionValue builtIn="false" value=""../../../../lib/rpmsg_lib.lib""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH.1944400625" name="Add <dir> to library search path (--search_path, -i)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH" valueType="libPaths">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/lib""/>
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DISPLAY_ERROR_NUMBER.623637272" name="Emit diagnostic identifier numbers (--display_error_number)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DIAG_WRAP.582641198" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO.1928800262" 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"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS.2087664005" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS.74775417" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS.2027021563" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.511274003" name="PRU Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex"/>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry excluding="AM335x.cmd" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <project id="PRU_RPMsg_Echo_Polling0.com.ti.ccstudio.buildDefinitions.PRU.ProjectType.1844420452" name="PRU" projectType="com.ti.ccstudio.buildDefinitions.PRU.ProjectType"/>
+ </storageModule>
+ <storageModule moduleId="scannerConfiguration"/>
+ <storageModule moduleId="org.eclipse.cdt.core.language.mapping">
+ <project-mappings>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.asmSource" language="com.ti.ccstudio.core.TIASMLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cHeader" language="com.ti.ccstudio.core.TIGCCLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cSource" language="com.ti.ccstudio.core.TIGCCLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxHeader" language="com.ti.ccstudio.core.TIGPPLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxSource" language="com.ti.ccstudio.core.TIGPPLanguage"/>
+ </project-mappings>
+ </storageModule>
+</cproject>
diff --git a/examples/am437x/PRU_RPMsg_Echo_Polling0/.project b/examples/am437x/PRU_RPMsg_Echo_Polling0/.project
--- /dev/null
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>PRU_RPMsg_Echo_Polling0</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+ <triggers>full,incremental,</triggers>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.ti.ccstudio.core.ccsNature</nature>
+ <nature>org.eclipse.cdt.core.cnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+ <nature>org.eclipse.cdt.core.ccnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+ </natures>
+</projectDescription>
diff --git a/examples/am437x/PRU_RPMsg_Echo_Polling0/.settings/org.eclipse.cdt.codan.core.prefs b/examples/am437x/PRU_RPMsg_Echo_Polling0/.settings/org.eclipse.cdt.codan.core.prefs
--- /dev/null
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+inEditor=false
+onBuild=false
diff --git a/examples/am437x/PRU_RPMsg_Echo_Polling0/.settings/org.eclipse.cdt.debug.core.prefs b/examples/am437x/PRU_RPMsg_Echo_Polling0/.settings/org.eclipse.cdt.debug.core.prefs
--- /dev/null
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+org.eclipse.cdt.debug.core.toggleBreakpointModel=com.ti.ccstudio.debug.CCSBreakpointMarker
diff --git a/examples/am437x/PRU_RPMsg_Echo_Polling0/AM437x_PRU_SS1.cmd b/examples/am437x/PRU_RPMsg_Echo_Polling0/AM437x_PRU_SS1.cmd
--- /dev/null
@@ -0,0 +1,84 @@
+/****************************************************************************/
+/* AM437x_PRU_SS1.cmd */
+/* Copyright (c) 2015 Texas Instruments Incorporated */
+/* */
+/* Description: This file is a linker command file that can be used for */
+/* linking PRU programs built with the C compiler and */
+/* the resulting .out file on an AM437x device. */
+/****************************************************************************/
+
+-cr /* Link using C conventions */
+
+/* Specify the System Memory Map */
+MEMORY
+{
+ PAGE 0:
+ PRU_IMEM : org = 0x00000000 len = 0x00003000 /* 12kB PRU-ICSS1 Instruction RAM */
+
+ PAGE 1:
+
+ /* RAM */
+
+ PRU_DMEM_0_1 : org = 0x00000000 len = 0x00002000 CREGISTER=24 /* 8kB PRU Data RAM 0_1 */
+ PRU_DMEM_1_0 : org = 0x00002000 len = 0x00002000 CREGISTER=25 /* 8kB PRU Data RAM 1_0 */
+ PRU_SHAREDMEM : org = 0x00010000 len = 0x00008000 CREGISTER=28 /* 32kB Shared RAM */
+
+ DDR : org = 0x80000000 len = 0x00000100 CREGISTER=31
+ L3OCMC : org = 0x40000000 len = 0x00010000 CREGISTER=30
+
+
+ /* Peripherals */
+
+ PRU_CFG : org = 0x00026000 len = 0x00000120 CREGISTER=4
+ PRU_ECAP : org = 0x00030000 len = 0x00000060 CREGISTER=3
+ PRU_IEP : org = 0x0002E000 len = 0x0000031C CREGISTER=26
+ PRU_INTC : org = 0x00020000 len = 0x00001504 CREGISTER=0
+ PRU_UART : org = 0x00028000 len = 0x00000038 CREGISTER=7
+
+ DCAN0 : org = 0x481CC000 len = 0x000001E8 CREGISTER=14
+ DCAN1 : org = 0x481D0000 len = 0x000001E8 CREGISTER=15
+ DMTIMER2 : org = 0x48040000 len = 0x0000005C CREGISTER=1
+ PWMSS0 : org = 0x48300000 len = 0x000002C4 CREGISTER=18
+ PWMSS1 : org = 0x48302000 len = 0x000002C4 CREGISTER=19
+ PWMSS2 : org = 0x48304000 len = 0x000002C4 CREGISTER=20
+ GEMAC : org = 0x4A100000 len = 0x0000128C CREGISTER=9
+ I2C1 : org = 0x4802A000 len = 0x000000D8 CREGISTER=2
+ I2C2 : org = 0x4819C000 len = 0x000000D8 CREGISTER=17
+ MBX0 : org = 0x480C8000 len = 0x00000140 CREGISTER=22
+ MCASP0_DMA : org = 0x46000000 len = 0x00000100 CREGISTER=8
+ MCSPI0 : org = 0x48030000 len = 0x000001A4 CREGISTER=6
+ MCSPI1 : org = 0x481A0000 len = 0x000001A4 CREGISTER=16
+ MMCSD0 : org = 0x48060000 len = 0x00000300 CREGISTER=5
+ SPINLOCK : org = 0x480CA000 len = 0x00000880 CREGISTER=23
+ TPCC : org = 0x49000000 len = 0x00001098 CREGISTER=29
+ UART1 : org = 0x48022000 len = 0x00000088 CREGISTER=11
+ UART2 : org = 0x48024000 len = 0x00000088 CREGISTER=12
+
+ RSVD10 : org = 0x48318000 len = 0x00000100 CREGISTER=10
+ RSVD13 : org = 0x48310000 len = 0x00000100 CREGISTER=13
+ RSVD21 : org = 0x00032400 len = 0x00000100 CREGISTER=21
+ RSVD27 : org = 0x00032000 len = 0x00000100 CREGISTER=27
+
+}
+
+/* Specify the sections allocation into memory */
+SECTIONS {
+ /* Forces _c_int00 to the start of PRU IRAM. Not necessary when loading
+ an ELF file, but useful when loading a binary */
+ .text:_c_int00* > 0x0, PAGE 0
+
+ .text > PRU_IMEM, PAGE 0
+ .stack > PRU_DMEM_0_1, PAGE 1
+ .bss > PRU_DMEM_0_1, PAGE 1
+ .cio > PRU_DMEM_0_1, PAGE 1
+ .data > PRU_DMEM_0_1, PAGE 1
+ .switch > PRU_DMEM_0_1, PAGE 1
+ .sysmem > PRU_DMEM_0_1, PAGE 1
+ .cinit > PRU_DMEM_0_1, PAGE 1
+ .rodata > PRU_DMEM_0_1, PAGE 1
+ .rofardata > PRU_DMEM_0_1, PAGE 1
+ .farbss > PRU_DMEM_0_1, PAGE 1
+ .fardata > PRU_DMEM_0_1, PAGE 1
+
+ .resource_table > PRU_DMEM_0_1, PAGE 1
+}
diff --git a/examples/am437x/PRU_RPMsg_Echo_Polling0/Makefile b/examples/am437x/PRU_RPMsg_Echo_Polling0/Makefile
--- /dev/null
@@ -0,0 +1,86 @@
+# PRU_CGT environment variable must point to the TI PRU compiler directory. E.g.:
+#(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+#(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+ifndef PRU_CGT
+define ERROR_BODY
+
+************************************************************
+PRU_CGT environment variable is not set. Examples given:
+(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
+CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
+PROJ_NAME=$(CURRENT_DIR)
+LINKER_COMMAND_FILE=./AM437x_PRU_SS1.cmd
+LIBS=--library=../../../lib/rpmsg_lib.lib
+INCLUDE=--include_path=../../../include --include_path=../../../include/am437x
+STACK_SIZE=0x100
+HEAP_SIZE=0x100
+GEN_DIR=gen
+
+#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+CFLAGS=-v3 -O2 --display_error_number --endian=little --hardware_mac=on --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
+#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
+
+TARGET=$(GEN_DIR)/$(PROJ_NAME).out
+MAP=$(GEN_DIR)/$(PROJ_NAME).map
+SOURCES=$(wildcard *.c)
+#Using .object instead of .obj in order to not conflict with the CCS build process
+OBJECTS=$(patsubst %,$(GEN_DIR)/%,$(SOURCES:.c=.object))
+
+all: printStart $(TARGET) printEnd
+
+printStart:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Building project: $(PROJ_NAME)'
+
+printEnd:
+ @echo ''
+ @echo 'Finished building project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Invokes the linker (-z flag) to make the .out file
+$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
+ @echo ''
+ @echo 'Building target: $@'
+ @echo 'Invoking: PRU Linker'
+ $(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)
+ @echo 'Finished building target: $@'
+ @echo ''
+ @echo 'Output files can be found in the "$(GEN_DIR)" directory'
+
+# Invokes the compiler on all c files in the directory to create the object files
+$(GEN_DIR)/%.object: %.c
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+.PHONY: all clean
+
+# Remove the $(GEN_DIR) directory
+clean:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Cleaning project: $(PROJ_NAME)'
+ @echo ''
+ @echo 'Removing files in the "$(GEN_DIR)" directory'
+ @rm -rf $(GEN_DIR)
+ @echo ''
+ @echo 'Finished cleaning project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
+-include $(OBJECTS:%.object=%.pp)
+
diff --git a/examples/am437x/PRU_RPMsg_Echo_Polling0/main.c b/examples/am437x/PRU_RPMsg_Echo_Polling0/main.c
--- /dev/null
@@ -0,0 +1,90 @@
+/*
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <stdint.h>
+#include <stdio.h>
+#include <pru_cfg.h>
+#include <rsc_types.h>
+#include <pru_virtqueue.h>
+#include <pru_rpmsg.h>
+#include <sys_mailbox.h>
+#include "resource_table_0.h"
+
+/* The mailboxes used for RPMsg are defined in the Linux device tree
+ * PRU0 uses mailboxes 2 (From ARM) and 3 (To ARM)
+ * PRU1 uses mailboxes 4 (From ARM) and 5 (To ARM)
+ */
+#define MB_TO_ARM_HOST 3
+#define MB_FROM_ARM_HOST 2
+
+/*
+ * Using the name 'rpmsg-pru' will probe the rpmsg_pru driver found
+ * at linux-x.y.z/drivers/rpmsg/rpmsg_pru.c
+ */
+#define CHAN_NAME "rpmsg-pru"
+#define CHAN_DESC "Channel 30"
+#define CHAN_PORT 30
+
+uint8_t payload[RPMSG_BUF_SIZE];
+
+/*
+ * main.c
+ */
+void main() {
+ struct pru_rpmsg_transport transport;
+ uint16_t src, dst, len;
+
+ /* allow OCP master port access by the PRU so the PRU can read external memories */
+ CT_CFG.SYSCFG_bit.STANDBY_INIT = 0;
+
+ /* Initialize pru_virtqueue corresponding to vring0 (PRU to ARM Host direction) */
+ pru_virtqueue_init(&transport.virtqueue0, &resourceTable.rpmsg_vring0, &CT_MBX.MESSAGE[MB_TO_ARM_HOST], &CT_MBX.MESSAGE[MB_FROM_ARM_HOST]);
+
+ /* Initialize pru_virtqueue corresponding to vring1 (ARM Host to PRU direction) */
+ pru_virtqueue_init(&transport.virtqueue1, &resourceTable.rpmsg_vring1, &CT_MBX.MESSAGE[MB_TO_ARM_HOST], &CT_MBX.MESSAGE[MB_FROM_ARM_HOST]);
+
+ /* Create the RPMsg channel between the PRU and ARM user space using the transport structure.
+ * The name 'rpmsg-pru' corresponds to the rpmsg_pru driver found
+ * at linux-x.y.z/drivers/rpmsg/rpmsg_pru.c
+ */
+ while(pru_rpmsg_channel(RPMSG_NS_CREATE, &transport, CHAN_NAME, CHAN_DESC, CHAN_PORT) != PRU_RPMSG_SUCCESS);
+ while(1){
+ if(CT_MBX.MESSAGE[MB_FROM_ARM_HOST] == 1){
+ /* Receive the message */
+ if(pru_rpmsg_receive(&transport, &src, &dst, payload, &len) == PRU_RPMSG_SUCCESS){
+ /* Echo the message back to the same address from which we just received */
+ pru_rpmsg_send(&transport, dst, src, payload, len);
+ }
+ }
+ }
+}
diff --git a/examples/am437x/PRU_RPMsg_Echo_Polling0/resource_table_0.h b/examples/am437x/PRU_RPMsg_Echo_Polling0/resource_table_0.h
--- /dev/null
@@ -0,0 +1,118 @@
+/*\r
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/ \r
+ * \r
+ * \r
+ * Redistribution and use in source and binary forms, with or without \r
+ * modification, are permitted provided that the following conditions \r
+ * are met:\r
+ * \r
+ * * Redistributions of source code must retain the above copyright \r
+ * notice, this list of conditions and the following disclaimer.\r
+ * \r
+ * * Redistributions in binary form must reproduce the above copyright\r
+ * notice, this list of conditions and the following disclaimer in the \r
+ * documentation and/or other materials provided with the \r
+ * distribution.\r
+ * \r
+ * * Neither the name of Texas Instruments Incorporated nor the names of\r
+ * its contributors may be used to endorse or promote products derived\r
+ * from this software without specific prior written permission.\r
+ * \r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \r
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \r
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT \r
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \r
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \r
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \r
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE \r
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ */\r
+\r
+/*\r
+ * ======== rsc_table_am335x_pru.h ========\r
+ *\r
+ * Define the resource table entries for all PRU cores. This will be\r
+ * incorporated into corresponding base images, and used by the remoteproc\r
+ * on the host-side to allocated/reserve resources.\r
+ *\r
+ */\r
+\r
+\r
+#ifndef _RSC_TABLE_PRU_H_\r
+#define _RSC_TABLE_PRU_H_\r
+\r
+#include <stddef.h>\r
+#include <rsc_types.h>\r
+#include "pru_virtio_ids.h"\r
+\r
+/*\r
+ * Sizes of the virtqueues (expressed in number of buffers supported,\r
+ * and must be power of 2)\r
+ */\r
+#define PRU_RPMSG_VQ0_SIZE 16\r
+#define PRU_RPMSG_VQ1_SIZE 16\r
+\r
+/*\r
+ * The feature bitmap for virtio rpmsg\r
+ */\r
+#define VIRTIO_RPMSG_F_NS 0 //name service notifications\r
+\r
+/* This firmware supports name service notifications as one of its features */\r
+#define RPMSG_PRU_C0_FEATURES (1 << VIRTIO_RPMSG_F_NS)\r
+\r
+struct my_resource_table {\r
+ struct resource_table base;\r
+\r
+ uint32_t offset[1]; /* Should match 'num' in actual definition */\r
+\r
+ /* rpmsg vdev entry */\r
+ struct fw_rsc_vdev rpmsg_vdev;\r
+ struct fw_rsc_vdev_vring rpmsg_vring0;\r
+ struct fw_rsc_vdev_vring rpmsg_vring1;\r
+};\r
+\r
+#pragma DATA_SECTION(resourceTable, ".resource_table")\r
+#pragma RETAIN(resourceTable)\r
+struct my_resource_table resourceTable = {\r
+ 1, /* Resource table version: only version 1 is supported by the current driver */\r
+ 1, /* number of entries in the table */\r
+ 0, 0, /* reserved, must be zero */\r
+ /* offsets to entries */\r
+ {\r
+ offsetof(struct my_resource_table, rpmsg_vdev),\r
+ },\r
+\r
+ /* rpmsg vdev entry */\r
+ {\r
+ (uint32_t)TYPE_VDEV, //type\r
+ (uint32_t)VIRTIO_ID_RPMSG, //id\r
+ (uint32_t)0, //notifyid\r
+ (uint32_t)RPMSG_PRU_C0_FEATURES, //dfeatures\r
+ (uint32_t)0, //gfeatures\r
+ (uint32_t)0, //config_len\r
+ (uint8_t)0, //status\r
+ (uint8_t)2, //num_of_vrings, only two is supported\r
+ { (uint8_t)0, (uint8_t)0 }, //reserved\r
+ /* no config data */\r
+ },\r
+ /* the two vrings */\r
+ {\r
+ 0, //da, will be populated by host, can't pass it in\r
+ 16, //align (bytes),\r
+ PRU_RPMSG_VQ0_SIZE, //num of descriptors\r
+ 0, //notifyid, will be populated, can't pass right now\r
+ 0 //reserved\r
+ },\r
+ {\r
+ 0, //da, will be populated by host, can't pass it in\r
+ 16, //align (bytes),\r
+ PRU_RPMSG_VQ1_SIZE, //num of descriptors\r
+ 0, //notifyid, will be populated, can't pass right now\r
+ 0 //reserved\r
+ },\r
+};\r
+\r
+#endif /* _RSC_TABLE_PRU_H_ */\r
diff --git a/examples/am437x/PRU_RPMsg_Echo_Polling1/.ccsproject b/examples/am437x/PRU_RPMsg_Echo_Polling1/.ccsproject
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<?ccsproject version="1.0"?>
+<projectOptions>
+ <deviceVariant value="TMS192C2026.AM3359.BeagleBone_Black"/>
+ <deviceFamily value="PRU"/>
+ <deviceEndianness value="little"/>
+ <codegenToolVersion value="2.1.1"/>
+ <isElfFormat value="true"/>
+ <linkerCommandFile value="AM335x.cmd"/>
+ <rts value="libc.a"/>
+ <createSlaveProjects value=""/>
+ <templateProperties value="id=com.ti.common.project.core.emptyProjectTemplate,"/>
+ <isTargetManual value="false"/>
+</projectOptions>
diff --git a/examples/am437x/PRU_RPMsg_Echo_Polling1/.cproject b/examples/am437x/PRU_RPMsg_Echo_Polling1/.cproject
--- /dev/null
@@ -0,0 +1,186 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+ <storageModule configRelations="2" moduleId="org.eclipse.cdt.core.settings">
+ <cconfiguration id="com.ti.ccstudio.buildDefinitions.PRU.Debug.273090423">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.PRU.Debug.273090423" moduleId="org.eclipse.cdt.core.settings" name="Debug">
+ <externalSettings/>
+ <extensions>
+ <extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.LinkErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" id="com.ti.ccstudio.buildDefinitions.PRU.Debug.273090423" name="Debug" parent="com.ti.ccstudio.buildDefinitions.PRU.Debug" postbuildStep="" prebuildStep="">
+ <folderInfo id="com.ti.ccstudio.buildDefinitions.PRU.Debug.273090423." name="/" resourcePath="">
+ <toolChain id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.DebugToolchain.589680471" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.DebugToolchain" targetTool="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerDebug.593082982">
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.406875534" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
+ <listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=TMS192C2026.AM4379.EVMAM437X"/>
+ <listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>
+ <listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>
+ <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.5.0"/>
+ <listOptionValue builtIn="false" value="LINKER_COMMAND_FILE="/>
+ <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/>
+ <listOptionValue builtIn="false" value="OUTPUT_TYPE=executable"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.808310518" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="2.1.1" valueType="string"/>
+ <targetPlatform id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformDebug.1813673816" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformDebug"/>
+ <builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderDebug.2072332753" name="GNU Make.Debug" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderDebug"/>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerDebug.1731159921" name="PRU Compiler" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerDebug">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE.1178959029" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="pru0"/>
+ <listOptionValue builtIn="false" value="am4379"/>
+ <listOptionValue builtIn="false" value="icss1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.SILICON_VERSION.1346037295" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.120930961" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.1783168001" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am437x""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEBUGGING_MODEL.997623474" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.502124124" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">
+ <listOptionValue builtIn="false" value="225"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER.561874116" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WRAP.201729493" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.643284456" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN" value="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.little" valueType="enumerated"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS.1512367819" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS.27275814" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS.264635250" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS.1293247247" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerDebug.593082982" name="PRU Linker" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerDebug">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE.856501884" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="ICSS1_PRU_CORE=1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE.589452081" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE" value="0x100" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE.10417729" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE" value="0x100" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE.1672144417" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE" value=""${ProjName}.out"" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE.1658287670" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE" value=""${ProjName}.map"" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY.438334590" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY" valueType="libs">
+ <listOptionValue builtIn="false" value=""libc.a""/>
+ <listOptionValue builtIn="false" value=""../../../../lib/rpmsg_lib.lib""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH.1283183094" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH" valueType="libPaths">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/lib""/>
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DISPLAY_ERROR_NUMBER.1749871527" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DIAG_WRAP.1184646792" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO.44186482" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO" value=""${ProjName}_linkInfo.xml"" valueType="string"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS.648104869" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS.718069017" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS.559792131" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.1748886389" name="PRU Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex"/>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry excluding="AM437x.cmd|AM335x.cmd" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ <cconfiguration id="com.ti.ccstudio.buildDefinitions.PRU.Release.308425420">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.PRU.Release.308425420" moduleId="org.eclipse.cdt.core.settings" name="Release">
+ <externalSettings/>
+ <extensions>
+ <extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.LinkErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" id="com.ti.ccstudio.buildDefinitions.PRU.Release.308425420" name="Release" parent="com.ti.ccstudio.buildDefinitions.PRU.Release" postbuildStep="" prebuildStep="">
+ <folderInfo id="com.ti.ccstudio.buildDefinitions.PRU.Release.308425420." name="/" resourcePath="">
+ <toolChain id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.ReleaseToolchain.1755859008" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.ReleaseToolchain" targetTool="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease.773232861">
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.1205903216" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
+ <listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=TMS192C2026.AM4379.EVMAM437X"/>
+ <listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>
+ <listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>
+ <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.5.0"/>
+ <listOptionValue builtIn="false" value="LINKER_COMMAND_FILE="/>
+ <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/>
+ <listOptionValue builtIn="false" value="OUTPUT_TYPE=executable"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.872800563" name="Compiler version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="2.1.1" valueType="string"/>
+ <targetPlatform id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformRelease.1722117865" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformRelease"/>
+ <builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderRelease.1856784981" keepEnvironmentInBuildfile="false" name="GNU Make" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderRelease"/>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerRelease.1601151982" name="PRU Compiler" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerRelease">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE.1916599781" name="Pre-define NAME (--define, -D)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="pru0"/>
+ <listOptionValue builtIn="false" value="am4379"/>
+ <listOptionValue builtIn="false" value="icss1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.SILICON_VERSION.1651469731" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.1271710780" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.997030028" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am437x""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.960622438" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">
+ <listOptionValue builtIn="false" value="225"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER.1782120223" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WRAP.429055553" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.1001936751" 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"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS.1277577182" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS.1317869246" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS.1973298501" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS.1403215958" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease.773232861" name="PRU Linker" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE.1220950372" name="Pre-define preprocessor macro _name_ to _value_ (--define)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="ICSS1_PRU_CORE=1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE.433508845" name="Set C system stack size (--stack_size, -stack)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE" value="0x100" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE.962136601" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE.1953847844" name="Specify output file name (--output_file, -o)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE" value=""${ProjName}.out"" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE.821389315" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY.552242888" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY" valueType="libs">
+ <listOptionValue builtIn="false" value=""libc.a""/>
+ <listOptionValue builtIn="false" value=""../../../../lib/rpmsg_lib.lib""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH.2105652613" name="Add <dir> to library search path (--search_path, -i)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH" valueType="libPaths">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/lib""/>
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DISPLAY_ERROR_NUMBER.1355089390" name="Emit diagnostic identifier numbers (--display_error_number)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DIAG_WRAP.1572486001" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO.1548603577" 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"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS.494657373" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS.624362814" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS.1742364677" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.1315644013" name="PRU Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex"/>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry excluding="AM335x.cmd" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <project id="PRU_RPMsg_Echo_Polling1.com.ti.ccstudio.buildDefinitions.PRU.ProjectType.815827881" name="PRU" projectType="com.ti.ccstudio.buildDefinitions.PRU.ProjectType"/>
+ </storageModule>
+ <storageModule moduleId="scannerConfiguration"/>
+ <storageModule moduleId="org.eclipse.cdt.core.language.mapping">
+ <project-mappings>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.asmSource" language="com.ti.ccstudio.core.TIASMLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cHeader" language="com.ti.ccstudio.core.TIGCCLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cSource" language="com.ti.ccstudio.core.TIGCCLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxHeader" language="com.ti.ccstudio.core.TIGPPLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxSource" language="com.ti.ccstudio.core.TIGPPLanguage"/>
+ </project-mappings>
+ </storageModule>
+</cproject>
diff --git a/examples/am437x/PRU_RPMsg_Echo_Polling1/.project b/examples/am437x/PRU_RPMsg_Echo_Polling1/.project
--- /dev/null
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>PRU_RPMsg_Echo_Polling1</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+ <triggers>full,incremental,</triggers>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.ti.ccstudio.core.ccsNature</nature>
+ <nature>org.eclipse.cdt.core.cnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+ <nature>org.eclipse.cdt.core.ccnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+ </natures>
+</projectDescription>
diff --git a/examples/am437x/PRU_RPMsg_Echo_Polling1/.settings/org.eclipse.cdt.codan.core.prefs b/examples/am437x/PRU_RPMsg_Echo_Polling1/.settings/org.eclipse.cdt.codan.core.prefs
--- /dev/null
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+inEditor=false
+onBuild=false
diff --git a/examples/am437x/PRU_RPMsg_Echo_Polling1/.settings/org.eclipse.cdt.debug.core.prefs b/examples/am437x/PRU_RPMsg_Echo_Polling1/.settings/org.eclipse.cdt.debug.core.prefs
--- /dev/null
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+org.eclipse.cdt.debug.core.toggleBreakpointModel=com.ti.ccstudio.debug.CCSBreakpointMarker
diff --git a/examples/am437x/PRU_RPMsg_Echo_Polling1/AM437x_PRU_SS1.cmd b/examples/am437x/PRU_RPMsg_Echo_Polling1/AM437x_PRU_SS1.cmd
--- /dev/null
@@ -0,0 +1,84 @@
+/****************************************************************************/
+/* AM437x_PRU_SS1.cmd */
+/* Copyright (c) 2015 Texas Instruments Incorporated */
+/* */
+/* Description: This file is a linker command file that can be used for */
+/* linking PRU programs built with the C compiler and */
+/* the resulting .out file on an AM437x device. */
+/****************************************************************************/
+
+-cr /* Link using C conventions */
+
+/* Specify the System Memory Map */
+MEMORY
+{
+ PAGE 0:
+ PRU_IMEM : org = 0x00000000 len = 0x00003000 /* 12kB PRU-ICSS1 Instruction RAM */
+
+ PAGE 1:
+
+ /* RAM */
+
+ PRU_DMEM_0_1 : org = 0x00000000 len = 0x00002000 CREGISTER=24 /* 8kB PRU Data RAM 0_1 */
+ PRU_DMEM_1_0 : org = 0x00002000 len = 0x00002000 CREGISTER=25 /* 8kB PRU Data RAM 1_0 */
+ PRU_SHAREDMEM : org = 0x00010000 len = 0x00008000 CREGISTER=28 /* 32kB Shared RAM */
+
+ DDR : org = 0x80000000 len = 0x00000100 CREGISTER=31
+ L3OCMC : org = 0x40000000 len = 0x00010000 CREGISTER=30
+
+
+ /* Peripherals */
+
+ PRU_CFG : org = 0x00026000 len = 0x00000120 CREGISTER=4
+ PRU_ECAP : org = 0x00030000 len = 0x00000060 CREGISTER=3
+ PRU_IEP : org = 0x0002E000 len = 0x0000031C CREGISTER=26
+ PRU_INTC : org = 0x00020000 len = 0x00001504 CREGISTER=0
+ PRU_UART : org = 0x00028000 len = 0x00000038 CREGISTER=7
+
+ DCAN0 : org = 0x481CC000 len = 0x000001E8 CREGISTER=14
+ DCAN1 : org = 0x481D0000 len = 0x000001E8 CREGISTER=15
+ DMTIMER2 : org = 0x48040000 len = 0x0000005C CREGISTER=1
+ PWMSS0 : org = 0x48300000 len = 0x000002C4 CREGISTER=18
+ PWMSS1 : org = 0x48302000 len = 0x000002C4 CREGISTER=19
+ PWMSS2 : org = 0x48304000 len = 0x000002C4 CREGISTER=20
+ GEMAC : org = 0x4A100000 len = 0x0000128C CREGISTER=9
+ I2C1 : org = 0x4802A000 len = 0x000000D8 CREGISTER=2
+ I2C2 : org = 0x4819C000 len = 0x000000D8 CREGISTER=17
+ MBX0 : org = 0x480C8000 len = 0x00000140 CREGISTER=22
+ MCASP0_DMA : org = 0x46000000 len = 0x00000100 CREGISTER=8
+ MCSPI0 : org = 0x48030000 len = 0x000001A4 CREGISTER=6
+ MCSPI1 : org = 0x481A0000 len = 0x000001A4 CREGISTER=16
+ MMCSD0 : org = 0x48060000 len = 0x00000300 CREGISTER=5
+ SPINLOCK : org = 0x480CA000 len = 0x00000880 CREGISTER=23
+ TPCC : org = 0x49000000 len = 0x00001098 CREGISTER=29
+ UART1 : org = 0x48022000 len = 0x00000088 CREGISTER=11
+ UART2 : org = 0x48024000 len = 0x00000088 CREGISTER=12
+
+ RSVD10 : org = 0x48318000 len = 0x00000100 CREGISTER=10
+ RSVD13 : org = 0x48310000 len = 0x00000100 CREGISTER=13
+ RSVD21 : org = 0x00032400 len = 0x00000100 CREGISTER=21
+ RSVD27 : org = 0x00032000 len = 0x00000100 CREGISTER=27
+
+}
+
+/* Specify the sections allocation into memory */
+SECTIONS {
+ /* Forces _c_int00 to the start of PRU IRAM. Not necessary when loading
+ an ELF file, but useful when loading a binary */
+ .text:_c_int00* > 0x0, PAGE 0
+
+ .text > PRU_IMEM, PAGE 0
+ .stack > PRU_DMEM_0_1, PAGE 1
+ .bss > PRU_DMEM_0_1, PAGE 1
+ .cio > PRU_DMEM_0_1, PAGE 1
+ .data > PRU_DMEM_0_1, PAGE 1
+ .switch > PRU_DMEM_0_1, PAGE 1
+ .sysmem > PRU_DMEM_0_1, PAGE 1
+ .cinit > PRU_DMEM_0_1, PAGE 1
+ .rodata > PRU_DMEM_0_1, PAGE 1
+ .rofardata > PRU_DMEM_0_1, PAGE 1
+ .farbss > PRU_DMEM_0_1, PAGE 1
+ .fardata > PRU_DMEM_0_1, PAGE 1
+
+ .resource_table > PRU_DMEM_0_1, PAGE 1
+}
diff --git a/examples/am437x/PRU_RPMsg_Echo_Polling1/Makefile b/examples/am437x/PRU_RPMsg_Echo_Polling1/Makefile
--- /dev/null
@@ -0,0 +1,86 @@
+# PRU_CGT environment variable must point to the TI PRU compiler directory. E.g.:
+#(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+#(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+ifndef PRU_CGT
+define ERROR_BODY
+
+************************************************************
+PRU_CGT environment variable is not set. Examples given:
+(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
+CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
+PROJ_NAME=$(CURRENT_DIR)
+LINKER_COMMAND_FILE=./AM437x_PRU_SS1.cmd
+LIBS=--library=../../../lib/rpmsg_lib.lib
+INCLUDE=--include_path=../../../include --include_path=../../../include/am437x
+STACK_SIZE=0x100
+HEAP_SIZE=0x100
+GEN_DIR=gen
+
+#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+CFLAGS=-v3 -O2 --display_error_number --endian=little --hardware_mac=on --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
+#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
+
+TARGET=$(GEN_DIR)/$(PROJ_NAME).out
+MAP=$(GEN_DIR)/$(PROJ_NAME).map
+SOURCES=$(wildcard *.c)
+#Using .object instead of .obj in order to not conflict with the CCS build process
+OBJECTS=$(patsubst %,$(GEN_DIR)/%,$(SOURCES:.c=.object))
+
+all: printStart $(TARGET) printEnd
+
+printStart:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Building project: $(PROJ_NAME)'
+
+printEnd:
+ @echo ''
+ @echo 'Finished building project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Invokes the linker (-z flag) to make the .out file
+$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
+ @echo ''
+ @echo 'Building target: $@'
+ @echo 'Invoking: PRU Linker'
+ $(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)
+ @echo 'Finished building target: $@'
+ @echo ''
+ @echo 'Output files can be found in the "$(GEN_DIR)" directory'
+
+# Invokes the compiler on all c files in the directory to create the object files
+$(GEN_DIR)/%.object: %.c
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+.PHONY: all clean
+
+# Remove the $(GEN_DIR) directory
+clean:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Cleaning project: $(PROJ_NAME)'
+ @echo ''
+ @echo 'Removing files in the "$(GEN_DIR)" directory'
+ @rm -rf $(GEN_DIR)
+ @echo ''
+ @echo 'Finished cleaning project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
+-include $(OBJECTS:%.object=%.pp)
+
diff --git a/examples/am437x/PRU_RPMsg_Echo_Polling1/main.c b/examples/am437x/PRU_RPMsg_Echo_Polling1/main.c
--- /dev/null
@@ -0,0 +1,90 @@
+/*
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <stdint.h>
+#include <stdio.h>
+#include <pru_cfg.h>
+#include <rsc_types.h>
+#include <pru_virtqueue.h>
+#include <pru_rpmsg.h>
+#include <sys_mailbox.h>
+#include "resource_table_1.h"
+
+/* The mailboxes used for RPMsg are defined in the Linux device tree
+ * PRU0 uses mailboxes 2 (From ARM) and 3 (To ARM)
+ * PRU1 uses mailboxes 4 (From ARM) and 5 (To ARM)
+ */
+#define MB_TO_ARM_HOST 5
+#define MB_FROM_ARM_HOST 4
+
+/*
+ * Using the name 'rpmsg-pru' will probe the rpmsg_pru driver found
+ * at linux-x.y.z/drivers/rpmsg/rpmsg_pru.c
+ */
+#define CHAN_NAME "rpmsg-pru"
+#define CHAN_DESC "Channel 31"
+#define CHAN_PORT 31
+
+uint8_t payload[RPMSG_BUF_SIZE];
+
+/*
+ * main.c
+ */
+void main() {
+ struct pru_rpmsg_transport transport;
+ uint16_t src, dst, len;
+
+ /* allow OCP master port access by the PRU so the PRU can read external memories */
+ CT_CFG.SYSCFG_bit.STANDBY_INIT = 0;
+
+ /* Initialize pru_virtqueue corresponding to vring0 (PRU to ARM Host direction) */
+ pru_virtqueue_init(&transport.virtqueue0, &resourceTable.rpmsg_vring0, &CT_MBX.MESSAGE[MB_TO_ARM_HOST], &CT_MBX.MESSAGE[MB_FROM_ARM_HOST]);
+
+ /* Initialize pru_virtqueue corresponding to vring1 (ARM Host to PRU direction) */
+ pru_virtqueue_init(&transport.virtqueue1, &resourceTable.rpmsg_vring1, &CT_MBX.MESSAGE[MB_TO_ARM_HOST], &CT_MBX.MESSAGE[MB_FROM_ARM_HOST]);
+
+ /* Create the RPMsg channel between the PRU and ARM user space using the transport structure.
+ * The name 'rpmsg-pru' corresponds to the rpmsg_pru driver found
+ * at linux-x.y.z/drivers/rpmsg/rpmsg_pru.c
+ */
+ while(pru_rpmsg_channel(RPMSG_NS_CREATE, &transport, CHAN_NAME, CHAN_DESC, CHAN_PORT) != PRU_RPMSG_SUCCESS);
+ while(1){
+ if(CT_MBX.MESSAGE[MB_FROM_ARM_HOST] == 1){
+ /* Receive the message */
+ if(pru_rpmsg_receive(&transport, &src, &dst, payload, &len) == PRU_RPMSG_SUCCESS){
+ /* Echo the message back to the same address from which we just received */
+ pru_rpmsg_send(&transport, dst, src, payload, len);
+ }
+ }
+ }
+}
diff --git a/examples/am437x/PRU_RPMsg_Echo_Polling1/resource_table_1.h b/examples/am437x/PRU_RPMsg_Echo_Polling1/resource_table_1.h
--- /dev/null
@@ -0,0 +1,118 @@
+/*\r
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/ \r
+ * \r
+ * \r
+ * Redistribution and use in source and binary forms, with or without \r
+ * modification, are permitted provided that the following conditions \r
+ * are met:\r
+ * \r
+ * * Redistributions of source code must retain the above copyright \r
+ * notice, this list of conditions and the following disclaimer.\r
+ * \r
+ * * Redistributions in binary form must reproduce the above copyright\r
+ * notice, this list of conditions and the following disclaimer in the \r
+ * documentation and/or other materials provided with the \r
+ * distribution.\r
+ * \r
+ * * Neither the name of Texas Instruments Incorporated nor the names of\r
+ * its contributors may be used to endorse or promote products derived\r
+ * from this software without specific prior written permission.\r
+ * \r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \r
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \r
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT \r
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \r
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \r
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \r
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE \r
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ */\r
+\r
+/*\r
+ * ======== rsc_table_am335x_pru.h ========\r
+ *\r
+ * Define the resource table entries for all PRU cores. This will be\r
+ * incorporated into corresponding base images, and used by the remoteproc\r
+ * on the host-side to allocated/reserve resources.\r
+ *\r
+ */\r
+\r
+\r
+#ifndef _RSC_TABLE_PRU_H_\r
+#define _RSC_TABLE_PRU_H_\r
+\r
+#include <stddef.h>\r
+#include <rsc_types.h>\r
+#include "pru_virtio_ids.h"\r
+\r
+/*\r
+ * Sizes of the virtqueues (expressed in number of buffers supported,\r
+ * and must be power of 2)\r
+ */\r
+#define PRU_RPMSG_VQ0_SIZE 16\r
+#define PRU_RPMSG_VQ1_SIZE 16\r
+\r
+/*\r
+ * The feature bitmap for virtio rpmsg\r
+ */\r
+#define VIRTIO_RPMSG_F_NS 0 //name service notifications\r
+\r
+/* This firmware supports name service notifications as one of its features */\r
+#define RPMSG_PRU_C0_FEATURES (1 << VIRTIO_RPMSG_F_NS)\r
+\r
+struct my_resource_table {\r
+ struct resource_table base;\r
+\r
+ uint32_t offset[1]; /* Should match 'num' in actual definition */\r
+\r
+ /* rpmsg vdev entry */\r
+ struct fw_rsc_vdev rpmsg_vdev;\r
+ struct fw_rsc_vdev_vring rpmsg_vring0;\r
+ struct fw_rsc_vdev_vring rpmsg_vring1;\r
+};\r
+\r
+#pragma DATA_SECTION(resourceTable, ".resource_table")\r
+#pragma RETAIN(resourceTable)\r
+struct my_resource_table resourceTable = {\r
+ 1, /* Resource table version: only version 1 is supported by the current driver */\r
+ 1, /* number of entries in the table */\r
+ 0, 0, /* reserved, must be zero */\r
+ /* offsets to entries */\r
+ {\r
+ offsetof(struct my_resource_table, rpmsg_vdev),\r
+ },\r
+\r
+ /* rpmsg vdev entry */\r
+ {\r
+ (uint32_t)TYPE_VDEV, //type\r
+ (uint32_t)VIRTIO_ID_RPMSG, //id\r
+ (uint32_t)0, //notifyid\r
+ (uint32_t)RPMSG_PRU_C0_FEATURES, //dfeatures\r
+ (uint32_t)0, //gfeatures\r
+ (uint32_t)0, //config_len\r
+ (uint8_t)0, //status\r
+ (uint8_t)2, //num_of_vrings, only two is supported\r
+ { (uint8_t)0, (uint8_t)0 }, //reserved\r
+ /* no config data */\r
+ },\r
+ /* the two vrings */\r
+ {\r
+ 0, //da, will be populated by host, can't pass it in\r
+ 16, //align (bytes),\r
+ PRU_RPMSG_VQ0_SIZE, //num of descriptors\r
+ 0, //notifyid, will be populated, can't pass right now\r
+ 0 //reserved\r
+ },\r
+ {\r
+ 0, //da, will be populated by host, can't pass it in\r
+ 16, //align (bytes),\r
+ PRU_RPMSG_VQ1_SIZE, //num of descriptors\r
+ 0, //notifyid, will be populated, can't pass right now\r
+ 0 //reserved\r
+ },\r
+};\r
+\r
+#endif /* _RSC_TABLE_PRU_H_ */\r
diff --git a/examples/am437x/PRU_access_const_table/.ccsproject b/examples/am437x/PRU_access_const_table/.ccsproject
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<?ccsproject version="1.0"?>
+<projectOptions>
+ <deviceVariant value="TMS192C2026.AM3359.BeagleBone_Black"/>
+ <deviceFamily value="PRU"/>
+ <deviceEndianness value="little"/>
+ <codegenToolVersion value="2.0.0.B2"/>
+ <isElfFormat value="true"/>
+ <rts value="libc.a"/>
+ <createSlaveProjects value=""/>
+ <templateProperties value="id=com.ti.common.project.core.emptyProjectTemplate,"/>
+ <isTargetManual value="false"/>
+</projectOptions>
diff --git a/examples/am437x/PRU_access_const_table/.cproject b/examples/am437x/PRU_access_const_table/.cproject
--- /dev/null
@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>\r
+<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">\r
+ <storageModule configRelations="2" moduleId="org.eclipse.cdt.core.settings">\r
+ <cconfiguration id="com.ti.ccstudio.buildDefinitions.PRU.Debug.1826805311">\r
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.PRU.Debug.1826805311" moduleId="org.eclipse.cdt.core.settings" name="Debug">\r
+ <externalSettings/>\r
+ <extensions>\r
+ <extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
+ <extension id="com.ti.ccstudio.errorparser.LinkErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
+ <extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
+ <extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/>\r
+ </extensions>\r
+ </storageModule>\r
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">\r
+ <configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" id="com.ti.ccstudio.buildDefinitions.PRU.Debug.1826805311" name="Debug" parent="com.ti.ccstudio.buildDefinitions.PRU.Debug" postbuildStep="" prebuildStep="">\r
+ <folderInfo id="com.ti.ccstudio.buildDefinitions.PRU.Debug.1826805311." name="/" resourcePath="">\r
+ <toolChain id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.DebugToolchain.1285794966" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.DebugToolchain" targetTool="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerDebug.443145251">\r
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.41977062" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">\r
+ <listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=TMS192C2026.AM4379.EVMAM437X"/>\r
+ <listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>\r
+ <listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>\r
+ <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.5.0"/>\r
+ <listOptionValue builtIn="false" value="LINKER_COMMAND_FILE="/>\r
+ <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/>\r
+ <listOptionValue builtIn="false" value="OUTPUT_TYPE=executable"/>\r
+ </option>\r
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1327522531" name="Compiler version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="2.1.1" valueType="string"/>\r
+ <targetPlatform id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformDebug.2112987060" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformDebug"/>\r
+ <builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderDebug.1597107298" keepEnvironmentInBuildfile="false" name="GNU Make" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderDebug"/>\r
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerDebug.1637932934" name="PRU Compiler" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerDebug">\r
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE.216276019" name="Pre-define NAME (--define, -D)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE" valueType="definedSymbols">\r
+ <listOptionValue builtIn="false" value="pru0"/>\r
+ <listOptionValue builtIn="false" value="am4379"/>\r
+ <listOptionValue builtIn="false" value="icss1"/>\r
+ </option>\r
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.SILICON_VERSION.812262343" 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"/>\r
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.410679104" 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"/>\r
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.1769087429" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">\r
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>\r
+ <listOptionValue builtIn="false" value=""../../../../include""/>\r
+ <listOptionValue builtIn="false" value=""../../../../include/am437x""/>\r
+ </option>\r
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEBUGGING_MODEL.247885346" 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"/>\r
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.584327114" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">\r
+ <listOptionValue builtIn="false" value="225"/>\r
+ </option>\r
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER.1964427241" 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"/>\r
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WRAP.300576266" 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"/>\r
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.1417774404" 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"/>\r
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS.2015673323" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS"/>\r
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS.1371849635" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS"/>\r
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS.1615847633" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS"/>\r
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS.1270324109" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS"/>\r
+ </tool>\r
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerDebug.443145251" name="PRU Linker" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerDebug">\r
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE.101243631" name="Pre-define preprocessor macro _name_ to _value_ (--define)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE" valueType="definedSymbols">\r
+ <listOptionValue builtIn="false" value="ICSS1_PRU_CORE=1"/>\r
+ </option>\r
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE.525234765" name="Set C system stack size (--stack_size, -stack)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE" value="0x100" valueType="string"/>\r
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE.1288511198" 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"/>\r
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE.287933492" name="Specify output file name (--output_file, -o)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE" value=""${ProjName}.out"" valueType="string"/>\r
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE.2113786738" 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"/>\r
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY.293519134" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY" valueType="libs">\r
+ <listOptionValue builtIn="false" value=""libc.a""/>\r
+ </option>\r
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH.1837698556" name="Add <dir> to library search path (--search_path, -i)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH" valueType="libPaths">\r
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/lib""/>\r
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>\r
+ </option>\r
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO.482354809" 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"/>\r
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS.522453440" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS"/>\r
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS.29632126" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS"/>\r
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS.1790384592" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS"/>\r
+ </tool>\r
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.1487797862" name="PRU Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex">\r
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.OUTPUT_FILE.658817975" name="Specify output file names (--outfile, -o)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.OUTPUT_FILE" value=""${BuildArtifactFileBaseName}.hex"" valueType="string"/>\r
+ </tool>\r
+ </toolChain>\r
+ </folderInfo>\r
+ <sourceEntries>\r
+ <entry excluding="AM335x_PRU.cmd|AM335x.cmd" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>\r
+ </sourceEntries>\r
+ </configuration>\r
+ </storageModule>\r
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>\r
+ </cconfiguration>\r
+ <cconfiguration id="com.ti.ccstudio.buildDefinitions.PRU.Release.235141862">\r
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.PRU.Release.235141862" moduleId="org.eclipse.cdt.core.settings" name="Release">\r
+ <externalSettings/>\r
+ <extensions>\r
+ <extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
+ <extension id="com.ti.ccstudio.errorparser.LinkErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
+ <extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
+ <extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/>\r
+ </extensions>\r
+ </storageModule>\r
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">\r
+ <configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" id="com.ti.ccstudio.buildDefinitions.PRU.Release.235141862" name="Release" parent="com.ti.ccstudio.buildDefinitions.PRU.Release" postbuildStep="" prebuildStep="">\r
+ <folderInfo id="com.ti.ccstudio.buildDefinitions.PRU.Release.235141862." name="/" resourcePath="">\r
+ <toolChain id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.ReleaseToolchain.2033769583" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.ReleaseToolchain" targetTool="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease.872679919">\r
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.1686788126" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">\r
+ <listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=TMS192C2026.AM4379.EVMAM437X"/>\r
+ <listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>\r
+ <listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>\r
+ <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.5.0"/>\r
+ <listOptionValue builtIn="false" value="LINKER_COMMAND_FILE="/>\r
+ <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/>\r
+ <listOptionValue builtIn="false" value="OUTPUT_TYPE=executable"/>\r
+ </option>\r
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.2059739382" name="Compiler version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="2.1.1" valueType="string"/>\r
+ <targetPlatform id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformRelease.1586865198" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformRelease"/>\r
+ <builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderRelease.897003333" keepEnvironmentInBuildfile="false" name="GNU Make" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderRelease"/>\r
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerRelease.306572436" name="PRU Compiler" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerRelease">\r
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE.619686976" name="Pre-define NAME (--define, -D)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE" valueType="definedSymbols">\r
+ <listOptionValue builtIn="false" value="pru0"/>\r
+ <listOptionValue builtIn="false" value="am4379"/>\r
+ <listOptionValue builtIn="false" value="icss1"/>\r
+ </option>\r
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.SILICON_VERSION.56574252" 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"/>\r
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.2146088883" 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"/>\r
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.258069553" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">\r
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>\r
+ <listOptionValue builtIn="false" value=""../../../../include""/>\r
+ <listOptionValue builtIn="false" value=""../../../../include/am437x""/>\r
+ </option>\r
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.1128068128" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">\r
+ <listOptionValue builtIn="false" value="225"/>\r
+ </option>\r
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER.1580186690" 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"/>\r
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WRAP.1729016295" 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"/>\r
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.109689057" 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"/>\r
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS.39856702" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS"/>\r
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS.1016344696" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS"/>\r
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS.135628601" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS"/>\r
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS.1879450362" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS"/>\r
+ </tool>\r
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease.872679919" name="PRU Linker" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease">\r
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE.805324727" name="Pre-define preprocessor macro _name_ to _value_ (--define)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE" valueType="definedSymbols">\r
+ <listOptionValue builtIn="false" value="ICSS1_PRU_CORE=1"/>\r
+ </option>\r
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE.583334029" name="Set C system stack size (--stack_size, -stack)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE" value="0x100" valueType="string"/>\r
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE.1535458671" 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"/>\r
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE.1079238798" name="Specify output file name (--output_file, -o)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE" value=""${ProjName}.out"" valueType="string"/>\r
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE.469600048" 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"/>\r
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY.196913204" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY" valueType="libs">\r
+ <listOptionValue builtIn="false" value=""libc.a""/>\r
+ </option>\r
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH.1649866476" name="Add <dir> to library search path (--search_path, -i)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH" valueType="libPaths">\r
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/lib""/>\r
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>\r
+ </option>\r
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO.1811225627" 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"/>\r
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS.904151406" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS"/>\r
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS.2027286290" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS"/>\r
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS.888220228" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS"/>\r
+ </tool>\r
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.812037200" name="PRU Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex">\r
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.OUTPUT_FILE.397023501" name="Specify output file names (--outfile, -o)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.OUTPUT_FILE" value=""${BuildArtifactFileBaseName}.hex"" valueType="string"/>\r
+ </tool>\r
+ </toolChain>\r
+ </folderInfo>\r
+ <sourceEntries>\r
+ <entry excluding="AM437x.cmd|AM335x.cmd" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>\r
+ </sourceEntries>\r
+ </configuration>\r
+ </storageModule>\r
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>\r
+ </cconfiguration>\r
+ </storageModule>\r
+ <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>\r
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">\r
+ <project id="PRU_access_const_table.com.ti.ccstudio.buildDefinitions.PRU.ProjectType.1535643121" name="PRU" projectType="com.ti.ccstudio.buildDefinitions.PRU.ProjectType"/>\r
+ </storageModule>\r
+ <storageModule moduleId="scannerConfiguration"/>\r
+ <storageModule moduleId="org.eclipse.cdt.core.language.mapping">\r
+ <project-mappings>\r
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.asmSource" language="com.ti.ccstudio.core.TIASMLanguage"/>\r
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cHeader" language="com.ti.ccstudio.core.TIGCCLanguage"/>\r
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cSource" language="com.ti.ccstudio.core.TIGCCLanguage"/>\r
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxHeader" language="com.ti.ccstudio.core.TIGPPLanguage"/>\r
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxSource" language="com.ti.ccstudio.core.TIGPPLanguage"/>\r
+ </project-mappings>\r
+ </storageModule>\r
+</cproject>\r
diff --git a/examples/am437x/PRU_access_const_table/.project b/examples/am437x/PRU_access_const_table/.project
--- /dev/null
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>PRU_access_const_table</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+ <triggers>full,incremental,</triggers>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.ti.ccstudio.core.ccsNature</nature>
+ <nature>org.eclipse.cdt.core.cnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+ <nature>org.eclipse.cdt.core.ccnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+ </natures>
+</projectDescription>
diff --git a/examples/am437x/PRU_access_const_table/.settings/org.eclipse.cdt.codan.core.prefs b/examples/am437x/PRU_access_const_table/.settings/org.eclipse.cdt.codan.core.prefs
--- /dev/null
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+inEditor=false
+onBuild=false
diff --git a/examples/am437x/PRU_access_const_table/.settings/org.eclipse.cdt.debug.core.prefs b/examples/am437x/PRU_access_const_table/.settings/org.eclipse.cdt.debug.core.prefs
--- /dev/null
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+org.eclipse.cdt.debug.core.toggleBreakpointModel=com.ti.ccstudio.debug.CCSBreakpointMarker
diff --git a/examples/am437x/PRU_access_const_table/AM437x_PRU_SS1.cmd b/examples/am437x/PRU_access_const_table/AM437x_PRU_SS1.cmd
--- /dev/null
@@ -0,0 +1,84 @@
+/****************************************************************************/
+/* AM437x_PRU_SS1.cmd */
+/* Copyright (c) 2015 Texas Instruments Incorporated */
+/* */
+/* Description: This file is a linker command file that can be used for */
+/* linking PRU programs built with the C compiler and */
+/* the resulting .out file on an AM437x device. */
+/****************************************************************************/
+
+-cr /* Link using C conventions */
+
+/* Specify the System Memory Map */
+MEMORY
+{
+ PAGE 0:
+ PRU_IMEM : org = 0x00000000 len = 0x00003000 /* 12kB PRU-ICSS1 Instruction RAM */
+
+ PAGE 1:
+
+ /* RAM */
+
+ PRU_DMEM_0_1 : org = 0x00000000 len = 0x00002000 CREGISTER=24 /* 8kB PRU Data RAM 0_1 */
+ PRU_DMEM_1_0 : org = 0x00002000 len = 0x00002000 CREGISTER=25 /* 8kB PRU Data RAM 1_0 */
+ PRU_SHAREDMEM : org = 0x00010000 len = 0x00008000 CREGISTER=28 /* 32kB Shared RAM */
+
+ DDR : org = 0x80000000 len = 0x00000100 CREGISTER=31
+ L3OCMC : org = 0x40000000 len = 0x00010000 CREGISTER=30
+
+
+ /* Peripherals */
+
+ PRU_CFG : org = 0x00026000 len = 0x00000120 CREGISTER=4
+ PRU_ECAP : org = 0x00030000 len = 0x00000060 CREGISTER=3
+ PRU_IEP : org = 0x0002E000 len = 0x0000031C CREGISTER=26
+ PRU_INTC : org = 0x00020000 len = 0x00001504 CREGISTER=0
+ PRU_UART : org = 0x00028000 len = 0x00000038 CREGISTER=7
+
+ DCAN0 : org = 0x481CC000 len = 0x000001E8 CREGISTER=14
+ DCAN1 : org = 0x481D0000 len = 0x000001E8 CREGISTER=15
+ DMTIMER2 : org = 0x48040000 len = 0x0000005C CREGISTER=1
+ PWMSS0 : org = 0x48300000 len = 0x000002C4 CREGISTER=18
+ PWMSS1 : org = 0x48302000 len = 0x000002C4 CREGISTER=19
+ PWMSS2 : org = 0x48304000 len = 0x000002C4 CREGISTER=20
+ GEMAC : org = 0x4A100000 len = 0x0000128C CREGISTER=9
+ I2C1 : org = 0x4802A000 len = 0x000000D8 CREGISTER=2
+ I2C2 : org = 0x4819C000 len = 0x000000D8 CREGISTER=17
+ MBX0 : org = 0x480C8000 len = 0x00000140 CREGISTER=22
+ MCASP0_DMA : org = 0x46000000 len = 0x00000100 CREGISTER=8
+ MCSPI0 : org = 0x48030000 len = 0x000001A4 CREGISTER=6
+ MCSPI1 : org = 0x481A0000 len = 0x000001A4 CREGISTER=16
+ MMCSD0 : org = 0x48060000 len = 0x00000300 CREGISTER=5
+ SPINLOCK : org = 0x480CA000 len = 0x00000880 CREGISTER=23
+ TPCC : org = 0x49000000 len = 0x00001098 CREGISTER=29
+ UART1 : org = 0x48022000 len = 0x00000088 CREGISTER=11
+ UART2 : org = 0x48024000 len = 0x00000088 CREGISTER=12
+
+ RSVD10 : org = 0x48318000 len = 0x00000100 CREGISTER=10
+ RSVD13 : org = 0x48310000 len = 0x00000100 CREGISTER=13
+ RSVD21 : org = 0x00032400 len = 0x00000100 CREGISTER=21
+ RSVD27 : org = 0x00032000 len = 0x00000100 CREGISTER=27
+
+}
+
+/* Specify the sections allocation into memory */
+SECTIONS {
+ /* Forces _c_int00 to the start of PRU IRAM. Not necessary when loading
+ an ELF file, but useful when loading a binary */
+ .text:_c_int00* > 0x0, PAGE 0
+
+ .text > PRU_IMEM, PAGE 0
+ .stack > PRU_DMEM_0_1, PAGE 1
+ .bss > PRU_DMEM_0_1, PAGE 1
+ .cio > PRU_DMEM_0_1, PAGE 1
+ .data > PRU_DMEM_0_1, PAGE 1
+ .switch > PRU_DMEM_0_1, PAGE 1
+ .sysmem > PRU_DMEM_0_1, PAGE 1
+ .cinit > PRU_DMEM_0_1, PAGE 1
+ .rodata > PRU_DMEM_0_1, PAGE 1
+ .rofardata > PRU_DMEM_0_1, PAGE 1
+ .farbss > PRU_DMEM_0_1, PAGE 1
+ .fardata > PRU_DMEM_0_1, PAGE 1
+
+ .resource_table > PRU_DMEM_0_1, PAGE 1
+}
diff --git a/examples/am437x/PRU_access_const_table/Makefile b/examples/am437x/PRU_access_const_table/Makefile
--- /dev/null
@@ -0,0 +1,86 @@
+# PRU_CGT environment variable must point to the TI PRU compiler directory. E.g.:
+#(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+#(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+ifndef PRU_CGT
+define ERROR_BODY
+
+************************************************************
+PRU_CGT environment variable is not set. Examples given:
+(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
+CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
+PROJ_NAME=$(CURRENT_DIR)
+LINKER_COMMAND_FILE=./AM437x_PRU_SS1.cmd
+LIBS=--library=../../../lib/rpmsg_lib.lib
+INCLUDE=--include_path=../../../include --include_path=../../../include/am437x
+STACK_SIZE=0x100
+HEAP_SIZE=0x100
+GEN_DIR=gen
+
+#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+CFLAGS=-v3 -O2 --display_error_number --endian=little --hardware_mac=on --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
+#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
+
+TARGET=$(GEN_DIR)/$(PROJ_NAME).out
+MAP=$(GEN_DIR)/$(PROJ_NAME).map
+SOURCES=$(wildcard *.c)
+#Using .object instead of .obj in order to not conflict with the CCS build process
+OBJECTS=$(patsubst %,$(GEN_DIR)/%,$(SOURCES:.c=.object))
+
+all: printStart $(TARGET) printEnd
+
+printStart:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Building project: $(PROJ_NAME)'
+
+printEnd:
+ @echo ''
+ @echo 'Finished building project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Invokes the linker (-z flag) to make the .out file
+$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
+ @echo ''
+ @echo 'Building target: $@'
+ @echo 'Invoking: PRU Linker'
+ $(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)
+ @echo 'Finished building target: $@'
+ @echo ''
+ @echo 'Output files can be found in the "$(GEN_DIR)" directory'
+
+# Invokes the compiler on all c files in the directory to create the object files
+$(GEN_DIR)/%.object: %.c
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+.PHONY: all clean
+
+# Remove the $(GEN_DIR) directory
+clean:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Cleaning project: $(PROJ_NAME)'
+ @echo ''
+ @echo 'Removing files in the "$(GEN_DIR)" directory'
+ @rm -rf $(GEN_DIR)
+ @echo ''
+ @echo 'Finished cleaning project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
+-include $(OBJECTS:%.object=%.pp)
+
diff --git a/examples/am437x/PRU_access_const_table/PRU_access_const_table.c b/examples/am437x/PRU_access_const_table/PRU_access_const_table.c
--- /dev/null
@@ -0,0 +1,119 @@
+/*
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <stdint.h>
+#include <pru_cfg.h>
+#include <pru_ctrl.h>
+#include "resource_table_empty.h"
+
+/* Mapping Constant Table (CT) registers to variables */
+volatile far uint8_t CT_MCSPI0 __attribute__((cregister("MCSPI0", near), peripheral));
+
+#ifndef PRU_SRAM
+#define PRU_SRAM __far __attribute__((cregister("PRU_SHAREDMEM", near)))
+#endif
+
+/* NOTE: Allocating shared_freq_x to PRU Shared Memory means that other PRU cores on
+ * the same subsystem must take care not to allocate data to that memory.
+ * Users also cannot rely on where in shared memory these variables are placed
+ * so accessing them from another PRU core or from the ARM is an undefined behavior.
+ */
+PRU_SRAM volatile uint32_t shared_freq_1;
+PRU_SRAM volatile uint32_t shared_freq_2;
+PRU_SRAM volatile uint32_t shared_freq_3;
+
+/* PRCM Registers */
+#define CM_PER_BASE ((volatile uint32_t *)(0x44E00000))
+#define SPI0_CLKCTRL (0x4C)
+#define ON (0x2)
+
+#define MCSPI0_MODULCTRL (*((volatile uint32_t*)(&CT_MCSPI0 + 0x128)))
+
+/* This is a char so that I can force access to R31.b0 for the host interrupt */
+volatile register uint8_t __R31;
+
+/* PRU-to-ARM interrupt */
+#define PRU_ARM_INTERRUPT (19+16)
+
+int main(){
+ uint32_t result;
+ volatile uint8_t *ptr_cm;
+
+ ptr_cm = CM_PER_BASE;
+
+ /*****************************************************************/
+ /* Access PRU peripherals using Constant Table & PRU header file */
+ /*****************************************************************/
+
+ /* Clear SYSCFG[STANDBY_INIT] to enable OCP master port */
+ CT_CFG.SYSCFG_bit.STANDBY_INIT = 0;
+
+ /* Read IEPCLK[OCP_EN] for IEP clock source */
+ result = CT_CFG.IEPCLK_bit.OCP_EN;
+
+
+ /*****************************************************************/
+ /* Access SoC peripherals using Constant Table */
+ /*****************************************************************/
+
+ /* Access PRCM (without CT) to initialize McSPI0 clock */
+ ptr_cm[SPI0_CLKCTRL] = ON;
+
+ /* Read McSPI0_MODULCTRL (offset 0x128)*/
+ result = MCSPI0_MODULCTRL;
+
+ /* Toggle MCSPI0_MODULCTRL[MS] (offset 0x128, bit 2) */
+ MCSPI0_MODULCTRL ^= 0x4;
+
+ /* Reset MCSPI0_MODULCTRL[MS] to original value */
+ MCSPI0_MODULCTRL = result;
+
+ /*****************************************************************/
+ /* Access PRU Shared RAM using Constant Table */
+ /*****************************************************************/
+
+ /* C28 defaults to 0x00000000, we need to set bits 23:8 to 0x0100 in order to have it point to 0x00010000 */
+ PRU0_CTRL.CTPPR0_bit.C28_POINTER = 0x0100;
+
+ /* Define value of shared_freq_1 */
+ shared_freq_1 = 1;
+
+ /* Read PRU Shared RAM Freq_1 memory */
+ if (shared_freq_1 == 1)
+ shared_freq_2 = shared_freq_2 + 1;
+ else
+ shared_freq_2 = shared_freq_3;
+
+ /* Halt PRU core */
+ __halt();
+}
diff --git a/examples/am437x/PRU_access_const_table/resource_table_empty.h b/examples/am437x/PRU_access_const_table/resource_table_empty.h
--- /dev/null
@@ -0,0 +1,72 @@
+/*\r
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/ \r
+ * \r
+ * \r
+ * Redistribution and use in source and binary forms, with or without \r
+ * modification, are permitted provided that the following conditions \r
+ * are met:\r
+ * \r
+ * * Redistributions of source code must retain the above copyright \r
+ * notice, this list of conditions and the following disclaimer.\r
+ * \r
+ * * Redistributions in binary form must reproduce the above copyright\r
+ * notice, this list of conditions and the following disclaimer in the \r
+ * documentation and/or other materials provided with the \r
+ * distribution.\r
+ * \r
+ * * Neither the name of Texas Instruments Incorporated nor the names of\r
+ * its contributors may be used to endorse or promote products derived\r
+ * from this software without specific prior written permission.\r
+ * \r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \r
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \r
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT \r
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \r
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \r
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \r
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE \r
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ */\r
+\r
+/*\r
+ * ======== resource_table_empty.h ========\r
+ *\r
+ * Define the resource table entries for all PRU cores. This will be\r
+ * incorporated into corresponding base images, and used by the remoteproc\r
+ * on the host-side to allocated/reserve resources. Note the remoteproc\r
+ * driver requires that all PRU firmware be built with a resource table.\r
+ *\r
+ * This file contains an empty resource table. It can be used either as:\r
+ *\r
+ * 1) A template, or\r
+ * 2) As-is if a PRU application does not need to configure PRU_INTC\r
+ * or interact with the rpmsg driver\r
+ *\r
+ */\r
+\r
+#ifndef _RSC_TABLE_PRU_H_\r
+#define _RSC_TABLE_PRU_H_\r
+\r
+#include <stddef.h>\r
+#include <rsc_types.h>\r
+\r
+struct my_resource_table {\r
+ struct resource_table base;\r
+\r
+ uint32_t offset[1]; /* Should match 'num' in actual definition */\r
+};\r
+\r
+#pragma DATA_SECTION(pru_remoteproc_ResourceTable, ".resource_table")\r
+#pragma RETAIN(pru_remoteproc_ResourceTable)\r
+struct my_resource_table pru_remoteproc_ResourceTable = {\r
+ 1, /* we're the first version that implements this */\r
+ 0, /* number of entries in the table */\r
+ 0, 0, /* reserved, must be zero */\r
+ 0, /* offset[0] */\r
+};\r
+\r
+#endif /* _RSC_TABLE_PRU_H_ */\r
+\r
diff --git a/examples/am437x/PRU_edmaConfig/.ccsproject b/examples/am437x/PRU_edmaConfig/.ccsproject
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<?ccsproject version="1.0"?>
+<projectOptions>
+ <deviceVariant value="TMS192C2026.AM3359.BeagleBone_Black"/>
+ <deviceFamily value="PRU"/>
+ <deviceEndianness value="little"/>
+ <codegenToolVersion value="2.0.0.B2"/>
+ <isElfFormat value="true"/>
+ <rts value="libc.a"/>
+ <createSlaveProjects value=""/>
+ <templateProperties value="id=com.ti.common.project.core.emptyProjectTemplate,"/>
+ <isTargetManual value="false"/>
+</projectOptions>
diff --git a/examples/am437x/PRU_edmaConfig/.cproject b/examples/am437x/PRU_edmaConfig/.cproject
--- /dev/null
@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+ <storageModule configRelations="2" moduleId="org.eclipse.cdt.core.settings">
+ <cconfiguration id="com.ti.ccstudio.buildDefinitions.PRU.Debug.876328915">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.PRU.Debug.876328915" moduleId="org.eclipse.cdt.core.settings" name="Debug">
+ <externalSettings/>
+ <extensions>
+ <extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.LinkErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" id="com.ti.ccstudio.buildDefinitions.PRU.Debug.876328915" name="Debug" parent="com.ti.ccstudio.buildDefinitions.PRU.Debug" postbuildStep="" prebuildStep="">
+ <folderInfo id="com.ti.ccstudio.buildDefinitions.PRU.Debug.876328915." name="/" resourcePath="">
+ <toolChain id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.DebugToolchain.1518893635" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.DebugToolchain" targetTool="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerDebug.1797451109">
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.77139874" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
+ <listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=TMS192C2026.AM4379.EVMAM437X"/>
+ <listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>
+ <listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>
+ <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.5.0"/>
+ <listOptionValue builtIn="false" value="LINKER_COMMAND_FILE="/>
+ <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/>
+ <listOptionValue builtIn="false" value="OUTPUT_TYPE=executable"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1795407884" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="2.1.1" valueType="string"/>
+ <targetPlatform id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformDebug.943776039" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformDebug"/>
+ <builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderDebug.289356354" name="GNU Make.Debug" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderDebug"/>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerDebug.720746825" name="PRU Compiler" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerDebug">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE.1516672081" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="pru0"/>
+ <listOptionValue builtIn="false" value="am4379"/>
+ <listOptionValue builtIn="false" value="icss1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.SILICON_VERSION.1144440527" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.1075470326" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.1209730770" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am437x""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEBUGGING_MODEL.1003395194" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.270741451" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">
+ <listOptionValue builtIn="false" value="225"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER.1056781639" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WRAP.382785499" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.1354316972" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN" value="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.little" valueType="enumerated"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS.1385835511" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS.731805975" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS.806282638" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS.1502912996" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerDebug.1797451109" name="PRU Linker" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerDebug">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE.1543514025" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="ICSS1_PRU_CORE=1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE.1714641641" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE" value="0x100" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE.1111582489" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE" value="0x100" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE.1380285758" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE" value=""${ProjName}.out"" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE.602782798" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE" value=""${ProjName}.map"" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY.1189025560" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY" valueType="libs">
+ <listOptionValue builtIn="false" value=""libc.a""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH.82843461" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH" valueType="libPaths">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/lib""/>
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO.1171944775" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO" value=""${ProjName}_linkInfo.xml"" valueType="string"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS.1793728732" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS.1785882164" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS.1508152454" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.934828133" name="PRU Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.OUTPUT_FILE.96154086" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.OUTPUT_FILE" value=""${BuildArtifactFileBaseName}.hex"" valueType="string"/>
+ </tool>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry excluding="AM437x.cmd|AM335x_PRU.cmd|AM335x.cmd" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ <cconfiguration id="com.ti.ccstudio.buildDefinitions.PRU.Release.1413564378">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.PRU.Release.1413564378" moduleId="org.eclipse.cdt.core.settings" name="Release">
+ <externalSettings/>
+ <extensions>
+ <extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.LinkErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" id="com.ti.ccstudio.buildDefinitions.PRU.Release.1413564378" name="Release" parent="com.ti.ccstudio.buildDefinitions.PRU.Release" postbuildStep="" prebuildStep="">
+ <folderInfo id="com.ti.ccstudio.buildDefinitions.PRU.Release.1413564378." name="/" resourcePath="">
+ <toolChain id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.ReleaseToolchain.392122107" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.ReleaseToolchain" targetTool="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease.1255759484">
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.1406023885" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
+ <listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=TMS192C2026.AM4379.EVMAM437X"/>
+ <listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>
+ <listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>
+ <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.5.0"/>
+ <listOptionValue builtIn="false" value="LINKER_COMMAND_FILE="/>
+ <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/>
+ <listOptionValue builtIn="false" value="OUTPUT_TYPE=executable"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1117913491" name="Compiler version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="2.1.1" valueType="string"/>
+ <targetPlatform id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformRelease.798911452" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformRelease"/>
+ <builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderRelease.131675223" keepEnvironmentInBuildfile="false" name="GNU Make" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderRelease"/>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerRelease.1959950932" name="PRU Compiler" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerRelease">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE.1420987298" name="Pre-define NAME (--define, -D)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="pru0"/>
+ <listOptionValue builtIn="false" value="am4379"/>
+ <listOptionValue builtIn="false" value="icss1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.SILICON_VERSION.1932662083" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.2139643485" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.489665269" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am437x""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.530597521" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">
+ <listOptionValue builtIn="false" value="225"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER.379936858" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WRAP.256312561" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.1016745722" 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"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS.1515324019" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS.1842095744" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS.308693553" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS.1875296501" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease.1255759484" name="PRU Linker" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE.2006441711" name="Pre-define preprocessor macro _name_ to _value_ (--define)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="ICSS1_PRU_CORE=1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE.219313619" name="Set C system stack size (--stack_size, -stack)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE" value="0x100" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE.284995107" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE.403244984" name="Specify output file name (--output_file, -o)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE" value=""${ProjName}.out"" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE.1736448954" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY.61089059" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY" valueType="libs">
+ <listOptionValue builtIn="false" value=""libc.a""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH.20920674" name="Add <dir> to library search path (--search_path, -i)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH" valueType="libPaths">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/lib""/>
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO.388269437" 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"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS.630280181" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS.214319866" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS.1393141994" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.1415381337" name="PRU Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.OUTPUT_FILE.1707450669" name="Specify output file names (--outfile, -o)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.OUTPUT_FILE" value=""${BuildArtifactFileBaseName}.hex"" valueType="string"/>
+ </tool>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry excluding="AM335x_PRU.cmd|AM335x.cmd" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <project id="PRU_edmaConfig.com.ti.ccstudio.buildDefinitions.PRU.ProjectType.990655853" name="PRU" projectType="com.ti.ccstudio.buildDefinitions.PRU.ProjectType"/>
+ </storageModule>
+ <storageModule moduleId="scannerConfiguration"/>
+ <storageModule moduleId="org.eclipse.cdt.core.language.mapping">
+ <project-mappings>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.asmSource" language="com.ti.ccstudio.core.TIASMLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cHeader" language="com.ti.ccstudio.core.TIGCCLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cSource" language="com.ti.ccstudio.core.TIGCCLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxHeader" language="com.ti.ccstudio.core.TIGPPLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxSource" language="com.ti.ccstudio.core.TIGPPLanguage"/>
+ </project-mappings>
+ </storageModule>
+</cproject>
diff --git a/examples/am437x/PRU_edmaConfig/.project b/examples/am437x/PRU_edmaConfig/.project
--- /dev/null
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>PRU_edmaConfig</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+ <triggers>full,incremental,</triggers>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.ti.ccstudio.core.ccsNature</nature>
+ <nature>org.eclipse.cdt.core.cnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+ <nature>org.eclipse.cdt.core.ccnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+ </natures>
+</projectDescription>
diff --git a/examples/am437x/PRU_edmaConfig/.settings/org.eclipse.cdt.codan.core.prefs b/examples/am437x/PRU_edmaConfig/.settings/org.eclipse.cdt.codan.core.prefs
--- /dev/null
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+inEditor=false
+onBuild=false
diff --git a/examples/am437x/PRU_edmaConfig/.settings/org.eclipse.cdt.debug.core.prefs b/examples/am437x/PRU_edmaConfig/.settings/org.eclipse.cdt.debug.core.prefs
--- /dev/null
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+org.eclipse.cdt.debug.core.toggleBreakpointModel=com.ti.ccstudio.debug.CCSBreakpointMarker
diff --git a/examples/am437x/PRU_edmaConfig/AM437x_PRU_SS1.cmd b/examples/am437x/PRU_edmaConfig/AM437x_PRU_SS1.cmd
--- /dev/null
@@ -0,0 +1,84 @@
+/****************************************************************************/
+/* AM437x_PRU_SS1.cmd */
+/* Copyright (c) 2015 Texas Instruments Incorporated */
+/* */
+/* Description: This file is a linker command file that can be used for */
+/* linking PRU programs built with the C compiler and */
+/* the resulting .out file on an AM437x device. */
+/****************************************************************************/
+
+-cr /* Link using C conventions */
+
+/* Specify the System Memory Map */
+MEMORY
+{
+ PAGE 0:
+ PRU_IMEM : org = 0x00000000 len = 0x00003000 /* 12kB PRU-ICSS1 Instruction RAM */
+
+ PAGE 1:
+
+ /* RAM */
+
+ PRU_DMEM_0_1 : org = 0x00000000 len = 0x00002000 CREGISTER=24 /* 8kB PRU Data RAM 0_1 */
+ PRU_DMEM_1_0 : org = 0x00002000 len = 0x00002000 CREGISTER=25 /* 8kB PRU Data RAM 1_0 */
+ PRU_SHAREDMEM : org = 0x00010000 len = 0x00008000 CREGISTER=28 /* 32kB Shared RAM */
+
+ DDR : org = 0x80000000 len = 0x00000100 CREGISTER=31
+ L3OCMC : org = 0x40000000 len = 0x00010000 CREGISTER=30
+
+
+ /* Peripherals */
+
+ PRU_CFG : org = 0x00026000 len = 0x00000120 CREGISTER=4
+ PRU_ECAP : org = 0x00030000 len = 0x00000060 CREGISTER=3
+ PRU_IEP : org = 0x0002E000 len = 0x0000031C CREGISTER=26
+ PRU_INTC : org = 0x00020000 len = 0x00001504 CREGISTER=0
+ PRU_UART : org = 0x00028000 len = 0x00000038 CREGISTER=7
+
+ DCAN0 : org = 0x481CC000 len = 0x000001E8 CREGISTER=14
+ DCAN1 : org = 0x481D0000 len = 0x000001E8 CREGISTER=15
+ DMTIMER2 : org = 0x48040000 len = 0x0000005C CREGISTER=1
+ PWMSS0 : org = 0x48300000 len = 0x000002C4 CREGISTER=18
+ PWMSS1 : org = 0x48302000 len = 0x000002C4 CREGISTER=19
+ PWMSS2 : org = 0x48304000 len = 0x000002C4 CREGISTER=20
+ GEMAC : org = 0x4A100000 len = 0x0000128C CREGISTER=9
+ I2C1 : org = 0x4802A000 len = 0x000000D8 CREGISTER=2
+ I2C2 : org = 0x4819C000 len = 0x000000D8 CREGISTER=17
+ MBX0 : org = 0x480C8000 len = 0x00000140 CREGISTER=22
+ MCASP0_DMA : org = 0x46000000 len = 0x00000100 CREGISTER=8
+ MCSPI0 : org = 0x48030000 len = 0x000001A4 CREGISTER=6
+ MCSPI1 : org = 0x481A0000 len = 0x000001A4 CREGISTER=16
+ MMCSD0 : org = 0x48060000 len = 0x00000300 CREGISTER=5
+ SPINLOCK : org = 0x480CA000 len = 0x00000880 CREGISTER=23
+ TPCC : org = 0x49000000 len = 0x00001098 CREGISTER=29
+ UART1 : org = 0x48022000 len = 0x00000088 CREGISTER=11
+ UART2 : org = 0x48024000 len = 0x00000088 CREGISTER=12
+
+ RSVD10 : org = 0x48318000 len = 0x00000100 CREGISTER=10
+ RSVD13 : org = 0x48310000 len = 0x00000100 CREGISTER=13
+ RSVD21 : org = 0x00032400 len = 0x00000100 CREGISTER=21
+ RSVD27 : org = 0x00032000 len = 0x00000100 CREGISTER=27
+
+}
+
+/* Specify the sections allocation into memory */
+SECTIONS {
+ /* Forces _c_int00 to the start of PRU IRAM. Not necessary when loading
+ an ELF file, but useful when loading a binary */
+ .text:_c_int00* > 0x0, PAGE 0
+
+ .text > PRU_IMEM, PAGE 0
+ .stack > PRU_DMEM_0_1, PAGE 1
+ .bss > PRU_DMEM_0_1, PAGE 1
+ .cio > PRU_DMEM_0_1, PAGE 1
+ .data > PRU_DMEM_0_1, PAGE 1
+ .switch > PRU_DMEM_0_1, PAGE 1
+ .sysmem > PRU_DMEM_0_1, PAGE 1
+ .cinit > PRU_DMEM_0_1, PAGE 1
+ .rodata > PRU_DMEM_0_1, PAGE 1
+ .rofardata > PRU_DMEM_0_1, PAGE 1
+ .farbss > PRU_DMEM_0_1, PAGE 1
+ .fardata > PRU_DMEM_0_1, PAGE 1
+
+ .resource_table > PRU_DMEM_0_1, PAGE 1
+}
diff --git a/examples/am437x/PRU_edmaConfig/Makefile b/examples/am437x/PRU_edmaConfig/Makefile
--- /dev/null
@@ -0,0 +1,86 @@
+# PRU_CGT environment variable must point to the TI PRU compiler directory. E.g.:
+#(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+#(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+ifndef PRU_CGT
+define ERROR_BODY
+
+************************************************************
+PRU_CGT environment variable is not set. Examples given:
+(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
+CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
+PROJ_NAME=$(CURRENT_DIR)
+LINKER_COMMAND_FILE=./AM437x_PRU_SS1.cmd
+LIBS=--library=../../../lib/rpmsg_lib.lib
+INCLUDE=--include_path=../../../include --include_path=../../../include/am437x
+STACK_SIZE=0x100
+HEAP_SIZE=0x100
+GEN_DIR=gen
+
+#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+CFLAGS=-v3 -O2 --display_error_number --endian=little --hardware_mac=on --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
+#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
+
+TARGET=$(GEN_DIR)/$(PROJ_NAME).out
+MAP=$(GEN_DIR)/$(PROJ_NAME).map
+SOURCES=$(wildcard *.c)
+#Using .object instead of .obj in order to not conflict with the CCS build process
+OBJECTS=$(patsubst %,$(GEN_DIR)/%,$(SOURCES:.c=.object))
+
+all: printStart $(TARGET) printEnd
+
+printStart:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Building project: $(PROJ_NAME)'
+
+printEnd:
+ @echo ''
+ @echo 'Finished building project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Invokes the linker (-z flag) to make the .out file
+$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
+ @echo ''
+ @echo 'Building target: $@'
+ @echo 'Invoking: PRU Linker'
+ $(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)
+ @echo 'Finished building target: $@'
+ @echo ''
+ @echo 'Output files can be found in the "$(GEN_DIR)" directory'
+
+# Invokes the compiler on all c files in the directory to create the object files
+$(GEN_DIR)/%.object: %.c
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+.PHONY: all clean
+
+# Remove the $(GEN_DIR) directory
+clean:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Cleaning project: $(PROJ_NAME)'
+ @echo ''
+ @echo 'Removing files in the "$(GEN_DIR)" directory'
+ @rm -rf $(GEN_DIR)
+ @echo ''
+ @echo 'Finished cleaning project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
+-include $(OBJECTS:%.object=%.pp)
+
diff --git a/examples/am437x/PRU_edmaConfig/PRU_edmaConfig.c b/examples/am437x/PRU_edmaConfig/PRU_edmaConfig.c
--- /dev/null
@@ -0,0 +1,269 @@
+/*
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <stdint.h>
+#include <pru_cfg.h>
+#include "resource_table_empty.h"
+
+volatile register uint32_t __R30;
+volatile register uint32_t __R31;
+
+/* 1D Transfer Parameters */
+typedef struct{
+ uint32_t src;
+ uint32_t dst;
+ uint32_t chan;
+} hostBuffer;
+
+/* EDMA PARAM registers */
+typedef struct{
+ uint32_t sam : 1;
+ uint32_t dam : 1;
+ uint32_t syncdim : 1;
+ uint32_t static_set : 1;
+ uint32_t : 4;
+ uint32_t fwid : 3;
+ uint32_t tccmode : 1;
+ uint32_t tcc : 6;
+ uint32_t : 2;
+ uint32_t tcinten : 1;
+ uint32_t itcinten : 1;
+ uint32_t tcchen : 1;
+ uint32_t itcchen : 1;
+ uint32_t privid : 4;
+ uint32_t : 3;
+ uint32_t priv : 1;
+} edmaParamOpt;
+
+/*typedef struct{
+ uint32_t src;
+} edmaParamSrc;*/
+
+typedef struct{
+ uint32_t acnt : 16;
+ uint32_t bcnt : 16;
+} edmaParamABcnt;
+
+/*typedef struct{
+ uint32_t dst;
+} edmaParamDst;*/
+
+typedef struct{
+ uint32_t srcbidx : 16;
+ uint32_t dstbidx : 16;
+} edmaParamBidx;
+
+typedef struct{
+ uint32_t link : 16;
+ uint32_t bcntrld : 16;
+} edmaParamLnkRld;
+
+typedef struct{
+ uint32_t srccidx : 16;
+ uint32_t dstcidx : 16;
+} edmaParamCidx;
+
+typedef struct{
+ uint32_t ccnt : 16;
+ uint32_t : 16;
+} edmaParamCcnt;
+
+typedef struct{
+ edmaParamOpt opt;
+ /*edmaParamSrc*/ uint32_t src;
+ edmaParamABcnt abcnt;
+ /*edmaParamDst*/ uint32_t dst;
+ edmaParamBidx bidx;
+ edmaParamLnkRld lnkrld;
+ edmaParamCidx cidx;
+ edmaParamCcnt ccnt;
+} edmaParam;
+
+/* This is a compiler hack so that the PRU knows where the parameters are stored
+ * This is effectively a pointer to DRAM
+ */
+#pragma LOCATION(buf, 0)
+hostBuffer buf;
+
+/* Addresses for Constant Table pointer registers
+ * CTBIR_0 -> C24 (PRU0 DRAM)
+ * CTBIR_1 -> C25 (PRU1 DRAM)
+ */
+#define CTBIR_0 (*(volatile uint32_t *)(0x22020))
+#define CTBIR_1 (*(volatile uint32_t *)(0x22024))
+
+/* EDMA Channel Registers */
+#define CM_PER_BASE ((volatile uint32_t *)(0x44E00000))
+#define TPTC0_CLKCTRL (0x24 / 4)
+#define TPCC_CLKCTRL (0xBC / 4)
+#define ON (0x2)
+
+/* EDMA Channel Registers */
+#define EDMA0_CC_BASE ((volatile uint32_t *)(0x49000000))
+#define DMAQNUM0 (0x0240 / 4)
+#define DMAQNUM1 (0x0244 / 4)
+#define DCHMAP_10 (0x0128 / 4)
+#define QUEPRI (0x0284 / 4)
+#define EMR (0x0300 / 4)
+#define EMCR (0x0307 / 4)
+#define EMCRH (0x030C / 4)
+#define QEMCR (0x0314 / 4)
+#define CCERRCLR (0x031C / 4)
+#define DRAE0 (0x0340 / 4)
+#define DRAE1 (0x0348 / 4)
+#define DRAE2 (0x0350 / 4)
+#define DRAE3 (0x0358 / 4)
+#define QWMTHRA (0x0620 / 4)
+#define GLOBAL_ESR (0x1010 / 4)
+#define GLOBAL_ESRH (0x1014 / 4)
+#define GLOBAL_EECR (0x1028 / 4)
+#define GLOBAL_EECRH (0x102C / 4)
+#define GLOBAL_SECR (0x1040 / 4)
+#define GLOBAL_SECRH (0x1044 / 4)
+#define GLOBAL_IESR (0x1060 / 4)
+#define GLOBAL_IESRH (0x1064 / 4)
+#define GLOBAL_ICR (0x1070 / 4)
+#define GLOBAL_ICRH (0x1074 / 4)
+
+/* EDMA Shadow Region 1 */
+#define ESR (0x2210 / 4)
+#define ESRH (0x2214 / 4)
+#define EESR (0x1030 / 4)
+#define EECR (0x2228 / 4)
+#define EECRH (0x222C / 4)
+#define SECR (0x2240 / 4)
+#define SECRH (0x2244 / 4)
+#define IPR (0x2268 / 4)
+#define IPRH (0x226C / 4)
+#define ICR (0x2270 / 4)
+#define ICRH (0x2274 / 4)
+#define IESR (0x2260 / 4)
+#define IESRH (0x2264 / 4)
+#define IEVAL (0x2278 / 4)
+#define IECR (0x2258 / 4)
+#define IECRH (0x225C / 4)
+
+/* EDMA PARAM registers */
+#define PARAM_OFFSET (0x4000 / 4)
+#define OPT 0x00
+#define SRC 0x04
+#define ACNT 0x100
+#define BCNT 0x1
+#define DST 0x0C
+#define SRC_DST_BIDX 0x10
+#define LINK_BCNTRLD 0x14
+#define SRC_DST_CIDX 0x18
+#define CCNT 0x1
+
+
+#define COPY_LENGTH 32
+
+void main(){
+ hostBuffer hostData;
+ uint32_t channelMask;
+ uint16_t paramOffset;
+ edmaParam params;
+ volatile uint32_t *ptr;
+ volatile uint32_t *ptr_cm;
+ volatile edmaParam *pParams;
+
+ ptr = EDMA0_CC_BASE;
+ ptr_cm = CM_PER_BASE;
+
+ /* Clear SYSCFG[STANDBY_INIT] to enable OCP master port */
+ CT_CFG.SYSCFG_bit.STANDBY_INIT = 0;
+
+ ptr_cm[TPTC0_CLKCTRL] = ON;
+ ptr_cm[TPCC_CLKCTRL] = ON;
+
+ /* Load channel parameters from DRAM - loaded by host */
+ hostData.src = /*buf.src*/ 0x4A310000; //PRU Shared memory
+ hostData.dst = /*buf.dst*/ 0x4A310100; //PRU Shared memory
+ hostData.chan = /*buf.chan*/ 10;
+
+ channelMask = (1 << hostData.chan);
+
+ /* Map Channel 10 to PaRAM 10 */
+ ptr[DCHMAP_10] = (hostData.chan << 5);
+
+ /* Setup EDMA region access for Shadow Region 1 */
+ ptr[DRAE1] |= channelMask;
+
+ /* Clear channel event from EDMA event registers */
+ ptr[SECR] |= channelMask;
+ ptr[ICR] |= channelMask;
+
+ /* Enable channel interrupt */
+ ptr[IESR] |= channelMask;
+
+ /* Enable channel */
+ ptr[EESR] |= channelMask;
+
+ /* Clear event missed register */
+ ptr[EMCR] |= channelMask;
+
+ /* Setup channel to submit to EDMA TC0 */
+ ptr[DMAQNUM1] &= 0xFFFFF0FF;
+
+ /* Setup and store PaRAM set for transfer */
+ paramOffset = PARAM_OFFSET;
+ /* channel * 0x20, word address */
+ paramOffset += ((hostData.chan << 5) / 4);
+
+ params.lnkrld.link = 0xFFFF;
+ params.lnkrld.bcntrld = 0x0000;
+ params.opt.tcc = hostData.chan;
+ params.opt.tcinten = 1;
+ params.opt.itcchen = 1;
+
+ params.ccnt.ccnt = CCNT;
+ params.abcnt.acnt = ACNT;
+ params.abcnt.bcnt = BCNT;
+ params.bidx.srcbidx = 0x1;
+ params.bidx.dstbidx = 0x1;
+ params.src = hostData.src;
+ params.dst = hostData.dst;
+
+ pParams = (volatile edmaParam *)(ptr + paramOffset);
+ *pParams = params;
+
+ /* Trigger transfer */
+ ptr[ESR] = (channelMask);
+
+ /* Wait for transfer completion */
+ while (!(ptr[IPR] & channelMask)){
+ }
+
+ /* Halt PRU core */
+ __halt();
+}
diff --git a/examples/am437x/PRU_edmaConfig/resource_table_empty.h b/examples/am437x/PRU_edmaConfig/resource_table_empty.h
--- /dev/null
@@ -0,0 +1,72 @@
+/*\r
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/ \r
+ * \r
+ * \r
+ * Redistribution and use in source and binary forms, with or without \r
+ * modification, are permitted provided that the following conditions \r
+ * are met:\r
+ * \r
+ * * Redistributions of source code must retain the above copyright \r
+ * notice, this list of conditions and the following disclaimer.\r
+ * \r
+ * * Redistributions in binary form must reproduce the above copyright\r
+ * notice, this list of conditions and the following disclaimer in the \r
+ * documentation and/or other materials provided with the \r
+ * distribution.\r
+ * \r
+ * * Neither the name of Texas Instruments Incorporated nor the names of\r
+ * its contributors may be used to endorse or promote products derived\r
+ * from this software without specific prior written permission.\r
+ * \r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \r
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \r
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT \r
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \r
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \r
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \r
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE \r
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ */\r
+\r
+/*\r
+ * ======== resource_table_empty.h ========\r
+ *\r
+ * Define the resource table entries for all PRU cores. This will be\r
+ * incorporated into corresponding base images, and used by the remoteproc\r
+ * on the host-side to allocated/reserve resources. Note the remoteproc\r
+ * driver requires that all PRU firmware be built with a resource table.\r
+ *\r
+ * This file contains an empty resource table. It can be used either as:\r
+ *\r
+ * 1) A template, or\r
+ * 2) As-is if a PRU application does not need to configure PRU_INTC\r
+ * or interact with the rpmsg driver\r
+ *\r
+ */\r
+\r
+#ifndef _RSC_TABLE_PRU_H_\r
+#define _RSC_TABLE_PRU_H_\r
+\r
+#include <stddef.h>\r
+#include <rsc_types.h>\r
+\r
+struct my_resource_table {\r
+ struct resource_table base;\r
+\r
+ uint32_t offset[1]; /* Should match 'num' in actual definition */\r
+};\r
+\r
+#pragma DATA_SECTION(pru_remoteproc_ResourceTable, ".resource_table")\r
+#pragma RETAIN(pru_remoteproc_ResourceTable)\r
+struct my_resource_table pru_remoteproc_ResourceTable = {\r
+ 1, /* we're the first version that implements this */\r
+ 0, /* number of entries in the table */\r
+ 0, 0, /* reserved, must be zero */\r
+ 0, /* offset[0] */\r
+};\r
+\r
+#endif /* _RSC_TABLE_PRU_H_ */\r
+\r
diff --git a/examples/am437x/PRU_gpioToggle/.ccsproject b/examples/am437x/PRU_gpioToggle/.ccsproject
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<?ccsproject version="1.0"?>
+<projectOptions>
+ <deviceVariant value="TMS192C2026.AM3359.BeagleBone_Black"/>
+ <deviceFamily value="PRU"/>
+ <deviceEndianness value="little"/>
+ <codegenToolVersion value="2.0.0.B2"/>
+ <isElfFormat value="true"/>
+ <rts value="libc.a"/>
+ <createSlaveProjects value=""/>
+ <templateProperties value="id=com.ti.common.project.core.emptyProjectTemplate,"/>
+ <isTargetManual value="false"/>
+</projectOptions>
diff --git a/examples/am437x/PRU_gpioToggle/.cproject b/examples/am437x/PRU_gpioToggle/.cproject
--- /dev/null
@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+ <storageModule configRelations="2" moduleId="org.eclipse.cdt.core.settings">
+ <cconfiguration id="com.ti.ccstudio.buildDefinitions.PRU.Debug.1529607746">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.PRU.Debug.1529607746" moduleId="org.eclipse.cdt.core.settings" name="Debug">
+ <externalSettings/>
+ <extensions>
+ <extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.LinkErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" id="com.ti.ccstudio.buildDefinitions.PRU.Debug.1529607746" name="Debug" parent="com.ti.ccstudio.buildDefinitions.PRU.Debug" postbuildStep="" prebuildStep="">
+ <folderInfo id="com.ti.ccstudio.buildDefinitions.PRU.Debug.1529607746." name="/" resourcePath="">
+ <toolChain id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.DebugToolchain.1213963061" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.DebugToolchain" targetTool="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerDebug.1081657923">
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.1834546528" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
+ <listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=TMS192C2026.AM4379.EVMAM437X"/>
+ <listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>
+ <listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>
+ <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.5.0"/>
+ <listOptionValue builtIn="false" value="LINKER_COMMAND_FILE="/>
+ <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/>
+ <listOptionValue builtIn="false" value="OUTPUT_TYPE=executable"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.515556359" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="2.1.1" valueType="string"/>
+ <targetPlatform id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformDebug.748824752" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformDebug"/>
+ <builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderDebug.1175048052" name="GNU Make.Debug" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderDebug"/>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerDebug.377468461" name="PRU Compiler" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerDebug">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE.984584760" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="pru0"/>
+ <listOptionValue builtIn="false" value="am4379"/>
+ <listOptionValue builtIn="false" value="icss1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.SILICON_VERSION.1475969774" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.1481766963" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.281562125" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am437x""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEBUGGING_MODEL.1646219998" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.178848699" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">
+ <listOptionValue builtIn="false" value="225"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER.1137357839" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WRAP.2057626518" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.2019825975" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN" value="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.little" valueType="enumerated"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS.930020442" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS.50221935" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS.1669734544" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS.396589403" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerDebug.1081657923" name="PRU Linker" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerDebug">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE.554743393" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="ICSS1_PRU_CORE=1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE.1517473122" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE" value="0x100" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE.1859175820" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE" value="0x100" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE.638542592" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE" value=""${ProjName}.out"" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE.1139934141" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE" value=""${ProjName}.map"" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY.1064712062" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY" valueType="libs">
+ <listOptionValue builtIn="false" value=""libc.a""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH.480255257" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH" valueType="libPaths">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/lib""/>
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO.947620203" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO" value=""${ProjName}_linkInfo.xml"" valueType="string"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS.1293610822" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS.1265938490" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS.151440853" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.738024223" name="PRU Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.OUTPUT_FILE.1881771647" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.OUTPUT_FILE" value=""${BuildArtifactFileBaseName}.hex"" valueType="string"/>
+ </tool>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry excluding="AM437x.cmd|AM335x_PRU.cmd|AM335x.cmd" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ <cconfiguration id="com.ti.ccstudio.buildDefinitions.PRU.Release.585090591">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.PRU.Release.585090591" moduleId="org.eclipse.cdt.core.settings" name="Release">
+ <externalSettings/>
+ <extensions>
+ <extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.LinkErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" id="com.ti.ccstudio.buildDefinitions.PRU.Release.585090591" name="Release" parent="com.ti.ccstudio.buildDefinitions.PRU.Release" postbuildStep="" prebuildStep="">
+ <folderInfo id="com.ti.ccstudio.buildDefinitions.PRU.Release.585090591." name="/" resourcePath="">
+ <toolChain id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.ReleaseToolchain.134827584" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.ReleaseToolchain" targetTool="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease.1183561325">
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.1996233239" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
+ <listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=TMS192C2026.AM4379.EVMAM437X"/>
+ <listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>
+ <listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>
+ <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.5.0"/>
+ <listOptionValue builtIn="false" value="LINKER_COMMAND_FILE="/>
+ <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/>
+ <listOptionValue builtIn="false" value="OUTPUT_TYPE=executable"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.798932978" name="Compiler version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="2.1.1" valueType="string"/>
+ <targetPlatform id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformRelease.425583866" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.targetPlatformRelease"/>
+ <builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderRelease.483816833" keepEnvironmentInBuildfile="false" name="GNU Make" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.builderRelease"/>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerRelease.81186442" name="PRU Compiler" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.compilerRelease">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE.763819605" name="Pre-define NAME (--define, -D)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="pru0"/>
+ <listOptionValue builtIn="false" value="am4379"/>
+ <listOptionValue builtIn="false" value="icss1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.SILICON_VERSION.2081185862" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.HARDWARE_MAC.1535397074" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH.1578101332" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.INCLUDE_PATH" valueType="includePath">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ <listOptionValue builtIn="false" value=""../../../../include""/>
+ <listOptionValue builtIn="false" value=""../../../../include/am437x""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING.435109314" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WARNING" valueType="stringList">
+ <listOptionValue builtIn="false" value="225"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DISPLAY_ERROR_NUMBER.1753280392" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.DIAG_WRAP.1179832091" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compilerID.ENDIAN.1939106803" 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"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS.2111980138" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__C_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS.1113614212" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__CPP_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS.87551617" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS.1908840241" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.compiler.inputType__ASM2_SRCS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease.1183561325" name="PRU Linker" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exe.linkerRelease">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE.1937610431" name="Pre-define preprocessor macro _name_ to _value_ (--define)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.DEFINE" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="ICSS1_PRU_CORE=1"/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE.51998678" name="Set C system stack size (--stack_size, -stack)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.STACK_SIZE" value="0x100" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.HEAP_SIZE.146681898" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE.430779592" name="Specify output file name (--output_file, -o)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.OUTPUT_FILE" value=""${ProjName}.out"" valueType="string"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.MAP_FILE.496992230" 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"/>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY.172052747" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.LIBRARY" valueType="libs">
+ <listOptionValue builtIn="false" value=""libc.a""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH.737798855" name="Add <dir> to library search path (--search_path, -i)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.SEARCH_PATH" valueType="libPaths">
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/lib""/>
+ <listOptionValue builtIn="false" value=""${CG_TOOL_ROOT}/include""/>
+ </option>
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.linkerID.XML_LINK_INFO.1073497004" 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"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS.1447907902" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS.668300271" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__CMD2_SRCS"/>
+ <inputType id="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS.2105563696" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.exeLinker.inputType__GEN_CMDS"/>
+ </tool>
+ <tool id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.182631683" name="PRU Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex">
+ <option id="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.OUTPUT_FILE.1732374755" name="Specify output file names (--outfile, -o)" superClass="com.ti.ccstudio.buildDefinitions.PRU_2.1.hex.OUTPUT_FILE" value=""${BuildArtifactFileBaseName}.hex"" valueType="string"/>
+ </tool>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry excluding="AM335x_PRU.cmd|AM335x.cmd" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <project id="PRU_gpioToggle.com.ti.ccstudio.buildDefinitions.PRU.ProjectType.738247740" name="PRU" projectType="com.ti.ccstudio.buildDefinitions.PRU.ProjectType"/>
+ </storageModule>
+ <storageModule moduleId="scannerConfiguration"/>
+ <storageModule moduleId="org.eclipse.cdt.core.language.mapping">
+ <project-mappings>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.asmSource" language="com.ti.ccstudio.core.TIASMLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cHeader" language="com.ti.ccstudio.core.TIGCCLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cSource" language="com.ti.ccstudio.core.TIGCCLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxHeader" language="com.ti.ccstudio.core.TIGPPLanguage"/>
+ <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxSource" language="com.ti.ccstudio.core.TIGPPLanguage"/>
+ </project-mappings>
+ </storageModule>
+</cproject>
diff --git a/examples/am437x/PRU_gpioToggle/.project b/examples/am437x/PRU_gpioToggle/.project
--- /dev/null
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>PRU_gpioToggle</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+ <triggers>full,incremental,</triggers>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.ti.ccstudio.core.ccsNature</nature>
+ <nature>org.eclipse.cdt.core.cnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+ <nature>org.eclipse.cdt.core.ccnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+ </natures>
+</projectDescription>
diff --git a/examples/am437x/PRU_gpioToggle/.settings/org.eclipse.cdt.codan.core.prefs b/examples/am437x/PRU_gpioToggle/.settings/org.eclipse.cdt.codan.core.prefs
--- /dev/null
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+inEditor=false
+onBuild=false
diff --git a/examples/am437x/PRU_gpioToggle/.settings/org.eclipse.cdt.debug.core.prefs b/examples/am437x/PRU_gpioToggle/.settings/org.eclipse.cdt.debug.core.prefs
--- /dev/null
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+org.eclipse.cdt.debug.core.toggleBreakpointModel=com.ti.ccstudio.debug.CCSBreakpointMarker
diff --git a/examples/am437x/PRU_gpioToggle/AM437x_PRU_SS1.cmd b/examples/am437x/PRU_gpioToggle/AM437x_PRU_SS1.cmd
--- /dev/null
@@ -0,0 +1,84 @@
+/****************************************************************************/
+/* AM437x_PRU_SS1.cmd */
+/* Copyright (c) 2015 Texas Instruments Incorporated */
+/* */
+/* Description: This file is a linker command file that can be used for */
+/* linking PRU programs built with the C compiler and */
+/* the resulting .out file on an AM437x device. */
+/****************************************************************************/
+
+-cr /* Link using C conventions */
+
+/* Specify the System Memory Map */
+MEMORY
+{
+ PAGE 0:
+ PRU_IMEM : org = 0x00000000 len = 0x00003000 /* 12kB PRU-ICSS1 Instruction RAM */
+
+ PAGE 1:
+
+ /* RAM */
+
+ PRU_DMEM_0_1 : org = 0x00000000 len = 0x00002000 CREGISTER=24 /* 8kB PRU Data RAM 0_1 */
+ PRU_DMEM_1_0 : org = 0x00002000 len = 0x00002000 CREGISTER=25 /* 8kB PRU Data RAM 1_0 */
+ PRU_SHAREDMEM : org = 0x00010000 len = 0x00008000 CREGISTER=28 /* 32kB Shared RAM */
+
+ DDR : org = 0x80000000 len = 0x00000100 CREGISTER=31
+ L3OCMC : org = 0x40000000 len = 0x00010000 CREGISTER=30
+
+
+ /* Peripherals */
+
+ PRU_CFG : org = 0x00026000 len = 0x00000120 CREGISTER=4
+ PRU_ECAP : org = 0x00030000 len = 0x00000060 CREGISTER=3
+ PRU_IEP : org = 0x0002E000 len = 0x0000031C CREGISTER=26
+ PRU_INTC : org = 0x00020000 len = 0x00001504 CREGISTER=0
+ PRU_UART : org = 0x00028000 len = 0x00000038 CREGISTER=7
+
+ DCAN0 : org = 0x481CC000 len = 0x000001E8 CREGISTER=14
+ DCAN1 : org = 0x481D0000 len = 0x000001E8 CREGISTER=15
+ DMTIMER2 : org = 0x48040000 len = 0x0000005C CREGISTER=1
+ PWMSS0 : org = 0x48300000 len = 0x000002C4 CREGISTER=18
+ PWMSS1 : org = 0x48302000 len = 0x000002C4 CREGISTER=19
+ PWMSS2 : org = 0x48304000 len = 0x000002C4 CREGISTER=20
+ GEMAC : org = 0x4A100000 len = 0x0000128C CREGISTER=9
+ I2C1 : org = 0x4802A000 len = 0x000000D8 CREGISTER=2
+ I2C2 : org = 0x4819C000 len = 0x000000D8 CREGISTER=17
+ MBX0 : org = 0x480C8000 len = 0x00000140 CREGISTER=22
+ MCASP0_DMA : org = 0x46000000 len = 0x00000100 CREGISTER=8
+ MCSPI0 : org = 0x48030000 len = 0x000001A4 CREGISTER=6
+ MCSPI1 : org = 0x481A0000 len = 0x000001A4 CREGISTER=16
+ MMCSD0 : org = 0x48060000 len = 0x00000300 CREGISTER=5
+ SPINLOCK : org = 0x480CA000 len = 0x00000880 CREGISTER=23
+ TPCC : org = 0x49000000 len = 0x00001098 CREGISTER=29
+ UART1 : org = 0x48022000 len = 0x00000088 CREGISTER=11
+ UART2 : org = 0x48024000 len = 0x00000088 CREGISTER=12
+
+ RSVD10 : org = 0x48318000 len = 0x00000100 CREGISTER=10
+ RSVD13 : org = 0x48310000 len = 0x00000100 CREGISTER=13
+ RSVD21 : org = 0x00032400 len = 0x00000100 CREGISTER=21
+ RSVD27 : org = 0x00032000 len = 0x00000100 CREGISTER=27
+
+}
+
+/* Specify the sections allocation into memory */
+SECTIONS {
+ /* Forces _c_int00 to the start of PRU IRAM. Not necessary when loading
+ an ELF file, but useful when loading a binary */
+ .text:_c_int00* > 0x0, PAGE 0
+
+ .text > PRU_IMEM, PAGE 0
+ .stack > PRU_DMEM_0_1, PAGE 1
+ .bss > PRU_DMEM_0_1, PAGE 1
+ .cio > PRU_DMEM_0_1, PAGE 1
+ .data > PRU_DMEM_0_1, PAGE 1
+ .switch > PRU_DMEM_0_1, PAGE 1
+ .sysmem > PRU_DMEM_0_1, PAGE 1
+ .cinit > PRU_DMEM_0_1, PAGE 1
+ .rodata > PRU_DMEM_0_1, PAGE 1
+ .rofardata > PRU_DMEM_0_1, PAGE 1
+ .farbss > PRU_DMEM_0_1, PAGE 1
+ .fardata > PRU_DMEM_0_1, PAGE 1
+
+ .resource_table > PRU_DMEM_0_1, PAGE 1
+}
diff --git a/examples/am437x/PRU_gpioToggle/Makefile b/examples/am437x/PRU_gpioToggle/Makefile
--- /dev/null
@@ -0,0 +1,86 @@
+# PRU_CGT environment variable must point to the TI PRU compiler directory. E.g.:
+#(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+#(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+ifndef PRU_CGT
+define ERROR_BODY
+
+************************************************************
+PRU_CGT environment variable is not set. Examples given:
+(Linux) export PRU_CGT=/home/jason/ti/ccs_v6_1_0/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+(Windows) set PRU_CGT=C:/TI/ccs_v6_0_1/ccsv6/tools/compiler/ti-cgt-pru_2.1.0
+************************************************************
+
+endef
+$(error $(ERROR_BODY))
+endif
+
+MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
+CURRENT_DIR := $(notdir $(patsubst %/,%,$(dir $(MKFILE_PATH))))
+PROJ_NAME=$(CURRENT_DIR)
+LINKER_COMMAND_FILE=./AM437x_PRU_SS1.cmd
+LIBS=--library=../../../lib/rpmsg_lib.lib
+INCLUDE=--include_path=../../../include --include_path=../../../include/am437x
+STACK_SIZE=0x100
+HEAP_SIZE=0x100
+GEN_DIR=gen
+
+#Common compiler and linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+CFLAGS=-v3 -O2 --display_error_number --endian=little --hardware_mac=on --obj_directory=$(GEN_DIR) --pp_directory=$(GEN_DIR) -ppd -ppa
+#Linker flags (Defined in 'PRU Optimizing C/C++ Compiler User's Guide)
+LFLAGS=--reread_libs --warn_sections --stack_size=$(STACK_SIZE) --heap_size=$(HEAP_SIZE)
+
+TARGET=$(GEN_DIR)/$(PROJ_NAME).out
+MAP=$(GEN_DIR)/$(PROJ_NAME).map
+SOURCES=$(wildcard *.c)
+#Using .object instead of .obj in order to not conflict with the CCS build process
+OBJECTS=$(patsubst %,$(GEN_DIR)/%,$(SOURCES:.c=.object))
+
+all: printStart $(TARGET) printEnd
+
+printStart:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Building project: $(PROJ_NAME)'
+
+printEnd:
+ @echo ''
+ @echo 'Finished building project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Invokes the linker (-z flag) to make the .out file
+$(TARGET): $(OBJECTS) $(LINKER_COMMAND_FILE)
+ @echo ''
+ @echo 'Building target: $@'
+ @echo 'Invoking: PRU Linker'
+ $(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)
+ @echo 'Finished building target: $@'
+ @echo ''
+ @echo 'Output files can be found in the "$(GEN_DIR)" directory'
+
+# Invokes the compiler on all c files in the directory to create the object files
+$(GEN_DIR)/%.object: %.c
+ @mkdir -p $(GEN_DIR)
+ @echo ''
+ @echo 'Building file: $<'
+ @echo 'Invoking: PRU Compiler'
+ $(PRU_CGT)/bin/clpru --include_path=$(PRU_CGT)/include $(INCLUDE) $(CFLAGS) -fe $@ $<
+
+.PHONY: all clean
+
+# Remove the $(GEN_DIR) directory
+clean:
+ @echo ''
+ @echo '************************************************************'
+ @echo 'Cleaning project: $(PROJ_NAME)'
+ @echo ''
+ @echo 'Removing files in the "$(GEN_DIR)" directory'
+ @rm -rf $(GEN_DIR)
+ @echo ''
+ @echo 'Finished cleaning project: $(PROJ_NAME)'
+ @echo '************************************************************'
+ @echo ''
+
+# Includes the dependencies that the compiler creates (-ppd and -ppa flags)
+-include $(OBJECTS:%.object=%.pp)
+
diff --git a/examples/am437x/PRU_gpioToggle/PRU_gpioToggle.c b/examples/am437x/PRU_gpioToggle/PRU_gpioToggle.c
--- /dev/null
@@ -0,0 +1,59 @@
+/*\r
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/ \r
+ * \r
+ * \r
+ * Redistribution and use in source and binary forms, with or without \r
+ * modification, are permitted provided that the following conditions \r
+ * are met:\r
+ * \r
+ * * Redistributions of source code must retain the above copyright \r
+ * notice, this list of conditions and the following disclaimer.\r
+ * \r
+ * * Redistributions in binary form must reproduce the above copyright\r
+ * notice, this list of conditions and the following disclaimer in the \r
+ * documentation and/or other materials provided with the \r
+ * distribution.\r
+ * \r
+ * * Neither the name of Texas Instruments Incorporated nor the names of\r
+ * its contributors may be used to endorse or promote products derived\r
+ * from this software without specific prior written permission.\r
+ * \r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \r
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \r
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT \r
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \r
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \r
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \r
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE \r
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ */\r
+\r
+#include <stdint.h>\r
+#include <pru_cfg.h>\r
+#include "resource_table_empty.h"\r
+\r
+volatile register uint32_t __R30;\r
+volatile register uint32_t __R31;\r
+\r
+void main(){\r
+ volatile uint32_t gpio;\r
+\r
+ /* Clear SYSCFG[STANDBY_INIT] to enable OCP master port */\r
+ CT_CFG.SYSCFG_bit.STANDBY_INIT = 0;\r
+\r
+ /* Toggle GPO pins TODO: Figure out which to use */\r
+ gpio = 0x000F;\r
+\r
+ /* TODO: Create stop condition, else it will toggle indefinitely */\r
+ while(1){\r
+ __R30 ^= gpio;\r
+ __delay_cycles(100000000);\r
+ }\r
+\r
+ /* Halt the PRU core */\r
+ __halt();\r
+}\r
+\r
diff --git a/examples/am437x/PRU_gpioToggle/resource_table_empty.h b/examples/am437x/PRU_gpioToggle/resource_table_empty.h
--- /dev/null
@@ -0,0 +1,72 @@
+/*\r
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/ \r
+ * \r
+ * \r
+ * Redistribution and use in source and binary forms, with or without \r
+ * modification, are permitted provided that the following conditions \r
+ * are met:\r
+ * \r
+ * * Redistributions of source code must retain the above copyright \r
+ * notice, this list of conditions and the following disclaimer.\r
+ * \r
+ * * Redistributions in binary form must reproduce the above copyright\r
+ * notice, this list of conditions and the following disclaimer in the \r
+ * documentation and/or other materials provided with the \r
+ * distribution.\r
+ * \r
+ * * Neither the name of Texas Instruments Incorporated nor the names of\r
+ * its contributors may be used to endorse or promote products derived\r
+ * from this software without specific prior written permission.\r
+ * \r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \r
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \r
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT \r
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \r
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \r
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \r
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE \r
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ */\r
+\r
+/*\r
+ * ======== resource_table_empty.h ========\r
+ *\r
+ * Define the resource table entries for all PRU cores. This will be\r
+ * incorporated into corresponding base images, and used by the remoteproc\r
+ * on the host-side to allocated/reserve resources. Note the remoteproc\r
+ * driver requires that all PRU firmware be built with a resource table.\r
+ *\r
+ * This file contains an empty resource table. It can be used either as:\r
+ *\r
+ * 1) A template, or\r
+ * 2) As-is if a PRU application does not need to configure PRU_INTC\r
+ * or interact with the rpmsg driver\r
+ *\r
+ */\r
+\r
+#ifndef _RSC_TABLE_PRU_H_\r
+#define _RSC_TABLE_PRU_H_\r
+\r
+#include <stddef.h>\r
+#include <rsc_types.h>\r
+\r
+struct my_resource_table {\r
+ struct resource_table base;\r
+\r
+ uint32_t offset[1]; /* Should match 'num' in actual definition */\r
+};\r
+\r
+#pragma DATA_SECTION(pru_remoteproc_ResourceTable, ".resource_table")\r
+#pragma RETAIN(pru_remoteproc_ResourceTable)\r
+struct my_resource_table pru_remoteproc_ResourceTable = {\r
+ 1, /* we're the first version that implements this */\r
+ 0, /* number of entries in the table */\r
+ 0, 0, /* reserved, must be zero */\r
+ 0, /* offset[0] */\r
+};\r
+\r
+#endif /* _RSC_TABLE_PRU_H_ */\r
+\r