Go Down

Topic: [Solved] FPGA boot loader recovery (Read 2956 times) previous topic - next topic

sandeepmistry

#15
Aug 08, 2018, 02:57 pm Last Edit: Aug 08, 2018, 04:44 pm by sandeepmistry
Hi @ronsoul,

That's very strange. Can you please confirm you are not power cycling the board or removing the USB cable between steps?

We plan to have a new SAMD boot loader fix this week or next week with some fixes. Would you be able to wait until this is out? I'm certain your hardware is fine, because the steps before step 9 succeed.

ronsoul

@sandeepmistry

Just tried to power cycle it as you said.  Its still behaving the same way. 

Sure I can wait, its no problem.  Thanks for the help.

ron

ronsoul

Sorry ignore the last post I was on my phone.  I did not power cycle or remove the USB cable.

Ron

loopmasta

I am stuck at step 7. Even after 10 Minutes this call does not return.


loopmasta:VidorFPGARecovery stiwi$ ./tools/mac/clujtag -p /dev/tty.usbmodem31 -s boot.svf
clujtag
Copyright (C) 2009  RIEGL Research ForschungsGmbH
Copyright (C) 2009  Clifford Wolf <clifford@clifford.at>
Copyright (C) 2015  Cluster <clusterrr@clusterrr.com>
Lib(X)SVF is free software licensed under the ISC license.


Thats it ...

sandeepmistry

Hi @loopmasta,

Please use /dev/cu.usbmodem31 instead of [ /dev/tty.usbmodem31/i]:


Code: [Select]

$ ./tools/mac/clujtag -p /dev/cu.usbmodem31 -s boot.svf

loopmasta

#20
Aug 10, 2018, 08:41 pm Last Edit: Aug 11, 2018, 02:06 am by loopmasta
Thanks @sandeepmistry. Works fine now. Sketch upload to board seems to work now most of the time. Still having trouble with VidorGraphics but thats another problem.

sandeepmistry

Hi @loopmasta,

Thanks for the update, there's a new v1.0.2 version of VidorGraphics in the library manager, it should resolve the issues with VidorDrawLogo not working (there was a SPI flash misconfiguration in the previous version).

narit

Thank you for update.

My board is working now.

ronsoul

#23
Aug 13, 2018, 07:50 pm Last Edit: Aug 13, 2018, 07:50 pm by ronsoul
*Sigh* Mine is still not working. :(

sandeepmistry

Hi @ronsoul,

Could you please try the new releases from this thread: http://forum.arduino.cc/index.php?topic=563513.0

Let us know in that thread if after you've updated the SAMD21 boot loader if loading sketches that contain bitstreams still hang.

ronsoul

#25
Aug 14, 2018, 03:47 am Last Edit: Aug 14, 2018, 04:18 am by ronsoul
@sandeepmistry

thank you for the update to the bootloader.  I also updated the libraries.  I was able to update the bootloader successfully.  I then tried to upload a VidorDrawlogo and it failes to upload at the same spot (37%).  I then tried to do the fpga recovery and when I got to step 6 I see the arduino logo on the screen.  I then ran step 9 and it failed at the same spot, 49%.  So it seems like the hardware is ok (maybe).  What should I try next?

so there are some error messages now.

Arduino: 1.8.5 (Windows 10), Board: "Arduino MKR Vidor 4000"

Build options changed, rebuilding all
WARNING: library SPI claims to run on (samd) architecture(s) and may be incompatible with your current board which runs on (samd_beta) architecture(s).
C:\Users\Ron\Documents\Arduino\libraries\VidorGraphics\src\jtag.c: In function 'jtagWriteBuffer':

C:\Users\Ron\Documents\Arduino\libraries\VidorGraphics\src\jtag.c:618:18: warning: passing argument 2 of 'ReadTDOBuf' from incompatible pointer type [-Wincompatible-pointer-types]

   ReadTDOBuf(32, &address, 0, 0);

                  ^

C:\Users\Ron\Documents\Arduino\libraries\VidorGraphics\src\jtag.c:202:13: note: expected 'char *' but argument is of type 'unsigned int *'

 static void ReadTDOBuf(int bit_count, char *txbuf, char *rxbuf, int inst)

             ^~~~~~~~~~

C:\Users\Ron\Documents\Arduino\libraries\VidorGraphics\src\jtag.c:619:26: warning: passing argument 2 of 'ReadTDOBuf' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]

   ReadTDOBuf(32 * len+2, data, 0, 0);

                          ^~~~

C:\Users\Ron\Documents\Arduino\libraries\VidorGraphics\src\jtag.c:202:13: note: expected 'char *' but argument is of type 'const uint8_t * {aka const unsigned char *}'

 static void ReadTDOBuf(int bit_count, char *txbuf, char *rxbuf, int inst)

             ^~~~~~~~~~

C:\Users\Ron\Documents\Arduino\libraries\VidorGraphics\src\jtag.c: In function 'jtagReadBuffer':

C:\Users\Ron\Documents\Arduino\libraries\VidorGraphics\src\jtag.c:633:18: warning: passing argument 2 of 'ReadTDOBuf' from incompatible pointer type [-Wincompatible-pointer-types]

   ReadTDOBuf(32, &address, 0, 0);

                  ^

C:\Users\Ron\Documents\Arduino\libraries\VidorGraphics\src\jtag.c:202:13: note: expected 'char *' but argument is of type 'unsigned int *'

 static void ReadTDOBuf(int bit_count, char *txbuf, char *rxbuf, int inst)

             ^~~~~~~~~~

