GithubHelp home page GithubHelp logo

Comments (3)

AndySymons avatar AndySymons commented on August 22, 2024

Me too. Did you find a solution yet?

from sduino.

tenbaht avatar tenbaht commented on August 22, 2024

It looks like this is not limited to OSX and I start to wonder why not more people are complaining about this.
Tested with 1.8.5 and 1.8.7 on OSX and Linux shows the same result:

  • open a sketch, verify (compile): ok
  • File->save as... and change a different name
  • verify (compile): fails.

Workaround: Go to File->Preferences and uncheck the option "Aggressively cache compiled core"

The reason for this error message is that main.rel can't be used from to the regular core library but needs to be linked directly from the compiled object file. Looks like I have to find a way around this.

from sduino.

tenbaht avatar tenbaht commented on August 22, 2024

I just released v0.4.0 that fixes this issue.
The root cause was that there was not external reference to main, so the linker never bothered to pull main.rel in from the libcore. As a workaround I used to leave main.rel out of libcore and link it separately. That guaranteed that it is pulled in.
But when the current sketch is renamed and the aggressive caching is active, the Arduino build system moves the libcore (and only the libcore) into an archive/build cache directory and deletes the old build directory - that contained the main.rel. Resulting in a linker failure on the next compile.
New way to deal with this: I merged all of main.c into wiring.c. This file is always pulled in because it contains the ISR for TIM4 (the millis() timer). This way main() is always pulled in, even from libcore and without any special linker parameters.

from sduino.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.