Posts: 4
Threads: 1
Joined: May 2020
I'm trying to simulate standalone booting from flash using the bootsel=0 and the bootrom.
What are the steps to prepare an image starting from the compiled elf file?
Do I just need to load it as is in the flash model for simulation, or are there some additional steps required?
Is there some documentation regarding this topic?
Thanks !
Posts: 4
Threads: 1
Joined: May 2020
I installed the flash VIP model for the S25fs256S and modified the testbench parameter USE_S25FS256S_MODEL = 1;
At first the model wasn't loading because the readme was outdated.
To finish the installation after copying the files into the rtl/vip folder I ran:
Code:
./generate-scripts --flash-vip
make clean build
Now I can load the application from QSPI flash in the simulator by using the following command in an example folder:
Code:
make conf boot=rom all run CONFIG_OPT=vsim/boot-mode=rom gui=1
My only question that remains is how to create a flash .bin image for use on a real platform, because I would like to test the QSPI booting on an FPGA target.
For simplicity(to avoid the trouble of merging the bitstream and application image) I will configure the FPGA through JTAG, but let Pulpissimo load the application stored in the flash.
Posts: 4
Threads: 1
Joined: May 2020
By inspecting the makefiles I found the required command to generate the bin file for programming the flash.
Code:
plp_mkflash --flash-boot-binary=build/pulpissimo/test/test --stimuli=flash_stim.slm --flash-type=spi --qpi --archi=pulpissimo --raw flash.bin
If flash the resulting .bin file into the flash of my FPGA and load the pulpissimo bitstream in the FPGA using JTAG, the platform can load the application from flash after setting the switch connected to bootsel to 0 and pressing the cpu_reset button.
Posts: 43
Threads: 0
Joined: Mar 2019
Thanks for posting this. I see if I can include this in the README.