Go Down

Topic: [Solved] A modified version of VidorDrawLogo won't run. (Read 3051 times) previous topic - next topic


Hello to all,
I modified the WidorDrawLogo a little to test it on my Vidor board connected to my TV.
I can flash the program without problem, but it won't run. I see nothing to the TV.
If I double-tap quickly the reset on the board the Arduino Logo start OK.

I had follow the "FPGA boot loader recovery" procedure too, and the procedure was completed without problem. But again, after I flashed the program I see nothing on the TV and trought the serial port too. I use a 5V/2.5A power supply and a powered USB hub. My VidorDrawLogo program has very little modification: I only replaced "Arduino" with my name!

Someone can help me? Where am'I wrong?



I attached all the log file.


Please post your full sketch. If possible you should always post code directly in the forum thread as text using code tags (</> button on the toolbar). This will make it easy for anyone to look at it, which will increase the likelihood of you getting help. If the sketch is longer than the forum will allow then it's OK to add it as an attachment. Don't put your code in some external file service like dropbox, etc.


Hello Pert, thanks for your post.
As I said, but I know my english is very bad, my program is the original WidorDrawLogo program where I modify the "Arduino" string to "Clemente".

But I attached the program to this post too.

Thanks for your time.


It's not quite accurate to say you "only replaced "Arduino" with my name" but I don't see any obvious problems. On the other hand, I don't have any experience with the Vidor.

What happens if you upload the original VidorDrawLogo sketch to the Vidor?


Thanks again Pert,
>What happens if you upload the original VidorDrawLogo sketch to the Vidor?
is the same thing, no image on the TV and no serial output. And I think the flash procedure ends correctly:
Code: [Select]

[==============================] 100% (10466/10466 pages)
done in 2.313 seconds

Verify 669764 bytes of flash with checksum.
Verify successful
done in 32.624 seconds
CPU reset.



Have you selected the correct baud rate? By default the IDE uses 9600 but the program uses 115200.


Hello FrederickZh, thanks for your replay,
yes the baud rate is 115200.


Just an update. I tried a very simple program:
Code: [Select]

#include "VidorGraphics.h"
#include "Vidor_GFX.h"

Vidor_GFX  vdgfx;

void setup() {
  while (!Serial){}

  Serial.println("Serial OK!");


void loop()
  Serial.println("Am'I a loop?");

and it worked as expected. May be a FPGA problem?



Aug 04, 2018, 05:16 pm Last Edit: Aug 04, 2018, 05:40 pm by tomtom2770
Hey everybody, I got the same problem with my MKR4000.

I just changed the color of the background in the example script, uploaded successfully and still can't see anything. When starting in bootloader mode (double click) the "normal" Arduino logo on a white background appears.

Code: [Select]

// Fill the screen with a yellowbackground

I also tried to use different phone chargers, different USB cables and used the FPGA boot loader recovery, but unfortunately nothing worked out.
If I add some print statements in the loop method I can see them in the console, but still no "new" image on screen.
Did anyone managed to run it correctly?


Same problem.

Code: [Select]
#include "VidorGraphics.h"
#include "Vidor_GFX.h"

Vidor_GFX  vdgfx;

void setup() {
  while (!Serial){}

  // Initialize the FPGA
  if (!FPGA.begin()) {
    Serial.println("Initialization failed!");
    while (1) {}


void loop()
{ char S[12];
  *  Draw an Arduino logo
  sprintf(S, "[%08d] Start screen draw...", millis());

  // Fill the screen with a white background

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

  *  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());
  vdgfx.fillCircle(415,225,100 ,vdgfx.lightBlue(),1);
  sprintf(S, "[%08d] ...Circle2...", millis());
  vdgfx.fillCircle(225,225,90 ,vdgfx.White(),1);
  sprintf(S, "[%08d] ...circle3...", millis());
  vdgfx.fillCircle(415,225,90 ,vdgfx.White(),1);
  sprintf(S, "[%08d] ...Circle4...", millis());
  vdgfx.fillRect(175,220,100,10 ,vdgfx.lightBlue(),1);
  sprintf(S, "[%08d] ...Rect1...", millis());
  vdgfx.fillRect(365,220,100,10 ,vdgfx.lightBlue(),1);
  sprintf(S, "[%08d] ...Rect2...", millis());
  vdgfx.fillRect(410,175,10,100 ,vdgfx.lightBlue(),1);
  sprintf(S, "[%08d] ...Rect3...", millis());

  *  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
  sprintf(S, "[%08d] ---printed TEST...", millis());
  sprintf(S, "[%08d] ...printed TM...", millis());

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

  while (1) {

The program is loaded correctly but then the usual logo remains instead of the modified one.

Code: [Select]
Welcome to minicom 2.7.1

Compiled on Aug 13 2017, 15:25:34.
Port /dev/ttyACM0, 18:01:05

Press CTRL-A Z for help on special keys

[00017511] Start screen draw...
[00022512] ...filled...
[00027513] ...Circle1...
[00032514] ...Circle2...
[00037515] ...circle3...
[00042516] ...Circle4...
[00047517] ...Rect1...
[00052518] ...Rect2...
[00057519] ...Rect3...
[00077523] ---printed TEST...
[00087525] ...printed TM...
[00087525] ...STOP!

By printing the milliseconds, each call to the graphics library lasts exactly 5001ms ... very strange.


After several hours spent trying to understand how the bootloader and JTAG bridge work.
My conclusion is that applicative software is never load in FPGA.

aka :
Code: [Select]

     uint32_t ptr[1];
     ptr[0] = 0 | 3;
     xmbCmdSend(ptr, 1); // (or xmbEveSend(ptr, 1) .. because I tried both)

just do nothing.

I finally put a scope probe on Flash CLK pin.

Factory software is load by the FPGA during power on (and only in this case not reset nor double reset).
The download duration is approximatly 64ms.

After that the FLASH component is neither more access unless R/W via JTAG interface

So FPGA is kept in factory software.
It's still able to answer some read flash request like
Code: [Select]

jtagFlashReadBlock(0x080000/*LAST_FLASH_PAGE*/, sizeof(buffer), (uint8_t*)buffer);

and basic commands (even the version command don't always return the same result).

So my next step will be to directly program the FPGA using an USBBlaster, but for now I have to rebuild a basic configuration with at least FLASH and JTAG bridge access.


By printing the milliseconds, each call to the graphics library lasts exactly 5001ms ... very strange.

MB Timeout is 5000ms. All calls to graphics functions end with a timeout. The request is sent to the MB but there is no response from the FPGA side.


Hello Riccardo,
using your program I have the same result:
Code: [Select]

[00019011] Start screen draw...
[00024012] ...filled...
[00029013] ...Circle1...
[00034014] ...Circle2...
[00039015] ...circle3...
[00044016] ...Circle4...
[00049017] ...Rect1...
[00054018] ...Rect2...
[00059019] ...Rect3...
[00079023] ---printed TEST...
[00089025] ...printed TM...
[00089025] ...STOP!


I get a similar response.

[00006611] Start screen draw...
[00016613] ...filled...
[00021614] ...Circle1...
[00026615] ...Circle2...
[00031616] ...circle3...
[00036617] ...Circle4...
[00041618] ...Rect1...
[00046619] ...Rect2...
[00051620] ...Rect3...
[00071624] ---printed TEST...
[00081626] ...printed TM...
[00081626] ...STOP!

I also get a strange amount of pixels put onto the screen with a small green rectangle at the top right. (image attached)


I tried the VidorTestSketch example of the VidorPeripherals library and it seems to work correctly.
So I took the piece of code that reads the version of the FPGA and inserted it into the VidorDrawLogo example of the VidorGraphics library:

Code: [Select]
  // 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

Unfortunately I get the FFFFFFFF value as a version:

Code: [Select]
Welcome to minicom 2.7.1

Compiled on Aug 13 2017, 15:25:34.
Port /dev/ttyACM0, 09:42:56

Press CTRL-A Z for help on special keys

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!

Perhaps it is, as philippe_at_sysemb says, that the file is not loaded into the FPGA, or the file in the library is corrupted.

Go Up