Skip to content

Commit af60fed

Browse files
committed
Changed flash cmd to a script
1 parent 09e2c5a commit af60fed

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
lines changed

.github/workflows/gradle.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,6 @@ jobs:
5959
name: build-artifact
6060
path: ./build
6161

62-
- name: Rename .out to .elf
63-
run: cd ./build/application/executable && ren application.out application.elf
64-
shell: cmd
65-
6662
- name: Flash on board
67-
run: cd ./build/application/executable && LinkServer flash MIMXRT1176xxxxx:MIMXRT1170-EVKB load .\application.elf
63+
run: ./scripts/flash.bat
6864
shell: cmd

scripts/flash.bat

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
@ECHO off
2+
3+
SET CURRENT_DIRECTORY=%CD%
4+
ECHO "Current directory: %CURRENT_DIRECTORY%"
5+
6+
cd ../build/application/executable/
7+
8+
REM Need to rename the .out into .elf to call the LinkServer flash cmd
9+
ren application.out application.elf
10+
11+
LinkServer flash MIMXRT1176xxxxx:MIMXRT1170-EVKB load .\application.elf
12+
13+
IF %ERRORLEVEL% NEQ 0 (
14+
ECHO "Failed to flash the board"
15+
EXIT /B %ERRORLEVEL%
16+
)
17+
18+
cd %CURRENT_DIRECTORY%

0 commit comments

Comments
 (0)