Add support for Adafruit Feather RP2040 (8MB). Identified with a unique USB PID so it displays properly once programmed one time. Moved LED to pin 13 (per the website docs), but have no board to test. Add over/underclocking menus, applied at boot. Use at your own risk, as usual. Add shims to allocate flash space for a filesystem (but not implemented yet). Add a "generic" RP2040 board
28 lines
784 B
Python
Executable file
28 lines
784 B
Python
Executable file
#!/usr/bin/env python3
|
|
import sys
|
|
import struct
|
|
import subprocess
|
|
import re
|
|
import os
|
|
import os.path
|
|
import argparse
|
|
import time
|
|
|
|
def main():
|
|
parser = argparse.ArgumentParser(description='Simple text substitution')
|
|
parser.add_argument('-i', '--input', action='store', required=True, help='Path to the source file')
|
|
parser.add_argument('-o', '--out', action='store', required=True, help='Path to the output file')
|
|
parser.add_argument('-s', '--sub', action='append', nargs=2, metavar=('find', 'replace'), required=True, help='Substition')
|
|
args = parser.parse_args()
|
|
|
|
with open(args.input, "r") as fin:
|
|
data = fin.read()
|
|
|
|
for f, r in args.sub:
|
|
data = re.sub(f, r, data)
|
|
|
|
with open(args.out, "w") as fout:
|
|
fout.write(data)
|
|
|
|
|
|
main()
|