waf: boards: use existing abstract class definition
Remove special case for removing ChibiOS base board class and use the pre-existing way Make board name list order be case-insensitive Also fix some space in blank lines
This commit is contained in:
parent
1e036e4d4e
commit
9bdbd37d98
@ -203,7 +203,7 @@ class Board:
|
|||||||
env.CXXFLAGS += [
|
env.CXXFLAGS += [
|
||||||
'-Wno-error=cast-align',
|
'-Wno-error=cast-align',
|
||||||
]
|
]
|
||||||
|
|
||||||
env.DEFINES.update(
|
env.DEFINES.update(
|
||||||
UAVCAN_CPP_VERSION = 'UAVCAN_CPP03',
|
UAVCAN_CPP_VERSION = 'UAVCAN_CPP03',
|
||||||
UAVCAN_NO_ASSERTIONS = 1,
|
UAVCAN_NO_ASSERTIONS = 1,
|
||||||
@ -260,13 +260,8 @@ def add_dynamic_boards():
|
|||||||
|
|
||||||
def get_boards_names():
|
def get_boards_names():
|
||||||
add_dynamic_boards()
|
add_dynamic_boards()
|
||||||
ret = sorted(list(_board_classes.keys()))
|
|
||||||
# some board types should not be selected
|
return sorted(list(_board_classes.keys()), key=str.lower)
|
||||||
hidden = ['chibios']
|
|
||||||
for h in hidden:
|
|
||||||
if h in ret:
|
|
||||||
ret.remove(h)
|
|
||||||
return ret
|
|
||||||
|
|
||||||
@conf
|
@conf
|
||||||
def get_board(ctx):
|
def get_board(ctx):
|
||||||
@ -333,8 +328,9 @@ class sitl(Board):
|
|||||||
env.CXXFLAGS += [
|
env.CXXFLAGS += [
|
||||||
'-fno-slp-vectorize' # compiler bug when trying to use SLP
|
'-fno-slp-vectorize' # compiler bug when trying to use SLP
|
||||||
]
|
]
|
||||||
|
|
||||||
class chibios(Board):
|
class chibios(Board):
|
||||||
|
abstract = True
|
||||||
toolchain = 'arm-none-eabi'
|
toolchain = 'arm-none-eabi'
|
||||||
|
|
||||||
def configure_env(self, cfg, env):
|
def configure_env(self, cfg, env):
|
||||||
@ -452,7 +448,7 @@ class chibios(Board):
|
|||||||
env.CXXFLAGS += [ '-DHAL_CHIBIOS_ENABLE_ASSERTS' ]
|
env.CXXFLAGS += [ '-DHAL_CHIBIOS_ENABLE_ASSERTS' ]
|
||||||
else:
|
else:
|
||||||
cfg.msg("Enabling ChibiOS asserts", "no")
|
cfg.msg("Enabling ChibiOS asserts", "no")
|
||||||
|
|
||||||
env.LIB += ['gcc', 'm']
|
env.LIB += ['gcc', 'm']
|
||||||
|
|
||||||
env.GIT_SUBMODULES += [
|
env.GIT_SUBMODULES += [
|
||||||
@ -707,7 +703,7 @@ class rst_zynq(linux):
|
|||||||
env.DEFINES.update(
|
env.DEFINES.update(
|
||||||
CONFIG_HAL_BOARD_SUBTYPE = 'HAL_BOARD_SUBTYPE_LINUX_RST_ZYNQ',
|
CONFIG_HAL_BOARD_SUBTYPE = 'HAL_BOARD_SUBTYPE_LINUX_RST_ZYNQ',
|
||||||
)
|
)
|
||||||
|
|
||||||
class px4(Board):
|
class px4(Board):
|
||||||
abstract = True
|
abstract = True
|
||||||
toolchain = 'arm-none-eabi'
|
toolchain = 'arm-none-eabi'
|
||||||
@ -872,7 +868,7 @@ class px4_v4pro(px4):
|
|||||||
self.px4io_name = 'px4io-v2'
|
self.px4io_name = 'px4io-v2'
|
||||||
self.romfs_exclude(['oreoled.bin'])
|
self.romfs_exclude(['oreoled.bin'])
|
||||||
self.with_uavcan = True
|
self.with_uavcan = True
|
||||||
|
|
||||||
class aerofc_v1(px4):
|
class aerofc_v1(px4):
|
||||||
name = 'aerofc-v1'
|
name = 'aerofc-v1'
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user