- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi, my problem is that i'm trying to get floating point numbers in nios; i had done my program yesterday and it was succesfull when it generated, but in nios it was giving 0 when i wrote numbers with printf.
that's why i found some documents today and i had changed my sopc builder's cpu settings with adding floating point hardware and check the division factor but nothing else and then i push generate button but it had failed Error: Failed to refresh PTF file and know all the sopc programs give the same error, and i can't do anything. could you say what can i do:confused:.Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I've done programs with NIOS II with FP custom instructions and they've work fine. Remember that in order to use printf you have to use something like %4.2 (4 integer digits and 2 decimal). Try to create a new C/C++ application with the program and the PTF file generated.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks to you. I will try it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- my problem is that i'm trying to get floating point numbers in nios; i had done my program yesterday and it was succesfull when it generated, but in nios it was giving 0 when i wrote numbers with printf. --- Quote End --- Double check that the "enable small c library" option is not selected in your BSP settings. The small C library does not including floating point support for printf.
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