mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-03-20 20:18:17 +08:00
Merge branch 'master' of https://github.com/RfidResearchGroup/proxmark3
This commit is contained in:
commit
9102c37292
4 changed files with 12 additions and 11 deletions
|
@ -77,7 +77,7 @@ endif
|
|||
# Generic standalone Mode injection of source code
|
||||
|
||||
|
||||
SRC_STANDALONE =
|
||||
SRC_STANDALONE = placeholder.c
|
||||
# WITH_STANDALONE_LF_ICERUN
|
||||
ifneq (,$(findstring WITH_STANDALONE_LF_ICERUN,$(APP_CFLAGS)))
|
||||
SRC_STANDALONE = lf_icerun.c
|
||||
|
|
9
armsrc/Standalone/placeholder.c
Normal file
9
armsrc/Standalone/placeholder.c
Normal file
|
@ -0,0 +1,9 @@
|
|||
#include "standalone.h" // standalone definitions
|
||||
#include "apps.h" // debug statements
|
||||
|
||||
void ModInfo(void) {
|
||||
DbpString(" No standalone mode present");
|
||||
}
|
||||
|
||||
void RunMod() {
|
||||
}
|
|
@ -7,7 +7,7 @@ Have a look at the skeleton standalone mode called IceRun, in the files `lf_ice
|
|||
|
||||
## 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`.
|
||||
|
||||
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. See this basic skeleton of main function RunMod().
|
||||
````
|
||||
|
@ -49,7 +49,7 @@ Samples of directive flag used in the `common/Makefile.hal`:
|
|||
#PLATFORM_DEFS += -DWITH_STANDALONE_HF_COLIN
|
||||
#PLATFORM_DEFS += -DWITH_STANDALONE_HF_BOG
|
||||
```
|
||||
Add your source code file like the following sample in the `armsrc\makefile`
|
||||
Add your source code file like the following sample in the `armsrc/Makefile`
|
||||
|
||||
```
|
||||
# WITH_STANDALONE_HF_COLIN
|
||||
|
|
|
@ -1549,16 +1549,8 @@ void __attribute__((noreturn)) AppMain(void) {
|
|||
/*
|
||||
* So this is the trigger to execute a standalone mod. Generic entrypoint by following the standalone/standalone.h headerfile
|
||||
* All standalone mod "main loop" should be the RunMod() function.
|
||||
* Since the standalone is either LF or HF, the somewhat bisarr defines below exists.
|
||||
*/
|
||||
#if defined (WITH_LF) && ( defined (WITH_STANDALONE_LF_SAMYRUN) || defined (WITH_STANDALONE_LF_HIDBRUTE) || defined (WITH_STANDALONE_LF_PROXBRUTE) )
|
||||
RunMod();
|
||||
#endif
|
||||
|
||||
#if defined (WITH_ISO14443a) && ( defined (WITH_STANDALONE_HF_YOUNG) || defined(WITH_STANDALONE_HF_COLIN) || defined(WITH_STANDALONE_HF_MATTYRUN) || defined(WITH_STANDALONE_HF_BOG) )
|
||||
RunMod();
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue