element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Avnet Boards Forums
  • Products
  • Dev Tools
  • Avnet Boards Community
  • Avnet Boards Forums
  • More
  • Cancel
Avnet Boards Forums
Software Application Development Hardware Float on the R5 (ultrazed)
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Avnet Boards Forums to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 2 replies
  • Subscribers 329 subscribers
  • Views 449 views
  • Users 0 members are here
Related

Hardware Float on the R5 (ultrazed)

tobinhall
tobinhall over 8 years ago

How can the compiler (armr5-none-eabi-gcc) be configured to use the hard floating point coprocessor?

 

I've tried 

-mfloat-abi=hard

-mfpu=vfpv3-d16

-mthumb

but I get undefined instruction exceptions 

the BSP seems to disable hard floating point with:

 -mfloat-abi=soft
 -mfpu=vfpv3-d16
 
in the "standalone" Makefile Why?  I was able to get around this and recompile by eliminating the offending lines and put the desired options in "extra_compiler_flags"
 
I have tried -mfloat-abi=softfp which runs, but is still too slow for me.
 
I've also tried to selectively compile with -mfloat-abi=hard , but it appears that the linker wants everything the same way.
 
thanks,
 
Tobin.
  • Sign in to reply
  • Cancel
  • tobinhall
    0 tobinhall over 8 years ago

    it seems that the bsp has the FPU disabled by default.  this would seem to partially explain why the bsp does not support the VFP and why the compile switches were the way they were.  Leaving the FPU enabled in boot.s seemed to fix my problem.

    Is there a "proper" way to do this?

    in Boot.s

    /* enable fpu access  */
    vmrs r3, FPEXC
    orr r1, r3, #(1<<30)
    vmsr FPEXC, r1
     
    /* clear the floating point register*/
    mov r1,#0
    vmov d0,r1,r1
    vmov d1,r1,r1
    vmov d2,r1,r1
    vmov d3,r1,r1
    vmov d4,r1,r1
    vmov d5,r1,r1
    vmov d6,r1,r1
    vmov d7,r1,r1
    vmov d8,r1,r1
    vmov d9,r1,r1
    vmov d10,r1,r1
    vmov d11,r1,r1
    vmov d12,r1,r1
    vmov d13,r1,r1
    vmov d14,r1,r1
    vmov d15,r1,r1
     
    /* restore previous value for fpu access */
    // vmsr FPEXC,r3
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • jafoste4
    0 jafoste4 over 8 years ago

    Hello Tobinhall,

    Please ask this question over at the Xilinx forum as it is more based on their tools and newest silicon. They are the best equipped to handle it.

    https://forums.xilinx.com/

    Thanks,

    Josh

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Reject Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube