Adjusted paths before publication

master
kaqu 2 years ago
parent 2e56f793a9
commit 6916be73de
  1. 3
      .gitignore
  2. 2
      README.md
  3. 3
      firmware/main.c
  4. 11
      helpers/imageflasher.py
  5. 18
      helpers/load_to_flash.py
  6. 1
      software/source/main.c

3
.gitignore vendored

@ -2,4 +2,5 @@ build/*
__pycache__/*
backup/*
software/build/*
hd_errors/*
hd_errors/*
helpers/__pycache__/*

@ -83,7 +83,7 @@ After installation of the relevant toolchains:
automatically
12. Make sure, your JTAG adapter is in place!
13. Run:
./flashcreate.sh main illumination
./flashcreate.sh
14. This flashes the application permanently to the boot address, where it will be verified by the BIOS
and started automatically (the good news: the 64kBytes of the sample application only take some 18 s ...)
15. You probably want to modify the application now ... (for development purposes, I recommend the quicker RAM bank

@ -46,9 +46,6 @@
#include <liblitesdcard/sdcard.h>
// Project local special (may need adjustment)
#include "/mnt/a30054ad-3fe6-444a-8d93-16df937e448e/projects/fpga/neopixelar/software/include/illumination.h"
static void boot_sequence(void)
{
if(serialboot()) {

@ -171,18 +171,17 @@ if __name__ == "__main__":
pwd = os.getcwd()
print("Working path: " + pwd)
_, tail = os.path.split(pwd)
if tail == "helpers": # Started within subdir?
relpath = "../"
else:
relpath = "./"
print("arg1", sys.argv[1])
if tail == "helpers": # Started within subdir?
os.chdir("..")
relpath = "./"
if sys.argv[1] == "--clear":
filename = relpath + "software/build/ffffffff" # Fixed ffffffff.img
from shutil import copyfile
copyfile(relpath + "software/helpers/ffffffff.img", filename)
copyfile(relpath + "helpers/ffffffff.img", filename + ".img")
else:
filename = relpath + "software/build/main" # Fixed main.img!
print(f"Translating {filename}.img to {filename}.svf")
convertBitToUploadFlashFile(filename + ".img", filename + ".svf", address=0x100000, id_provided= 0x41111043)
print(f"Load/flash {filename}.svf ...")
load2flash(filename + ".svf")
os.chdir(pwd)

@ -6,6 +6,7 @@
#
import os
import sys
def load2flash(file):
print("--------")
@ -23,21 +24,20 @@ jtag newtap ecp5 tap -irlen 8 -expected-id 0x41111043
def eraseflash(file):
load2flash(file)
if __name__ == "__main__":
bLoadProgram = False # False = Erase instead!
if __name__ == "__main__":
pwd = os.getcwd()
print("Working path: " + pwd)
_, tail = os.path.split(pwd)
if tail == "helpers": # Started within subdir?
relpath = ".."
else:
relpath = "."
if bLoadProgram == True:
os.chdir("..")
relpath = "./"
if sys.argv[1] != "--clear":
filename = relpath + "/build/colorlight_5a_75b/gateware/colorlight_5a_75b"
print(f"Load/flash {filename}.svf.flash ...")
load2flash(filename + ".svf.flash")
print("Done.")
else:
filename = relpath + "/helpers/eraser.svf"
print("Erasing flash w/ {0}(expect 5 min. waiting time ...)".format(filename))
eraseflash(filename)
print("Done.")
eraseflash(filename)
os.chdir(pwd)
print("Done.")

@ -104,6 +104,7 @@ int main(int i, char **c)
#endif
printf("\e[1mExecuting within RAM ...\e[0m\n");
printf("Press [w] slower, [s] faster, [x] to exit demo!\n");
while(1)
if(illumination()) // The DEMO !
break;

Loading…
Cancel
Save