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

flash.mk openocd script can't open target binary #872

Closed
Brandon-Hurst opened this issue Jan 13, 2024 · 5 comments · Fixed by #876
Closed

flash.mk openocd script can't open target binary #872

Brandon-Hurst opened this issue Jan 13, 2024 · 5 comments · Fixed by #876
Assignees
Labels
bug Something isn't working build system This issue or pull request is related to the MSDK build system

Comments

@Brandon-Hurst
Copy link
Contributor

Attempting to flash my MAX78000FTHR via "make flash.openocd" as described in the User Guide.
image

Here is the output I consistently get:
image

I'm able to manually run openocd/arm-none-eabi-gdb server and flash the binary just fine, but the flashing script referenced here is unable to open the binary file. I also tried this from an Administrator-level bash environment.

@ethyljoybadiang
Copy link

Hello, I also have trouble similar to that. May I just ask, did you also encounter a gdb connection error?

@Brandon-Hurst
Copy link
Contributor Author

Hi Ethyl,

No, I did not. I was able to flash my app over gdb-openocd. I ran it like it explains in the User Guide, below for your reference:

In one terminal window, run:
openocd -s ${MAXIM_PATH}/Tools/OpenOCD/Scripts -f interface/cmsis-dap.cfg -f target/max78000.cfg

In another terminal, cd into your project directory and run arm-none-eabi-gdb then run the following commands:
target extended-remote :3333 connects to your running openocd client
file build/max78000.elf will set the target binary to load
load will load the flash

I was also able to flash with just OpenOCD by essentially running the same command as the flash.mk but on the command line.

Incidentally, I also installed onto a VM for Ubuntu 22.04 yesterday and the flash.mk process works just fine on Linux. So it's perhaps a Windows issue.

@Jake-Carter
Copy link
Contributor

Thanks @Brandon-Hurst, just replicated the issue. It does seem to be specific to Windows/MSYS2

@Jake-Carter Jake-Carter self-assigned this Jan 15, 2024
@Jake-Carter Jake-Carter added bug Something isn't working build system This issue or pull request is related to the MSDK build system labels Jan 15, 2024
@Jake-Carter
Copy link
Contributor

Hey @Brandon-Hurst just merged a fix into main. Should be working now

@Brandon-Hurst
Copy link
Contributor Author

Yep, tested and working. Thanks Jake!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working build system This issue or pull request is related to the MSDK build system
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants