- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My nios ii version is 8.0,and i used c2h in it ,the function is
unsigned short add(unsigned short a,unsigned short b){ unsigned short sum=0; sum=a+b; return sum; } and main function is int main() { unsigned short s1=10,s2=10; unsigned s; //printf("Hello from Nios II!\n"); s=add(s1,s2); printf("the sum is %ld\n",(long)s); return 0; } the result is the sum is 1 why?why did i get wrong result with c2h? My nios is the crack,so i download the limited sof to boardLink Copied
0 Replies

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page