Commit 88088871 authored by Tiago Jorge's avatar Tiago Jorge
Browse files

Generate GRMON script to load bitfiles into the flash SPI.

parent 6633af60
......@@ -2620,6 +2620,12 @@ struct config_bitfile {
int size;
};
''');
grmonScript = open("loadBitfilesToSpi.gr", "w")
grmonScript.write('''grcg enable 9
spi set pm 2
spi flash detect
spi flash erase
''');
for braveMakefile in os.popen("find . -path *VHDL-DESIGN/design/Makefile*"):
os.chdir(os.path.dirname(braveMakefile))
......@@ -2660,6 +2666,7 @@ struct config_bitfile bitfiles[] = {''');
else:
bitFilesHeader.write(''',
"%s", globalFpgaStatus_%s, %s, %s''' % (config, fBlockName, bitFileOffset, btfileSize))
grmonScript.write('''spi flash load ./GlueAndBuild/glue%s/TASTE-VHDL-DESIGN/design/bitfile-swapped.nxb %s\n''' % (fBlockName, bitFileOffset))
bitFileOffset = bitFileOffset + maxBitfileSize
os.chdir(savedDir)
bitFilesHeader.write('''
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment