From: Michal Sojka Date: Sat, 3 Oct 2015 10:42:54 +0000 (+0200) Subject: Generate list of GIO pin names X-Git-Tag: eaton-0.7~4 X-Git-Url: http://rtime.felk.cvut.cz/gitweb/pes-rpp/rpp-lib.git/commitdiff_plain/87cafbf47799a5aefe54edf0a7ec5d9fa9fba22f Generate list of GIO pin names This list will be used by Simulink GIO blocks to offer the user a list of valid pin names for the active target. --- diff --git a/build/.gitignore b/build/.gitignore index 7b0cf27..e9186a0 100644 --- a/build/.gitignore +++ b/build/.gitignore @@ -2,6 +2,7 @@ rpp-lib.lib rpp-lib.a os/ rpp/ +/gio_names.txt .settings/ lwip/ ccsObjs.opt diff --git a/build/Makefile.lib.inc b/build/Makefile.lib.inc index 60f5d2b..c35a511 100644 --- a/build/Makefile.lib.inc +++ b/build/Makefile.lib.inc @@ -45,9 +45,10 @@ rpp_lib_DEPS = $(rpp_lib_OBJS:%=%.dep) rpp-lib.lib: $(rpp_lib_OBJS) #../rpp/TMS570LS313xFlashLnk.cmd $(AR) r $@ $^ -$(makefile_lib_inc_dir)/../rpp-lib.lib: rpp-lib.lib +$(makefile_lib_inc_dir)/../rpp-lib.lib: rpp-lib.lib rpp/src/gio_names.txt $(call cp,$<,$@) $(call cp,$(call pathconv,../Makefile.config),$(dir $@)) + $(call cp,$(call pathconv,rpp/src/gio_names.txt),$(makefile_lib_inc_dir)) -include $(rpp_lib_DEPS) @@ -59,6 +60,11 @@ $(rpp_lib_asm_OBJS): %.obj: $(makefile_lib_inc_dir)/../%.asm $(call mkdir,$(dir $@)) $(RPP_COMPILE_CMD) +rpp/src/gio_names.txt: %: $(makefile_lib_inc_dir)/../%.tmpl + $(call mkdir,$(dir $@)) + $(RPP_PREPROC_CMD) + + .PHONY: all clean $(makefile_lib_inc_dir)/../rpp-lib.lib clean:: diff --git a/build/Makefile.rules.arm b/build/Makefile.rules.arm index 1a9cc2f..b730eda 100644 --- a/build/Makefile.rules.arm +++ b/build/Makefile.rules.arm @@ -59,6 +59,7 @@ RPP_MAKE_CFLAGS = \ --preproc_with_compile RPP_COMPILE_CMD = $(CC) $(RPP_CFLAGS) $(RPP_MAKE_CFLAGS) $< +RPP_PREPROC_CMD = $(CC) $(RPP_CFLAGS) --preproc_only --output_file=$@ $< BUILD_DIR ?= Debug RPP_LIB_DIR = $(makefile_rules_arm_dir)/$(TARGET)/$(BUILD_DIR) diff --git a/build/Makefile.rules.posix b/build/Makefile.rules.posix index ea9cbe3..7434ce5 100644 --- a/build/Makefile.rules.posix +++ b/build/Makefile.rules.posix @@ -35,6 +35,7 @@ RPP_MAKE_CFLAGS = \ -MD -MF $@.dep -MP -MT $@ RPP_COMPILE_CMD = $(CC) -c $(RPP_CFLAGS) $(RPP_MAKE_CFLAGS) -o $@ $< +RPP_PREPROC_CMD = $(CC) -E $(RPP_CFLAGS) -P -x c -o $@ $< BUILD_DIR ?= Debug RPP_LIB_DIR = $(makefile_rules_posix_dir)/$(TARGET)/$(BUILD_DIR) diff --git a/rpp/src/.gitattributes b/rpp/src/.gitattributes new file mode 100644 index 0000000..66858d1 --- /dev/null +++ b/rpp/src/.gitattributes @@ -0,0 +1 @@ +/gio_names.txt.tmpl eaton diff --git a/rpp/src/gio_names.txt.tmpl b/rpp/src/gio_names.txt.tmpl new file mode 100644 index 0000000..72badf8 --- /dev/null +++ b/rpp/src/gio_names.txt.tmpl @@ -0,0 +1,6 @@ +/* + * Template for generating list of GIO pin names for use by GIO + * Simulink blocks + */ +#define GIO_PIN_DEF_GEN(name, port, pin, conf) name +#include "drv/gio_def.h"