Giter Club home page Giter Club logo

cmake-particle-firmware's Introduction

cmake-particle-firmware's People

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

zsoltmazlo

cmake-particle-firmware's Issues

Propose changes to particle

Need to put together a proposal for inclusion of the firmware changes for upstream.

Theme is adding a different entry point for the compilation of the user library, one which uses already compiled object files rather than source files.k

  • Make a squashed version of the firmware fork branch, for readability
  • Have a couple of examples that cleanly demonstrate the separation achievable by using ExternalProject
  • Update the readme to quickly highlight the goals of this effort
  • Move hacking related content out of the readme down to another md

Create scaffolding project

Create a scriptable process for creating the project structure demonstrated here.

Create this as a separate repository.

Link the app into the firmware

The ideal configuration for ux in clion would be to allow cmake to build the app target and then call the firmware make to link in the compiled app.

On the surface it seems possible, but would take some modifications to the firmware build.

Example of compiling with cmake over here jw3/TinyGPSPlus@a5b58ea

Support multiple-compilation-unit libraries

The cmake structure is built around third party libraries that have only a single compilation unit.

When trying to add a multi unit library there are constraints that prevent either multiple objects (1) or static library (2) from working

  1. The library naming patterns only support having a simple string identifier
  • which works fine for current structure as it uses TARGET_OBJECTS to look up the lib
  1. The firmware required the least amount of modification to get objects woven in, static libs do not fit nearly as well

There are also concerns on the configuration side about what modifications are needed to allow the cmake module to support multiple units and continue to support patching.

Timing issue patching external project

There exists some sort of timing issue with the external target and the patch. Takes an additional refresh before the patched code is included in the build.

Possibly the target being built before the patch is applied?

Potentially because of the way the additional target is added in the external project.

Can't build due to "No rule to make target `CMakeFiles/OneWire.dir/depend'."

I can't build this project properly due to "no rule to make target". Any idea how to solve it?

Thanks!

➜  cmake-particle-firmware git:(master) ✗ ./build.sh photon "0.7.0"
-- The C compiler identification is AppleClang 10.0.0.10001145
-- The CXX compiler identification is AppleClang 10.0.0.10001145
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done

=============================== Configuring firmware for the -=-= photon =-=- ===============================

