Go Down

Topic: Problem with VidorDrawLogo (Read 1 time) previous topic - next topic

FrederickZh

Hi Frederick,
if you reload the bootloader using the instructions here (https://forum.arduino.cc/index.php?topic=561393.0) do you see a green spot on the top left side?
thanks,

Dario
I had done the 'recovery' before carrying out all the tests I mentioned above. And actually I can see a green square in the upper-right corner of my screen instead of upper-left.

riccardo_giacomazzi

Same results also from me.
With the new app nothing has changed compared to the old one.
Nothing has changed since the FPGA Recovery.

I confirm that the green rectangle is at the top right.

sandeepmistry

#17
Aug 07, 2018, 11:10 pm Last Edit: Aug 07, 2018, 11:15 pm by sandeepmistry
Hi Everyone,

There was some issues with the bitstream provided in the original VidorGraphics library. We've pushed an updated version to Github: https://github.com/vidor-libraries/VidorGraphics

Please re-download the library and add to your sketchbook to get the fixes.

FrederickZh

#18
Aug 08, 2018, 04:38 am Last Edit: Aug 08, 2018, 05:20 am by FrederickZh
Hi Everyone,

There was some issues with the bitstream provided in the original VidorGraphics library. We've pushed an updated version to Github: https://github.com/vidor-libraries/VidorGraphics

Please re-download the library and add to your sketchbook to get the fixes.
Sorry but as reported by a2retro, the updated library still gave me the same results.

riccardo_giacomazzi

I confirm: no change after updating the library.

lcipriani

Please be sure to have the version
version=1.0.1

of the lib, you can check it by reading the file /home/luca/Arduino/libraries/VidorGraphics-master/library.properties

let us know if that is the case.

sandeepmistry

Also, please let us know the output of the serial monitor. As well as trying again after power cycling the board.

FrederickZh

Please be sure to have the version
version=1.0.1

of the lib, you can check it by reading the file /home/luca/Arduino/libraries/VidorGraphics-master/library.properties

let us know if that is the case.
Also, please let us know the output of the serial monitor. As well as trying again after power cycling the board.
  • Version == 1.0.1: Confirmed
  • Original VidorDrawLogo serial output: None
  • My VidorDrawLogo serial output: Waiting for FPGA...\n0\n1\n2\n3\n4 (endless)
  • Reset button: Tried for several times. made no difference.

riccardo_giacomazzi

I confirm what Frederick wrote, with the original example on the serial nothing comes.
With the example I modified:

Code: [Select]
void loop()
{ char S[12];
  /**
  *  Draw an Arduino logo
  */

  // Let's discover which version we are running
  int version = FPGA.version();
  Serial.print("Vidor bitstream version: ");
  Serial.println(version, HEX);

  // Let's also ask which IPs are included in this bitstream
  FPGA.printConfig();

  sprintf(S, "[%08d] Start screen draw...", millis());
  Serial.println(S);

  // Fill the screen with a white background
  vdgfx.fillRect(0,0,640,480,vdgfx.White(),1);

  sprintf(S, "[%08d] ...filled...", millis());
  Serial.println(S);

  /**
  *  The library allows drawing some basic elements to the view, like circles, rectangles, lines
  */ 

  vdgfx.fillCircle(225,225,100 ,vdgfx.lightBlue(),1);
  sprintf(S, "[%08d] ...Circle1...", millis());
  Serial.println(S);
  vdgfx.fillCircle(415,225,100 ,vdgfx.lightBlue(),1);
  sprintf(S, "[%08d] ...Circle2...", millis());
  Serial.println(S);
  vdgfx.fillCircle(225,225,90 ,vdgfx.White(),1);
  sprintf(S, "[%08d] ...circle3...", millis());
  Serial.println(S);
  vdgfx.fillCircle(415,225,90 ,vdgfx.White(),1);
  sprintf(S, "[%08d] ...Circle4...", millis());
  Serial.println(S);
  vdgfx.fillRect(175,220,100,10 ,vdgfx.lightBlue(),1);
  sprintf(S, "[%08d] ...Rect1...", millis());
  Serial.println(S);
  vdgfx.fillRect(365,220,100,10 ,vdgfx.lightBlue(),1);
  sprintf(S, "[%08d] ...Rect2...", millis());
  Serial.println(S);
  vdgfx.fillRect(410,175,10,100 ,vdgfx.lightBlue(),1);
  sprintf(S, "[%08d] ...Rect3...", millis());
  Serial.println(S);

  /**
  *  To draw a text we can use the classic functions like write() and print()
  *  Text size, color and position can be changed using the .text subclass
  */
  vdgfx.text.setCursor(150,375);
  vdgfx.text.setAlpha(1);
  vdgfx.text.setSize(3);
  vdgfx.text.setColor(vdgfx.lightBlue());
  vdgfx.println("TEST");
  sprintf(S, "[%08d] ---printed TEST...", millis());
  Serial.println(S);
  vdgfx.text.setCursor(480,145);
  vdgfx.text.setSize(1);
  vdgfx.println("TM");
  sprintf(S, "[%08d] ...printed TM...", millis());
  Serial.println(S);

  sprintf(S, "[%08d] ...STOP!", millis());
  Serial.println(S);

  while (1) {
  }
}


The following log arrives on the serial:

Code: [Select]
Vidor bitstream version: FFFFFFFF
number of devices 0
[00017103] Start screen draw...
[00022105] ...filled...
[00027106] ...Circle1...
[00032107] ...Circle2...
[00037108] ...circle3...
[00042109] ...Circle4...
[00047110] ...Rect1...
[00052111] ...Rect2...
[00057112] ...Rect3...
[00077116] ---printed TEST...
[00087118] ...printed TM...
[00087118] ...STOP!


It does not read the bitstream version, it does not read the devices present and every call to the library ends by timeout (5000ms).
It seems like there is not a mailbox attached to the virtual JTAG.

DarioPennisi

Hi,
just to nail things down a bit... first of all upload an empty sketch. this will prevent FPGA to be programmed with the application image and should stay in the boot image. eventually use the procedure to restore the boot image as per https://forum.arduino.cc/index.php?topic=561393.msg3828087#msg3828087

once this is done and you're sure you are in the boot image then you can reload the VidorDrawLogo sketch. that will load the sketch and the fpga image. note that it will take a while, up to a minute, after you see that download succeeded before the board is rebooted with the new software. this happens because the verification phase is silent (we're addressing this).

