Skip to content
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

Merged
merged 7 commits into from
Mar 30, 2023
Merged

Adding Makefile targets for flashing. #519

merged 7 commits into from
Mar 30, 2023

Conversation

kevin-gillespie
Copy link
Contributor

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?

Copy link
Contributor

@Jake-Carter Jake-Carter left a 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

Copy link
Contributor

@lorne-maxim lorne-maxim left a 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).

Copy link
Contributor

@Jake-Carter Jake-Carter left a 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

@kevin-gillespie
Copy link
Contributor Author

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.

@Jake-Carter
Copy link
Contributor

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

@Jake-Carter Jake-Carter added the build system This issue or pull request is related to the MSDK build system label Mar 29, 2023
@kevin-gillespie kevin-gillespie merged commit a277849 into main Mar 30, 2023
@kevin-gillespie kevin-gillespie deleted the flash-targets branch March 30, 2023 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build system This issue or pull request is related to the MSDK build system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants