analogdevicesinc / msdk

Software Development Kit for Analog Device's MAX-series microcontrollers
Apache License 2.0
60 stars 75 forks source link

MAX32660 EVSYS Board Can't Flash #1003

Closed yuval5295 closed 3 weeks ago

yuval5295 commented 2 months ago

Hey,

I was running Hello_World example on it But I can't flash my board, it is giving the error: Remote communication error. Target disconnected.:

I am using VS (Eclipse made me too much troubles) and unfortunately I had never succeed to flash it. I did all the instructions mentioned on issue #883 step by step - updated the adapter firmware and erase but still no success.

this is my details on DAPALINK: Unique ID: 04211702bfb8038600000000000000000000000097969906 HIC ID: 97969906 Auto Reset: 0 Automation allowed: 1 Overflow detection: 0 Incompatible image detection: 0 Page erasing: 1 Daplink Mode: Interface Interface Version: 0256 Git SHA: 34fe95d79afeba62ef097774ecc609ef8c2b74ea Local Mods: 1 USB Interfaces: MSD, CDC, HID, WebUSB Interface CRC: 0xd7617efe Remount count: 0 URL: http://www.maximintegrated.com/max32660

this is what written on terminal:

image

looking forward for any help :)

Jake-Carter commented 2 months ago

Hi @yuval5295, have you ever been able to program the board? Or this is the error you're seeing on a first-time attempt?

yuval5295 commented 2 months ago

Hey Jake! I have never succeeded to program the board. I just started to try run the first example and it’s keep fail flashing.

בתאריך יום ב׳, 29 באפר׳ 2024 ב-18:35 מאת Jake Carter < @.***>:

Hi @yuval5295 https://github.com/yuval5295, have you ever been able to program the board? Or this is the error you're seeing on a first-time attempt?

— Reply to this email directly, view it on GitHub https://github.com/analogdevicesinc/msdk/issues/1003#issuecomment-2083055109, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO467GTHTA27R74UEJIUVQTY7ZSEVAVCNFSM6AAAAABG5ARPISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBTGA2TKMJQHE . You are receiving this because you were mentioned.Message ID: @.***>

Jake-Carter commented 2 months ago

Do you have a jumper installed on JP1 (labelled "Target VDD")?

You'll need to select either 3.3V or 1.8V. Either setting should work, but you'll need to select at least one to supply power to the MAX32660

yuval5295 commented 2 months ago

Yes I have and I put the jumper on 1.8V option.

בתאריך יום ב׳, 29 באפר׳ 2024 ב-19:42 מאת Jake Carter < @.***>:

Do you have a jumper installed on JP1 (labelled "Target VDD")?

You'll need to select either 3.3V or 1.8V. Either setting should work, but you'll need to select at least one to supply power to the MAX32660

— Reply to this email directly, view it on GitHub https://github.com/analogdevicesinc/msdk/issues/1003#issuecomment-2083195379, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO467GVGX43SYPFVVB3LOMDY7Z2ADAVCNFSM6AAAAABG5ARPISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBTGE4TKMZXHE . You are receiving this because you were mentioned.Message ID: @.***>

Jake-Carter commented 2 months ago

We re-tested with a board on our side and that latest PICO firmware you're using should work.

Can you run the following command from your VS Code terminal, and paste the output? It will print some additional debug info.

openocd -s $MAXIM_PATH/Tools/OpenOCD/scripts -f interface/cmsis-dap.cfg -f target/max32660.cfg -c "init;reset halt" -d3

The error you're getting is the generic error when there is a connection issue to the micro on the SWD port, the micro is powered off, the host PC can't find the debugger, etc.

yuval5295 commented 2 months ago

Hey!

Thank you for your reply. I send the command through terminal: [image: image.png]

On Mon, 29 Apr 2024 at 22:39, Jake Carter @.***> wrote:

We re-tested with a board on our side and that latest PICO firmware you're using should work.

Can you run the following command from your VS Code terminal, and paste the output? It will print some additional debug info.

