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

Unable to upload Blink to MAX32620FTHR board #3

Closed
technoblogy opened this issue Sep 26, 2018 · 35 comments
Closed

Unable to upload Blink to MAX32620FTHR board #3

technoblogy opened this issue Sep 26, 2018 · 35 comments

Comments

@technoblogy
Copy link

I've just received a MAX32620FTHR board and I'm trying to develop an application for it, but I don't even seem to be able to successfully upload Blink to it.

I'm using Arduino IDE 1.8.5 on a Mac (High Sierra) and am following the instructions here:

https://github.com/MaximIntegratedMicros/arduino-max326xx/wiki/MAX32620FTHR#programming-the-max32620fthr

I've tried with the Native USB Port, and the Arduino IDE just hangs up at the "Uploading..." stage. Note that there's no USB port option available on the Tools->Port menu, which is suspicious.

I've also tried with the Programming Port, connecting the MAXDAP adapter to the MAX32620FTHR board, and both boards to the Mac via USB cables. Again, the Arduino IDE just hangs up at the "Uploading..." stage.

I hope someone can help me get started!

@khariya
Copy link
Contributor

khariya commented Sep 26, 2018

@technoblogy We're looking into this issue.
If there's no Port available, can you make sure the board is plugged in properly and gets enumerated?

Do you see a mass storage drive named 'BOOTLOADER' or 'DAPLINK'? If yes, can you try to do the following:

  1. From IDE, Sketch->Export Compiled Binary. You'll see a new .bin file in your sketch folder.
  2. Copy and paste the .bin file to the mass storage drive.

@technoblogy
Copy link
Author

Thank you for your reply.

If there's no Port available, can you make sure the board is plugged in properly and gets enumerated?

It's definitely plugged in properly. What do you mean by "enumerated"?

Do you see a mass storage drive named 'BOOTLOADER' or 'DAPLINK'?

Yes, BOOTLOADER.

From IDE, Sketch->Export Compiled Binary. Copy and paste the .bin file to the mass storage drive.

That works fine.

@technoblogy
Copy link
Author

(Sorry, clicked the wrong button.)

@khariya
Copy link
Contributor

khariya commented Sep 28, 2018

I uploaded a Blink example on MAX32620FTHR on Mac OS Mojave running Arduino 1.8.5. Everything worked as expected.
If you were able to successfully copy-paste the exported .bin file then you can be sure that the board and the Arduino support package works fine.

Would you mind trying it on a different computer?

Note that there's no USB port option available on the Tools->Port menu, which is suspicious.

This is a Serial (COM) port, not a USB mass storage port. When you connect using the Native USB port and see a BOOTLOADER drive, there won't be any Port available. If you connect using a MAXDAP adapter and see a DAPLINK drive, you should see a Port available.

@technoblogy
Copy link
Author

Checked again. Here's what happens:

Plug in the board. The Blink sketch uploaded via the exported .bin file runs, the LED flashes slowly, and I get /dev/cu.usbmodem1411 on the Port menu.

Hold down the Boot button, press and release the Reset button, and release Boot. The LED is now on steadily. /dev/cu.usbmodem1411 has disappeared from the Port menu.

Select Upload. I get the error:

java.lang.NullPointerException
	at cc.arduino.packages.uploaders.SerialUploader.uploadUsingProgrammer(SerialUploader.java:314)
	at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:89)
	at cc.arduino.UploaderUtils.upload(UploaderUtils.java:78)
	at processing.app.SketchController.upload(SketchController.java:713)
	at processing.app.SketchController.exportApplet(SketchController.java:686)
	at processing.app.Editor$DefaultExportHandler.run(Editor.java:2168)
	at java.lang.Thread.run(Thread.java:748)

and the Arduino IDE hangs on Uploading...

If I can get hold of another Mac I'll try it on that.

@technoblogy
Copy link
Author

I've now successfully run my Lisp interpreter for microcontrollers, uLisp, on the MAX32620FTHR:

uLisp - Lisp for microcontrollers

I uploaded it via the exported .bin file, and communication via the Arduino IDE's Serial Monitor works nicely.

I have a few questions about using the Arduino IDE with the MAX32620FTHR. Should I ask them here, or would it be better to email them directly to someone?

@khariya
Copy link
Contributor

khariya commented Oct 4, 2018

I have a few questions about using the Arduino IDE with the MAX32620FTHR. Should I ask them here, or would it be better to email them directly to someone?

I've contacted you via your uLisp email ID.

@SchneHa
Copy link

SchneHa commented Oct 21, 2018

I have the same problem on my Mac: If I try to upload an Arduino sketch (1.8.5) the IDE hangs during upload. I did it using DAPLink and board 'MAX32620FTHR (Programming Port)'. After a while I got the message 'Upload finished' but the max32620fthr wasn't programmed. I even tried using 'Upload using Programmer' without success.

I did the same with Arduino IDE 1.8.5 on a PC running Windows 7 and it worked.

Would you please look after this issue because I usually use a Mac and it isn't possible to program max32620fthr using Arduino IDE on it.

@SchneHa
Copy link

