Verified Commit 23f42a94 authored by Anne Jan Brouwer's avatar Anne Jan Brouwer 💬
Browse files

Merge branch 'master' of git.card10.badge.events.ccc.de:card10/firmware into micropython

parents 69b99f4a 3ae54c3c
Pipeline #136 passed with stage
in 4 minutes and 23 seconds
......@@ -2,4 +2,4 @@ make clean
make APP=1
make build/max32665.bin
cp build/max32665.bin card10.bin
python ../bootloader/crc_patch.py card10.bin
../bootloader/crc_patch.py card10.bin
......@@ -2,4 +2,4 @@ make clean
make APP=1
make build/max32665.bin
cp build/max32665.bin card10.bin
python ../bootloader/crc_patch.py card10.bin
../bootloader/crc_patch.py card10.bin
......@@ -2,4 +2,4 @@ make clean
make APP=1
make build/max32665.bin
cp build/max32665.bin card10.bin
python ../bootloader/crc_patch.py card10.bin
../bootloader/crc_patch.py card10.bin
......@@ -2,4 +2,4 @@ make clean
make APP=1
make build/max32665.bin
cp build/max32665.bin card10.bin
python ../bootloader/crc_patch.py card10.bin
../bootloader/crc_patch.py card10.bin
......@@ -2,4 +2,4 @@ make clean
make APP=1
make build/max32665.bin
cp build/max32665.bin card10.bin
python ../bootloader/crc_patch.py card10.bin
../bootloader/crc_patch.py card10.bin
#!/usr/bin/env python3
import sys
import crc16
crc = 0
data = open(sys.argv[1]).read()
data = open(sys.argv[1], 'rb').read()
crc = crc16.crc16xmodem(data)
print(crc)
padded = data + chr(crc >> 8) + chr(crc & 0xFF)
padded = data + bytes([crc >> 8, crc & 0xFF])
crc = 0
crc = crc16.crc16xmodem(padded)
print(crc)
open(sys.argv[1], 'w').write(padded)
open(sys.argv[1], 'wb').write(padded)
......@@ -2,4 +2,4 @@ make clean
make APP=1
make build/max32665.bin
cp build/max32665.bin card10.bin
python ../bootloader/crc_patch.py card10.bin
../bootloader/crc_patch.py card10.bin
......@@ -2,4 +2,4 @@ make clean
make APP=1
make build/max32665.bin
cp build/max32665.bin card10.bin
python ../bootloader/crc_patch.py card10.bin
../bootloader/crc_patch.py card10.bin
......@@ -2,4 +2,4 @@ make clean
make APP=1
make build/max32665.bin
cp build/max32665.bin card10.bin
python ../bootloader/crc_patch.py card10.bin
../bootloader/crc_patch.py card10.bin
Supports Markdown
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