openocd -s $MAXIM_PATH/Tools/OpenOCD/scripts -f interface/cmsis-dap.cfg -f target/max32660.cfg -c "init;reset halt" -d3

The error you're getting is the generic error when there is a connection issue to the micro on the SWD port, the micro is powered off, the host PC can't find the debugger, etc.

— Reply to this email directly, view it on GitHub https://github.com/analogdevicesinc/msdk/issues/1003#issuecomment-2083521967, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO467GTUV2O3CA6PSU4MA73Y72OXPAVCNFSM6AAAAABG5ARPISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBTGUZDCOJWG4 . You are receiving this because you were mentioned.Message ID: @.***>

Jake-Carter commented 2 months ago

@yuval5295 looks like the image didn't make it to the ticket from the email. Can you paste in the terminal output, or attach the image to the ticket on Github?

yuval5295 commented 1 month ago

Sure, here it is. [image: image.png]

On Sat, 4 May 2024 at 03:47, Jake Carter @.***> wrote:

@yuval5295 https://github.com/yuval5295 looks like the image didn't make it to the ticket from the email. Can you paste in the terminal output, or attach the image to the ticket on Github?

— Reply to this email directly, view it on GitHub https://github.com/analogdevicesinc/msdk/issues/1003#issuecomment-2093922281, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO467GVTULP6ERL67YLZ623ZAQVYXAVCNFSM6AAAAABG5ARPISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJTHEZDEMRYGE . You are receiving this because you were mentioned.Message ID: @.***>

Jake-Carter commented 1 month ago

Sorry, still not showing:

image

Can you paste the actual terminal output? CTRL+SHIFT+C should let you copy from the VS Code terminal

Jake-Carter commented 1 month ago

Alternatively you can run

openocd -s $MAXIM_PATH/Tools/OpenOCD/scripts -f interface/cmsis-dap.cfg -f target/max32660.cfg -c "init;reset halt" -d3 > openocd_log.txt 2>&1

and attach "openocd_log.txt"

yuval5295 commented 1 month ago

cfg -c "init;reset halt" -d3 Open On-Chip Debugger (Analog Devices 0.12.0-1.0.0-7) OpenOCD 0.12.0 (2023-09-27-07:53) Licensed under GNU GPL v2 Report bugs to @.***> User : 3 3 options.c:52 configuration_output_handler(): debug_level: 3 User : 4 7 options.c:52 configuration_output_handler(): Debug: 5 8 options.c:233 add_default_dirs(): bindir=/usr/local/bin Debug: 6 10 options.c:234 add_default_dirs(): pkgdatadir=/usr/local/share/openocd Debug: 7 13 options.c:235 add_default_dirs(): exepath=C:/MaximSDK/Tools/OpenOCD Debug: 8 16 options.c:236 add_default_dirs(): bin2data=../share/openocd Debug: 9 18 configuration.c:35 add_script_search_dir(): adding C:/Users/97254/AppData/Roaming/OpenOCD Debug: 10 21 configuration.c:35 add_script_search_dir(): adding C:/MaximSDK/Tools/OpenOCD/../share/openocd/site Debug: 11 25 configuration.c:35 add_script_search_dir(): adding C:/MaximSDK/Tools/OpenOCD/../share/openocd/scripts Debug: 12 29 command.c:155 script_debug(): command - ocd_find interface/cmsis-dap.cfg User : 13 32 command.c:608 command_run_line(): embedded:startup.tcl:28: Error: Can't find interface/cmsis-dap.cfg in procedure 'script' at file "embedded:startup.tcl", line 28

On Fri, 10 May 2024 at 01:34, Jake Carter @.***> wrote:

Alternatively you can run

openocd -s $MAXIM_PATH/Tools/OpenOCD/scripts -f interface/cmsis-dap.cfg -f target/max32660.cfg -c "init;reset halt" -d3 > openocd_log.txt 2>&1

and attach "openocd_log.txt"

