sci-bots / base-node-rpc

Base classes for Arduino RPC node/device
0 stars 2 forks source link

Conflict in dependency library object files across Atmel architectures #4

Open cfobel opened 7 years ago

cfobel commented 7 years ago

Steps to reproduce

  1. Run paver build_firmware (this will build base-node-rpc hex for Uno and mega2560).
  2. Run paver build_firmware in another project based off base-node-rpc for the Uno only.
  3. Flash newly built Uno hex to microcontroller.
  4. Try to connect using:

    from <project>.proxy import SerialProxy
    
    proxy = SerialProxy()

Observed behaviour

Proxy connection times out.

Expected behaviour

Proxy should connect.

Notes

As of 662cfefd7c73a538b16f21f02c9dee4760fdbecc, when building dependency libraries (e.g., lib\site-packages\nadamq\src), object files are left in source directories.

This causes a problem when building for multiple platforms.

For example, if built for mega2560, the object files left in the library source directories will be compiled for the mega2560. However, if building for the atmega328 (Uno) later, the object files will be found in the library source directories and will not be rebuilt for the Uno.

cfobel commented 7 years ago

We should probably be using variant directories support in SCons to build library dependencies outside of source directories. This should prevent this from being an issue.