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

First shot towards a separate HITL target #2062

Merged
merged 5 commits into from
Jun 13, 2017
Merged

First shot towards a separate HITL target #2062

merged 5 commits into from
Jun 13, 2017

Conversation

podhrmic
Copy link
Member

@podhrmic podhrmic commented May 6, 2017

@gautierhattenberger I am trying to add HITL as a separate target so it is easier to use.

The idea is that hitl is de facto nps target, except it has a different name (and uses a few different files). So I want to have nps_common.makefile and then nps.makefile and hitl.makefile (see below).

Then I have to have a toplevel Makefile.hitl that only calls Makefile.nps and that should be it - right?

I can'get it to compile, I suspect there is some change with generators that I have to add the target to?

@gautierhattenberger
Copy link
Member

at least you need to add hitl to the list of default possible targets in sw/lib/ocaml/env.ml

@podhrmic
Copy link
Member Author

podhrmic commented May 7, 2017

@gautierhattenberger thanks for the pointer. I changed it, but I am still not seeing hitl.makefile being called - if I run HITL target I see:

...
make[1]: Leaving directory '/home/podhrad/Documents/Paparazzi/paparazzi'
make[1]: Entering directory '/home/podhrad/Documents/Paparazzi/paparazzi'
>>>Calling nps.makefile
>>>Calling nps_common.makefile
GENERATE /home/podhrad/Documents/Paparazzi/paparazzi/var/aircrafts/Minion_RP3/hitl/generated/airframe.h from airframes/AGGIEAIR/aggieair_minion_rp3_lia.xml
...

even though the target is hitl , not nps

Then indeed the compilation fails.

Any ideas? I added the hitl target to env.ml

@gautierhattenberger
Copy link
Member

correct makefile selection is coming from this line: https://github.com/paparazzi/paparazzi/blob/master/conf/firmwares/subsystems/shared/nps.makefile#L17

@podhrmic
Copy link
Member Author

podhrmic commented May 7, 2017

I specify it in hitl.makefile (see https://github.com/paparazzi/paparazzi/blob/hitl_updates/conf/firmwares/subsystems/shared/hitl.makefile#L13 ) but the problem is that hitl.makefile is never called in the first place.

@podhrmic
Copy link
Member Author

podhrmic commented May 7, 2017

$(info >>>Calling hilt.makefile) never shows up in the console, instead I can see $(info >>>Calling nps.makefile) even when I call hitl target

@podhrmic
Copy link
Member Author

podhrmic commented May 8, 2017

@gautierhattenberger do you have an idea why compiling hitl target would still call conf/firmwares/subsystems/shared/nps.makefile first?

@flixr
Copy link
Member

flixr commented May 8, 2017

@podhrmic nps.makefile is always included from rotorcraft.makefile...

@flixr
Copy link
Member

flixr commented May 8, 2017

Use the --debug option of make to find what makefiles are parsed, etc...
e.g. make --debug=v AIRCRAFT=Ark_Hexa_1.8 hitl.compile

@podhrmic
Copy link
Member Author

podhrmic commented May 9, 2017

Thanks for help, I figured it out. Have to do some cleanup still, but it works now.

@podhrmic
Copy link
Member Author

@flixr @gautierhattenberger would you be OK with merging this as-is, so I can update the wiki page about HITL and have a separete hitl target which makes the whole setup more user-friendly?

It needs some polishing, but it doesn't break anything and works just fine for what it is - unfortunately I won't have time to sit down and properly finish it for a couple of weeks, and I would like to avoid merge conflicts (plus I would like to have the wiki page updated).

@flixr
Copy link
Member

flixr commented May 19, 2017

Can you at least take out the "calling xx makefile" infos?

@podhrmic
Copy link
Member Author

OK, never mind - probably better to merge it once it is clean.

@podhrmic podhrmic merged commit 74f8b74 into master Jun 13, 2017
@podhrmic podhrmic deleted the hitl_updates branch June 13, 2017 20:39
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

Successfully merging this pull request may close these issues.

3 participants