— Reply to this email directly, view it on GitHub https://github.com/analogdevicesinc/msdk/issues/1003#issuecomment-2103553490, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO467GXGSNO6GUAWKMACZ73ZBP2XXAVCNFSM6AAAAABG5ARPISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBTGU2TGNBZGA . You are receiving this because you were mentioned.Message ID: @.***>

Jake-Carter commented 1 month ago

@yuval5295 are you on Windows? Sorry - I used the Linux syntax for environment variables. On Windows it should be:

openocd -s %MAXIM_PATH%/Tools/OpenOCD/scripts -f interface/cmsis-dap.cfg -f target/max32660.cfg -c "init;reset halt" -d3 > openocd_log.txt 2>&1

(%MAXIM_PATH% instead of $MAXIM_PATH)

yuval5295 commented 1 month ago

Hellp Jack! it seems nothing printed on the command line after I sent this command but it makes D1 blink green light fast (which not before I send it). What should I do next?

Thanks! Yuval.

On Tue, 14 May 2024 at 00:32, Jake Carter @.***> wrote:

@yuval5295 https://github.com/yuval5295 are you on Windows? Sorry - I used the Linux syntax for environment variables. On Windows it should be:

openocd -s %MAXIM_PATH%/Tools/OpenOCD/scripts -f interface/cmsis-dap.cfg -f target/max32660.cfg -c "init;reset halt" -d3 > openocd_log.txt 2>&1

(%MAXIM_PATH% instead of $MAXIM_PATH)

— Reply to this email directly, view it on GitHub https://github.com/analogdevicesinc/msdk/issues/1003#issuecomment-2108837127, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO467GQLEDONHOJ2AKMOHFTZCEWQDAVCNFSM6AAAAABG5ARPISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBYHAZTOMJSG4 . You are receiving this because you were mentioned.Message ID: @.***>

Jake-Carter commented 1 month ago

Hi @yuval5295,

That actually means that the command has successfully connected to the MAX32660. The OpenOCD server has launched and is waiting for a GDB client connection. Essentially it means that the debugger is working properly with the command.

This means that there could be some problem specific to the VS Code setup.

Have you set MAXIM_PATH correctly in your user settings.json file? See here

Please copy/paste the entire contents of your settings.json file here as well.

yuval5295 commented 3 weeks ago

Hello Jake!

Great news, you are totally right. the problem was the MAXIM_PATH I set, by accident I put two // instead of one! Thank you so much for your help and I'm sorry to bother you with such stupid mistake.

Also I wanted to ask, can you tell me what should I check if I can't see the prints on VS terminal? I used PuTTy instead but it seems that VS Terminal should work as well.

Thank you again, Yuval.

On Wed, 5 Jun 2024 at 02:18, Jake Carter @.***> wrote:

Hi @yuval5295 https://github.com/yuval5295,

That actually means that the command has successfully connected to the MAX32660. The OpenOCD server has launched and is waiting for a GDB client connection. Essentially it means that the debugger is working properly with the command.

This means that there could be some problem specific to the VS Code setup.

Have you set MAXIM_PATH correctly in your user settings.json file? See here https://analogdevicesinc.github.io/msdk//USERGUIDE/#getting-started-with-visual-studio-code

Please copy/paste the entire contents of your settings.json file here as well.

— Reply to this email directly, view it on GitHub https://github.com/analogdevicesinc/msdk/issues/1003#issuecomment-2148565617, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO467GX7YWL23KSZX6MYS3TZFZDMZAVCNFSM6AAAAABG5ARPISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBYGU3DKNRRG4 . You are receiving this because you were mentioned.Message ID: @.***>

Jake-Carter commented 3 weeks ago

Hey, no problem at all.

You can use the Serial Monitor extension. This is what I use.

Just be aware it has a small quirk - it will send a special serial command to reset the micro when you connect to the serial port... This can make debugging a bit strange if you're not aware of it. It's why I have not officially recommended it in the User Guide. But the extension otherwise works very well.

Jake-Carter commented 3 weeks ago

I will go ahead and close this out, but let me know if there's anything else I can help with.