Page 1 of 1

How to load automatically bit file into RP while rebooting

Posted: Wed Dec 20, 2017 12:06 pm
by tomershahar11
Hello

I'm working almost a year on the RP product, and every time I reboot the RP from power supply, the last bit file I loaded on it - erase automatically.
It actually doesn't erases from the SD card (it's still there under 'tmp' directory) but it's not loaded on it, i.e. it's not obeys the code configurable from VIVADO.

I need to program the RP to work with specific code, regardless of its mode (on \ off).
The loading action is done using the command:
"cat <BIT_FILE_NAME.bit> /dev/xdevcfg"

Is there any option to load it automatically when booting the RP? Any option to add it to boot setup?

Re: How to load automatically bit file into RP while rebooting

Posted: Fri Feb 09, 2018 2:08 pm
by carlos.e.teixeira
Hi Tomer

I'm not sure about your issue (I'm still learning about Red Pitaya and Linux environments), but I think that even you load your bitstream file to the 'devcfg' driver, the FSBL does not change. So, every time you power up your board, the FSBL (capable of programming the PL before loading U-Boot) uses the default bitstream file.

In order to have the FSBL load the PL, include the bitstream file when generating 'boot.bin' and boot normally.

Take a look here for more information.

I don't know if it is the best way, but I think it will solve your problem.
Best regards

Re: How to load automatically bit file into RP while rebooting

Posted: Wed Feb 14, 2018 12:23 pm
by redpitaya
If you do not want to rebuild the whole SD card image you can use crontab
Connect to you STEMlab board via terminal and type:

Code: Select all

 crontab -e 
and then insert this line

Code: Select all

 
   @reboot /home/my_name/bin/my_command
where my_command is an executable file (chmod 755 my_command), that contains

Code: Select all

cat <BIT_FILE_NAME.bit> /dev/xdevcfg