Hey guys, I am working on making Elliptic Curve Cryptography El-Gamal in 8051 MCU using Keil uvision 4. I want to make it 128 bit, so I need to use GMP library. However, to use GMP I usually download it in mingw-get-setup first, so I think it won't run if I just copy the gmp.h to my project in Keil.
My questions are :
1. how can I use gmp in 8051 using Keil?
2. Or should I compile it first in gcc, then just download the hex file to 8051? How to program the register in gcc?
Thanks for your attention :D
Best regards
and what is the error at last line of sub.c ? SUB.C(40): error C231: '_sub': redefinition
the code at that line is :
return c;
put your variable declarations at the top of the block. not after any function calls.
this depends on the level of c. I can't remember the exact details and I haven't got time to research.
that is left as an exercise for you.
Nice code you have.
for(i=1;i>=0;i--)
i is unsigned char.
Start on one and repeat until negative. How often do you see an unsigned character be negative?
Yes actually it works after I put the declaration on top. However, the pointer c I create share the same address as the variable a. Anyone know how to make they have different address?
c : X:0x000000
a : X:0x000000[...]
Thus, when I debug it by putting the cursor to while(1) and run to cursor line, the c have value 0, although it should have different value when I run it on GCC. Is it because c and a have the same address?