ardupilot icon indicating copy to clipboard operation
ardupilot copied to clipboard

Tools: added build features list to extract_features.py

Open Hwurzburg opened this issue 3 years ago • 2 comments

here is the first part of updating extract_features.py I also have the list in text form for feature name, so it will be easy to diff on each board to get the shorter list of EXCLUDED features once the features list is extracted, to present to users...

also corrected the existing feature names in this file

I changed the labels to include the class, since the subclasses which were being used are not unique...this fixes that...

~~a few strange things during testing....I used a master build for the CubeOrange....it could not find either the NMEA nor UAVCAN airspeed sensor....the UAVCAN sensor is present in the elf and matches the string, but is not reported....and the NMEA airspeed sensor is not in the elf dump, but should be as far as I can tell tracing the ifdefs....I tried looking for the "draw_sidebars" symbol also, and it was missing but should be in the build since its only excluded on HAL_MINIMIZE features if OSD is enabled (which it is ...other symbols are there in the elf)....we need to figure this out before working further...~~

tip to future contributors...should use: arm-none-eabi-nm -td -S -C build//bin/ | grep -i ' T ' | grep | less

to look for either the constructor or method for the symbols to use in this script

maybe we could enlist a few people to take parts of the list to find the symbol name...I can take some more groups once we get a couple of volunteers...

Hwurzburg avatar Jul 31 '22 13:07 Hwurzburg

Symbols can be found in the elf with this script:

pbarker@fx:~/rc/ardupilot(master)$ ls ~/bin/*nm*
/home/pbarker/bin/arm-nm
pbarker@fx:~/rc/ardupilot(master)$ cat ~/bin/*nm*
#!/bin/bash

arm-none-eabi-nm --print-size -C  -n -td --size-sort $1
pbarker@fx:~/rc/ardupilot(master)$ 

peterbarker avatar Jul 31 '22 22:07 peterbarker

@tridge @peterbarker cant find a symbol for when the various motor matrix options are enabled.....they just assign a value to an existing variable....how are we going to determine if they are built? maybe have to create some kind of dummy symbol in the code?

per @IamPete1 suggestion , I can move the code in the switches to separate functions for each motor matrix setup and that will allow finding a symbol.... done #21327

Hwurzburg avatar Aug 01 '22 17:08 Hwurzburg

@peterbarker ball's back in your court now....

Hwurzburg avatar Sep 01 '22 19:09 Hwurzburg

Merged, thanks!

peterbarker avatar Sep 02 '22 04:09 peterbarker