mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2026-05-12 11:18:11 -07:00
Merge branch 'master' into sim_half_duplex
update 210117
This commit is contained in:
@@ -0,0 +1,115 @@
|
||||
name: MacOS Build and Test
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
macos-make:
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set Git http.postBuffer to something high
|
||||
run: git config --global http.postBuffer 524288000
|
||||
|
||||
- name: Handle homebrew quirks
|
||||
run: rm -rf /usr/local/bin/2to3
|
||||
|
||||
- name: Update brew repos
|
||||
run: brew update
|
||||
continue-on-error: true
|
||||
|
||||
- name: Tap RfidResearchGroup/proxmark3
|
||||
run: brew tap RfidResearchGroup/proxmark3
|
||||
|
||||
- name: Install dependencies
|
||||
run: brew install readline qt5 RfidResearchGroup/proxmark3/arm-none-eabi-gcc
|
||||
|
||||
- name: make clean
|
||||
run: make clean
|
||||
|
||||
- name: Build
|
||||
env:
|
||||
V: 1
|
||||
run: make
|
||||
|
||||
- name: Test
|
||||
run: make check
|
||||
|
||||
macos-make-btaddon:
|
||||
if: always()
|
||||
needs: [macos-make]
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set Git http.postBuffer to something high
|
||||
run: git config --global http.postBuffer 524288000
|
||||
|
||||
- name: Handle homebrew quirks
|
||||
run: rm -rf /usr/local/bin/2to3
|
||||
|
||||
- name: Update brew repos
|
||||
run: brew update
|
||||
continue-on-error: true
|
||||
|
||||
- name: Tap RfidResearchGroup/proxmark3
|
||||
run: brew tap RfidResearchGroup/proxmark3
|
||||
|
||||
- name: Install dependencies
|
||||
run: brew install readline qt5 RfidResearchGroup/proxmark3/arm-none-eabi-gcc
|
||||
|
||||
- name: make clean
|
||||
run: make clean
|
||||
|
||||
- name: Build
|
||||
env:
|
||||
V: 1
|
||||
PLATFORM_EXTRAS: BTADDON
|
||||
run: make
|
||||
|
||||
- name: Test
|
||||
run: make check
|
||||
|
||||
macos-cmake:
|
||||
if: always()
|
||||
needs: [macos-make, macos-make-btaddon]
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set Git http.postBuffer to something high
|
||||
run: git config --global http.postBuffer 524288000
|
||||
|
||||
- name: Handle homebrew quirks
|
||||
run: rm -rf /usr/local/bin/2to3
|
||||
|
||||
- name: Update brew repos
|
||||
run: brew update
|
||||
continue-on-error: true
|
||||
|
||||
- name: Tap RfidResearchGroup/proxmark3
|
||||
run: brew tap RfidResearchGroup/proxmark3
|
||||
|
||||
- name: Install dependencies
|
||||
run: brew install readline qt5 RfidResearchGroup/proxmark3/arm-none-eabi-gcc
|
||||
|
||||
- name: Prepare Build Folders
|
||||
run: mkdir -p client/build
|
||||
|
||||
- name: Initiate cmake environment
|
||||
run: cmake ..
|
||||
working-directory: client/build/
|
||||
|
||||
- name: Build
|
||||
env:
|
||||
VERBOSE: 1
|
||||
run: make
|
||||
working-directory: client/build/
|
||||
|
||||
- name: Test
|
||||
env:
|
||||
CHECKARGS: "--clientbin ./client/build/proxmark3"
|
||||
run: make client/check
|
||||
@@ -0,0 +1,85 @@
|
||||
name: Ubuntu Build and Test
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
ubuntu-make:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Update apt repos
|
||||
run: sudo apt-get update
|
||||
|
||||
- name: Install dependencies
|
||||
run: sudo apt-get install -yqq make autoconf build-essential ca-certificates pkg-config libreadline-dev gcc-arm-none-eabi libnewlib-dev qtbase5-dev libbz2-dev libbluetooth-dev libpython3-dev python3 python3-dev libpython3-all-dev liblua5.2-dev liblua5.2-0-dbg liblua5.2-0 lua5.2 sed
|
||||
|
||||
- name: make clean
|
||||
run: make clean
|
||||
|
||||
- name: Build
|
||||
env:
|
||||
V: 1
|
||||
run: make
|
||||
|
||||
- name: Test
|
||||
run: make check
|
||||
|
||||
ubuntu-make-btaddon:
|
||||
if: always()
|
||||
needs: [ubuntu-make]
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Update apt repos
|
||||
run: sudo apt-get update
|
||||
|
||||
- name: Install dependencies
|
||||
run: sudo apt-get install -yqq make autoconf build-essential ca-certificates pkg-config libreadline-dev gcc-arm-none-eabi libnewlib-dev qtbase5-dev libbz2-dev libbluetooth-dev libpython3-dev python3 python3-dev libpython3-all-dev liblua5.2-dev liblua5.2-0-dbg liblua5.2-0 lua5.2 sed
|
||||
|
||||
- name: make clean
|
||||
run: make clean
|
||||
|
||||
- name: Build
|
||||
env:
|
||||
V: 1
|
||||
PLATFORM_EXTRAS: BTADDON
|
||||
run: make
|
||||
|
||||
- name: Test
|
||||
run: make check
|
||||
|
||||
ubuntu-cmake:
|
||||
if: always()
|
||||
needs: [ubuntu-make, ubuntu-make-btaddon]
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Update apt repos
|
||||
run: sudo apt-get update
|
||||
|
||||
- name: Install dependencies
|
||||
run: sudo apt-get install -yqq make autoconf build-essential ca-certificates pkg-config libreadline-dev gcc-arm-none-eabi libnewlib-dev qtbase5-dev libbz2-dev libbluetooth-dev libpython3-dev python3 python3-dev libpython3-all-dev liblua5.2-dev liblua5.2-0-dbg liblua5.2-0 lua5.2 sed
|
||||
|
||||
- name: Prepare Build Folders
|
||||
run: mkdir -p client/build
|
||||
|
||||
- name: Initiate cmake environment
|
||||
run: cmake ..
|
||||
working-directory: client/build/
|
||||
|
||||
- name: Build
|
||||
env:
|
||||
VERBOSE: 1
|
||||
run: make
|
||||
working-directory: client/build/
|
||||
|
||||
- name: Test
|
||||
env:
|
||||
CHECKARGS: "--clientbin ./client/build/proxmark3"
|
||||
run: make client/check
|
||||
+8
-4
@@ -71,6 +71,7 @@ tools/cryptorf/cm
|
||||
tools/cryptorf/sm
|
||||
tools/cryptorf/sma
|
||||
tools/cryptorf/sma_multi
|
||||
tools/mf_nonce_brute/mf_nonce_brute
|
||||
|
||||
fpga/*
|
||||
!fpga/tests
|
||||
@@ -93,18 +94,21 @@ client/traces/*
|
||||
client/dumps/*
|
||||
*.ice
|
||||
*.new
|
||||
tools/mf_nonce_brute/mf_nonce_brute
|
||||
tools/andrew/*
|
||||
tools/jtag_openocd/openocd_configuration
|
||||
ppls patches/*
|
||||
*- Copy.*
|
||||
/EF_*
|
||||
|
||||
client/lualibs/mfc_default_keys.lua
|
||||
client/lualibs/pm3_cmd.lua
|
||||
# recompiled
|
||||
fpga_version_info.c
|
||||
|
||||
# log / history
|
||||
.proxmark3/*
|
||||
|
||||
# .tmp files are created during compilation
|
||||
*.tmp
|
||||
|
||||
# VSCode files
|
||||
!.vscode/templates/*.json
|
||||
!.vscode/extensions.json
|
||||
!.vscode/tasks.json
|
||||
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
{
|
||||
// See https://go.microsoft.com/fwlink/?LinkId=827846
|
||||
// for the documentation about the extensions.json format
|
||||
"recommendations": [
|
||||
"ms-vscode.cpptools",
|
||||
"austin.code-gnu-global",
|
||||
"marus25.cortex-debug",
|
||||
"augustocdias.tasks-shell-input"
|
||||
]
|
||||
}
|
||||
+145
@@ -0,0 +1,145 @@
|
||||
#!/bin/bash
|
||||
###############################
|
||||
# Linux #
|
||||
# Uncomment to override #
|
||||
###############################
|
||||
#export SerialPort="/dev/ttyACM0"
|
||||
#export DebuggerPath="/usr/bin/gdb"
|
||||
#export JLinkServerPath="/opt/SEGGER/JLink/JLinkGDBServerCLExe"
|
||||
|
||||
###############################
|
||||
# WSL #
|
||||
# Uncomment to override #
|
||||
###############################
|
||||
#export SerialPort="/dev/ttyS4"
|
||||
#export DebuggerPath="/usr/bin/gdb"
|
||||
#export JLinkServerPath="/mnt/c/Program Files (x86)/SEGGER/JLink/JLinkGDBServerCL.exe"
|
||||
|
||||
###############################
|
||||
# ProxSpace #
|
||||
# Uncomment to override #
|
||||
###############################
|
||||
#export SerialPort="COM5"
|
||||
#export JLinkServerPath="C:/Program Files (x86)/SEGGER/JLink/JLinkGDBServerCL.exe"
|
||||
|
||||
#Debugging on 256KB systems is not recommended
|
||||
#This option does not override PLATFORM_SIZE
|
||||
export DeviceMem="512"
|
||||
|
||||
|
||||
VSCODEPATH=$(dirname "$0")
|
||||
|
||||
function print_config {
|
||||
echo "Updating with following configuration:"
|
||||
echo "SerialPort: $SerialPort"
|
||||
echo "DebuggerPath: $DebuggerPath"
|
||||
echo "JLinkServerPath: $JLinkServerPath"
|
||||
}
|
||||
|
||||
function setup_serial_port {
|
||||
if [ -z "$SerialPort" ]; then
|
||||
pm3list=$($VSCODEPATH/../pm3 --list 2>/dev/null)
|
||||
#Use first port listed
|
||||
export SerialPort=$(echo $pm3list | head -n 1 | cut -c 4-)
|
||||
if [ -z "$SerialPort" ]; then
|
||||
echo >&2 "[!!] No serial port found, please set SerialPort manually"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
function setup_gdb_linux {
|
||||
if [ -z "$DebuggerPath" ]; then
|
||||
export DebuggerPath="/usr/bin/gdb"
|
||||
fi
|
||||
if [ ! -x "$DebuggerPath" ]; then
|
||||
echo >&2 "[!!] gdb not found, please set DebuggerPath manually"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
function setup_jlink_linux {
|
||||
if [ -z "$JLinkServerPath" ]; then
|
||||
export JLinkServerPath="/opt/SEGGER/JLink/JLinkGDBServerCLExe"
|
||||
fi
|
||||
if [ ! -x "$JLinkServerPath" ]; then
|
||||
echo >&2 "[!!] JLinkGDBServerCLExe not found, please set JLinkServerPath manually"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
function setup_jlink_wsl {
|
||||
if [ -z "$JLinkServerPath" ]; then
|
||||
export JLinkServerPath="/mnt/c/Program Files (x86)/SEGGER/JLink/JLinkGDBServerCL.exe"
|
||||
fi
|
||||
if [ ! -x "$JLinkServerPath" ]; then
|
||||
echo >&2 "[!!] JLinkGDBServerCL.exe not found, please set JLinkServerPath manually"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
function setup_jlink_ps {
|
||||
if [ -z "$JLinkServerPath" ]; then
|
||||
export JLinkServerPath="c:/Program Files (x86)/SEGGER/JLink/JLinkGDBServerCL.exe"
|
||||
fi
|
||||
jlinkpath=$(cygpath "$JLinkServerPath")
|
||||
if [ ! -x "$jlinkpath" ]; then
|
||||
echo >&2 "[!!] JLinkGDBServerCL.exe not found, please set JLinkServerPath manually"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
function setup_wsl {
|
||||
setup_serial_port
|
||||
setup_gdb_linux
|
||||
setup_jlink_wsl
|
||||
print_config
|
||||
envsubst '${SerialPort} ${DebuggerPath} ${JLinkServerPath} ${DeviceMem}' <"$VSCODEPATH/templates/launch_wsl.json" > "$VSCODEPATH/launch.json"
|
||||
}
|
||||
|
||||
function setup_linux {
|
||||
setup_serial_port
|
||||
setup_gdb_linux
|
||||
setup_jlink_linux
|
||||
print_config
|
||||
envsubst '${SerialPort} ${DebuggerPath} ${JLinkServerPath} ${DeviceMem}' <"$VSCODEPATH/templates/launch_linux.json" > "$VSCODEPATH/launch.json"
|
||||
}
|
||||
|
||||
function setup_ps {
|
||||
setup_serial_port
|
||||
setup_jlink_ps
|
||||
export DebuggerPath="Using ProxSpace gbd"
|
||||
print_config
|
||||
envsubst '${SerialPort} ${JLinkServerPath} ${DeviceMem}' <"$VSCODEPATH/templates/launch_ps.json" > "$VSCODEPATH/launch.json"
|
||||
}
|
||||
|
||||
if [ -f "$VSCODEPATH/launch.json" ]; then
|
||||
read -p "Existing configuration found, do you want to override it? " -n 1 -r
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||
then
|
||||
rm "$VSCODEPATH/launch.json.bak" 2> /dev/null
|
||||
mv "$VSCODEPATH/launch.json" "$VSCODEPATH/launch.json.bak" 2> /dev/null
|
||||
else
|
||||
echo >&2 "[!!] user abort"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
HOSTOS=$(uname | awk '{print toupper($0)}')
|
||||
if [ "$HOSTOS" = "LINUX" ]; then
|
||||
if uname -a|grep -q Microsoft; then
|
||||
setup_wsl
|
||||
else
|
||||
setup_linux
|
||||
fi
|
||||
elif [ "$HOSTOS" = "DARWIN" ]; then
|
||||
echo >&2 "[!!] MacOS not supported, sorry!"
|
||||
exit 1
|
||||
elif [[ "$HOSTOS" =~ MINGW(32|64)_NT* ]]; then
|
||||
setup_ps
|
||||
else
|
||||
echo >&2 "[!!] Host OS not recognized, abort: $HOSTOS"
|
||||
exit 1
|
||||
fi
|
||||
Vendored
+17
-84
@@ -2,23 +2,20 @@
|
||||
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
||||
// for the documentation about the tasks.json format
|
||||
"version": "2.0.0",
|
||||
"windows": {
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}",
|
||||
"env": {
|
||||
"PATH": "${workspaceFolder}/../../msys2/mingw64/bin;${workspaceFolder}/../../msys2/usr/local/bin;${workspaceFolder}/../../msys2/usr/bin;${workspaceFolder}/../../msys2/bin",
|
||||
"MSYSTEM": "MINGW64"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tasks": [
|
||||
{
|
||||
"label": "all: Make & run",
|
||||
"type": "shell",
|
||||
"command": "make -j && ./pm3",
|
||||
"windows": {
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}/../..",
|
||||
"shell": {
|
||||
"executable": "${workspaceFolder}/../../runme64.bat",
|
||||
"args": [
|
||||
"-c \"cd ${workspaceFolderBasename} &&"
|
||||
],
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
"problemMatcher": [
|
||||
"$gcc"
|
||||
],
|
||||
@@ -31,18 +28,6 @@
|
||||
"label": "choose: Make",
|
||||
"type": "shell",
|
||||
"command": "make ${input:componentType} -j",
|
||||
"windows": {
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}/../..",
|
||||
"shell": {
|
||||
"executable": "${workspaceFolder}/../../runme64.bat",
|
||||
"args": [
|
||||
"-c \"cd ${workspaceFolderBasename} &&"
|
||||
],
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
"problemMatcher": [
|
||||
"$gcc"
|
||||
],
|
||||
@@ -52,18 +37,6 @@
|
||||
"label": "client: Debug: make",
|
||||
"type": "shell",
|
||||
"command": "make client -j DEBUG=1",
|
||||
"windows": {
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}/../..",
|
||||
"shell": {
|
||||
"executable": "${workspaceFolder}/../../runme64.bat",
|
||||
"args": [
|
||||
"-c \"cd ${workspaceFolderBasename} &&"
|
||||
],
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
"problemMatcher": [
|
||||
"$gcc"
|
||||
],
|
||||
@@ -73,18 +46,6 @@
|
||||
"label": "client: Debug: clean & make",
|
||||
"type": "shell",
|
||||
"command": "make client/clean && make client -j DEBUG=1",
|
||||
"windows": {
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}/../..",
|
||||
"shell": {
|
||||
"executable": "${workspaceFolder}/../../runme64.bat",
|
||||
"args": [
|
||||
"-c \"cd ${workspaceFolderBasename} &&"
|
||||
],
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
"problemMatcher": [
|
||||
"$gcc"
|
||||
],
|
||||
@@ -94,55 +55,27 @@
|
||||
"label": "fullimage: Make & Flash",
|
||||
"type": "shell",
|
||||
"command": "make fullimage && ./pm3-flash-fullimage",
|
||||
"windows": {
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}/../..",
|
||||
"shell": {
|
||||
"executable": "${workspaceFolder}/../../runme64.bat",
|
||||
"args": [
|
||||
"-c \"cd ${workspaceFolderBasename} &&"
|
||||
],
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "BOOTROM: Make & Flash",
|
||||
"type": "shell",
|
||||
"command": "make bootrom && ./pm3-flash-bootrom",
|
||||
"windows": {
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}/../..",
|
||||
"shell": {
|
||||
"executable": "${workspaceFolder}/../../runme64.bat",
|
||||
"args": [
|
||||
"-c \"cd ${workspaceFolderBasename} &&"
|
||||
],
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "Run client",
|
||||
"type": "shell",
|
||||
"command": "./pm3",
|
||||
"windows": {
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}/../..",
|
||||
"shell": {
|
||||
"executable": "${workspaceFolder}/../../runme64.bat",
|
||||
"args": [
|
||||
"-c \"cd ${workspaceFolderBasename} &&"
|
||||
],
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
"problemMatcher": []
|
||||
},{
|
||||
"label": "fullimage: clean & make debug",
|
||||
"type": "shell",
|
||||
"command": "make armsrc/clean && make armsrc/all DEBUG_ARM=1",
|
||||
"problemMatcher": [
|
||||
"$gcc"
|
||||
],
|
||||
"group": "build",
|
||||
}
|
||||
],
|
||||
"inputs": [
|
||||
|
||||
+32
-42
@@ -5,34 +5,11 @@
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "(gdb) Attach",
|
||||
"type": "cppdbg",
|
||||
"request": "attach",
|
||||
"program": "${cwd}/client/proxmark3",
|
||||
//"processId": "${command:pickProcess}",
|
||||
"processId": "${input:ProcessID}",
|
||||
"MIMode": "gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
],
|
||||
"windows": {
|
||||
"processId": "${input:ProcessIDWindows}",
|
||||
"miDebuggerPath": "${workspaceFolder}/../../msys2/mingw64/bin/gdb.exe",
|
||||
"externalConsole": true,//for ProxSpace externalConsole=true is required, because the internal cosole stops updating after a while
|
||||
"environment": [{
|
||||
"name": "PATH","value": "${workspaceFolder}/../../msys2/mingw64/bin;${workspaceFolder}/../../msys2/usr/local/bin;${workspaceFolder}/../../msys2/usr/bin;${workspaceFolder}/../../msys2/bin"
|
||||
}]
|
||||
}
|
||||
},{
|
||||
"name": "(gdb) Build & Launch",
|
||||
"name": "Client: (gdb) Build & Launch",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${cwd}/client/proxmark3",
|
||||
"args": ["/dev/ttyACM0"],
|
||||
"args": ["${SerialPort}"],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}",
|
||||
"environment": [],
|
||||
@@ -46,15 +23,36 @@
|
||||
}
|
||||
],
|
||||
"preLaunchTask": "client: Debug: clean & make",
|
||||
"miDebuggerPath": "/usr/bin/gdb",
|
||||
"windows": {
|
||||
"args": ["COM5"],
|
||||
"miDebuggerPath": "${workspaceFolder}/../../msys2/mingw64/bin/gdb.exe",
|
||||
"externalConsole": true,//for ProxSpace externalConsole=true is required, because the internal cosole stops updating after a while
|
||||
"environment": [{
|
||||
"name": "PATH","value": "${workspaceFolder}/../../msys2/mingw64/bin;${workspaceFolder}/../../msys2/usr/local/bin;${workspaceFolder}/../../msys2/usr/bin;${workspaceFolder}/../../msys2/bin"
|
||||
}]
|
||||
}
|
||||
"miDebuggerPath": "${DebuggerPath}"
|
||||
},{
|
||||
"name": "Client: (gdb) Attach",
|
||||
"type": "cppdbg",
|
||||
"request": "attach",
|
||||
"program": "${cwd}/client/proxmark3",
|
||||
//"processId": "${command:pickProcess}",
|
||||
"processId": "${input:ProcessID}",
|
||||
"MIMode": "gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
},{
|
||||
"name": "Firmware: (J-Link) Build & Launch",
|
||||
"type": "cortex-debug",
|
||||
"request": "launch",
|
||||
"cwd": "${workspaceRoot}",
|
||||
"preLaunchTask": "fullimage: clean & make debug",
|
||||
"executable": "${workspaceRoot}/armsrc/obj/fullimage.elf",
|
||||
"serverpath": "${JLinkServerPath}",
|
||||
"servertype": "jlink",
|
||||
"device": "AT91SAM7S${DeviceMem}",
|
||||
"interface": "jtag",
|
||||
"serialNumber": "", //If you have more than one J-Link probe, add the serial number here.
|
||||
"runToMain": false,
|
||||
"armToolchainPath": "/usr/bin/"
|
||||
}
|
||||
],
|
||||
"inputs": [
|
||||
@@ -67,14 +65,6 @@
|
||||
"command": "pgrep -n proxmark3",
|
||||
}
|
||||
|
||||
},{
|
||||
"id": "ProcessIDWindows",
|
||||
"type": "command",
|
||||
"command": "shellCommand.execute",
|
||||
"args": {
|
||||
"command": "${workspaceFolder}/../../runme64.bat -c \"cat /proc/$(pgrep -n proxmark3)/winpid\"",
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
}
|
||||
Vendored
+49
@@ -0,0 +1,49 @@
|
||||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}",
|
||||
"env": {
|
||||
"PATH": "${workspaceFolder}/../../msys2/mingw64/bin;${workspaceFolder}/../../msys2/usr/local/bin;${workspaceFolder}/../../msys2/usr/bin;${workspaceFolder}/../../msys2/bin",
|
||||
"MSYSTEM": "MINGW64"
|
||||
}
|
||||
},
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Client: (gdb) Build & Launch",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"cwd": "${workspaceFolder}",
|
||||
"program": "${cwd}/client/proxmark3",
|
||||
"args": ["${SerialPort}"],
|
||||
"stopAtEntry": false,
|
||||
"externalConsole": true,//for ProxSpace externalConsole=true is required, because the internal cosole stops updating after a while
|
||||
"MIMode": "gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
],
|
||||
"preLaunchTask": "client: Debug: clean & make",
|
||||
"miDebuggerPath": "${workspaceFolder}/../../msys2/mingw64/bin/gdb.exe"
|
||||
},{
|
||||
"name": "Firmware: (J-Link) Build & Launch",
|
||||
"type": "cortex-debug",
|
||||
"request": "launch",
|
||||
"cwd": "${workspaceRoot}",
|
||||
"preLaunchTask": "fullimage: clean & make debug",
|
||||
"executable": "${workspaceRoot}/armsrc/obj/fullimage.elf",
|
||||
"serverpath": "${JLinkServerPath}",
|
||||
"servertype": "jlink",
|
||||
"device": "AT91SAM7S${DeviceMem}",
|
||||
"interface": "jtag",
|
||||
"serialNumber": "", //If you have more than one J-Link probe, add the serial number here.
|
||||
"runToMain": false,
|
||||
"armToolchainPath": "${workspaceFolder}/../../msys2/mingw64/bin"
|
||||
}
|
||||
]
|
||||
}
|
||||
Vendored
+70
@@ -0,0 +1,70 @@
|
||||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Client: (gdb) Build & Launch",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${cwd}/client/proxmark3",
|
||||
"args": ["${SerialPort}"],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}",
|
||||
"environment": [],
|
||||
"externalConsole": false,
|
||||
"MIMode": "gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
],
|
||||
"preLaunchTask": "client: Debug: clean & make",
|
||||
"miDebuggerPath": "${DebuggerPath}"
|
||||
},{
|
||||
"name": "Client: (gdb) Attach",
|
||||
"type": "cppdbg",
|
||||
"request": "attach",
|
||||
"program": "${cwd}/client/proxmark3",
|
||||
//"processId": "${command:pickProcess}",
|
||||
"processId": "${input:ProcessID}",
|
||||
"MIMode": "gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
},{
|
||||
"name": "Firmware: (J-Link) Build & Launch",
|
||||
"type": "cortex-debug",
|
||||
"request": "launch",
|
||||
"cwd": "${workspaceRoot}",
|
||||
"preLaunchTask": "fullimage: clean & make debug",
|
||||
"executable": "${workspaceRoot}/armsrc/obj/fullimage.elf",
|
||||
"serverpath": "${JLinkServerPath}",
|
||||
"servertype": "jlink",
|
||||
"device": "AT91SAM7S${DeviceMem}",
|
||||
"interface": "jtag",
|
||||
"serialNumber": "", //If you have more than one J-Link probe, add the serial number here.
|
||||
"runToMain": false,
|
||||
"armToolchainPath": "/usr/bin/"
|
||||
}
|
||||
],
|
||||
"inputs": [
|
||||
{
|
||||
// Using Extension "Tasks Shell Input" https://marketplace.visualstudio.com/items?itemName=augustocdias.tasks-shell-input
|
||||
"id": "ProcessID",
|
||||
"type": "command",
|
||||
"command": "shellCommand.execute",
|
||||
"args": {
|
||||
"command": "pgrep -n proxmark3",
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
}
|
||||
+8
-1
@@ -3,7 +3,14 @@ All notable changes to this project will be documented in this file.
|
||||
This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log...
|
||||
|
||||
## [unreleased][unreleased]
|
||||
- Added `ICE_STATE_DUMP_SIM` - standalone mode for dumping/simming one iClass tag (@iconicsec)
|
||||
- Added `tools/hitag2crack/crack5opencl`, an optimized version of `crack5gpu` (@matrix)
|
||||
- Fixed Makefile to account for changes when running on Apple Silicon (@tcprst)
|
||||
- Added support for debugging ARM with JTAG & VSCode (@Gator96100)
|
||||
- Added MFUL "Gen1b" suport to `hf_mfu_setuid.lua` (@iceman1001)
|
||||
- Added possibility to get bargraph in `lf tune` and `hf tune` (@iceman1001, @doegox)
|
||||
- Added `hf emrtd` ePassport dumping and parsing (@aveao)
|
||||
- Added `aidsearch` to `hf 14b info` (@iceman1001)
|
||||
- Added `ICE_STATE_DUMP_SIM` - standalone mode for dumping/simming one iClass tag (@iconicsec)
|
||||
- Added `lf em 4x50 eview` - show uploaded EM4x50 data in emul memory (@tharexde)
|
||||
- Fix `data rawdemod` parsing for psk2 and user defined clock (@cyberpunk-re)
|
||||
- Added `hf iclass encode` - encode a wiegand binary to a encrypted credential (@iceman1001)
|
||||
|
||||
@@ -46,7 +46,7 @@ ifneq (,$(INSTALLTOOLS))
|
||||
endif
|
||||
ifneq (,$(INSTALLSIMFW))
|
||||
$(Q)$(MKDIR) $(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLFWRELPATH)
|
||||
$(Q)$(CP) $(foreach fw,$(INSTALLSIMFW),tools/simmodule/$(fw)) $(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLFWRELPATH)
|
||||
$(Q)$(CP) $(foreach fw,$(INSTALLSIMFW),client/resources/$(fw)) $(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLFWRELPATH)
|
||||
endif
|
||||
ifeq ($(platform),Linux)
|
||||
$(Q)$(MKDIR) $(DESTDIR)$(UDEV_PREFIX)
|
||||
@@ -169,7 +169,7 @@ help:
|
||||
@echo "+ fpga_compress - Make tools/fpga_compress"
|
||||
@echo
|
||||
@echo "+ style - Apply some automated source code formatting rules"
|
||||
@echo "+ cliparser - Generate cliparser TODO
|
||||
@echo "+ cliparser - Generate cliparser TODO"
|
||||
@echo "+ check - Run offline tests. Set CHECKARGS to pass arguments to the test script"
|
||||
@echo "+ .../check - Run offline tests against specific target. See above."
|
||||
@echo "+ miscchecks - Detect various encoding issues in source code"
|
||||
|
||||
@@ -57,6 +57,11 @@ else
|
||||
RANLIB= ranlib
|
||||
endif
|
||||
|
||||
# For detection of Apple Silicon
|
||||
ifeq ($(platform),Darwin)
|
||||
BREW_PREFIX = $(shell brew --prefix)
|
||||
endif
|
||||
|
||||
ifeq ($(DEBUG),1)
|
||||
DEFCXXFLAGS = -g -O0 -pipe
|
||||
DEFCFLAGS = -g -O0 -fstrict-aliasing -pipe
|
||||
@@ -66,6 +71,11 @@ else
|
||||
DEFCFLAGS = -Wall -Werror -O3 -fstrict-aliasing -pipe
|
||||
DEFLDFLAGS =
|
||||
endif
|
||||
|
||||
ifeq ($(DEBUG_ARM),1)
|
||||
APP_CFLAGS += -g
|
||||
SKIP_COMPRESSION=1
|
||||
endif
|
||||
# Next ones are activated only if SANITIZE=1
|
||||
ifeq ($(SANITIZE),1)
|
||||
DEFCFLAGS += -g -fsanitize=address -fno-omit-frame-pointer
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Run 'make PLATFORM=' to get an exhaustive list of possible parameters for this file.
|
||||
|
||||
PLATFORM=PM3RDV4
|
||||
#PLATFORM=PM3OTHER
|
||||
#PLATFORM=PM3GENERIC
|
||||
# If you want more than one PLATFORM_EXTRAS option, separate them by spaces:
|
||||
#PLATFORM_EXTRAS=BTADDON
|
||||
#STANDALONE=HF_MSDSAL
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
# RRG / Iceman repo - Proxmark3
|
||||
# RRG / Iceman - Proxmark3
|
||||
|
||||
|
||||
| Releases | Coverity | Contributors |
|
||||
| ------------------- | -------------------:| -------------------:|
|
||||
| [](https://github.com/RfidResearchGroup/proxmark3/releases/latest) | [](https://scan.coverity.com/projects/proxmark3-rrg-iceman-repo)|  |
|
||||
|
||||
|
||||
| Actions OSX CI | Actions Ubuntu CI | Windows CI |
|
||||
| ------------------- | -------------------:| -------------------:|
|
||||
|  |  | [](https://ci.appveyor.com/project/RfidResearchGroup/proxmark3/branch/master) |
|
||||
|
||||
|
||||
|
||||
|
||||
| Releases | Linux & OSX CI | Windows CI | Coverity | Contributors |
|
||||
| ------------------- |:-------------------:| -------------------:| -------------------:| -------------------:|
|
||||
| [](https://github.com/RfidResearchGroup/proxmark3/releases/latest) | [](https://travis-ci.com/RfidResearchGroup/proxmark3) | [](https://ci.appveyor.com/project/RfidResearchGroup/proxmark3/branch/master) | [](https://scan.coverity.com/projects/proxmark3-rrg-iceman-repo)|  |
|
||||
|
||||
|
||||
|
||||
# PROXMARK INSTALLATION AND OVERVIEW
|
||||
# PROXMARK3 INSTALLATION AND OVERVIEW
|
||||
|
||||
| FAQ's & Updates | Installation | Use of the Proxmark |
|
||||
| ------------------- |:-------------------:| -------------------:|
|
||||
@@ -36,10 +39,25 @@
|
||||
|[Notes on Color usage](/doc/colors_notes.md)|[Makefile vs CMake](/doc/md/Development/Makefile-vs-CMake.md)|[Notes on Cloner guns](/doc/cloner_notes.md)|
|
||||
|[Notes on cliparser usage](/doc/cliparser.md)|[Notes on clocks](/doc/clocks.md)||
|
||||
|
||||
## Build for non-RDV4 Proxmark3 platforms
|
||||
|
||||
In order to build this repo for other Proxmark3 platforms we urge you to read [Advanced compilation parameters](/doc/md/Use_of_Proxmark/4_Advanced-compilation-parameters.md)
|
||||
## Build for Proxmark3 RDV4
|
||||
See the instruction links in the tables above to build, flash and run for your Proxmark3 RDV4 device.
|
||||
|
||||
## Build for generic Proxmark3 platforms
|
||||
In order to build this repo for generic Proxmark3 platforms we urge you to read [Advanced compilation parameters](/doc/md/Use_of_Proxmark/4_Advanced-compilation-parameters.md)
|
||||
|
||||
With generic Proxmark3 platforms we mean:
|
||||
- RDV1
|
||||
- RDV2
|
||||
- RDV3 easy
|
||||
- Proxmark Evolution (needs extra care)
|
||||
- Radiowar black PCB version
|
||||
- Ryscorp green PCB version
|
||||
- Ryscorp Pm3Pro
|
||||
- VX
|
||||
- numerous Chinese adapted versions of the RDV3 easy (kkmoon, pisworks etc)
|
||||
|
||||
> ⚠ **Note**: About flash memory size of other Proxmark3 platforms. You need to keep a eye on how large your ARM chip built-in flash memory is. With 512kb you are fine but if its 256kb you need to compile this repo with even less functionality. When running the `./pm3-flash-all` you can see which size your device have if you have the bootloader from this repo installed. Otherwise you will find the size reported in the start message when running the Proxmark3 client `./pm3`.
|
||||
|
||||
## What has changed?
|
||||
|
||||
@@ -49,7 +67,9 @@ On the hardware side:
|
||||
* added smart card module
|
||||
* added FPC connector
|
||||
|
||||
On the software side: quite a lot, see the [Changelog file](CHANGELOG.md).
|
||||
On the software side:
|
||||
|
||||
quite a lot, see the [Changelog file](CHANGELOG.md) which we try to keep updated.
|
||||
|
||||
## Development
|
||||
|
||||
@@ -57,13 +77,13 @@ On the software side: quite a lot, see the [Changelog file](CHANGELOG.md).
|
||||
|
||||
This repo compiles nicely on
|
||||
- Proxspace v3.x
|
||||
- [latest release v3.7.1](https://github.com/Gator96100/ProxSpace/releases)
|
||||
- [latest release v3.7.2](https://github.com/Gator96100/ProxSpace/releases)
|
||||
- Windows/mingw environment with Qt5.6.1 & GCC 4.9
|
||||
- Ubuntu 16.04 -> 20.04
|
||||
- ParrotOS, Gentoo, Pentoo, Kali, Nethunter, Archlinux, Fedora, Debian
|
||||
- Rasbian
|
||||
- Android / Termux
|
||||
- Mac OS X / Homebrew
|
||||
- Mac OS X / Homebrew / Apple Silicon
|
||||
- WSL1 (Windows subsystem linux) on Windows 10
|
||||
- Docker container
|
||||
- [ RRG / Iceman repo based ubuntu 18.04 container ](https://hub.docker.com/r/secopsconsult/proxmark3)
|
||||
@@ -72,26 +92,22 @@ This repo compiles nicely on
|
||||
Hardware to run client on
|
||||
- PC
|
||||
- Android
|
||||
- Raspberry Pi & Raspberry Pi Zero
|
||||
- Raspberry Pi, Raspberry Pi Zero
|
||||
- Nvidia Jetson Nano
|
||||
|
||||
## Precompiled binaries
|
||||
We don't maintain any precompiled binaries in this repo. There is community effort over at the Proxmark3 forum where @gator96100 has set up a google drive with many mingw binaries which is up-to-date. We link to these files here as to make it easier for users.
|
||||
If you are having troubles with these files, contact the package maintainer @gator96100 and read the [sticky thread at forum](http://www.proxmark.org/forum/viewtopic.php?pid=24763#p24763) where known issues has been documented.
|
||||
We don't maintain any precompiled binaries in this repo. There is community effort over at the Proxmark3 forum where [@gator96100](https://github.com/gator96100) has set up a AWS bucket with precompiled Proxspace (Mingw) binaries which is recompiled every night and with that also up-to-date. We link to these files here as to make it easier for users.
|
||||
|
||||
_If you use his pre-compiled Proxspace binaries do consider buy him a coffee for his efforts. Remember nothing says thank you as good as a donation._
|
||||
|
||||
Ref:
|
||||
For Proxmark3 RDV4
|
||||
- [Precompiled builds for RDV40 dedicated x86](https://drive.google.com/open?id=13zUs-aiQkYaSl5KWrBtuW5IWCoHJPsue)
|
||||
- [Precompiled builds for RDV40 dedicated x64](https://drive.google.com/open?id=1SyPB8t5Vo8O0Lh7PjNm3Kv-mO4BNbxjX)
|
||||
If you are having troubles with these files, contact the package maintainer [@gator96100](https://github.com/gator96100) and read the [homepage of his proxmark builds](https://www.proxmarkbuilds.org/) or read the [sticky thread at forum](http://www.proxmark.org/forum/viewtopic.php?pid=24763#p24763) where known issues has been documented with regards to the precompiled builds.
|
||||
|
||||
For Proxmark3 RDV4 with blueshark addon
|
||||
- [Precompiled builds for RDV40 dedicated with Bluetooth addon x86](https://drive.google.com/open?id=1TqWYctkRvkLshQ1ZRBHPLDzYHR-asuMO)
|
||||
- [Precompiled builds for RDV40 dedicated with Bluetooth addon x64](https://drive.google.com/open?id=17ful7u2QyYmMQzQzc5fAf8nJvyoDJfSL)
|
||||
### Proxmark3 RDV4 devices
|
||||
- [Precompiled builds for RDV40 dedicated x64](https://www.proxmarkbuilds.org/#rdv40-64/)
|
||||
- [Precompiled builds for RDV40 dedicated with Bluetooth addon x64](https://www.proxmarkbuilds.org/#rdv40_bt-64/)
|
||||
|
||||
Generice Proxmark3 devices (non RDV4), for Proxmark3 Easy, RDV1, RDV2, RDV3, etc etc
|
||||
- [Precompiled builds for RRG / Iceman repository x86](https://drive.google.com/open?id=1PI3Xr1mussPBPnYGu4ZjWzGPARK4N7JR)
|
||||
- [Precompiled builds for RRG / Iceman repository x64](https://drive.google.com/open?id=1uX9RtYGinuFrpHybu4xq_BE3HrobI20e)
|
||||
### Generic Proxmark3 devices
|
||||
- [Precompiled builds for RRG / Iceman repository x64](https://www.proxmarkbuilds.org/#rrg_other-64/)
|
||||
|
||||
|
||||
## Roadmap
|
||||
@@ -103,28 +119,40 @@ We usually merge your contributions fast since we do like the idea of getting a
|
||||
|
||||
## Issues & Troubleshooting
|
||||
Please search the [issues](https://github.com/rfidresearchgroup/proxmark3/issues) page here and see if your issue is listed in the first instance.
|
||||
Read the [Troubleshooting](/doc/md/Installation_Instructions/Troubleshooting.md) guide to weed out most known problems.
|
||||
Read the [Troubleshooting guide](/doc/md/Installation_Instructions/Troubleshooting.md) to weed out most known problems.
|
||||
|
||||
Next place to visit is the [Proxmark Forum](http://www.proxmark.org/forum/index.php). Learn to search it well and finally Google / duckduckgo is your friend :) You will find many blogposts, youtube videos, tweets, reddit
|
||||
Next place to visit is the [Proxmark3 Forum](http://www.proxmark.org/forum/index.php). Learn to search it well and finally Google / duckduckgo is your friend :)
|
||||
You will find many blogposts, youtube videos, tweets, reddit
|
||||
|
||||
### Offical channels
|
||||
- [RFID Hacking community discord server](https://discord.gg/QfPvGFRQxH)
|
||||
- [Proxmark3 IRC channel](http://webchat.freenode.net/?channels=#proxmark3)
|
||||
- [Proxmark3 sub reddit](https://www.reddit.com/r/proxmark3/)
|
||||
- [Twitter](https://twitter.com/proxmark3/)
|
||||
- [Proxmark3 community discord server](https://discord.gg/QfPvGFRQxH)
|
||||
|
||||
_no slack channel_
|
||||
- [Proxmark3 Twitter](https://twitter.com/proxmark3/)
|
||||
- [Proxmark3 forum](http://www.proxmark.org/forum/index.php)
|
||||
- _no slack channel_
|
||||
|
||||
Iceman has quite a few videos on his [youtube channel](https://www.youtube.com/c/ChrisHerrmann1001)
|
||||
|
||||
### Youtube channels
|
||||
Iceman has quite a few videos on his channel and Quentyn has risen up the last year with good informative videos. We suggest you check them out and smash that subscribe buttons!
|
||||
|
||||
- [Iceman channel](https://www.youtube.com/c/ChrisHerrmann1001)
|
||||
- [Quentyn Taylor](https://www.youtube.com/channel/UCL91C3IZDv3wfj2ABhdRIrw)
|
||||
- [Hacker warehouse channel](https://www.youtube.com/channel/UCimS6P854cQ23j6c_xst7EQ)
|
||||
|
||||
_if you think of some more good youtube channels to be on this list, let us know!_
|
||||
|
||||
## Cheat sheet
|
||||
|
||||
Thanks to Alex Dibs, you can enjoy a [command cheat sheet](/doc/cheatsheet.md)
|
||||
You can enjoy a [command cheat sheet](/doc/cheatsheet.md) and we are trying to keep it updated.
|
||||
[Thanks to Alex Dib!](https://github.com/scund00r)
|
||||
|
||||
## Maintainers ( package, distro )
|
||||
|
||||
To all distro, package maintainers, we tried to make your life easier. `make install` is now available and if you want to know more.
|
||||
- [Maintainers](/doc/md/Development/Maintainers.md)
|
||||
To all distro, package maintainers, we tried to make your life easier.
|
||||
|
||||
`make install` is now available and if you want to know more.
|
||||
- [Notes for maintainers](/doc/md/Development/Maintainers.md)
|
||||
|
||||
## Why didn't you base it on official Proxmark3 Master?
|
||||
|
||||
@@ -132,8 +160,9 @@ The separation from official Proxmark3 repo gives us a lot of freedom to create
|
||||
|
||||
## Proxmark3 GUI
|
||||
|
||||
The official PM3-GUI from Gaucho will not work.
|
||||
The new [Proxmark3 Universal GUI](https://github.com/burma69/PM3UniversalGUI) will work more or less. Change is needed in order to show helptext when client isn't connected to a device. We don't know how active the maintainers.
|
||||
The official PM3-GUI from Gaucho will not work. Not to mention is quite old and not maintained any longer.
|
||||
|
||||
The new [Proxmark3 Universal GUI](https://github.com/burma69/PM3UniversalGUI) will work more or less. Change is needed in order to show helptext when client isn't connected to a device. We don't know how active the maintainers are. There has been brought to our attention that there is quite a few Chinese Windows GUI available. Usually you find them on alibaba / taobao ads but we have no idea which fw/client they are compatible with. Proceed with caution if you decide to go down that road.
|
||||
|
||||
# Donations
|
||||
|
||||
|
||||
@@ -217,8 +217,12 @@ $(OBJDIR)/fullimage.data.o: $(OBJDIR)/fullimage.data.bin.z
|
||||
$(Q)$(OBJCOPY) -O elf32-littlearm -I binary -B arm --rename-section .data=compressed_data $^ $@
|
||||
|
||||
$(OBJDIR)/fullimage.elf: $(OBJDIR)/fullimage.nodata.o $(OBJDIR)/fullimage.data.o
|
||||
ifeq (,$(findstring WITH_NO_COMPRESSION,$(APP_CFLAGS)))
|
||||
$(info [=] LD $@)
|
||||
$(Q)$(CC) $(CROSS_LDFLAGS) -Wl,-T,ldscript,-e,_osimage_entry,-Map,$(patsubst %.elf,%.map,$@) -o $@ $^
|
||||
else
|
||||
$(Q)$(CP) $(OBJDIR)/fullimage.stage1.elf $@
|
||||
endif
|
||||
|
||||
tarbin: $(OBJS)
|
||||
$(info TAR $@)
|
||||
|
||||
@@ -257,6 +257,9 @@ void ReadMem(int addr) {
|
||||
/* osimage version information is linked in, cf commonutil.h */
|
||||
/* bootrom version information is pointed to from _bootphase1_version_pointer */
|
||||
extern char *_bootphase1_version_pointer, _flash_start, _flash_end, __data_src_start__;
|
||||
#ifdef WITH_NO_COMPRESSION
|
||||
extern char *_bootrom_end, _bootrom_start, __os_size__;
|
||||
#endif
|
||||
static void SendVersion(void) {
|
||||
char temp[PM3_CMD_DATA_SIZE - 12]; /* Limited data payload in USB packets */
|
||||
char VersionString[PM3_CMD_DATA_SIZE - 12] = { '\0' };
|
||||
@@ -295,9 +298,11 @@ static void SendVersion(void) {
|
||||
strncat(VersionString, "\n ", sizeof(VersionString) - strlen(VersionString) - 1);
|
||||
}
|
||||
}
|
||||
#ifndef WITH_NO_COMPRESSION
|
||||
// Send Chip ID and used flash memory
|
||||
uint32_t text_and_rodata_section_size = (uint32_t)&__data_src_start__ - (uint32_t)&_flash_start;
|
||||
uint32_t compressed_data_section_size = common_area.arg1;
|
||||
#endif
|
||||
|
||||
struct p {
|
||||
uint32_t id;
|
||||
@@ -308,7 +313,11 @@ static void SendVersion(void) {
|
||||
|
||||
struct p payload;
|
||||
payload.id = *(AT91C_DBGU_CIDR);
|
||||
#ifdef WITH_NO_COMPRESSION
|
||||
payload.section_size = (uint32_t)&_bootrom_end - (uint32_t)&_bootrom_start + (uint32_t)&__os_size__;
|
||||
#else
|
||||
payload.section_size = text_and_rodata_section_size + compressed_data_section_size;
|
||||
#endif
|
||||
payload.versionstr_len = strlen(VersionString) + 1;
|
||||
memcpy(payload.versionstr, VersionString, payload.versionstr_len);
|
||||
|
||||
|
||||
+20
-25
@@ -133,35 +133,30 @@ static hf14a_config hf14aconfig = { 0, 0, 0, 0, 0 } ;
|
||||
|
||||
void printHf14aConfig(void) {
|
||||
DbpString(_CYAN_("HF 14a config"));
|
||||
Dbprintf(" [a] Anticol override....%i %s%s%s",
|
||||
hf14aconfig.forceanticol,
|
||||
(hf14aconfig.forceanticol == 0) ? "( " _GREEN_("No") " ) follow standard " : "",
|
||||
(hf14aconfig.forceanticol == 1) ? "( " _RED_("Yes") " ) always do anticol" : "",
|
||||
(hf14aconfig.forceanticol == 2) ? "( " _RED_("Yes") " ) always skip anticol" : ""
|
||||
Dbprintf(" [a] Anticol override....%s%s%s",
|
||||
(hf14aconfig.forceanticol == 0) ? _GREEN_("std") " : follow standard " : "",
|
||||
(hf14aconfig.forceanticol == 1) ? _RED_("force") " : always do anticol" : "",
|
||||
(hf14aconfig.forceanticol == 2) ? _RED_("skip") " : always skip anticol" : ""
|
||||
);
|
||||
Dbprintf(" [b] BCC override........%i %s%s%s",
|
||||
hf14aconfig.forcebcc,
|
||||
(hf14aconfig.forcebcc == 0) ? "( " _GREEN_("No") " ) follow standard" : "",
|
||||
(hf14aconfig.forcebcc == 1) ? "( " _RED_("Yes") " ) always do CL2" : "",
|
||||
(hf14aconfig.forcebcc == 2) ? "( " _RED_("Yes") " ) always use card BCC" : ""
|
||||
Dbprintf(" [b] BCC override........%s%s%s",
|
||||
(hf14aconfig.forcebcc == 0) ? _GREEN_("std") " : follow standard" : "",
|
||||
(hf14aconfig.forcebcc == 1) ? _RED_("fix") " : fix bad BCC" : "",
|
||||
(hf14aconfig.forcebcc == 2) ? _RED_("ignore") " : ignore bad BCC, always use card BCC" : ""
|
||||
);
|
||||
Dbprintf(" [2] CL2 override........%i %s%s%s",
|
||||
hf14aconfig.forcecl2,
|
||||
(hf14aconfig.forcecl2 == 0) ? "( " _GREEN_("No") " ) follow standard" : "",
|
||||
(hf14aconfig.forcecl2 == 1) ? "( " _RED_("Yes") " ) always do CL2" : "",
|
||||
(hf14aconfig.forcecl2 == 2) ? "( " _RED_("Yes") " ) always skip CL2" : ""
|
||||
Dbprintf(" [2] CL2 override........%s%s%s",
|
||||
(hf14aconfig.forcecl2 == 0) ? _GREEN_("std") " : follow standard" : "",
|
||||
(hf14aconfig.forcecl2 == 1) ? _RED_("force") " : always do CL2" : "",
|
||||
(hf14aconfig.forcecl2 == 2) ? _RED_("skip") " : always skip CL2" : ""
|
||||
);
|
||||
Dbprintf(" [3] CL3 override........%i %s%s%s",
|
||||
hf14aconfig.forcecl3,
|
||||
(hf14aconfig.forcecl3 == 0) ? "( " _GREEN_("No") " ) follow standard" : "",
|
||||
(hf14aconfig.forcecl3 == 1) ? "( " _RED_("Yes") " ) always do CL3" : "",
|
||||
(hf14aconfig.forcecl3 == 2) ? "( " _RED_("Yes") " ) always skip CL3" : ""
|
||||
Dbprintf(" [3] CL3 override........%s%s%s",
|
||||
(hf14aconfig.forcecl3 == 0) ? _GREEN_("std") " : follow standard" : "",
|
||||
(hf14aconfig.forcecl3 == 1) ? _RED_("force") " : always do CL3" : "",
|
||||
(hf14aconfig.forcecl3 == 2) ? _RED_("skip") " : always skip CL3" : ""
|
||||
);
|
||||
Dbprintf(" [r] RATS override.......%i %s%s%s",
|
||||
hf14aconfig.forcerats,
|
||||
(hf14aconfig.forcerats == 0) ? "( " _GREEN_("No") " ) follow standard " : "",
|
||||
(hf14aconfig.forcerats == 1) ? "( " _RED_("Yes") " ) always do RATS" : "",
|
||||
(hf14aconfig.forcerats == 2) ? "( " _RED_("Yes") " ) always skip RATS" : ""
|
||||
Dbprintf(" [r] RATS override.......%s%s%s",
|
||||
(hf14aconfig.forcerats == 0) ? _GREEN_("std") " : follow standard " : "",
|
||||
(hf14aconfig.forcerats == 1) ? _RED_("force") " : always do RATS" : "",
|
||||
(hf14aconfig.forcerats == 2) ? _RED_("skip") " : always skip RATS" : ""
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -154,7 +154,7 @@ t55xx_configurations_t T55xx_Timing = {
|
||||
{ 29 * 8, 17 * 8, 15 * 8, 40 * 8, 15 * 8, 0, 0 }, // Leading 0
|
||||
{ 29 * 8, 17 * 8, 15 * 8, 31 * 8, 15 * 8, 47 * 8, 63 * 8 } // 1 of 4
|
||||
#else
|
||||
// PM3OTHER or like offical repo
|
||||
// PM3GENERIC or like official repo
|
||||
{ 31 * 8, 20 * 8, 18 * 8, 50 * 8, 15 * 8, 0, 0 }, // Default Fixed
|
||||
{ 31 * 8, 20 * 8, 18 * 8, 50 * 8, 15 * 8, 0, 0 }, // Long Leading Ref.
|
||||
{ 31 * 8, 20 * 8, 18 * 8, 40 * 8, 15 * 8, 0, 0 }, // Leading 0
|
||||
|
||||
+15
-4
@@ -14,14 +14,16 @@
|
||||
|
||||
#include "proxmark3_arm.h"
|
||||
#include "appmain.h"
|
||||
#ifndef WITH_NO_COMPRESSION
|
||||
#include "lz4.h"
|
||||
#endif
|
||||
#include "BigBuf.h"
|
||||
#include "string.h"
|
||||
|
||||
extern struct common_area common_area;
|
||||
extern char __data_src_start__, __data_start__, __data_end__, __bss_start__, __bss_end__;
|
||||
|
||||
|
||||
#ifndef WITH_NO_COMPRESSION
|
||||
static void uncompress_data_section(void) {
|
||||
int avail_in;
|
||||
memcpy(&avail_in, &__data_src_start__, sizeof(int));
|
||||
@@ -35,6 +37,7 @@ static void uncompress_data_section(void) {
|
||||
// save the size of the compressed data section
|
||||
common_area.arg1 = avail_in;
|
||||
}
|
||||
#endif
|
||||
|
||||
void __attribute__((section(".startos"))) Vector(void);
|
||||
void Vector(void) {
|
||||
@@ -48,12 +51,20 @@ void Vector(void) {
|
||||
}
|
||||
common_area.flags.osimage_present = 1;
|
||||
|
||||
/* Set up data segment: Copy from flash to ram */
|
||||
#ifdef WITH_NO_COMPRESSION
|
||||
char *data_src = &__data_src_start__;
|
||||
char *data_dst = &__data_start__;
|
||||
char *data_end = &__data_end__;
|
||||
while (data_dst < data_end) *data_dst++ = *data_src++;
|
||||
#else
|
||||
uncompress_data_section();
|
||||
#endif
|
||||
|
||||
/* Set up (that is: clear) BSS. */
|
||||
char *dst = &__bss_start__;
|
||||
char *end = &__bss_end__;
|
||||
while (dst < end) *dst++ = 0;
|
||||
char *bss_dst = &__bss_start__;
|
||||
char *bss_end = &__bss_end__;
|
||||
while (bss_dst < bss_end) *bss_dst++ = 0;
|
||||
|
||||
AppMain();
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user