bluerange-io / bluerange-mesh

BlueRange Mesh (formerly FruityMesh) - The first completely connection-based open source mesh on top of Bluetooth Low Energy (4.1/5.0 or higher)
https://bluerange.io/
Other
287 stars 109 forks source link

Not able to Run the new Makefile to generate binaries #132

Closed viveknath93 closed 4 years ago

viveknath93 commented 4 years ago

Hi, I had previously used fruity mesh and compiled the binaries in a different sequence of steps. However, with the new fruity mesh, I am not able to compile the project. Can you please help if I am missing something ?

fm_issue1 fm_issue2

viveknath93 commented 4 years ago

Update: This is issue is solved after commenting out the following line from CMakeLists.txt Not sure if this is a dirty workaround, but this works! -> target_compile_options_multi("${NATIVE_TARGETS}" "-flto")

Also, the Docu for generating the Eclipse files can be updated from cmake ../fruitymesh -DBUILD_FEATURESETS=ON -DGCC_PATH="C:/path/to/gcc-arm-none-eabi-4_9" -G "Unix Makefiles"

To cmake ../fruitymesh -D BUILD_FEATURESETS=ON -D GCCPATH="C:\Program Files (x86)\GNU Tools ARM Embedded\4.9 2015q3" -G "Eclipse CDT4 - Unix Makefiles"

The older option is not working and it is already mentioned as a comment!

mariusheil commented 4 years ago

Hi, thanks a lot for reporting this. We have had this problem on once PC running on OSX, but we were not sure why it is happening. We will look into this issue. This has something to do with the Hardfault handler that is implemented in the Nordic SDK. We will look into this and see how that can be solved. Without -flto I suppose that the binary will be bigger. It is some compiler incompatibility that we did not yet figure out why it only happens on some PCs. I will report back.

viveknath93 commented 4 years ago

Hi, Thanks a lot for the information.

mariusheil commented 4 years ago

Hi,

I cannot reproduce the issue easily on my computer. I have checked that I have the same GCC version (yes, I do). Could you please do the following?:

If an error occurs and you have to change the command, make sure to delete all files in the build directory first.

If this still leads to the same issue, can you please tell me which cmake version you are using? (cmake --version) (I have 3.16.3) and also which make utilities you are using (make --version) (I have: GNU Make 4.2.1 Built for x86_64-w64-mingw32).

Thanks

viveknath93 commented 4 years ago

Hi, This seems to work fine now, I am able to generate the binaries now!

This is Myfolder structure: C:\fruitymesh -\fruitymesh -\fruitymesh_build_tmp

Initially, The build directories were not getting created outside the repo folder. And were showing like "cache could not be found" i.e : It was building only inside - C:\fruitymesh\fruitymesh This was the reason why I was running build inside the repo folder itself.

I got the error mentioned above(screenshots) while compiling in this manner. and I commented out this below line from CMakeLists target_compile_options_multi("${NATIVE_TARGETS}" "-flto")

cmake --version : cmake version 3.17.1 make --version : GNU Make 4.1 Built for i686-w64-mingw32

And yes. Hex files are smaller compared to previous compilation: github_nrf52.hex - 351KB ->322KB github_nrf52_merged.hex - 696KB ->667KB

Thank you!

viveknath93 commented 4 years ago

Hi, This seems to work fine now, I am able to generate the binaries now!

This is Myfolder structure: C:\fruitymesh -\fruitymesh -\fruitymesh_build_tmp

Initially, The build directories were not getting created outside the repo folder. And were showing like "cache could not be found" i.e : It was building only inside - C:\fruitymesh\fruitymesh This was the reason why I was running build inside the repo folder itself.

I got the error mentioned above(screenshots) while compiling in this manner. and I commented out this below line from CMakeLists target_compile_options_multi("${NATIVE_TARGETS}" "-flto")

cmake --version : cmake version 3.17.1 make --version : GNU Make 4.1 Built for i686-w64-mingw32

And yes. Hex files are smaller compared to previous compilation: github_nrf52.hex - 351KB ->322KB github_nrf52_merged.hex - 696KB ->667KB

Thank you!

mariusheil commented 4 years ago

Ok, that was the way it was documented, but I am currently updating the documentation to be more precise and added a warning and some troubleshooting. Will be available with one of the next releases. Hopefully, this will prevent that others run into the same issue. I will close the issue. If there is anything unsolved, feel free to reopen it.

-----EDIT: Writing the error message here so this issue can be found while searching for it as the message is only in the initial screenshot: Error: CFI instruction used without previous .cfi_startproc

Viveknath thulasi notifications@github.com schrieb am Di., 21. Apr. 2020, 17:54:

Hi, This seems to work fine now, I am able to generate the binaries now!

This is Myfolder structure: C:\fruitymesh -\fruitymesh -\fruitymesh_build_tmp

Initially, The build directories were not getting created outside the repo folder. And were showing like "cache could not be found" i.e : It was building only inside - C:\fruitymesh\fruitymesh This was the reason why I was running build inside the repo folder itself.

I got the error mentioned above(screenshots) while compiling in this manner. and I commented out this below line from CMakeLists target_compile_options_multi("${NATIVE_TARGETS}" "-flto")

cmake --version : cmake version 3.17.1 make --version : GNU Make 4.1 Built for i686-w64-mingw32

And yes. Hex files are smaller compared to previous compilation: github_nrf52.hex - 351KB ->322KB github_nrf52_merged.hex - 696KB ->667KB

Thank you!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mwaylabs/fruitymesh/issues/132#issuecomment-617258257, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABM62NC32RKPPPRHOFRXI2LRNW6TPANCNFSM4MK44CEQ .

viveknath93 commented 4 years ago

thank you for the information!