Hello,
i'm using codeblocks via vncserver for developing a small c-program to acquire data from channel.
There are no errors from the compiler.
When i start my application i get the error message: BUS Error.
Therefore i start after reboot the webinterface from Red-Pitaya and open the oscilloscop application. After this step i run my own c application. The error doesn't appear.
Has anyone similar problems or any Idea how to fix it?
Thanks
BUS Error in CodeBlocks
-
- Posts: 7
- Joined: Thu Jan 07, 2016 10:39 am
Re: BUS Error in CodeBlocks
Hi,
Bus errors are generally caused by applications trying to access memory that hardware cannot physically address. The cause might be an unaligned access as well as non-existent address, not enough permissions to access or alter memory.
One of many possible reason is that you use wrong fpga bitstream. Which fpga bit-stream are you using currently?
Latest stable and beta releases load logic bitstream on boot, but oscilloscope application uses classic bitstream so you should probably load that one before you try to use actual adc hardware.
Simply running "cat /opt/redpitaya/fpga/fpga_classic.bit > /dev/xdevcfg" should fix this issue if this is the reason of bus error. You can also run this from system() from inside of your c application.
Cheers,
Uroš
Bus errors are generally caused by applications trying to access memory that hardware cannot physically address. The cause might be an unaligned access as well as non-existent address, not enough permissions to access or alter memory.
One of many possible reason is that you use wrong fpga bitstream. Which fpga bit-stream are you using currently?
Latest stable and beta releases load logic bitstream on boot, but oscilloscope application uses classic bitstream so you should probably load that one before you try to use actual adc hardware.
Simply running "cat /opt/redpitaya/fpga/fpga_classic.bit > /dev/xdevcfg" should fix this issue if this is the reason of bus error. You can also run this from system() from inside of your c application.
Cheers,
Uroš
-
- Posts: 11
- Joined: Fri Jul 14, 2017 11:51 pm
Re: BUS Error in CodeBlocks
Hi,
after running "cat /opt/redpitaya/fpga/fpga_0.94.bit > /dev/xdevcfg" in my c programm with system() it works without starting the oscilloscope from webinterface.
(I downloaded the image file "red_pitaya_OS-stable.img.zip 23-Feb-2017 15:50 463044908" from http://downloads.redpitaya.com/downloads/)
Thank you for your help.
after running "cat /opt/redpitaya/fpga/fpga_0.94.bit > /dev/xdevcfg" in my c programm with system() it works without starting the oscilloscope from webinterface.
(I downloaded the image file "red_pitaya_OS-stable.img.zip 23-Feb-2017 15:50 463044908" from http://downloads.redpitaya.com/downloads/)
Thank you for your help.
-
- Posts: 21
- Joined: Mon Jan 27, 2020 1:10 pm
Re: BUS Error in CodeBlocks
It worked for me also.
Many Thank
Omer.
Code: Select all
system ("cat /opt/redpitaya/fpga/fpga_0.94.bit > /dev/xdevcfg");
Omer.
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie
Who is online
Users browsing this forum: No registered users and 110 guests