Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Tools/ardupilotwaf/chibios.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,8 @@ def build(bld):
)

common_src = [bld.bldnode.find_or_declare('hwdef.h'),
bld.bldnode.find_or_declare('modules/ChibiOS/include_dirs')]
bld.bldnode.find_or_declare('modules/ChibiOS/include_dirs'),
bld.bldnode.find_or_declare('ap_romfs_embedded.h')]
common_src += bld.path.ant_glob('libraries/AP_HAL_ChibiOS/hwdef/common/*.[ch]')
common_src += bld.path.ant_glob('libraries/AP_HAL_ChibiOS/hwdef/common/*.mk')
common_src += bld.path.ant_glob('modules/ChibiOS/os/hal/**/*.[ch]')
Expand Down
4 changes: 2 additions & 2 deletions Tools/ardupilotwaf/toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def configure(cfg):
_filter_supported_cxx_compilers('g++', 'clang++')

if cfg.env.TOOLCHAIN == 'native':
cfg.load('compiler_cxx compiler_c')
cfg.load('compiler_cxx compiler_c gccdeps')
if cfg.env.COMPILER_CC == 'clang' or cfg.env.COMPILER_CXX == 'clang++':
Logs.warn("Warning! Native clang builds can be unstable, please use gcc/g++. \
\nRefer ardupilot.org docs for more details.")
Expand All @@ -140,7 +140,7 @@ def configure(cfg):
cfg.find_toolchain_program('ar')

cfg.msg('Using toolchain', cfg.env.TOOLCHAIN)
cfg.load('compiler_cxx compiler_c')
cfg.load('compiler_cxx compiler_c gccdeps')

if cfg.env.COMPILER_CC == 'clang':
cfg.env.CFLAGS += cfg.env.CLANG_FLAGS
Expand Down
2 changes: 0 additions & 2 deletions libraries/AP_GPS/AP_GPS.h
Original file line number Diff line number Diff line change
Expand Up @@ -481,11 +481,9 @@ class AP_GPS
uint8_t current_baud;
bool auto_detected_baud;
struct UBLOX_detect_state ublox_detect_state;
#if !HAL_MINIMIZE_FEATURES
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does increase the build size for minimized boards.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, I don't think it does (as its a union)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked, it does change the build size here, and this is not a union, it's a struct. (Each driver type needs it's own detect state))

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the HAL_MINIMIZE_FEATURES check:

BUILD SUMMARY
Build directory: /home/wickedshell/code/ardupilot/build/fmuv2
Target         Text    Data  BSS     Total  
--------------------------------------------
bin/arduplane  952124  3960  193284  1149368

Without the HAL_MINIMIZE_FEATURES check:

BUILD SUMMARY
Build directory: /home/wickedshell/code/ardupilot/build/fmuv2
Target         Text    Data  BSS     Total  
--------------------------------------------
bin/arduplane  952172  3960  193284  1149416

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry about that, of course its a struct
now, the Q is if 50 bytes is worth it ...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other option is to just move the detect state into AP_GPS.cpp as a static struct (or static member of AP_GPS::detect_instance()) which would allow the maintenance of the HAL_MINIMIZE_FEATURES check, without polluting the header.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make builds already don't fit for PX4-FMUv2, so we're probably approaching it too with waf builds.

struct MTK_detect_state mtk_detect_state;
struct MTK19_detect_state mtk19_detect_state;
struct SIRF_detect_state sirf_detect_state;
#endif // !HAL_MINIMIZE_FEATURES
struct NMEA_detect_state nmea_detect_state;
struct SBP_detect_state sbp_detect_state;
struct SBP2_detect_state sbp2_detect_state;
Expand Down
2 changes: 1 addition & 1 deletion modules/waf
Submodule waf updated 1 files
+1 −1 waflib/extras/gccdeps.py