C:\Users\Ron\Documents\Arduino\libraries\VidorGraphics\src\jtag.c:637:19: warning: passing argument 2 of 'ReadTDOBuf' from incompatible pointer type [-Wincompatible-pointer-types]

     ReadTDOBuf(4, &address, 0, 1);

                   ^

C:\Users\Ron\Documents\Arduino\libraries\VidorGraphics\src\jtag.c:202:13: note: expected 'char *' but argument is of type 'unsigned int *'

 static void ReadTDOBuf(int bit_count, char *txbuf, char *rxbuf, int inst)

             ^~~~~~~~~~

In file included from C:\Users\Ron\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd21/include/samd21.h:69:0,

                 from C:\Users\Ron\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd.h:105,

                 from C:\Users\Ron\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/sam.h:540,

                 from c:\users\ron\appdata\local\arduino15\packages\arduino\hardware\samd_beta\1.6.23\cores\arduino\arduino.h:48,

                 from C:\Users\Ron\AppData\Local\Arduino15\packages\arduino\hardware\samd_beta\1.6.23\cores\arduino\USB\samd21_host.c:24:

C:\Users\Ron\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd21/include/samd21g18a.h:226:0: warning: "LITTLE_ENDIAN" redefined

 #define LITTLE_ENDIAN          1

 

In file included from c:\users\ron\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\sys\types.h:67:0,

                 from c:\users\ron\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\stdio.h:61,

                 from C:\Users\Ron\AppData\Local\Arduino15\packages\arduino\hardware\samd_beta\1.6.23\cores\arduino\USB\samd21_host.c:20:

c:\users\ron\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\machine\endian.h:17:0: note: this is the location of the previous definition

 #define LITTLE_ENDIAN _LITTLE_ENDIAN

 

In file included from C:\Users\Ron\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd21/include/samd21.h:69:0,

                 from C:\Users\Ron\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd.h:105,

                 from C:\Users\Ron\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/sam.h:540,

                 from C:\Users\Ron\AppData\Local\Arduino15\packages\arduino\hardware\samd_beta\1.6.23\cores\arduino\Arduino.h:48,

                 from C:\Users\Ron\AppData\Local\Arduino15\packages\arduino\hardware\samd_beta\1.6.23\cores\arduino\Print.cpp:23:

C:\Users\Ron\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd21/include/samd21g18a.h:226:0: warning: "LITTLE_ENDIAN" redefined

 #define LITTLE_ENDIAN          1

 

In file included from c:\users\ron\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\sys\types.h:67:0,

                 from c:\users\ron\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\stdio.h:61,

                 from C:\Users\Ron\AppData\Local\Arduino15\packages\arduino\hardware\samd_beta\1.6.23\cores\arduino\Print.cpp:20:

c:\users\ron\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\machine\endian.h:17:0: note: this is the location of the previous definition

 #define LITTLE_ENDIAN _LITTLE_ENDIAN

 

In file included from C:\Users\Ron\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd21/include/samd21.h:69:0,

                 from C:\Users\Ron\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd.h:105,

                 from C:\Users\Ron\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/sam.h:540,

                 from C:\Users\Ron\AppData\Local\Arduino15\packages\arduino\hardware\samd_beta\1.6.23\cores\arduino\SERCOM.h:22,

                 from C:\Users\Ron\AppData\Local\Arduino15\packages\arduino\hardware\samd_beta\1.6.23\cores\arduino\Uart.h:22,

                 from C:\Users\Ron\AppData\Local\Arduino15\packages\arduino\hardware\samd_beta\1.6.23\cores\arduino\Uart.cpp:19:

C:\Users\Ron\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd21/include/samd21g18a.h:226:0: warning: "LITTLE_ENDIAN" redefined

 #define LITTLE_ENDIAN          1

 

In file included from c:\users\ron\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\sys\types.h:67:0,

                 from c:\users\ron\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\stdio.h:61,

                 from C:\Users\Ron\AppData\Local\Arduino15\packages\arduino\hardware\samd_beta\1.6.23\cores\arduino\Print.h:23,

                 from C:\Users\Ron\AppData\Local\Arduino15\packages\arduino\hardware\samd_beta\1.6.23\cores\arduino\Stream.h:26,

                 from C:\Users\Ron\AppData\Local\Arduino15\packages\arduino\hardware\samd_beta\1.6.23\cores\arduino\HardwareSerial.h:24,

                 from C:\Users\Ron\AppData\Local\Arduino15\packages\arduino\hardware\samd_beta\1.6.23\cores\arduino\Uart.h:21,

                 from C:\Users\Ron\AppData\Local\Arduino15\packages\arduino\hardware\samd_beta\1.6.23\cores\arduino\Uart.cpp:19:

c:\users\ron\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\machine\endian.h:17:0: note: this is the location of the previous definition

 #define LITTLE_ENDIAN _LITTLE_ENDIAN



This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.


Thanks
Ron

sandeepmistry

Hi @ronsoul,


At this point, I think we get your board swapped out. Please contact support@arduino.cc and link to this forum post to get the process started.

I was certain your board was reparable via software, but it does not seem to be the case.

ronsoul

@sandeepmistry

Thank you for the help.

Ron

ronsoul

@sandeepmistry

I received my replacement board last night.  After updating the bootloader everything works as perfectly.

Ron

zhangsiyan12134

I got the board today and after I tried VidorDrawLogo example, I cannot upload any sketch in Normal mode to the board. So I tried the FPGA recovery procedure on Windows 10 and after I finished step 7, the red light keeps lit up, I wait for few more minutes, still lit up. So I keep doing the following steps and as the result, I still cannot upload sketch in normal mode.

And I also tried upload "SAMD_BootloaderUpdater" in DFU mode and it shows no need to update.

Go Up