-- Configuring [empty] remote at /Users/Jackie/Documents/Workspace/PhD/3.1-James-Monica/infoled/Infoled-photon/cmake-particle-firmware/build-photon/CMakeFiles/empty_remote.dir/empty
-- Configuring [tinker] remote at /Users/Jackie/Documents/Workspace/PhD/3.1-James-Monica/infoled/Infoled-photon/cmake-particle-firmware/build-photon/CMakeFiles/tinker_remote.dir/tinker
-- Configuring [blinker] remote at /Users/Jackie/Documents/Workspace/PhD/3.1-James-Monica/infoled/Infoled-photon/cmake-particle-firmware/build-photon/CMakeFiles/blinker_remote.dir/blinker
-- Configuring [knocker] remote at /Users/Jackie/Documents/Workspace/PhD/3.1-James-Monica/infoled/Infoled-photon/cmake-particle-firmware/build-photon/CMakeFiles/knocker_remote.dir/knocker
-- Configuring [tracker] remote at /Users/Jackie/Documents/Workspace/PhD/3.1-James-Monica/infoled/Infoled-photon/cmake-particle-firmware/build-photon/CMakeFiles/tracker_remote.dir/tracker
-- tracker include TinyGpsPlus at /Users/Jackie/Documents/Workspace/PhD/3.1-James-Monica/infoled/Infoled-photon/cmake-particle-firmware/build-photon/tinygps-prefix/src/tinygps/firmware
-- Configuring [tracker2] remote at /Users/Jackie/Documents/Workspace/PhD/3.1-James-Monica/infoled/Infoled-photon/cmake-particle-firmware/build-photon/CMakeFiles/tracker2_remote.dir/tracker2
-- tracker2 include NeoGPS at /Users/Jackie/Documents/Workspace/PhD/3.1-James-Monica/infoled/Infoled-photon/cmake-particle-firmware/build-photon/neogps-prefix/src/neogps/src
-- Configuring [display] remote at /Users/Jackie/Documents/Workspace/PhD/3.1-James-Monica/infoled/Infoled-photon/cmake-particle-firmware/build-photon/CMakeFiles/display_remote.dir/display
-- display include LiquidCrystalI2C at /Users/Jackie/Documents/Workspace/PhD/3.1-James-Monica/infoled/Infoled-photon/cmake-particle-firmware/build-photon/lcdi2c-prefix/src/lcdi2c/firmware
-- Configuring [thermometer] remote at /Users/Jackie/Documents/Workspace/PhD/3.1-James-Monica/infoled/Infoled-photon/cmake-particle-firmware/build-photon/CMakeFiles/thermometer_remote.dir/thermometer
-- thermometer include OneWire at /Users/Jackie/Documents/Workspace/PhD/3.1-James-Monica/infoled/Infoled-photon/cmake-particle-firmware/build-photon/onewire-prefix/src/onewire/src
-- thermometer include DS18B20 at /Users/Jackie/Documents/Workspace/PhD/3.1-James-Monica/infoled/Infoled-photon/cmake-particle-firmware/build-photon/ds18b20-prefix/src/ds18b20/firmware
-- Configuring [asset-tracker-rk] remote at /Users/Jackie/Documents/Workspace/PhD/3.1-James-Monica/infoled/Infoled-photon/cmake-particle-firmware/build-photon/CMakeFiles/asset-tracker-rk_remote.dir/asset-tracker-rk
-- asset-tracker-rk include LIS3DH at /Users/Jackie/Documents/Workspace/PhD/3.1-James-Monica/infoled/Infoled-photon/cmake-particle-firmware/build-photon/lis3dh-prefix/src/lis3dh/src
-- asset-tracker-rk include AssetTrackerRK at /Users/Jackie/Documents/Workspace/PhD/3.1-James-Monica/infoled/Infoled-photon/cmake-particle-firmware/build-photon/assettrackerrk-prefix/src/assettrackerrk/src
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/Jackie/Documents/Workspace/PhD/3.1-James-Monica/infoled/Infoled-photon/cmake-particle-firmware/build-photon
Scanning dependencies of target onewire
[  1%] Creating directories for 'onewire'
[  2%] Performing download step (git clone) for 'onewire'
-- onewire download command succeeded.  See also /Users/Jackie/Documents/Workspace/PhD/3.1-James-Monica/infoled/Infoled-photon/cmake-particle-firmware/build-photon/onewire-prefix/src/onewire-stamp/onewire-download-*.log
[  3%] No patch step for 'onewire'
[  4%] No update step for 'onewire'
[  5%] No configure step for 'onewire'
[  6%] No build step for 'onewire'
[  7%] No install step for 'onewire'
[  8%] Completed 'onewire'
[  8%] Built target onewire
make[2]: *** No rule to make target `CMakeFiles/OneWire.dir/depend'.  Stop.
make[1]: *** [CMakeFiles/OneWire.dir/all] Error 2
make: *** [all] Error 2

Firmware build broken in de0b4de1

de0b4de broke the build

  • causes the target name to revert to a directory derived version
  • potentially causes some issue with user/tests builds
================== Using remote user compilation /home/wassj/dev/code/scratch/particle-cmake-cross-compile/cmake-build-debug ==================
make[6]: *** No rule to make target '../../../build/target/user/platform-6-m/.mount_jetbraHFPhF1/libuser.a', needed by '/home/wassj/dev/code/scratch/particle-cmake-cross-compile/cmake-build-debug/blinker/blinker.elf'.  Stop.
../build/recurse.mk:11: recipe for target 'modules/photon/user-part' failed
make[5]: *** [modules/photon/user-part] Error 2
build/recurse.mk:11: recipe for target 'main' failed
make[4]: *** [main] Error 2
CMakeFiles/blinker.dir/build.make:60: recipe for target 'blinker/blinker.bin' failed
make[3]: *** [blinker/blinker.bin] Error 2
make[3]: *** Deleting file 'blinker/blinker.bin'
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/blinker.dir/all' failed
make[2]: *** [CMakeFiles/blinker.dir/all] Error 2
CMakeFiles/Makefile2:116: recipe for target 'CMakeFiles/blinker.dir/rule' failed
make[1]: *** [CMakeFiles/blinker.dir/rule] Error 2
Makefile:131: recipe for target 'blinker' failed

Removing these variables is an important step towards building the objects in the IDE and then linking into the firmware.

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.