Newbie - problem with compile
« on: March 03, 2017, 11:16:55 am »
Hi
I am new here so please excuse silly questions. I have installed the MinGW environment and downloaded all the tools and the code as per the instruction on the web.
I pulled the master branch as there was a note that said that next failed.
I compiled and got this error message. Any shove in the right direction will be appreciated.

 No rule to make target 'C:/msys64/mingw64/bin/libhogweed-4-2.dll', needed by 'C:/msys64/home/mariusl/librepilot/build/librepilot-gcs_release/bin/libhogweed-4-2.dll'.  Stop.

filnet

  • *****
  • 113
Re: Newbie - problem with compile
« Reply #1 on: March 03, 2017, 11:27:25 am »
LibrePilot's Windows build system relies on msys2 to get third parties packages.

Unfortunately, msys2 is a fast moving target and we are not always up to date so things break (especially for new comers that get the latest versions of the packages that we use).

Concerning the error you get about libhogweed, this was fixed a while back. You'll need to switch to the next branch. There is not much point in compiling master yourself as we provide distributions for it.

On next you'll need to apply this fix : https://bitbucket.org/ferdna/librepilot/commits/be41713d29fd53c326f2575308a40bcbbb443fe9?at=next



Re: Newbie - problem with compile
« Reply #2 on: March 03, 2017, 06:32:18 pm »
I started from scratch and used the next branch. I also did the fix as you instructed and all compiled fine. Thanks for the help.
Now the challenge to get my development environment to work.

Do people use the Qt Creator IDE or is there a better way?

filnet

  • *****
  • 113
Re: Newbie - problem with compile
« Reply #3 on: March 03, 2017, 11:31:11 pm »
Nice !

There are other known issues in next (again due to third party package updates).
One I know of is that 3D models are glitching badly (propellers are all over the place).

Please shout if you see anything suspect.

filnet

  • *****
  • 113
Re: Newbie - problem with compile
« Reply #4 on: March 03, 2017, 11:46:11 pm »
Some use QtCreator and it's not bad I heard.

I use Eclipse but just as an editor. Compilation and execution is done from command line.
I use Eclipse because I am familiar with it and did not want to learn another IDE.
But I still use QtCreator for editing *.ui files...

Using Eclipse takes quite a bit of setup if you want proper error highlighting, code navigation, refactoring, etc... to work, but it is doable. I even got the debugger to work at some point in time. For GCS only btw.... some have used Eclipse for firmware dev but it's not my case.
Unfortunately, I never got round to make my setup for GCS dev available to others... I still need to externalize a few things that are still hardwired to my particular environment.

PS: I am willing to share my Eclipse setup with whoever want's to take it as is and eventually take it further.
« Last Edit: March 04, 2017, 12:05:27 am by filnet »

Re: Newbie - problem with compile
« Reply #5 on: March 04, 2017, 07:59:21 am »
There is an Eclipse based IDE for STM32. called Workbench for STM32. It has a plugin for the STM32 products and might be handy to use for firmware debugging. I will try to get that going and a copy of your Eclipse setup might be handy for that.

QT Creator is actually a very fine IDE once you get it working. The debug and tool chain setup is very similar to Eclipse.

filnet

  • *****
  • 113
Re: Newbie - problem with compile
« Reply #6 on: March 04, 2017, 01:28:53 pm »
My Eclipse setup is attached (.project and .cproject files).

You'll need to drop them in ./ground/gcs and use File/Import/Existing Projects into Workspace

Next step is to configure the project, right click on the the project and select Properties.
From there change LIBREPILOT_TOOLS_DIR and MINGW_DIR to match your environment (see attached png).
« Last Edit: March 04, 2017, 01:38:06 pm by filnet »

Re: Newbie - problem with compile
« Reply #7 on: March 05, 2017, 10:38:38 am »
Thanks got that going.