Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different behaviour if creating library instead of using all sources in generate_firmware #167

Open
carlosgalvezp opened this issue Aug 12, 2016 · 0 comments

Comments

@carlosgalvezp
Copy link

Hi,

I have CMake 3.5.1, Arduino 1.6.10, Ubuntu 16.04.

I have observed that the generated executable has different behaviour when I compile using the following two configurations in the CMakelists:

A) Plug all the .cpp files into the generare_arduino_firmware function:

generate_arduino_firmware(${CMAKE_PROJECT_NAME}
      SRCS  loop.cpp ${MY_LIB_SRCS}
)

B) Create a library and link to it later:

generate_arduino_library(my_lib SRCS  ${MY_LIB_SRCS})
generate_arduino_firmware(${CMAKE_PROJECT_NAME}
      SRCS  loop.cpp 
      LIBS my_lib
)

Option A) produces the desired behaviours, whereas B) produces a slightly smaller executable and it does not work as expected (Arduino restarts over and over).

Why is this happening? How can it be fixed?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant