Its about a year since I tried any coding in ArduCopter and in the interim I see the master is now built using waf in place of make.
OK.
After a bit of fiddling about I have the waf build working.
I wanted to try some of the simple examples, specifically the HAL UART_test.
Waf compiled the examples OK.
But I am struggling to figure out how to upload the UART_test example to my test Pixhawk. (Via the USB as usual)
The --upload flag suggested by waf at the end of build appeared to start the full firmware build and upload cycle so I stopped that and tried to specify the particular example. That resulted in:
No function px4-v2/examples/UART_test defined in ~/ardupilot/wscript
After running the changes around the relative directories I stopped digging and tried the forums.
As I didn’t find any references to this problem it seemed prudent to ask as I’m sure the answer will be useful to many.
Smashing, and so following the instructions on thread 4931
I tried:
./waf --targets examples/UART_Test --upload
which revealed:
Waf: Entering directory /home/martin/ardupilot/build/px4-v2' Waf: Leaving directory/home/martin/ardupilot/build/px4-v2’
Could not find a task generator for the name ‘examples/UART_Test’
Next I tried another example:
./waf --targets examples/AHRS_Test --upload
This built and loaded OK ending with:
BUILD SUMMARY
Build directory: /home/martin/ardupilot/build/px4-v2
Target Text Data BSS Total
examples/AHRS_Test 551664 2764 49112 603540
PX4
The ELF files are pointed by the path in the “Target” column. The .px4 files are in
the same directory of their corresponding ELF files.
PX4IO
Binary Text Data BSS Total
px4-extra-files/px4io 41800 584 3018 45402
Build commands will be stored in build/px4-v2/compile_commands.json
’build’ finished successfully (22.999s)
So I’m off to figure out how to build the missing script.
BUILD SUMMARY
Build directory: /home/pi/ardupilot/build/navio2
Target Text Data BSS Total
examples/UART_test 73678 1084 18620 93382
Build commands will be stored in build/navio2/compile_commands.json
’build’ finished successfully (29.731s)
Waf: Entering directory `/home/pi/ardupilot/build/navio2’
Destination for rsync not defined. Either pass --rsync-dest here or during configuration.
Would someone please explain me the last line. Thanx.