GithubHelp home page GithubHelp logo

Comments (4)

rhaamo avatar rhaamo commented on May 27, 2024

Adding -fPIC to CFLAGS and CXXFLAGS make it build and link (and it runs).

I didn't tryied to build for the final target, cross-compiled, so I don't know if it would break that.

from epsilon.

rhaamo avatar rhaamo commented on May 27, 2024

update: it definitely mess with the real ARM version (doesn't boot and switch to DFU)

from epsilon.

titimoby avatar titimoby commented on May 27, 2024

so you mean that adding the flags allow simulator build (I tested it and it works) but this broke the device firmware build ?

from epsilon.

rhaamo avatar rhaamo commented on May 27, 2024

Yes, adding -fPIC to the build for ARM makes it doesn't boot.

Currently the fix I'm using is:

diff --git a/Makefile b/Makefile
index 37639cd8..b12b0dfe 100644
--- a/Makefile
+++ b/Makefile
@@ -25,8 +25,8 @@ SFLAGS += -Wall
 SFLAGS += -MD -MP
 
 # Language-specific flags
-CFLAGS = -std=c99
-CXXFLAGS = -std=c++11 -fno-exceptions -fno-rtti -fno-threadsafe-statics
+CFLAGS += -std=c99
+CXXFLAGS += -std=c++11 -fno-exceptions -fno-rtti -fno-threadsafe-statics
 
 products :=
 
diff --git a/build/platform.simulator.mak b/build/platform.simulator.mak
index 91eaeafe..9ed827fa 100644
--- a/build/platform.simulator.mak
+++ b/build/platform.simulator.mak
@@ -3,3 +3,5 @@ USE_LIBA = 0
 EXE = elf
 OS_WITH_ONBOARDING_APP ?= 0
 OS_WITH_SOFTWARE_UPDATE_PROMPT ?= 0
+CFLAGS = -fPIC
+CXXFLAGS = -fPIC

from epsilon.

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.