Git Product home page Git Product logo

Comments (6)

RobMeades avatar RobMeades commented on June 4, 2024

Hi there: it is not properly documented but the way this is intended to work is to use the xxx_stubs.c files in network/src which should allow the linker to drop the unused code, see also the bit in our test system where we check that the stubs at least compile, u_run_lint.py.

It so happens that we have some guys internally developing a cellular application in a very limited code space that are using exactly this mechanism at the moment (@qasim-ublox), in fact I thought your issue was a pull request coming in from them because our stubbing wasn't working properly, so if the stub files don't do what you need watch this space as those guys will have exactly the same problem.

Can I ask which toolchain you are using?

from ubxlib.

 avatar commented on June 4, 2024

Hey, thanks for the quick response!
I missed the stub files, that should be good for us. I did not try to use them so far, so I have no idea if they are working for us or not. We are actually not that limited on code space, but having to include a complete WiFi and BLE driver seemed a bit too wasteful even if it is not a problem on our current platform.

Regarding the toolchain question:
So far, I only did a quick evaluation run on an STM32F4 with the STM32CubeIDE project you provide.
The real project will use another STM32 variant on a CMake + ARM-GCC toolchain and a different RTOS.
Since that will require some work to create the port, I want to evaluate the library on the STM32F4 platform first.

from ubxlib.

RobMeades avatar RobMeades commented on June 4, 2024

Understood, thanks for the background info. Very happy to receive any feedback after your investigations, we may well be able to accommodate any changes you think we need.

from ubxlib.

RobMeades avatar RobMeades commented on June 4, 2024

I've added some documentation for the stubs in 4dc1b, closing this on that basis; please re-open if you disagree and certainly open new issues with any requests if you think there are things we should improve for you.

from ubxlib.

 avatar commented on June 4, 2024

Great, I just tried that procedure.
Only replacing the files with the stub files did not have much of an effect in the Stm32CubeIDE, I guess it either does not optimize unused functions at link time or it was because of the examples.

When I removed the corresponding internal files for BLE, GNSS and WiFi along with the tests, I was able to reduce the memory footprint by 60kB, so it seems like this is working when you properly adjust the build system.

from ubxlib.

RobMeades avatar RobMeades commented on June 4, 2024

Hmm, interesting, there are some directives (here and here) we employ in the nRF5 makefile which GCC needs to drop unused sections, I'm not sure if the STM32F4 Eclipse IDE files (which are mostly standard boilerplate from ST) have those.

Anyway, glad you've been able to progress.

from ubxlib.

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.