From 76e7603ef14e54e76be063a7d5fcd5c4b08530e3 Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 3 Sep 2018 22:36:43 +0200 Subject: [PATCH] textual --- armsrc/Standalone/readme.md | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/armsrc/Standalone/readme.md b/armsrc/Standalone/readme.md index b2b31d77e..10d2553bb 100644 --- a/armsrc/Standalone/readme.md +++ b/armsrc/Standalone/readme.md @@ -6,7 +6,8 @@ If you want to implement a new standalone mode, you need to implement the method ## Implementing a standalone mode -Each standalone mod needs to have its own compiler flag to be added in `armsrc\makefile` and inside the function `AppMain` inside AppMain.c. Inside Appmain a call to RunMod is needed. It looks strange because of what kinds of dependencies your mode will have. +Each standalone mod needs to have its own compiler flag to be added in `armsrc\makefile` and inside the function `AppMain` inside AppMain.c. Inside Appmain a call to RunMod is needed. It looks strange because of what kinds of dependencies your mode will have. + The RunMod function is your "main" function when running. You need to check for Usb commands, in order to let the pm3 client break the standalone mode. As it is now, you can only have one standalone mode installed at the time. @@ -15,14 +16,30 @@ As it is now, you can only have one standalone mode installed at the time. Use HF/LF to denote which frequence your mod is targeting. Use you own github name/similar for perpetual honour to denote your mod -Samples: +Samples of directive flag used in the `armsrc\makefile`: ### -DWITH_LF_ICERUN ### -DWITH_LF_SAMYRUN ### -DWITH_LF_PROXBRUTE ### -DWITH_LF_HIDBRUTE +### -DWITH_HF_COLIN ### -DWITH_HF_YOUNG ### -DWITH_HF_MATTYRUN +Add your source code file like the following sample in the `armsrc\makefile` + +``` +# WITH_HF_COLIN +ifneq (,$(findstring WITH_HF_COLIN,$(APP_CFLAGS))) + SRC_STANDALONE = hf_colin.c vtsend.c +else + SRC_STANDALONE = +endif +``` + ## Adding identification of your mode Do please add a identification string in the function `printStandAloneModes` inside `armsrc\appmain.c` This will enable an easy way to detect on client side which standalone mods has been installed on the device. + + +Once all this is done, you and others can now easily compile different standalone modes by just swapping the -D directive in `armsrc\makefile` +