cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
guinnesstrinker
Adventurer
Adventurer
9,051 Views
Registered: ‎08-23-2012

howto create an impact batch script with .bit and .srec to generate .mcs

I have a design (Spartan6, PlanAhead 14.7, MicroBlaze) and would like to create a script for creating a .mcs for a SPI-prom that includes

 

- download.bit (system.bit + bootloader.elf) <- merging is done

- application.srec <- conversion .elf to .srec is done

 

download.bit and application.srec are located in subdirectory "mcs".

filename.mcs should be written in subdirectory "mcs".

 

 

Doing this with the Impact-GUI is no problem.

Starting address of the application inside the prom  is 0x40b000.

 

This does not work. (download.bit file is put to address 0x40b000)

Why????

 

impact -batch impact.cmd

---------------------------------------------

impact.cmd:

 

setMode -pff
setSubmode -pffspi

addConfigDevice  -name "filename" -path "mcs"
setAttribute -configdevice -attr multibootBpiType -value ""
setAttribute -configdevice -attr compressed -value "FALSE"
setAttribute -configdevice -attr compressed -value "FALSE"
setAttribute -configdevice -attr autoSize -value "FALSE"
setAttribute -configdevice -attr fileFormat -value "mcs"
setAttribute -configdevice -attr fillValue -value "FF"
setAttribute -configdevice -attr swapBit -value "FALSE"
setAttribute -configdevice -attr dir -value "UP"
setAttribute -configdevice -attr multiboot -value "FALSE"
setAttribute -configdevice -attr multiboot -value "FALSE"
setAttribute -configdevice -attr spiSelected -value "TRUE"
setAttribute -configdevice -attr spiSelected -value "TRUE"


addPromDevice -p 1 -size 16384 -name 16M

addDesign -version 0 -startaddress 0x0
addDeviceChain -index 0
addDevice -p 1 -file "mcs/download.bit"

addDesign -version 0 -startaddress 0x40b000
addDeviceChain -index 1
addDevice -p 1 -file "mcs/application.srec"

generate
quit

---------------------------------------------

 

Tags (5)
0 Kudos
Reply
4 Replies
venkata
Moderator
Moderator
8,669 Views
Registered: ‎02-16-2010

What is the error you are finding?
------------------------------------------------------------------------------
Don't forget to reply, give kudo and accept as solution
------------------------------------------------------------------------------
0 Kudos
Reply
guinnesstrinker
Adventurer
Adventurer
8,663 Views
Registered: ‎08-23-2012

The whole impact.cmd is working fine, if you remove this block:

----------------

addDesign -version 0 -startaddress 0x40b000
addDeviceChain -index 1
addDevice -p 1 -file "mcs/application.srec"

----------------

 

This means I am able to create a filename.mcs that contains the download.bit file in subfolder mcs.

 

I am not able to tell Impact (via batch) that I want to add a "Non-Configuration Data file" application.srec (and not a second .bit).

 

 

Doing this using the GUI is easy (see screenshots)

 

 

screenshot_2016-04-22_155434.png
screenshot_2016-04-22_155410.png
screenshot_2016-04-22_155245.png
0 Kudos
Reply
venkata
Moderator
Moderator
8,424 Views
Registered: ‎02-16-2010

Check the commands populated in the IMPACT console while you add non-configuration data file to .mcs file. You can use the same commands in batch mode.
------------------------------------------------------------------------------
Don't forget to reply, give kudo and accept as solution
------------------------------------------------------------------------------
0 Kudos
Reply
guinnesstrinker
Adventurer
Adventurer
8,421 Views
Registered: ‎08-23-2012

That's what I did.

 

Btw. you can find this __impact.log and a __impact.cmd in

 

e:\Xilinx\14.7\ISE_DS\ISE\

 

(see attachment)

 

It doesn't really help ;-(

 

 

0 Kudos
Reply