0

Just got an Arduino M0 Pro and everything was going so well with my first project but then I suffered this error when trying to upload my sketch: Polling target at91samd21g18.cpu failed, trying to reexamine My arduino is connected and powered via USB from PC and it seems as though its the same issue as this: http://www.arduino.org/forums/post/reply?f=63&t=217 So I tried guide they suggested here: http://www.arduino.org/learning/tutorials/advanced-guides/arduino-m0-pro-for-advanced-user#Burning_Bootloader_procedure

All was going well with the Atmel Studio 7... but when I locate the bootloader file on my PC and click the program button... I get the following Erasing device... OK Programming Flash.. Cancelled with the error:

Unable to parse objectfile C:\Program Files (x86)\Arduino\hardware\arduino\samd\bootloaders\zero\Bootloader_D21_M0_Pro_150427.hex: Unsupported format.

I found an alternative bootloader for the M0 Pro file on github but its identical in every way to the original I have.

Can anyone help?

too honest for this site
  • 12,050
  • 4
  • 30
  • 52
Filious
  • 107
  • 2
  • 9
  • How did you create your 'Bootloader_D21_M0_Pro_150427.hex' ? If you Copy/Paste the content from the Github to a text file, you have to take care with the format especially the end of line. The arduino file are made as 'unix-style' (a single 'LF') instead of default 'windows style' format (CR+LF). – J. Piquard Nov 11 '16 at 16:21
  • @J. Piquard Not entirely sure I understand about the LF versus CR+LF but the bootloader file already existed in the Arduino application folder. When taking the github file I used copy and paste straight into notepad ++ to compare. If I've done something wrong how can I remedy the issue? – Filious Nov 11 '16 at 16:43
  • Reload the HEX file in your notepad++ and from 'Edit' menu, select 'EOL Conversion' then 'Unix format'. When conversion performed, save the file. – J. Piquard Nov 11 '16 at 16:58
  • @J. Piquard Doing as suggested and we are definitely making progress Erasing device... OK Programming Flash...OK Verifying Flash...OK and its still verifying and the 'L' led on board is flashing... Hope thats a good thing!? – Filious Nov 11 '16 at 17:57
  • Next step, you can write all details as an answer. – J. Piquard Nov 11 '16 at 18:55

1 Answers1

0

So I did as suggested by J. Piquard and after several attempts all appears to go well. I'm posting as much detail as I can for the benefit of others. When I hit the 'Program' button the Arduino led3 flashed repeatedly at speed and then I got the Erasing device... OK Programming Flash...OK Verifying Flash...OK After that the Arduino M0 Pro led3 labelled 'L' blinked at a steady 1 second pace. Not sure why or whether it should but it continued. Closed down the AtmelStudio app Launched Arduino IDE 1.7.11 (from arduino.org) and uploaed my sketch successfully. Led 3 stopped flashing...huge sigh... Now I'll try and figure out why the Nextion code trashed the bootloader..

NOTE: On first two attempts after flashing the board and trying to upload sketch in the IDE I received the error message that COM 4 was busy!

Big thanks to J. Piquard - that unix tip did the trick

Filious
  • 107
  • 2
  • 9