Fairly new user to Xilinx microblaze here (and first post to this user group). I'm trying to write C-code (within Xilinx Platform Studio) to determine the remainder after an integer division. So if I say
num = 13/10; rem = 13%10;
then num = 1 and rem = 3.
I'm getting an error stating "invalid operands to binary %" when I try to build.
What I surmise is that % is trying to convert to a binary format rather than obtaining the desired remainder result. I would also assume that I need to include the correct header file in order to perform the remainder operation.
However, I'm having trouble determining what math functions are available w/in microblaze and the associated symbols needed to perform desired functions (i.e., how to determine an integer remainder).
When I'm configuring microblaze in fpga hardware, should I use floating point? I can't find any math include file under /microblaze_0/include.
Thanks for the help in figuring this out. I'm sure there's an easy answer...