1. Do I need to flash your "cart.bin" in the firmware subfolder to STM32H750 programmer? If so, how / by which tool?
I cant really find any documentation by WeActStudio and their github isnt helpful either.
You want to grab the zip file from here
https://github.com/WeActStudio/MiniSTM32H7xx/tree/master/Soft
Hold down the B0 button on the STM board and plug it into your computer. This will put the STM board into programming mode. The first time you do this you will likely need to install drivers for it. To install the driver run the included "DFU_Driver/STM32Bootloader.Bat" as administrator. You might need to re-plugin after installing the driver, I dont recall. Copy the cart.bin to the same dir you decompressed the zip to. Run "WeAct Studio USB Download Tool. Bat", it will prompt you for a filename, type in cart.bin. This will program the STM board. Once its done you should see the firmware running on the STM board's screen "P-ROM VTX V1".
The right most button on the STM board is the only button used for navigation in the firmware. A single short press will go to the next menu item, a 2 second press will pick the current item. The top level menu lets you pick the rom type (P, S, M, V, C). Once you select a rom type, you can choose from between TEST, DUMP, PROG, VERI.
The TEST command will try to read the flash chip's ID. I've documented what I have gotten on them all
here along with the crcs of the original flash contents, but they need to be verified they are correct.
The DUMP command will dump the contents of the flash to xrom.bin, where x is p, s, m, v or c depending on which flash type you picked. ie P-ROM DUMP will write to prom.bin file.
The PROG command will write xrom to the flash, where x is p, s, m, v or c depending on which flash type you picked. ie P-ROM PROG will write prom to the flash. Note that dump and prog use different files (prom.bin vs prom)
The VERI command will verify the flash against the xrom file, where x is p, s, m, v or c depending on which flash type you picked. ie P-ROM VERI will compare the flash with the prom file.
The sdcard should be formatted FAT. I've been using a 16G sandisk.
2. Regarding the rom files created by the compiler: are all of those files simply required on the micro sd card or does your firmware require a specific structure?
The compiler will create the following rom files under the ROM folder
Code:
crom-1
crom-2
mrom
prom-1
prom-2
prom-3
srom
vrom
These are the roms that need to be written to the flash chips. You will notice crom/prom's filenames don't match up with the expected filenames the PROG command is wanting. So you will need to
- install c1 flash chip in STM board
- copy crom-1 to the sdcard
- rename crom-1 to crom on the sdcard
- program the flash (and verify)
- install c2 flash chip in STM board
- copy crom-2 to the sdcard
- rename crom-2 to crom on the sdcard
- program flash (and verify)
And the same type of thing for the proms
The compiler will also create the following verilog include files in the Verilog folder
Code:
ix_c.inc
ix_p.inc
ix_v.inc
Code:
ix_c.inc needs to be copied to CPLD/XXX/CHA_CP1/rtl/ directory
ix_p.inc needs to be copied to CPLD/XXX/PROG_CP1/rtl/ directory
ix_v.inc needs top be copied to CPLD/XXX/PROG_PCM2/rtl/ directory
Where XXX is either AES or MVS depending on your 161in1 cart.
Regarding the CPLD part:
1. First of all, how do you connect the USB blaster? Simply by using the 10pin cable and the respective connector on both 161in1 pcbs?
2. You mention Quartus as a programming tool: can you be more specific on how to use that tool and with which data? "VTXCart-main\CPLD" seems to contain relevant files .. you mention that files in the subfolder "Verilog" created by the compiler are relevant as well. Do these need to be magically combined somehow?
The pinout of the jtag connector on the 161in1 boards is
pin 1 = VCC (3.3V)
pin 2 = GND
pin 3 = TCK
pin 4 = TDO
pin 5 = TDI
pin 6 = TMS
You would need to wire up the jtag connector to the usb blaster based on that. I didn't program my CPLDs with a usb blaster so someone else will need to help with that.
Each CPLD has its own Quartus project. So in Quartus do open project goto the synth directory of a given CPLD and open the project file. Pressing the Compile/Play button will compile the verilog code (this will only work if you copied over the ix_X.inc file from above). Once you have it compiled you would then need to program it to the the corresponding CPLD.
Just to note I'm still working my way through getting a cart fully working. I've got the P, S, M, V flashs all good, but the C flashes are being a pita because of the shitty daughter boards they use. They are super thin and fragile.