Speedier demo, flash app clear added

master
kaqu 2 years ago
parent 728f258fd9
commit 9198ffcfb2
  1. 12
      README.md
  2. 1
      helpers/ffffffff.img
  3. 8
      helpers/imageflasher.py
  4. 7
      software/README.md
  5. 16
      software/flashclearapp.sh
  6. 2
      software/flashcreate.sh
  7. 5
      software/source/illumination.c

@ -10,8 +10,9 @@ to life!).
### 1. Software ###
To use this project effectively, you will have to install LiteX, see https://github.com/enjoy-digital/litex for details. Project Trellis, NextPNR & YoSys shall also be installed.
Also, it is recommended to install the board support, see https://github.com/litex-hub/litex-boards.
To use this project effectively, you will have to install LiteX, see https://github.com/enjoy-digital/litex for details (and project Trellis, NextPNR & YoSys requirements).
Also, it is recommended to install the board support, see https://github.com/litex-hub/litex-boards,
as well as the the RISC-V tool chain (see https://github.com/sifive/freedom-tools/releases).
To communicate with your board via network, install the wishbone tools, see https://github.com/litex-hub/wishbone-utils.
To use the automatic documentation feature, you will have to install sphinx, see https://www.sphinx-doc.org/en/master. Also its wavedrom extension has to be installed, see https://pypi.org/project/wavedrom.
@ -75,11 +76,10 @@ After installation of the relevant toolchains:
automatically
12. Make sure, your JTAG adapter is in place!
13. Run:
./ramcreate.sh main illumination 1
and then:
./flashcreate.sh main illumination
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 ...
15. You probably want to modify the application now ... (for development purposes, I recommend the quicker RAM bank
loading - to get rid of an annoying flashed app, you may also use ./flashclearapp.sh ;)
Have fun!
Have fun!

@ -0,0 +1 @@
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>

@ -175,7 +175,13 @@ if __name__ == "__main__":
relpath = "../"
else:
relpath = "./"
filename = relpath + "software/build/main" # Fixed main.img!
print("arg1", sys.argv[1])
if sys.argv[1] == "--clear":
filename = relpath + "software/build/ffffffff" # Fixed ffffffff.img
from shutil import copyfile
copyfile(relpath + "software/helpers/ffffffff.img", filename)
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 ...")

@ -7,4 +7,9 @@ This directory contains the actual application & the loading/flashing tools.
example: ./ramcreate.sh main illumination 1
2. flashcreate.sh - Create & flash an application image (for permanent action across power losses)
usage: ./flashcreate.sh
usage: ./flashcreate.sh
3. flashclearapp.sh - Make flash app invalid, thus booting faster & then RAM boot dev. (pure convenience ...)
usage: ./flashclearapp.sh

@ -0,0 +1,16 @@
#!/bin/bash
#
# flashclearapp.sh
# Clear
#
# History:
# --------
# 29.10.20/KQ Initial version
#
echo "Clearing flash application ..."
cd ..
python3 helpers/imageflasher.py --clear
cd software
echo "Done."

@ -13,7 +13,7 @@ echo "Preparing flash image ..."
./ramcreate.sh main illumination 1
echo "Flashing image ..."
cd ..
python3 helpers/imageflasher.py
python3 helpers/imageflasher.py --flash
cd software
echo "Done."

@ -49,7 +49,7 @@ static int32_t arLEDBuffer[MAXTABLES][MAXLEDS]; // GRB values
extern char kbhit(void);
extern int key_eval(void);
static int iDelay = 100; // 100ms by default
static int iDelay = 15; // 100ms by default
int key_eval(void)
{
@ -57,7 +57,7 @@ int key_eval(void)
case 'w': if(iDelay < 200)
iDelay += 10;
break;
case 's': if(iDelay > 20)
case 's': if(iDelay > 10)
iDelay -= 10;
break;
case 'x': return 1; // Abort indication
@ -81,7 +81,6 @@ void send_LEDs(void)
npe_b24Data2Load_write(arLEDBuffer[j][i]); // store 32(24) bit value @Table/Offset
}
}
busy_wait(25); // Minimum that meets the eye ;)
}
void clear_LEDs(int iTable)

Loading…
Cancel
Save