From e917b37cad6b3b1930367dc98a0070f2de37eba0 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Thu, 16 Apr 2020 12:26:32 +0100 Subject: [PATCH] ECC-917: Create 4 output files --- memfs.py | 9 +++++---- memfs/CMakeLists.txt | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/memfs.py b/memfs.py index 121909564..ca961aa9c 100755 --- a/memfs.py +++ b/memfs.py @@ -30,6 +30,7 @@ print('Excluding: ', EXCLUDED) FILES = {} SIZES = {} NAMES = [] +CHUNK = 5500 * 1000 # chunk size in bytes # Binary to ASCII function. Different in Python 2 and 3 try: @@ -41,10 +42,10 @@ except: # The last argument is the base name of the generated C file(s) output_file_path = sys.argv[-1] -CHUNK = 7 * 1000 * 1000 # chunk size in bytes totsize = 0 # amount written fcount = 0 opath = output_file_path + "_" + str(fcount).zfill(3) + ".c" +print('Generating output: ', opath) g = open(opath, "w") for directory in dirs: @@ -102,14 +103,14 @@ for directory in dirs: g.close() fcount += 1 opath = output_file_path + "_" + str(fcount).zfill(3) + ".c" - #print('Generating output: ', opath) + print('Generating output: ', opath) g = open(opath, "w") totsize = 0 g.close() -assert fcount == 2 +assert fcount == 3 opath = output_file_path + "_final.c" -#print('Generating output: ', opath) +print('Generating output: ', opath) g = open(opath, "w") print(""" diff --git a/memfs/CMakeLists.txt b/memfs/CMakeLists.txt index 2827da4d5..0f5da4be9 100644 --- a/memfs/CMakeLists.txt +++ b/memfs/CMakeLists.txt @@ -9,6 +9,7 @@ set( generated_c_files ${CMAKE_CURRENT_BINARY_DIR}/memfs_gen_000.c ${CMAKE_CURRENT_BINARY_DIR}/memfs_gen_001.c ${CMAKE_CURRENT_BINARY_DIR}/memfs_gen_002.c + ${CMAKE_CURRENT_BINARY_DIR}/memfs_gen_003.c ${CMAKE_CURRENT_BINARY_DIR}/memfs_gen_final.c) add_custom_command(