-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding Makefile targets for flashing. #519
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This'll be awesome. A few questions below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One optional change (see in-line comment).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I suggest we remove the OPENOCD_SCRIPTS
warning, but other than that I don't see any other changes to make.
Tested on my MAX78002EVKIT. Works great with standard projects. RISC-V projects don't work for some reason...
If I run make
from MAX78002/CNN/imagenet-riscv
it includes the flash file correctly:
C:\Users\JCarter3\repos\fork\msdk\Examples\MAX78002\CNN\imagenet-riscv>make
make[1]: Entering directory '/c/Users/JCarter3/repos/fork/msdk/Examples/MAX78002/CNN/imagenet-riscv'
here!
/C/Users/JCarter3/repos/fork/msdk/Libraries/CMSIS/../../Tools/Flash/flash.mk:50: Warning: OPENOCD_SCRIPTS undefined, using C:/Users/JCarter3/repos/fork/msdk/Tools/OpenOCD/scripts
make[1]: Leaving directory '/c/Users/JCarter3/repos/fork/msdk/Examples/MAX78002/CNN/imagenet-riscv'
make[1]: Entering directory '/c/Users/JCarter3/repos/fork/msdk/Examples/MAX78002/CNN/imagenet-riscv'
/bin/sh: line 1: gcc: command not found
expr: syntax error: unexpected argument ‘4’
here!
/C/Users/JCarter3/repos/fork/msdk/Libraries/CMSIS/../../Tools/Flash/flash.mk:50: Warning: OPENOCD_SCRIPTS undefined, using C:/Users/JCarter3/repos/fork/msdk/Tools/OpenOCD/scripts
/C/Users/JCarter3/repos/fork/msdk/Libraries/CMSIS/../../Tools/Flash/flash.mk:84: Warning: cygpath unavailable to convert path name
to Windows format
make[1]: Leaving directory '/c/Users/JCarter3/repos/fork/msdk/Examples/MAX78002/CNN/imagenet-riscv'
However if I then run make flash.openocd
:
C:\Users\JCarter3\repos\fork\msdk\Examples\MAX78002\CNN\imagenet-riscv>make flash.openocd
make: *** No rule to make target 'flash.openocd'. Stop.
Not sure why this is failing
Just to follow up on the build failure, this is an issue with that particular example because all of the available build targets are explicitly set in the Makefile. It doesn't include any other Makefiles. |
TODO: Improve RISC-V Makefile system for AI85/AI87 to match what we did for the BLE micros |
This will allow us to
make flash.openocd
.I added another target for JLink
make flash.jlink
. This isn't a part of our SDK, but I know that some of our customers prefer this to OpenOCD.What do we think of the file path and include in the Makefile?