]> rtime.felk.cvut.cz Git - fpga/virtex2/msp_motion.git/commitdiff
Added simple app testing libpxmc
authorVladimir Burian <buriavl2@fel.cvut.cz>
Thu, 21 Apr 2011 13:27:14 +0000 (15:27 +0200)
committerVladimir Burian <buriavl2@fel.cvut.cz>
Thu, 21 Apr 2011 13:27:14 +0000 (15:27 +0200)
14 files changed:
build/Makefile
software/msp430-virtex2-motion/Makefile [new file with mode: 0644]
software/msp430-virtex2-motion/Makefile.omk [new file with mode: 0644]
software/msp430-virtex2-motion/Makefile.rules [new symlink]
software/msp430-virtex2-motion/app/Makefile [new file with mode: 0644]
software/msp430-virtex2-motion/app/Makefile.omk [new file with mode: 0644]
software/msp430-virtex2-motion/app/motion.c [new file with mode: 0644]
software/msp430-virtex2-motion/arch [new symlink]
software/msp430-virtex2-motion/board [new symlink]
software/msp430-virtex2-motion/cmdproc [new symlink]
software/msp430-virtex2-motion/config.target [new file with mode: 0644]
software/msp430-virtex2-motion/misc [new symlink]
software/msp430-virtex2-motion/msp430-virtex2-motion.kdev4 [new file with mode: 0644]
software/msp430-virtex2-motion/pxmc [new symlink]

index 13a8320c8d454250fc1e485bb2fcdf52376214cc..63fc6af38c3f46e2753b24069c27e8f6f6759ad6 100644 (file)
@@ -52,7 +52,7 @@ UCF             = $(TOP).ucf
 
 ARCH            = msp430
 BOARD           = virtex2
-APP             = 
+APP             = motion
 
 BMM             = memory.bmm
 SW_SRC          = software/$(ARCH)-$(BOARD)-$(APP)
