Commit 6f77d81b authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

add kconfig variables for inflate lib

parent 8870ec8a
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -258,6 +258,14 @@ ifdef CONFIG_driver_softi2c
	COMMON_FLAGS += -DDRIVER_SOFTI2C
endif

ifdef CONFIG_lib_inflate
	CXX_TARGETS += src/lib/inflate.cc
endif

ifdef CONFIG_lib_inflate_checksum
	COMMON_FLAGS += -DDEFLATE_CHECKSUM
endif

# Configure drivers (TODO: Kconfig)

ifneq (${i2c_freq}, )
+6 −2
Original line number Diff line number Diff line
@@ -8,10 +8,14 @@ ifdef app
	override timer_s = 0
	override loop = 0
	override arch_drivers += ,counter
	override CONFIG_lib_inflate = y
endif

ifdef deflate_nop
	COMMON_FLAGS += -DDEFLATE_NOP
else
	CXX_TARGETS += src/lib/inflate.cc
	override undefine CONFIG_lib_inflate
endif

ifdef deflate_checksum
	override CONFIG_lib_inflate_checksum = y
endif
+5 −4
Original line number Diff line number Diff line
@@ -6,8 +6,8 @@ import subprocess
import sys


def main(arch):
    make_args = [f"arch={arch}", "app=deflatetest"]
def main(make_args):
    make_args += ["app=deflatetest"]
    base_rom = None
    base_ram = None
    defl_rom = None
@@ -55,7 +55,8 @@ def main(arch):

    rom_usage = int(np.ceil((defl_rom - base_rom) / 16)) * 16
    ram_usage = int(np.ceil((defl_ram - base_ram) / 16)) * 16
    print(f"| {arch} | {rom_usage} B | {ram_usage} B")
    arch_line = " ".join(make_args)
    print(f"| {arch_line} | {rom_usage} B | {ram_usage} B")

    status = subprocess.run(
        ["make", "cat"] + make_args, stdout=subprocess.PIPE, universal_newlines=True
@@ -74,4 +75,4 @@ def main(arch):


if __name__ == "__main__":
    main(*sys.argv[1:])
    main(sys.argv[1:])