once this is complete you should see that image has been loaded correctly and that the sketch should finally display the programmatically drawn logo.

if you see errors then either you have a problem with boot image or there is something wrong in the transition from boot to application images.

FrederickZh

Hi,
just to nail things down a bit... first of all upload an empty sketch. this will prevent FPGA to be programmed with the application image and should stay in the boot image. eventually use the procedure to restore the boot image as per https://forum.arduino.cc/index.php?topic=561393.msg3828087#msg3828087

once this is done and you're sure you are in the boot image then you can reload the VidorDrawLogo sketch. that will load the sketch and the fpga image. note that it will take a while, up to a minute, after you see that download succeeded before the board is rebooted with the new software. this happens because the verification phase is silent (we're addressing this).

once this is complete you should see that image has been loaded correctly and that the sketch should finally display the programmatically drawn logo.

if you see errors then either you have a problem with boot image or there is something wrong in the transition from boot to application images.

did what you described, twice. still ended up with no luck. nothing changes :(

riccardo_giacomazzi

Loaded an empty sketch:

Code: [Select]
Lo sketch usa 10608 byte (4%) dello spazio disponibile per i programmi. Il massimo è 262144 byte.
Atmel SMART device 0x10010005 found
Device       : ATSAMD21G18A
Chip ID      : 10010005
Version      : v2.0 [Arduino:XYZ] Jun 20 2018 16:38:19
Address      : 8192
Pages        : -129
Page Size    : 64 bytes
Total Size   : 4194295KB
Planes       : 1
Lock Regions : 16
Locked       : none
Security     : false
Boot Flash   : true
BOD          : false
BOR          : false
Arduino      : FAST_CHIP_ERASE
Arduino      : FAST_MULTI_PAGE_WRITE
Arduino      : CAN_CHECKSUM_MEMORY_BUFFER
Erase flash
done in 0.860 seconds

Write 10752 bytes to flash (168 pages)

[===========                   ] 38% (64/168 pages)
[======================        ] 76% (128/168 pages)
[==============================] 100% (168/168 pages)
done in 0.073 seconds

Verify 10752 bytes of flash with checksum.
Verify successful
done in 0.007 seconds
CPU reset.


Performed physical reset (power off) of the card.
No video appears on the screen, only by double clicking on the button is the logo with the green rectangle at the top right.
At this point I loaded the modified VidorDrawLogo with the debug messages:

Code: [Select]
Lo sketch usa 17584 byte (6%) dello spazio disponibile per i programmi. Il massimo è 262144 byte.
Atmel SMART device 0x10010005 found
Device       : ATSAMD21G18A
Chip ID      : 10010005
Version      : v2.0 [Arduino:XYZ] Jun 20 2018 16:38:19
Address      : 8192
Pages        : -129
Page Size    : 64 bytes
Total Size   : 4194295KB
Planes       : 1
Lock Regions : 16
Locked       : none
Security     : false
Boot Flash   : true
BOD          : false
BOR          : false
Arduino      : FAST_CHIP_ERASE
Arduino      : FAST_MULTI_PAGE_WRITE
Arduino      : CAN_CHECKSUM_MEMORY_BUFFER
Erase flash
done in 0.842 seconds

Write 680460 bytes to flash (10633 pages)

[                              ] 0% (64/10633 pages)
[                              ] 1% (128/10633 pages)
[                              ] 1% (192/10633 pages)
[                              ] 2% (256/10633 pages)
[                              ] 3% (320/10633 pages)
[=                             ] 3% (384/10633 pages)
[=                             ] 4% (448/10633 pages)
[=                             ] 4% (512/10633 pages)
[=                             ] 5% (576/10633 pages)
[=                             ] 6% (640/10633 pages)
[=                             ] 6% (704/10633 pages)
[==                            ] 7% (768/10633 pages)
[==                            ] 7% (832/10633 pages)
[==                            ] 8% (896/10633 pages)
[==                            ] 9% (960/10633 pages)
[==                            ] 9% (1024/10633 pages)
   [...]
[===========================   ] 90% (9600/10633 pages)
[===========================   ] 90% (9664/10633 pages)
[===========================   ] 91% (9728/10633 pages)
[===========================   ] 92% (9792/10633 pages)
[===========================   ] 92% (9856/10633 pages)
[===========================   ] 93% (9920/10633 pages)
[============================  ] 93% (9984/10633 pages)
[============================  ] 94% (10048/10633 pages)
[============================  ] 95% (10112/10633 pages)
[============================  ] 95% (10176/10633 pages)
[============================  ] 96% (10240/10633 pages)
[============================= ] 96% (10304/10633 pages)
[============================= ] 97% (10368/10633 pages)
[============================= ] 98% (10432/10633 pages)
[============================= ] 98% (10496/10633 pages)
[============================= ] 99% (10560/10633 pages)
[============================= ] 99% (10624/10633 pages)
[==============================] 100% (10633/10633 pages)
done in 3.063 seconds

Verify 680460 bytes of flash with checksum.
Verify successful
done in 33.484 seconds
CPU reset.


The video with the green rectangle always remains on the screen and the usual messages, interspersed with waiting 5s, arrive on the serial line.

Code: [Select]

Vidor bitstream version: FFFFFFFF
number of devices 0
[00016573] Start screen draw...
[00021575] ...filled...
[00026576] ...Circle1...
[00031577] ...Circle2...
[00036578] ...circle3...
[00041579] ...Circle4...
[00046580] ...Rect1...
[00051581] ...Rect2...
[00056582] ...Rect3...
[00076586] ---printed TEST...
[00086588] ...printed TM...
[00086588] ...STOP!


If it were a hardware problem interfacing between MCU and FPGA, the library of VidorSketchTest should not work, instead that works.

DarioPennisi

Hi guys,
i am suspecting there may be some kind of marginality on a few boards. please try substituting app.ttf in VidorGraphics with the attached file and run the test sketch. i am particularly interested in seeing which version is being reported. this should not return FFFFFFFF but likely won't even return the expected value for vidorgraphics. if this is the case then there is a problem reading flash. this version may as well work as i'm trying to reduce flash speed. sorry to treat you as guinea pigs but am just trying to figure out what's going on...

thanks,

a2retro

#28
Aug 09, 2018, 02:08 am Last Edit: Aug 09, 2018, 02:11 am by a2retro
Hi Dario, I get 100% uploaded but i get Verify failed right after (Win7)

Code: [Select]
An error occurred while uploading the sketch
checksumBuffer(start_addr=0x2d000, size=0x1000) = 0
checksumBuffer(start_addr=0x2e000, size=0x1000) = 0
checksumBuffer(start_addr=0x2f000, size=0x1000) = 0
checksumBuffer(start_addr=0x30000, size=0x1000) = 0
checksumBuffer(start_addr=0x31000, size=0x1000) = 0
checksumBuffer(start_addr=0x32000, size=0x1000) = 0
checksumBuffer(start_addr=0x33000, size=0x1000) = 0
checksumBuffer(start_addr=0x34000, size=0x1000) = 0
checksumBuffer(start_addr=0x35000, size=0x1000) = 0
checksumBuffer(start_addr=0x36000, size=0x1000) = 0
checksumBuffer(start_addr=0x37000, size=0x1000) = 0
checksumBuffer(start_addr=0x38000, size=0x1000) = 0
checksumBuffer(start_addr=0x39000, size=0x1000) = 0
checksumBuffer(start_addr=0x3a000, size=0x1000) = 0
checksumBuffer(start_addr=0x3b000, size=0x1000) = 0
checksumBuffer(start_addr=0x3c000, size=0x1000) = 0
checksumBuffer(start_addr=0x3d000, size=0x1000) = 0
checksumBuffer(start_addr=0x3e000, size=0x1000) = 0
checksumBuffer(start_addr=0x3f000, size=0x1000) = 0
checksumBuffer(start_addr=0x40000, size=0x1000) = 9fc9
checksumBuffer(start_addr=0x41000, size=0x1000) = 300b
Verify failed


It is using the new code on the Samd as I put some debug statements back. No change on the HDMI display Still shows the bootloader or blank display.

DarioPennisi

Hi. Verifica failed is expected as i didn't give you the new header with hashtag. Regardless this should bè loaded and you should be able to run the sketch and verify FPGA version. Since verification fails at end or download you have to manually reset.

Go Up