SchneHa commented Oct 21, 2018

...message during 'hanging' of the IDE: Searching for Maxim board in /Volumes

Uploading the sketch using the PC overwrites the bootloader. Re-burning bootloader can be done with PC but not with Mac. Bootloader Version: 0242

@khariya
Copy link
Contributor

khariya commented Oct 22, 2018

@SchneHa I'm not sure if I understand your problem exactly. I don't see any issue with the message "Searching for Maxim board in /Volumes" on Mac for uploading a sketch.
The original post mentions about IDE being stuck at "Uploading..." stage. Do you have a similar situation?

The MAX32620FTHR can be programmed in 2 ways, have you looked into this?

Re-burning bootloader can be done with PC but not with Mac.

I'll double check this.

@SchneHa
Copy link

SchneHa commented Oct 22, 2018

@khariya yes, it’s exactly the same problem. I see the message and the uploads stucks. After a while the upload seems to be finished but the message is still there and the upload didn’t succeed.

Programming and burning bootloader using a PC works well but programming overwrites the bootloader. After burning bootloader again I can see the volume ‚Bootloader‘ and drag the .bin file to it but thereafter bootloader is overwritten again.

I know the document the link refers to. But it isn’t how it is described. I can’t set the board into boot mode by holding down Boot button and releasing Reset button. And dragging a file to ‚Bootloader‘ overwrites the bootloader on the board as I wrote.

@khariya
Copy link
Contributor

khariya commented Oct 22, 2018

@SchneHa I just tried the "Burn Bootloader" feature in the following environment:
Mac OS X version 10.11.16
Arduino IDE 1.8.5
Maxim's package 1.1.4

It works fine with the instructions mentioned here.

Can you provide the steps to reproduce the issue your facing? Please include the connections of the board(s).

If you get the "Upload Finished" message on IDE at some point, then I don't see where it gets stuck.
How long does it display the message "Uploading..."? If it's only a couple of seconds then that's normal.
From your explanation, it looks like your upload succeeds but fails to run the program in an expected manner. Is that true?

@SchneHa
Copy link

SchneHa commented Oct 22, 2018

Mac OS X version 10.12.6
Arduino IDE 1.8.5
Maxim's package 1.1.4

Using MAX32620FTHR(Programming Port)
DAPLink adapter isn't flashing, uploading stucks for about 10 minutes, after that I see the following:

maxim

@SchneHa
Copy link

SchneHa commented Oct 22, 2018

maxim1

This doesn't work with the board I have! If pressing Boot button and releasing after pressed Reset button, the board starts into the same mode as previous, I see BOOTLOADER volume in Finder and have no serial port to flash using native USB port. That's exactly the same on PC and Mac.

Something seems to be wrong with the flashed bootloader 0242.

@khariya
Copy link
Contributor

khariya commented Oct 22, 2018

When you connect using the Native USB port and see a BOOTLOADER drive, there won't be any Serial Port available.
If you connect using a MAXDAP adapter and see a DAPLINK drive, you should see a Serial Port.

In order to Program with Native USB Port you don't need a Serial(COM) port to select under Tools->Port

When you see a BOOTLOADER volume, you should be able to upload a sketch, after selecting MAX32620FTHR(Native USB Port).

DAPLink adapter isn't flashing, uploading stucks for about 10 minutes

When programming via Native USB Port, disconnect the MAXDAP adapter from MAX32620FTHR (ribbon cable connection) and from host machine. Only MAX32620FTHR is connected and BOOTLOADER drive is available.
Do you have anything connected to the FTHR board other than micro USB cable? It could be an external circuitary that's drawing power from the board.

@SchneHa
Copy link

SchneHa commented Oct 22, 2018

This information I get in Systeminformation on my Mac if max32620fthr is plugged in as BOOTLOADER.

maxim2

@SchneHa
Copy link

SchneHa commented Oct 22, 2018

I did it without any other circuitary and got the same IDE message as I posted above. But the sketch wasn't uploaded. The board doesn't as it should (as flashed with DAPLink on PC).

@SchneHa
Copy link

SchneHa commented Oct 22, 2018

On a PC flashing over native USB port worked, but bootloader is overwritten after flashing. On a Mac there is no success!

@khariya
Copy link
Contributor

khariya commented Oct 23, 2018

If you picked Board->MAX32620FTHR(Native USB Port) and then uploaded a sketch to the BOOTLOADER drive, it won't override the bootloader on the board. No LED will flash when uploading to this drive. The drive will disappear and your application will start running.
To bring the BOOTLOADER drive back(different than restoring the bootloader):

  1. Press and keep holding BOOT button.
  2. Press and release the RESET button.
  3. Once you see a stable RED LED, release the BOOT button.

Now you'll be able to see the BOOTLOADER drive again. At this point, you are ready to upload another sketch.
Please note, while during the above process the MAXDAP adapter isn't connected to anything.
I'm guessing that by 'flashing' you mean, uploading a sketch.

If you're doing something different then above mentioned steps or in that order. Please provide the exact steps with connections to boards so I can recreate the issue.

@technoblogy
Copy link
Author

