Lstout Posted April 3, 2013 Report Share Posted April 3, 2013 Hi, How can i program an arduino sketch for ZPUino to the spi flash ? Is it by creating a merged .bit file with the firmawre ? but how to do this ?The papilio loader offer the posibility to do this merging with the .bmm and .hex file, but how to get the hex file form the Arduino ide ? thanks Link to comment Share on other sites More sharing options...
alvieboy Posted April 3, 2013 Report Share Posted April 3, 2013 You can either upload it through the IDE (it will be written persistently to flash) or you can create a fpga bitfile+sketch that can be burned with papilioprog. Are you having trouble uploading using IDE or you want to generate a composite (FPGA bitfile+sketch) file that can be burned into the SPI flash ? Link to comment Share on other sites More sharing options...
Lstout Posted April 3, 2013 Author Report Share Posted April 3, 2013 Both in fact, I 'd like to generate a composit fpga+sketch file. And i also have a problem with the IDE: i can only load my sketch once after having burned the bit file. The second time and following there is some verify errors. To make it work again i have to do a global erease with the papilio loader and then burn again the bit file. But its quit long each time... It looks like the IDE does not erease the memory space of the sketch before writing. Because if i try to load the sketch twice without any change it's ok, but if i do a change i have to reburn every thing. Have you face that before ? Link to comment Share on other sites More sharing options...
alvieboy Posted April 4, 2013 Report Share Posted April 4, 2013 Which board are you using ? Care to paste the errors you are seeing ? Link to comment Share on other sites More sharing options...
Lstout Posted April 4, 2013 Author Report Share Posted April 4, 2013 i am using a papilio-pro board with the ide arduino-0102. Below is what i get if i try to load twice the sketch without ereasing and re-burning the bit file.An other thing is I understood that the IDE was suppose to burn the sketch, but if i do a OFF - ON on the board the program is lost. Board: Unknown board @ 96000000 Hz (0xa4041700)Verification failed at 0x00060000!05 18 02 ca 31 0a fa de a4 04 17 00 0b 0b 0b ae 80 04 00 00 0b 0b 0b 0b 88 08 0b 0b 0b ad d1 2d 0b 0b 0b 0b 88 0c 04 00 00 00 00 00 04 02 fc 05 0d 81 0b 80 e4 80 80 88 0c 80 e0 51 ae c1 2d 02 84 05 0d 04 02 fc 05 0d 82 0b 80 e4 80 80 88 0c 80 e0 51 ae c1 2d 02 84 05 0d 04 02 f4 05 0d 74 84 11 08 71 08 29 82 b0 0a 0c 53 80 e0 51 ae c1 2d 02 8c 05 0d 04 02 f8 05 0d 73 75 84 12 0c 51 a0 d7 2d 02 88 05 0d 04 02 f0 05 0d 75 77 54 54 86 d0 74 0c 80 52 72 51 ad d0 2d 81 52 72 51 ad dc 2d 72 10 10 84 80 05 53 8c 0b 81 90 0a 14 0c 87 e8 52 73 51 a0 f2 2d 73 51 a0 a9 2d 02 90 05 0d 04 02 fc 05 0d 72 84 11 08 88 0c 51 02 84 05 0d 04 80 e4 80 80 84 08 88 0c 04 72 82 2b 88 0c 04 02 f4 05 0d 75 52 74 51 a1 d7 2d bc 52 88 08 51 bb 81 2d 80 0b 88 08 24 8a 38 88 08 51 b9 b105 1c a3 db 31 0a fa de a4 04 17 00 0b 0b 0b ae c0 04 00 00 0b 0b 0b 0b 88 08 0b 0b 0b ad d3 2d 0b 0b 0b 0b 88 0c 04 00 00 00 00 00 04 02 fc 05 0d 81 0b 80 e4 80 80 88 0c 80 e0 51 ae d1 2d 02 84 05 0d 04 02 fc 05 0d 82 0b 80 e4 80 80 88 0c 80 e0 51 ae d1 2d 02 84 05 0d 04 02 f4 05 0d 74 84 11 08 71 08 29 82 b0 0a 0c 53 80 e0 51 ae d1 2d 02 8c 05 0d 04 02 f8 05 0d 73 75 84 12 0c 51 a0 d7 2d 02 88 05 0d 04 02 f0 05 0d 75 77 54 54 86 d0 74 0c 80 52 72 51 ad d4 2d 81 52 72 51 ad de 2d 72 10 10 84 80 05 53 8c 0b 81 90 0a 14 0c 87 e8 52 73 51 a0 f2 2d 73 51 a0 a9 2d 02 90 05 0d 04 02 fc 05 0d 72 84 11 08 88 0c 51 02 84 05 0d 04 80 e4 80 80 84 08 88 0c 04 72 82 2b 88 0c 04 02 f4 05 0d 75 52 74 51 a1 d7 2d bc 52 88 08 51 bb 85 2d 80 0b 88 08 24 8a 38 88 08 51 b9 b9Programming completed WITH ERRORS in 1.88 seconds. Link to comment Share on other sites More sharing options...
alvieboy Posted April 4, 2013 Report Share Posted April 4, 2013 Looks like the erase is not working. Which flash is that ? Is it MX (macronix) or SST ? I recall some issues with sector sizes on MX devices, but that was fixed quite long ago. I can send you an updated programmer if this ends up being the MX problem with sector sizes. Link to comment Share on other sites More sharing options...
Lstout Posted April 4, 2013 Author Report Share Posted April 4, 2013 The flash is MX (macronix) (MX25L6445) Link to comment Share on other sites More sharing options...
alvieboy Posted April 4, 2013 Report Share Posted April 4, 2013 Can you replace the programmer with this one, to see if issue goes away ? http://alvie.com/zpuino/downloads/other/zpuinoprogrammer-20130404.zip Extract it and replace the "zpuinoprogrammer.exe" which is inside "tools\zpu\bin". Link to comment Share on other sites More sharing options...
Lstout Posted April 4, 2013 Author Report Share Posted April 4, 2013 Hi, no sorry it's still exactly the same. Link to comment Share on other sites More sharing options...
alvieboy Posted April 4, 2013 Report Share Posted April 4, 2013 I clearly remember this issue now. Let me see if I can find the patch. It was only fixed in one of my branches, not sure which.... Link to comment Share on other sites More sharing options...
alvieboy Posted April 4, 2013 Report Share Posted April 4, 2013 Ok I think I found it: http://alvie.com/zpuino/downloads/other/zpuinoprogrammer-20130404-1.zip See if this one helps. Link to comment Share on other sites More sharing options...
Felix Posted April 4, 2013 Report Share Posted April 4, 2013 was this the one?may have to pull the changes into mine too. https://github.com/GadgetFactory/Papilio-Loader 1/4/2012 Version 2.4 Fixes from MagnusK * New cmd-line option (-d) that allows you to specify the FTDI device. This was asked for in this forum. * Spartan-6 LX4 - LX45 parts are added to the built-in device list * The fpga wait-code is put back * The code now supports many more flash parts * The number of pages in the Macronix part is corrected (32768, not 250000) * Misc corrections here and there in the code * The erase-before-programming is now handled by a new routine (Spi_PartialErase) that tries to be smarter about the erase. 12/3/2012 Version 2.3 Added support for larger bit files with Macronix chips.8/31/2012 Version 2.2 Added support for Macronix 64Mb SPI Flash chips. Added ability to Erase Flash chip from Explorer context menu. Link to comment Share on other sites More sharing options...
Lstout Posted April 4, 2013 Author Report Share Posted April 4, 2013 Yes, this one solved itThank you Alvie. Link to comment Share on other sites More sharing options...
dpavlin Posted August 9, 2013 Report Share Posted August 9, 2013 I'm having similar problem: Board: Unknown board @ 96000000 Hz (0xa4041700) I tried rebuilding zpuinoprogrammer from https://github.com/alvieboy/ZPUino-HDL/tree/master/zpu/hdl/zpuino/programmer but it still doesn't work for me. Looking in boards.c it seems to have 0xA4031700 but not 0xa4041700. What should I do? Just change definition to match my board? Is that safe to do? Update: after half day more, I managed to get everything working. I needed to compile my own ZAP IDE for Linux, replace zpuinoprogrammer with modified version as described below, and flash zpuino-1.0-PapilioPro-S6LX9-RetroCade-1.0.bit from zap-2.0.5 Windows installation. This brings me to my next question: why bit files from git clone of ZAP--ZPUino-Arduino-Papilio--IDE don't work? I can see that they are much smaller than ones in Windows installation. Also, zpuinoprogrammer from GadgetFactory branch doesn't work. But if you use the one from alvieboy's repo and just add additional board it works like charm.dpavlin@blue:/blue-zfs/ZPUino/ZPUino-HDL/zpu/hdl/zpuino/programmer$ git diff boards.cdiff --git a/zpu/hdl/zpuino/programmer/boards.c b/zpu/hdl/zpuino/programmer/boards.cindex 6d901ec..3a9ea83 100644--- a/zpu/hdl/zpuino/programmer/boards.c+++ b/zpu/hdl/zpuino/programmer/boards.c@@ -13,6 +13,7 @@ static struct board_type boards[] = { { 0xA4020F00, "GadgetFactory Papilio One 250 (extra RAM)" }, { 0xA4030E00, "GadgetFactory Papilio Plus LX4" }, { 0xA4031700, "GadgetFactory Papilio Pro LX9" },+ { 0xA4041700, "GadgetFactory Papilio Pro LX9" }, { 0x83010F00, "Spartan 3E Starter Kit S3E500" }, { 0x83011A00, "Spartan 3E Starter Kit S3E500 w/64MB DDR" }, { 0x83010E01, "Spartan 3E Starter Kit S3E500 w/ 8-bit HQVGA" }, Link to comment Share on other sites More sharing options...
alvieboy Posted August 22, 2013 Report Share Posted August 22, 2013 You don't need to add the board to the list. That list is just needed to display the board name, and does not affect the functionality. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.