diff --git a/software/msp430-virtex2-motion/Makefile b/software/msp430-virtex2-motion/Makefile
new file mode 100644 (file)
index 0000000..cafc99f
--- /dev/null
@@ -0,0 +1,15 @@
+# Generic directory or leaf node makefile for OCERA make framework
+
+ifndef MAKERULES_DIR
+MAKERULES_DIR := $(shell ( old_pwd="" ;  while [ ! -e Makefile.rules ] ; do if [ "$$old_pwd" = `pwd`  ] ; then exit 1 ; else old_pwd=`pwd` ; cd -L .. 2>/dev/null ; fi ; done ; pwd ) )
+endif
+
+ifeq ($(MAKERULES_DIR),)
+all : default
+.DEFAULT::
+       @echo -e "\nThe Makefile.rules has not been found in this or partent directory\n"
+else
+include $(MAKERULES_DIR)/Makefile.rules
+endif
+
+# DO NOT DELETE
diff --git a/software/msp430-virtex2-motion/Makefile.omk b/software/msp430-virtex2-motion/Makefile.omk
new file mode 100644 (file)
index 0000000..0f8d70e
--- /dev/null
@@ -0,0 +1,6 @@
+# -*- makefile -*-
+
+SUBDIRS = arch board cmdproc misc pxmc app
+
+-include $(SOURCES_DIR)/Makefile.omk-additional 
+
diff --git a/software/msp430-virtex2-motion/Makefile.rules b/software/msp430-virtex2-motion/Makefile.rules
new file mode 120000 (symlink)
index 0000000..afb2930
--- /dev/null
@@ -0,0 +1 @@
+../Makefile.rules
\ No newline at end of file
diff --git a/software/msp430-virtex2-motion/app/Makefile b/software/msp430-virtex2-motion/app/Makefile
new file mode 100644 (file)
index 0000000..cafc99f
--- /dev/null
@@ -0,0 +1,15 @@
+# Generic directory or leaf node makefile for OCERA make framework
+
+ifndef MAKERULES_DIR
+MAKERULES_DIR := $(shell ( old_pwd="" ;  while [ ! -e Makefile.rules ] ; do if [ "$$old_pwd" = `pwd`  ] ; then exit 1 ; else old_pwd=`pwd` ; cd -L .. 2>/dev/null ; fi ; done ; pwd ) )
+endif
+
+ifeq ($(MAKERULES_DIR),)
+all : default
+.DEFAULT::
+       @echo -e "\nThe Makefile.rules has not been found in this or partent directory\n"
+else
+include $(MAKERULES_DIR)/Makefile.rules
+endif
+
+# DO NOT DELETE
diff --git a/software/msp430-virtex2-motion/app/Makefile.omk b/software/msp430-virtex2-motion/app/Makefile.omk
new file mode 100644 (file)
index 0000000..3c85be4
--- /dev/null
@@ -0,0 +1,13 @@
+# -*- makefile -*-
+
+bin_PROGRAMS = motion
+motion_SOURCES = motion.c
+
+motion_LIBS = pxmc cmdproc misc
+
+lib_LOADLIBES = pxmcbsp
+
+#lib_LOADLIBES = bspbase ul_drv lpciap uloi keyval lpciap_kvpb mach_hal uldy
+
+# This selects linker script
+#link_VARIANTS = sstub
diff --git a/software/msp430-virtex2-motion/app/motion.c b/software/msp430-virtex2-motion/app/motion.c
new file mode 100644 (file)
index 0000000..5d2fb94
--- /dev/null
@@ -0,0 +1,59 @@
+#include <stdio.h>
+#include <cmd_proc.h>
+#include <pxmc_cmds.h>
+#include <signal.h>
+#include "pxmc_virtex2.h"
+
+#define MOTOR_VECTOR      0
+
+interrupt(MOTOR_VECTOR) motor_isr() {
+  pxmc_sfi_isr();
+}
+
+
+cmd_des_t const **cmd_list;
+
+cmd_des_t const cmd_des_help={
+    0, 0,
+    "HELP","prints help for commands",
+    cmd_do_help,{(char*)&cmd_list}};
+
+int val;
+cmd_des_t const cmd_des_val={
+    0, CDESM_OPCHR|CDESM_RW,
+    "VAL","use ':' or '?' to store/read value of an integer variable",
+    cmd_do_rw_int, {(char*)&val}};
+
+
+    
+cmd_des_t const *cmd_pxmc_list[] = {
+  &cmd_des_help,
+  &cmd_des_val,
+  CMD_DES_INCLUDE_SUBLIST(cmd_pxmc_base),
+  CMD_DES_INCLUDE_SUBLIST(cmd_pxmc_deb),
+  NULL
+};
+
+cmd_des_t const **cmd_list = cmd_pxmc_list;
+
+
+extern pxmc_state_t *pxmc_main_arr[];
+
+pxmc_state_list_t  pxmc_main_list={
+  pxml_arr:pxmc_main_arr,
+  pxml_cnt:0
+};
+
+
+extern cmd_io_t cmd_io_std_line;
+
+int main()
+{
+  pxmc_initialize();
+
+  eint();
+  
+  while (1) {
+    cmd_processor_run(&cmd_io_std_line, cmd_pxmc_list);
+  }
+}
diff --git a/software/msp430-virtex2-motion/arch b/software/msp430-virtex2-motion/arch
new file mode 120000 (symlink)
index 0000000..90fe9ab
--- /dev/null
@@ -0,0 +1 @@
+../submodule/sysless/arch/
\ No newline at end of file
diff --git a/software/msp430-virtex2-motion/board b/software/msp430-virtex2-motion/board
new file mode 120000 (symlink)
index 0000000..2ba265e
--- /dev/null
@@ -0,0 +1 @@
+../submodule/sysless/board/
\ No newline at end of file
diff --git a/software/msp430-virtex2-motion/cmdproc b/software/msp430-virtex2-motion/cmdproc
new file mode 120000 (symlink)
index 0000000..974ac28
--- /dev/null
@@ -0,0 +1 @@
+../submodule/sysless/libs4c/cmdproc/
\ No newline at end of file
diff --git a/software/msp430-virtex2-motion/config.target b/software/msp430-virtex2-motion/config.target
new file mode 100644 (file)
index 0000000..00915ef
--- /dev/null
@@ -0,0 +1,30 @@
+ARCH=msp430
+MACH=openmsp430
+BOARD=virtex2
+#CONFIG_BOARD_VARIANT=
+
+CONFIG_OC_CMDPROC=y
+CONFIG_MISC_LIBRARY=y
+
+CONFIG_PXMC=y
+CONFIG_PXMC_COORDMV=n
+CONFIG_PXMC_CMPQUE=n
+CONFIG_PXMC_WITH_PTABLE=n
+
+
+CROSS_COMPILE = msp430-
+TARGET_ARCH = -mmcu=msp430x423
+
+# Set default C flags. If theese are set elsewhere (e.g. on a command
+# line), these default flags are not used.
+DEBUG ?=
+OPTIMIZE ?= -O2
+
+# This selects linker script
+LD_SCRIPT=openmsp430-sstub
+
+#OUTPUT_FORMATS = bin hex srec
+
+OUTPUT_FORMATS = bin
+
+
diff --git a/software/msp430-virtex2-motion/misc b/software/msp430-virtex2-motion/misc
new file mode 120000 (symlink)
index 0000000..a4be88f
--- /dev/null
@@ -0,0 +1 @@
+../submodule/sysless/libs4c/misc/
\ No newline at end of file
diff --git a/software/msp430-virtex2-motion/msp430-virtex2-motion.kdev4 b/software/msp430-virtex2-motion/msp430-virtex2-motion.kdev4
new file mode 100644 (file)
index 0000000..8251668
--- /dev/null
@@ -0,0 +1,3 @@
+[Project]
+Manager=KDevCustomMakeManager
+Name=msp430-virtex2-motion
diff --git a/software/msp430-virtex2-motion/pxmc b/software/msp430-virtex2-motion/pxmc
new file mode 120000 (symlink)
index 0000000..76ad9b3
--- /dev/null
@@ -0,0 +1 @@
+../submodule/pxmc/libs4c/
\ No newline at end of file