Bump to head

This commit is contained in:
InsanityAutomation
2019-11-21 09:30:10 -05:00
parent f1e187a5dd
commit e81a1c7044
552 changed files with 15116 additions and 14062 deletions
@@ -1,12 +1,20 @@
Import("env")
import os
import struct
Import("env")
# Relocate firmware from 0x08000000 to 0x08008800
for define in env['CPPDEFINES']:
if define[0] == "VECT_TAB_ADDR":
env['CPPDEFINES'].remove(define)
env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x8008800"))
env.Replace(LDSCRIPT_PATH="buildroot/share/PlatformIO/ldscripts/chitu_f103.ld")
custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/ldscripts/chitu_f103.ld")
for i, flag in enumerate(env["LINKFLAGS"]):
if "-Wl,-T" in flag:
env["LINKFLAGS"][i] = "-Wl,-T" + custom_ld_script
elif flag == "-T":
env["LINKFLAGS"][i + 1] = custom_ld_script
def calculate_crc(contents, seed):
accumulating_xor_value = seed;
@@ -105,8 +113,6 @@ def encrypt_file(input, output_file, file_length):
# Encrypt ${PROGNAME}.bin and save it as 'update.cbd'
def encrypt(source, target, env):
import os
firmware = open(target[0].path, "rb")
update = open(target[0].dir.path +'/update.cbd', "wb")
length = os.path.getsize(target[0].path)