Sony's Developer World forum

    • Home
    • Forum guidelines

    Upcoming maintenance 

     

    Dear Customers and Partners.

    This website will be undergoing scheduled maintenance on June 14, 2023. Please be aware there may be disruption to the developer portal website and associated services during the scheduled maintenance period.

    This upgrade is essential to ensure the continued performance, reliability, and security of Developer World.

    We apologize for any inconvenience.

     

     

    Please improve default settings: Arduino compiler flags by removing -fpermissive

    Spresense
    2
    3
    581
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      jens6151 0 1 1 last edited by

      I was wondering about the difference of compiler flags between Arduino SDK and Spresense SDK.

      I would strongly recommend to remove -fpermissive at link.
      This compiles code that should not. For example a missing return statement or a missing implementation of a member function of a class and more. This results in undefined behavior during runtime (and is difficult to detect, especially without debugger)

      There might be valid uses, but it should be only used when you really know what you are doing.

      Do you have good reasons to add -fpermissive? If not please remove it.

      Speaking of good default settings.

      • Please add the "-j" to the build scripts for make calls, including the make clean. What would be the reason not to have it?
      • Please set the default upload speed to 230400. (Do you know why more does not work?)
      1 Reply Last reply Reply Quote
      • J
        jens6151 0 1 1 last edited by

        Additionally I would be interested in why -fno-strict-aliasing and -fno-strength-reduce are added.

        C 1 Reply Last reply Reply Quote
        • C
          CamilaSouza DeveloperWorld @jens6151 0 1 1 last edited by

          Hi @jens6151-0-1-1

          Let me investigate this questions internally and get back to you as soon as possible.

          1 Reply Last reply Reply Quote
          • First post
            Last post
          Developer World
          Copyright © 2021 Sony Group Corporation. All rights reserved.
          • Contact us
          • Legal