Skip to content

Commit

Permalink
Fix CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
HiFiPhile committed Aug 6, 2023
1 parent 7f3ff21 commit 207267c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions hw/bsp/lpc54/boards/lpcxpresso54628/board.mk
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion test/hitl/hitl_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@
]
}
]
}
}
18 changes: 9 additions & 9 deletions test/hitl/hitl_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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)
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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
Expand All @@ -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')
Expand All @@ -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')
Expand All @@ -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']:
Expand Down

0 comments on commit 207267c

Please sign in to comment.