From 207267cf061f83cb1d6cfe4ed461402b2933b5ca Mon Sep 17 00:00:00 2001 From: HiFiPhile Date: Sun, 6 Aug 2023 16:50:49 +0200 Subject: [PATCH] Fix CI. --- hw/bsp/lpc54/boards/lpcxpresso54628/board.mk | 8 ++++---- test/hitl/hitl_config.json | 2 +- test/hitl/hitl_test.py | 18 +++++++++--------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/hw/bsp/lpc54/boards/lpcxpresso54628/board.mk b/hw/bsp/lpc54/boards/lpcxpresso54628/board.mk index e0b382aeb1..c3ddcb3f0e 100644 --- a/hw/bsp/lpc54/boards/lpcxpresso54628/board.mk +++ b/hw/bsp/lpc54/boards/lpcxpresso54628/board.mk @@ -1,12 +1,12 @@ -MCU_VARIANT = LPC54628 -MCU_CORE = LPC54628 +MCU_VARIANT = LPC54608 +MCU_CORE = LPC54608 PORT ?= 1 -CFLAGS += -DCPU_LPC54628J512ET180 +CFLAGS += -DCPU_LPC54608J512ET180 CFLAGS += -Wno-error=double-promotion -LD_FILE = $(MCU_DIR)/gcc/LPC54628J512_flash.ld +LD_FILE = $(MCU_DIR)/gcc/LPC54608J512_flash.ld LIBS += $(TOP)/$(MCU_DIR)/gcc/libpower_hardabi.a diff --git a/test/hitl/hitl_config.json b/test/hitl/hitl_config.json index 70778b8d1b..297ae8b817 100644 --- a/test/hitl/hitl_config.json +++ b/test/hitl/hitl_config.json @@ -73,4 +73,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/test/hitl/hitl_test.py b/test/hitl/hitl_test.py index f1523752fd..90546de3b7 100644 --- a/test/hitl/hitl_test.py +++ b/test/hitl/hitl_test.py @@ -40,7 +40,7 @@ def flash_jlink(sn, dev, firmware): ret = subprocess.run(f'JLinkExe -USB {sn} -device {dev} -if swd -JTAGConf -1,-1 -speed auto -NoGui 1 -ExitOnError 1 -CommandFile flash.jlink', shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) stdout = ret.stdout.decode() - os.remove('flash.jlink') + os.remove('flash.jlink') assert ret.returncode == 0, 'Flash failed\n' + stdout def test_cdc_dual_ports(id): @@ -56,7 +56,7 @@ def test_cdc_dual_ports(id): assert os.path.exists(port1) and os.path.exists(port2), \ 'Device not available' - + # Echo test ser1 = serial.Serial(port1) ser2 = serial.Serial(port2) @@ -91,7 +91,7 @@ def test_cdc_msc(id): assert os.path.exists(port) and os.path.exists(block), \ 'Device not available' - + # Echo test ser = serial.Serial(port) @@ -125,12 +125,12 @@ def test_dfu(id): break time.sleep(1) timeout = timeout - 1 - + assert timeout, 'Device not available' - + # Test upload try: - os.remove('dfu0') + os.remove('dfu0') os.remove('dfu1') except OSError: pass @@ -149,7 +149,7 @@ def test_dfu(id): with open('dfu1') as f: assert 'Hello world from TinyUSB DFU! - Partition 1' in f.read(), 'Wrong uploaded data' - os.remove('dfu0') + os.remove('dfu0') os.remove('dfu1') print('dfu test done') @@ -165,7 +165,7 @@ def test_dfu_runtime(id): break time.sleep(1) timeout = timeout - 1 - + assert timeout, 'Device not available' print('dfu_runtime test done') @@ -174,7 +174,7 @@ def test_dfu_runtime(id): if __name__ == '__main__': with open(f'{os.path.dirname(__file__)}/hitl_config.json') as f: config = json.load(f) - + for device in config['devices']: print(f"Testing device:{device['device']}") for test in device['tests']: