From 3aa6c913a88f129413f9f66ba7dd97142e25e9b7 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Fri, 7 Jul 2017 12:04:20 +0200 Subject: Fix: wrong extension of configured files Remove the ".in" template extension from filenames which have to be correctly named. Change-Id: I8128f5fa64d5fa914a717c18fbba14fc43de4935 Signed-off-by: Romain Forlot --- cmake/cmake.d/02-macros.cmake | 1 + gdb/gdb-on-target.in | 29 ----------------------------- gdb/gdb-on-target.ini.in | 29 +++++++++++++++++++++++++++++ ssh/start-on-target.in | 25 ------------------------- ssh/start-on-target.sh.in | 25 +++++++++++++++++++++++++ wgt/install-wgt-on-target.in | 19 ------------------- wgt/install-wgt-on-target.sh.in | 19 +++++++++++++++++++ 7 files changed, 74 insertions(+), 73 deletions(-) delete mode 100644 gdb/gdb-on-target.in create mode 100644 gdb/gdb-on-target.ini.in delete mode 100644 ssh/start-on-target.in create mode 100644 ssh/start-on-target.sh.in delete mode 100644 wgt/install-wgt-on-target.in create mode 100644 wgt/install-wgt-on-target.sh.in diff --git a/cmake/cmake.d/02-macros.cmake b/cmake/cmake.d/02-macros.cmake index fd0c43b..7444214 100644 --- a/cmake/cmake.d/02-macros.cmake +++ b/cmake/cmake.d/02-macros.cmake @@ -42,6 +42,7 @@ macro(configure_files_in_dir dir) foreach(file ${filelist}) get_filename_component(filename ${file} NAME) string(REGEX REPLACE "target" "${RSYNC_TARGET}" destinationfile ${filename}) + string(REGEX REPLACE ".in$" "" destinationfile ${destinationfile}) configure_file(${file} ${CMAKE_CURRENT_BINARY_DIR}/target/${destinationfile}) endforeach() endmacro(configure_files_in_dir) diff --git a/gdb/gdb-on-target.in b/gdb/gdb-on-target.in deleted file mode 100644 index 0478e90..0000000 --- a/gdb/gdb-on-target.in +++ /dev/null @@ -1,29 +0,0 @@ -# gdb-remote.init file for IDE -# Object: allow to use standard gdb to remote debug a target -# Usage: remote-target-populate update script under ./build directory -# Author: Fulup Ar Foll (IoT.bzh) -# Reference: https://blog.flameeyes.eu/2010/02/remote-debugging-with-gdb-part-2-gdb/ - -# Start gdbserver on target and connect through SSH link -target remote | ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null @RSYNC_TARGET@ gdbserver - afb-daemon --port=@AFB_REMPORT@ --workdir=@RSYNC_PREFIX@/@PROJECT_NAME@ --roothttp=./htdocs --ldpath=./lib --verbose --token=@AFB_TOKEN@ - -# Disable auto load of libraries to improved perf -set auto-solib-add off - -# Define path for project libraries -set solib-search-path $ENV{PROJECT_DIR}/build/@PKGOUT_DIR@/lib - -# Path substitution for source file names -set substitute-path @CMAKE_CURRENT_SOURCE_DIR@ $ENV{PROJECT_DIR} - -# Replace run by continue (gdb use 'run' when gdbserver wants 'continue') -define run -continue -end - -# Manually load project libraries when loaded by afb-daemon -break execute_command -commands -sharedlibrary $ENV{PROJECT_DIR}/build/@PKGOUT_DIR@ -continue -end \ No newline at end of file diff --git a/gdb/gdb-on-target.ini.in b/gdb/gdb-on-target.ini.in new file mode 100644 index 0000000..0478e90 --- /dev/null +++ b/gdb/gdb-on-target.ini.in @@ -0,0 +1,29 @@ +# gdb-remote.init file for IDE +# Object: allow to use standard gdb to remote debug a target +# Usage: remote-target-populate update script under ./build directory +# Author: Fulup Ar Foll (IoT.bzh) +# Reference: https://blog.flameeyes.eu/2010/02/remote-debugging-with-gdb-part-2-gdb/ + +# Start gdbserver on target and connect through SSH link +target remote | ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null @RSYNC_TARGET@ gdbserver - afb-daemon --port=@AFB_REMPORT@ --workdir=@RSYNC_PREFIX@/@PROJECT_NAME@ --roothttp=./htdocs --ldpath=./lib --verbose --token=@AFB_TOKEN@ + +# Disable auto load of libraries to improved perf +set auto-solib-add off + +# Define path for project libraries +set solib-search-path $ENV{PROJECT_DIR}/build/@PKGOUT_DIR@/lib + +# Path substitution for source file names +set substitute-path @CMAKE_CURRENT_SOURCE_DIR@ $ENV{PROJECT_DIR} + +# Replace run by continue (gdb use 'run' when gdbserver wants 'continue') +define run +continue +end + +# Manually load project libraries when loaded by afb-daemon +break execute_command +commands +sharedlibrary $ENV{PROJECT_DIR}/build/@PKGOUT_DIR@ +continue +end \ No newline at end of file diff --git a/ssh/start-on-target.in b/ssh/start-on-target.in deleted file mode 100644 index 9e3a60d..0000000 --- a/ssh/start-on-target.in +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -# -# File: start-on-target.sh -# Author: Fulup Ar Foll @ IoT.bzh -# Object: Forward signal (SIGTERM) to remote process -# Created on 24-May-2017, 09:23:37 -# Usage: remote-target-populate update script under ./build directory - -# Do not change manually use 'make remote-target-populate' -export RSYNC_TARGET=@RSYNC_TARGET@ -export PROJECT_NAME=@PROJECT_NAME@ -export RSYNC_PREFIX=@RSYNC_PREFIX@/@PROJECT_NAME@ -export AFB_REMPORT=@AFB_REMPORT@ -export AFB_TOKEN=@AFB_TOKEN@ - -exec ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -tt $RSYNC_TARGET << EOF - afb-daemon --workdir=$RSYNC_PREFIX --port=$AFB_REMPORT --roothttp=./htdocs --ldpath=./lib --verbose --token=$AFB_TOKEN & - PID_DAEMON=\$! - - trap "echo REMOTE-SIGNAL TRAP; kill -15 \$PID_DAEMON" INT QUIT TERM EXIT - - # wait for daemon to finish - wait \$PID_DAEMON - exit -EOF diff --git a/ssh/start-on-target.sh.in b/ssh/start-on-target.sh.in new file mode 100644 index 0000000..9e3a60d --- /dev/null +++ b/ssh/start-on-target.sh.in @@ -0,0 +1,25 @@ +#!/bin/sh +# +# File: start-on-target.sh +# Author: Fulup Ar Foll @ IoT.bzh +# Object: Forward signal (SIGTERM) to remote process +# Created on 24-May-2017, 09:23:37 +# Usage: remote-target-populate update script under ./build directory + +# Do not change manually use 'make remote-target-populate' +export RSYNC_TARGET=@RSYNC_TARGET@ +export PROJECT_NAME=@PROJECT_NAME@ +export RSYNC_PREFIX=@RSYNC_PREFIX@/@PROJECT_NAME@ +export AFB_REMPORT=@AFB_REMPORT@ +export AFB_TOKEN=@AFB_TOKEN@ + +exec ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -tt $RSYNC_TARGET << EOF + afb-daemon --workdir=$RSYNC_PREFIX --port=$AFB_REMPORT --roothttp=./htdocs --ldpath=./lib --verbose --token=$AFB_TOKEN & + PID_DAEMON=\$! + + trap "echo REMOTE-SIGNAL TRAP; kill -15 \$PID_DAEMON" INT QUIT TERM EXIT + + # wait for daemon to finish + wait \$PID_DAEMON + exit +EOF diff --git a/wgt/install-wgt-on-target.in b/wgt/install-wgt-on-target.in deleted file mode 100644 index 39a69d5..0000000 --- a/wgt/install-wgt-on-target.in +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -# -# File: install-wgt-on-target.sh -# Author: Sebastien Douheret @ IoT.bzh -# Object: install widget on target -# Created on 24-May-2017, 09:23:37 -# Usage: - -# Do not change manually use 'make remote-target-populate' -export RSYNC_TARGET=@RSYNC_TARGET@ -export WGT_FILE_L=@CMAKE_CURRENT_BINARY_DIR@/@PROJECT_NAME@.wgt -export WGT_FILE_T=/tmp/@PROJECT_NAME@.wgt - -scp $WGT_FILE_L $RSYNC_TARGET:$WGT_FILE_T \ - && ssh -o "StrictHostKeyChecking no" -tt $RSYNC_TARGET -- \ - afm-util install $WGT_FILE_T - -# && rm -f $WGT_FILE_T - diff --git a/wgt/install-wgt-on-target.sh.in b/wgt/install-wgt-on-target.sh.in new file mode 100644 index 0000000..39a69d5 --- /dev/null +++ b/wgt/install-wgt-on-target.sh.in @@ -0,0 +1,19 @@ +#!/bin/sh +# +# File: install-wgt-on-target.sh +# Author: Sebastien Douheret @ IoT.bzh +# Object: install widget on target +# Created on 24-May-2017, 09:23:37 +# Usage: + +# Do not change manually use 'make remote-target-populate' +export RSYNC_TARGET=@RSYNC_TARGET@ +export WGT_FILE_L=@CMAKE_CURRENT_BINARY_DIR@/@PROJECT_NAME@.wgt +export WGT_FILE_T=/tmp/@PROJECT_NAME@.wgt + +scp $WGT_FILE_L $RSYNC_TARGET:$WGT_FILE_T \ + && ssh -o "StrictHostKeyChecking no" -tt $RSYNC_TARGET -- \ + afm-util install $WGT_FILE_T + +# && rm -f $WGT_FILE_T + -- cgit 1.2.3-korg