Quantcast
Channel: Altera Forums
Viewing all articles
Browse latest Browse all 19390

incompatible type for argument 2 of '__builtin_stwio'

$
0
0
I'm trying to write to memory using the IOWR_32DIRECT function, however I'm receiving an error complaining about an incompatible type. I'll have to admit that it's difficult to find the specifics on how this function works. In the software developer's handbook, there's only a table mentioning OFFSET with no detail as to what type OFFSET is. I'd assumed that since this function is used to write 32 bit data sections, the offset would be 32 bits, or 4 bytes.

However, I haven't even gotten to the point of using the OFFSET, as I'm receiving this error when calling the function with an offset of 0. Here is how I'm using the function,

IOWR_32DIRECT(SLAVE_BASE, 0, DATA_STRUCTURE);

Where SLAVE_BASE is defined in the system.h file and DATA_STRUCTURE is a 32 bit value defined in my code.

Edit: Ok, after looking more closely, I see that the second call to __builtin_stwio is actually the DATA portion and not the OFFSET.

__builtin_stwio (__IO_CALC_ADDRESS_DYNAMIC ((BASE), (OFFSET)), (DATA))

So, that brings up another problem. I have what I think is a 32 bit value being passed in. Is DATA expected to be a specific type?

Thanks for any help, in advance.

Drew

Viewing all articles
Browse latest Browse all 19390

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>