Commit 18d258e3 authored by Nicole Faerber's avatar Nicole Faerber

Customize for Purism Librem Key, add flash script for current OpenOCD and ST-Link V2

parent 0c18ebc9
Pipeline #8911 failed with stages
......@@ -33,8 +33,10 @@
# Cmd interface paramenters
VID?=0x20a0
PID?=0x4108
# Purism VID
VID?=0x316d
# Librem Key PID
PID?=0x4c4b
###########################################
......
#!/bin/bash -x
if [ "x$OPENOCD_BIN" = "x" ]; then
OPENOCD_BIN=`which openocd`
fi
if [ $? = 1 ]; then
echo "openocd binary not found,\nplease specify path and binary name using OPENOCD_BIN environment"
exit 1
fi
sudo $OPENOCD_BIN \
-f interface/stlink-v2.cfg \
-f target/stm32f1x.cfg \
-c init -c "reset halt" \
-c "flash write_image erase ../build/gcc/nitrokey-pro-firmware.elf" \
-c "verify_image ../build/gcc/nitrokey-pro-firmware.elf" \
-c "reset run" \
-c exit
exit 0
......@@ -228,7 +228,8 @@ const uint8_t CCID_StringVendor[CCID_SIZ_STRING_VENDOR] = {
CCID_SIZ_STRING_VENDOR, /* Size of manufaturer string */
0x03, /* bDescriptorType = String descriptor */
/* Manufacturer: "Nitrokey" */
'N', 0, 'i', 0, 't', 0, 'r', 0, 'o', 0, 'k', 0, 'e', 0, 'y', 0
'P', 0, 'u', 0, 'r', 0, 'i', 0, 's', 0, 'm', 0,
',', 0, ' ', 0, 'S', 0, 'P', 0, 'C', 0
};
......@@ -236,8 +237,8 @@ const uint8_t CCID_StringProduct[CCID_SIZ_STRING_PRODUCT] = {
CCID_SIZ_STRING_PRODUCT,
0x03,
/* Product name: "Nitrokey Pro" */
'N', 0, 'i', 0, 't', 0, 'r', 0, 'o', 0, 'k', 0, 'e', 0, 'y', 0, ' ', 0,
'P', 0, 'r', 0, 'o', 0
'L', 0, 'i', 0, 'b', 0, 'r', 0, 'e', 0, 'm', 0, ' ', 0, 'K', 0, 'e', 0,
'y', 0
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment