Problem using custom build


Bobsheldon

Recommended Posts

Hi,

I'm trying to use GadgetFactory-Arduino- Soft-Core-v1.6.0-ga7f9bf7

With Papilio-ArduinoIDE0018f after having generated it with

Xilinx_ISE_DS_Win_13.4.

when trying an upload I get this error:

Converting Intel hex file to Verilog Mem format:

Selecting Papilio Custom Bit file.

Merging Verilog Mem file with Xilinx bitstream

ERROR:Data2MEM:6 - Illegal token 'RAMB16', 'opening range bracket '['' expected.

      Line #24, File "bitstream\custom_bd.bmm".

                  PM_Inst/RAM_Word0 RAM16 [15:0] [0:1023] PLACED = X0Y3;

                                                  ^

make: *** [pcustom] Error 3

I would appreciate any advice withthis. Thanks in anticipation

Link to comment
Share on other sites

Hello Bob,

Hmmm, this is an interesting one... The line in question in the custom_bd.bmm file should look like this:

          PM_Inst/RAM_Word0 [15:0] PLACED = X0Y3;

When you made your customizations did you make any changes to the memory layout?

The BMM file is automatically generated when then bit file is synthesized and it tells the data2mem tool which BRAM blocks to write the gcc generated hex file to.

I'm thinking, with the information at hand, that either you made some memory changes or version 13.4 does something differently. If you have made memory changes then the solution is to modify the bmm file in the project to match the changes. ISE uses the bmm file in the project to generate the _bd.bmm file.

Jack.

Link to comment
Share on other sites

Thanks Jack,

I edited my custom_bd.bmm file to look like your suggested format and it worked! I tried verifying the custom_bd.bmm With the data2MEM version in Xilinx 13.4 and it worked using the data2MEM in papilio-arduinoIDE failed as before. I suggest something has changed in the Xilinx ISE. Not to worry I'm up and running!! Thanks again. Bob

Link to comment
Share on other sites

Hi Jack,

The Papilio_AVR8.bmm looks like this, it is unaltered

ADDRESS_MAP avrmap PPC405 0

    ADDRESS_SPACE rom_code RAMB16 [0x00000000:0x00003fff]

        BUS_BLOCK

    PM_Inst/RAM_Word0 [15:0];

        END_BUS_BLOCK;

 

        BUS_BLOCK

    PM_Inst/RAM_Word1 [15:0];

        END_BUS_BLOCK;

        BUS_BLOCK

    PM_Inst/RAM_Word2 [15:0];

        END_BUS_BLOCK;

        BUS_BLOCK

    PM_Inst/RAM_Word3 [15:0];

        END_BUS_BLOCK;  

        BUS_BLOCK

    PM_Inst/RAM_Word4 [15:0];

        END_BUS_BLOCK;

 

        BUS_BLOCK

    PM_Inst/RAM_Word5 [15:0];

        END_BUS_BLOCK;

        BUS_BLOCK

    PM_Inst/RAM_Word6 [15:0];

        END_BUS_BLOCK;

        BUS_BLOCK

    PM_Inst/RAM_Word7 [15:0];

        END_BUS_BLOCK;

 

    END_ADDRESS_SPACE;

END_ADDRESS_MAP;

The generated file was Papilio_AV8_bd.bmm:

// BMM LOC annotation file.

//

// Release 13.4 - (null) O.87xd, build 2.7 Nov 11, 2011

// Copyright © 1995-2012 Xilinx, Inc.  All rights reserved.

///////////////////////////////////////////////////////////////////////////////

//

// Processor 'avrmap', ID 0, memory map.

//

///////////////////////////////////////////////////////////////////////////////

ADDRESS_MAP avrmap PPC405 0

    ///////////////////////////////////////////////////////////////////////////////

    //

    // Processor 'avrmap' address space 'rom_code' 0x00000000:0x00003FFF (16 KBytes).

    //

    ///////////////////////////////////////////////////////////////////////////////

    ADDRESS_SPACE rom_code RAMB16 [0x00000000:0x00003FFF]

        BUS_BLOCK

            PM_Inst/RAM_Word0 RAMB16 [15:0] [0:1023] PLACED = X0Y3;

        END_BUS_BLOCK;

        BUS_BLOCK

            PM_Inst/RAM_Word1 RAMB16 [15:0] [1024:2047] PLACED = X1Y2;

        END_BUS_BLOCK;

        BUS_BLOCK

            PM_Inst/RAM_Word2 RAMB16 [15:0] [2048:3071] PLACED = X0Y5;

        END_BUS_BLOCK;

        BUS_BLOCK

            PM_Inst/RAM_Word3 RAMB16 [15:0] [3072:4095] PLACED = X0Y4;

        END_BUS_BLOCK;

        BUS_BLOCK

            PM_Inst/RAM_Word4 RAMB16 [15:0] [4096:5119] PLACED = X0Y2;

        END_BUS_BLOCK;

        BUS_BLOCK

            PM_Inst/RAM_Word5 RAMB16 [15:0] [5120:6143] PLACED = X0Y1;

        END_BUS_BLOCK;

        BUS_BLOCK

            PM_Inst/RAM_Word6 RAMB16 [15:0] [6144:7167] PLACED = X1Y3;

        END_BUS_BLOCK;

        BUS_BLOCK

            PM_Inst/RAM_Word7 RAMB16 [15:0] [7168:8191] PLACED = X0Y0;

        END_BUS_BLOCK;

    END_ADDRESS_SPACE;

END_ADDRESS_MAP;

and finally my edited custom_bd.bmm file

// BMM LOC annotation file.

//

// Release 13.4 - (null) O.87xd, build 2.7 Nov 11, 2011

// Copyright © 1995-2012 Xilinx, Inc.  All rights reserved.

///////////////////////////////////////////////////////////////////////////////

//

// Processor 'avrmap', ID 0, memory map.

//

///////////////////////////////////////////////////////////////////////////////

ADDRESS_MAP avrmap PPC405 0

    ///////////////////////////////////////////////////////////////////////////////

    //

    // Processor 'avrmap' address space 'rom_code' 0x00000000:0x00003FFF (16 KBytes).

    //

    ///////////////////////////////////////////////////////////////////////////////

    ADDRESS_SPACE rom_code RAMB16 [0x00000000:0x00003FFF]

        BUS_BLOCK

            PM_Inst/RAM_Word0 [15:0] PLACED = X0Y3;

        END_BUS_BLOCK;

        BUS_BLOCK

            PM_Inst/RAM_Word1 [15:0]  PLACED = X1Y2;

        END_BUS_BLOCK;

        BUS_BLOCK

            PM_Inst/RAM_Word2 [15:0]  PLACED = X0Y5;

        END_BUS_BLOCK;

        BUS_BLOCK

            PM_Inst/RAM_Word3 [15:0] PLACED = X0Y4;

        END_BUS_BLOCK;

        BUS_BLOCK

            PM_Inst/RAM_Word4 [15:0] PLACED = X0Y2;

        END_BUS_BLOCK;

        BUS_BLOCK

            PM_Inst/RAM_Word5 [15:0] PLACED = X0Y1;

        END_BUS_BLOCK;

        BUS_BLOCK

            PM_Inst/RAM_Word6 [15:0] PLACED = X1Y3;

        END_BUS_BLOCK;

        BUS_BLOCK

            PM_Inst/RAM_Word7 [15:0] PLACED = X0Y0;

        END_BUS_BLOCK;

    END_ADDRESS_SPACE;

END_ADDRESS_MAP;

:D If there anything you want me to try, let me know.

Cheers

Bob

Link to comment
Share on other sites

Guest John W

Hi,

I went though this as well.  I found that I had to update the data2mem.exe with the latest version, and I had to add a dash (-) in front of the second data2mem command in the Makefile.  It appears that the second command returns some error code which would otherwise cause the make to fail.

My "custom" section of the Makefile in hardware\tools\butterfly_platform looks like this:


CUSTOM_FOLDER=bitstreams/
CUSTOM_BITFILE=$(CUSTOM_FOLDER)custom.bit
CUSTOM_BMM=$(CUSTOM_FOLDER)custom_bd.bmm

pcustom:
    @echo
    @echo Selecting Papilio Custom Bit file.
    @echo
    @echo $(MSG_BIT)
    ./data2mem -bm $(CUSTOM_BMM) -bt $(CUSTOM_BITFILE) -bd out.mem -o b out.bit
    -./data2mem -bm $(CUSTOM_BMM) -bt out.bit -d > out.dmp
ifeq ($(PAPILIO_SIM),TRUE)
    $(DATA2MEM) -bm $(CUSTOM_BMM) -bd out.mem -o h $(PAPILIO_SIM_PATH)
endif

Link to comment
Share on other sites

  • 1 month later...

Hi,

I went though this as well.  I found that I had to update the data2mem.exe with the latest version, and I had to add a dash (-) in front of the second data2mem command in the Makefile.  It appears that the second command returns some error code which would otherwise cause the make to fail.

My "custom" section of the Makefile in hardware\tools\butterfly_platform looks like this:


CUSTOM_FOLDER=bitstreams/
CUSTOM_BITFILE=$(CUSTOM_FOLDER)custom.bit
CUSTOM_BMM=$(CUSTOM_FOLDER)custom_bd.bmm

pcustom:
    @echo
    @echo Selecting Papilio Custom Bit file.
    @echo
    @echo $(MSG_BIT)
    ./data2mem -bm $(CUSTOM_BMM) -bt $(CUSTOM_BITFILE) -bd out.mem -o b out.bit
    -./data2mem -bm $(CUSTOM_BMM) -bt out.bit -d > out.dmp
ifeq ($(PAPILIO_SIM),TRUE)
    $(DATA2MEM) -bm $(CUSTOM_BMM) -bd out.mem -o h $(PAPILIO_SIM_PATH)
endif

This worked like a charm for me. WebPack 13.4. Copied over the data2mem from WebPack and added the "-" to the make file.

Thanks John!

Link to comment
Share on other sites

  • 3 months later...

After trying the fix, I get a different error,


Merging Verilog Mem file with Xilinx bitstream:
make: *** [pcustom] Error -1073741502

which is the code for STATUS_DLL_INIT_FAILED (0xC0000142). This is coupled with a Visual C++ Runtime dialog that says:


Runtime Error!

Program: C:\Users\Bug\A...
R6034
An application has made an attempt to load the C runtime library incorrectly.
Please contact the application's support team for more information.

The reference to the C library made me suspect that msys was at fault (as in http://forum.gadgetf...d-vista-64-bit/ ), but replacing msys-1.0.dll had no apparent effect. Because the path is truncated, I'm not even sure which exe threw the error, but I suspect it may be the new data2mem.

Ideas?

Link to comment
Share on other sites

Ok, it's been a while since I set this all up, but what I remember is that I had to copy the Microsoft.VC80.CRT directory for data2mem.exe to work. So look in the Xilinx directory where you got data2mem and see if there is a Microsoft.VC80.CRT directory and upgrade that as well.

Jack.

Link to comment
Share on other sites

To find missing dependencies you can also use this tool: http://www.dependencywalker.com/

either drag the exefile into that, and it will show you all external dll's and stuff it requires, and it will mark with red what it don't find, if it is dynamically linked to the exe, just run it via the menu profile, and you can see it there also.

There are often trouble with apps compiled with newer visualstudio versions, since there are quite a few builds of those libraries..

Link to comment
Share on other sites

As I suspected, the 13.4 version of data2mem works, not 14+. I just had to temporarily sacrifice 30 GB of my HDD. :P

To find missing dependencies you can also use this tool: http://www.dependencywalker.com/

either drag the exefile into that, and it will show you all external dll's and stuff it requires, and it will mark with red what it don't find, if it is dynamically linked to the exe, just run it via the menu profile, and you can see it there also.

There are often trouble with apps compiled with newer visualstudio versions, since there are quite a few builds of those libraries..

Thank you, that's a useful tool. It didn't look like data2mem (14.1) was missing anything, though...

Link to comment
Share on other sites

  • 1 month later...

Hi,

does anybody found the solution? i tried every thing propose in this topic without result.

the data2meme.exe (14.2) is crashing when i try to upload my board, and i have the message:

Merging Verilog Mem file with Xilinx bitstream:

make: *** [pcustom] Error -1073741515

The one in the papilio arduino works fine if i modify manually my _bd.bmm file.

Any sugestions ?

Link to comment
Share on other sites

  • 3 weeks later...

I had the same problem. So I tried to run the most recent Xilinx data2mem on commandline and it was having trouble locating some dll files (One was in the VC90.CRT directory, one was further away). after looking around the xilinx directories, I found them and copied them into the same directory as data2mem. As soon as data2mem worked, whenever data2mem would fail, I would copy my own data2mem (with all of the dll's it needed) into the directory and run data2mem, and then upload the bit file to the board. It worked. To make my life less complicated, I replaced the data2mem in the Arduino-Papilio IDE directory and it worked great. Funny side effect is that now it didn't work with anything but custom boards because now the bmm files for the Papilio-500k is incompatible with my new data2mem. So the way to fix that is to replace each of the old bmm files with ones that you generate yourself.

Hope that helps someone.

-Neil

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.