mmap - Segmentation fault

Applications, development tools, FPGA, C, WEB
Post Reply
Posts: 1
Joined: Wed Oct 17, 2018 8:04 pm

mmap - Segmentation fault

Post by ahesse » Wed Oct 17, 2018 8:23 pm

Hey everyone,

right now I am trying to understand how to program the Red Pitaya's FPGA, so I'm following Anton Potočnik's tutorial to build a stopwatch.

When compiling a C program to read out the clock count from the given address I always get a "Segmentation fault (program as)" - this seems to be independent of the FPGA program loaded, and I could narrow it down to the following part of the C code:

Code: Select all

int fd;
void *cfg;
fd = open("/dev/mem", O_RDWR | O_SYNC);

			MAP_SHARED, fd, 0x42000000);
Is the address I'm trying to use reserved for some other purpose? I cannot seem to find an address that makes this error disappear...
Or am I handling pointers wrong?
Is it somehow related to the Red Pitaya's OS version (I'm running 0.98-617 on a STEM14)?

I'd be happy about any help or advice, I don't seem to be able to figure this out by myself...

Thanks in advance!

Post Reply
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 6 guests