Here's a more detailed description of what happens for me with a MAX32620FTHR board on a Mac (macOS High Sierra) with the latest Arduino IDE and Maxim Arduino core:

Versions installed:

Arduino IDE version 1.8.7
Maxim ARM (32-bits) Boards: 1.1.4

Attempt 1

  • Plug in board

  • Select Board: Max32820FTHR(Native USB Port)

  • Select Port: /dev/cu.usbmodem1411

  • Load Examples Blink.

  • Select Sketch->Upload.

No LEDs are lit.

Error pane displays:

java.lang.NullPointerException
	at cc.arduino.packages.uploaders.SerialUploader.uploadUsingProgrammer(SerialUploader.java:314)
	at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:89)
	at cc.arduino.UploaderUtils.upload(UploaderUtils.java:82)
	at processing.app.SketchController.upload(SketchController.java:736)
	at processing.app.SketchController.exportApplet(SketchController.java:703)
	at processing.app.Editor$DefaultExportHandler.run(Editor.java:2028)
	at java.lang.Thread.run(Thread.java:748)

and it gets stuck on Uploading...

Attempt 2

Quit from Arduino IDE and try again:

Repeat above sequence but this time first do:

  • Press and keep holding BOOT button.
  • Press and release the RESET button.
  • Once you see a stable RED LED, release the BOOT button.

This time the red LED is lit steadily.

  • Select Sketch->Upload.

But exactly the same error as before, and stuck on Uploading...

Attempt 3

Tried the instructions for Restoring the bootloader:

  • Connect the MAXDAP adapter to the MAX32620FTHR as described in "Programming with a MAXDAP Programming Adapter".
  • Go to Tools and select Burn Bootloader.

I now get:

java.lang.NullPointerException
	at cc.arduino.packages.uploaders.SerialUploader.burnBootloader(SerialUploader.java:362)
	at processing.app.Editor.lambda$handleBurnBootloader$61(Editor.java:2385)
	at java.lang.Thread.run(Thread.java:748)
Error while burning bootloader.

@khariya
Copy link
Contributor

khariya commented Oct 23, 2018

Thanks, @technoblogy!
I'll look into it.

@SchneHa
Copy link

SchneHa commented Oct 23, 2018

If you picked Board->MAX32620FTHR(Native USB Port) and then uploaded a sketch to the BOOTLOADER drive, it won't override the bootloader on the board. No LED will flash when uploading to this drive. The drive will disappear and your application will start running.
To bring the BOOTLOADER drive back(different than restoring the bootloader):

  1. Press and keep holding BOOT button.
  2. Press and release the RESET button.
  3. Once you see a stable RED LED, release the BOOT button.

Now you'll be able to see the BOOTLOADER drive again. At this point, you are ready to upload another sketch.
Please note, while during the above process the MAXDAP adapter isn't connected to anything.
I'm guessing that by 'flashing' you mean, uploading a sketch.

If you're doing something different then above mentioned steps or in that order. Please provide the exact steps with connections to boards so I can recreate the issue.

@khariya Thank you, now I see a bit clearer. Yes, I mean 'uploading a sketch' (flashing).
My problem with Mac is the same as @technoblogy described. It seems not to be a problem of Macintosh.

@khariya
Copy link
Contributor

khariya commented Oct 25, 2018

@technoblogy do you know what type of file system you're using on your Mac? Is it APFS?

@technoblogy
Copy link
Author

Yes, APFS.

@SchneHa
Copy link

SchneHa commented Oct 25, 2018

My filesystem is HFS+ and I have exactly the same problem.

@SchneHa
Copy link

SchneHa commented Dec 18, 2018

Isn't there any solution of this problem?

@SchneHa
Copy link

SchneHa commented Jan 20, 2019

@khariya Did you look after the problem? Isn't it solved yet?

@khariya
Copy link
Contributor

khariya commented Jan 21, 2019

@SchneHa I apologize, I haven't been able to work on it for a while now due to other priorities.
I'll try to work on it soon.

@SchneHa
Copy link

SchneHa commented Feb 18, 2019

@khariya Maybe the issue is because MacOS isn't able to run a batch file? Look at
/Users/xxxxx/Library/Arduino15/packages/Maxim/tools/daplink/1.0.1/daplink.bat

@khariya
Copy link
Contributor

khariya commented Feb 18, 2019

I've found the issue. I'll be releasing an update soon.

@khariya
Copy link
Contributor

khariya commented Feb 18, 2019

@SchneHa @technoblogy Fixed in version 1.1.5

@khariya khariya closed this as completed Feb 18, 2019
@technoblogy
Copy link
Author

Thank you! I have upgraded to 1.1.5 and confirm that I have been able to upload Blink to the MAX32620FTHR via USB.

@khariya
Copy link
Contributor

khariya commented Feb 18, 2019

Thanks for the feedback!

@SchneHa
Copy link

SchneHa commented Feb 19, 2019

I can confirm, too. Thank you very much, after updating to version 1.1.5 it works very smooth.

@khariya
Copy link
Contributor

khariya commented Feb 19, 2019

Good to hear that. Thanks for your feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants