Skip to content

Commit 6c9ca4d

Browse files
committed
Fix get_parent for revert
1 parent 45d78d6 commit 6c9ca4d

79 files changed

Lines changed: 851 additions & 3497 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@ filesystem/splash
66
filesystem/Saves
77
filesystem/lib
88

9-
production_files
10-
119
doc/build
1210
.vscode
1311
**/desktop.ini
14-
filesystem/system/settings.txt
15-
firmware_date.h
16-
filesystem/lib
17-
filesystem/Games/TempGames

build_and_upload.py

Lines changed: 7 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -38,44 +38,20 @@ def get_drives():
3838

3939
# ### Step 1: Get arguments
4040
arguments = sys.argv[1:]
41-
upload = True
4241

4342
if len(arguments) > 0 and arguments[0] == "clean":
4443
execute(['make', '-C', '../ports/rp2', 'clean', 'BOARD=THUMBY_COLOR'])
4544
print("\n\nSUCCESS: Done cleaning rp2 port!\n")
4645
exit(1)
47-
elif len(arguments) > 0 and arguments[0] == "no_upload":
48-
upload = False
49-
50-
51-
# ### Step 2: Get the date of the last commit and bake into firmware
52-
firmware_date_file = open("src/firmware_date.h", "w")
53-
commit_id = os.popen('git rev-parse --short HEAD').read()
54-
commit_date = os.popen('git log -1 --format="%cd" --date=iso').read()
55-
commit_date = commit_date.splitlines()
56-
commit_date = commit_date[0]
57-
commit_date = commit_date.split(' ')
58-
commit_date = commit_date[0] + "_" + commit_date[1]
59-
firmware_date_file.write(f"""
60-
#ifndef FIRMWARE_DATE_H
61-
#define FIRMWARE_DATE_H
62-
63-
#define FIRMWARE_DATE "{commit_date}"
64-
65-
#endif
66-
""")
67-
firmware_date_file.close()
68-
69-
# ### Step 3: Build the firmware (which will freeze everything in `modules`)
46+
47+
48+
# ### Step 2: Build the firmware (which will freeze everything in `modules`)
7049
print("\n\nBuilding rp2 port...\n")
7150
execute(['make', '-C', '../ports/rp2', '-j8', 'BOARD=THUMBY_COLOR', 'USER_C_MODULES=../../TinyCircuits-Tiny-Game-Engine/src/micropython.cmake'])
7251
print("\n\nDone building rp2 port!\n")
7352

74-
# Rename UF2 if want to
75-
firmware_path = f"../ports/rp2/build-THUMBY_COLOR/firmware_{commit_id}.uf2"
76-
shutil.move("../ports/rp2/build-THUMBY_COLOR/firmware.uf2", firmware_path)
7753

78-
# ### Step 4: Make sure output binary isn't larger than 1 MiB
54+
# ### Step 3: Make sure output binary isn't larger than 1 MiB
7955
# as the flash is partitioned as FIRMWARE | SCRATCH | FILESYSTEM
8056
# and only 1MiB is assumed for the max size of the binary
8157
# (see resources/engine_resource_manager.c)
@@ -84,11 +60,7 @@ def get_drives():
8460
if output_bin_size >= 1 * 1024 * 1024:
8561
raise Exception("ERROR: Output binary size is too large! It can only be upto 1Mib in size. See: https://github.com/TinyCircuits/TinyCircuits-Tiny-Game-Engine/issues/66")
8662

87-
# Exit if told not to upload
88-
if(upload is False):
89-
exit(0)
90-
91-
# ### Step 5: Assume that the port is plugged in and may be running a program, connect to it
63+
# ### Step 4: Assume that the port is plugged in and may be running a program, connect to it
9264
# end program with ctrl-c, and put into BOOTLOADER mode for upload
9365
print("Looking for serial port to reset...")
9466
for port, desc, hwid in sorted(serial.tools.list_ports.comports()):
@@ -118,7 +90,7 @@ def get_drives():
11890
print("\nConnected and reset!\n")
11991

12092

121-
# ### Step 6: Find the BOOTSEL device and copy over the firmware
93+
# ### Step 5: Find the BOOTSEL device and copy over the firmware
12294
print("Finding drive letter... (may need to manually put into BOOTSEL mode)")
12395
mount = None
12496
done = False
@@ -134,7 +106,7 @@ def get_drives():
134106
print("Found drive! " + mount)
135107

136108
print("Copying firmware to device...")
137-
execute(['sudo', 'cp', firmware_path, mount + "/firmware.uf2"])
109+
execute(['sudo', 'cp', '../ports/rp2/build-THUMBY_COLOR/firmware.uf2', mount + "/firmware.uf2"])
138110
print("SUCCESS: Copied firmware to device!\n")
139111

140112
# Wait for logo to end if calling in succession with run.py

collect_files_for_image.py

Lines changed: 0 additions & 61 deletions
This file was deleted.
-2.13 KB
Binary file not shown.

filesystem/Games/TestGames/DirectDrawBlitTest/main.py

Lines changed: 0 additions & 15 deletions
This file was deleted.

filesystem/Games/TestGames/DirectDrawCircleTest/main.py

Lines changed: 0 additions & 13 deletions
This file was deleted.

filesystem/Games/TestGames/DirectDrawLineTest/main.py

Lines changed: 0 additions & 13 deletions
This file was deleted.

filesystem/Games/TestGames/DirectDrawPixelTest/main.py

Lines changed: 0 additions & 13 deletions
This file was deleted.

filesystem/Games/TestGames/DirectDrawRectTest/main.py

Lines changed: 0 additions & 13 deletions
This file was deleted.

filesystem/Games/TestGames/DirectDrawTextTest/main.py

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)