Skip to content

Commit

Permalink
d: d
Browse files Browse the repository at this point in the history
d

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
  • Loading branch information
SebastianBoe committed Mar 3, 2020
1 parent 41481f9 commit 6538c28
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 22 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,7 @@ add_custom_command(
${PYTHON_EXECUTABLE}
${ZEPHYR_BASE}/scripts/gen_kobject_list.py
--validation-output ${DRV_VALIDATION}
--subsystems \"$<TARGET_PROPERTY:zephyr_property_target,SUBSYSTEMS>\"
$<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:--verbose>
DEPENDS ${ZEPHYR_BASE}/scripts/gen_kobject_list.py
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
Expand Down
10 changes: 10 additions & 0 deletions drivers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,13 @@ add_subdirectory_ifdef(CONFIG_ENTROPY_HAS_DRIVER entropy)
add_subdirectory_ifdef(CONFIG_SYS_CLOCK_EXISTS timer)
add_subdirectory_ifdef(CONFIG_NEURAL_NET_ACCEL neural_net)
add_subdirectory_ifdef(CONFIG_PTP_CLOCK ptp_clock)

set_property(
TARGET zephyr_property_target
APPEND_STRING
PROPERTY SUBSYSTEMS
adc
aio_cmp
counter
# etc.
)
30 changes: 8 additions & 22 deletions scripts/gen_kobject_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,28 +93,6 @@


subsystems = [
"adc_driver_api",
"aio_cmp_driver_api",
"counter_driver_api",
"crypto_driver_api",
"dma_driver_api",
"flash_driver_api",
"gpio_driver_api",
"i2c_driver_api",
"i2s_driver_api",
"ipm_driver_api",
"led_driver_api",
"pinmux_driver_api",
"pwm_driver_api",
"entropy_driver_api",
"sensor_driver_api",
"spi_driver_api",
"uart_driver_api",
"can_driver_api",
"ptp_clock_driver_api",
"eeprom_driver_api",
"wdt_driver_api",

# Fake 'sample driver' subsystem, used by tests/samples
"sample_driver_api"
]
Expand Down Expand Up @@ -340,6 +318,11 @@ def parse_args():

parser.add_argument("-k", "--kernel", required=False,
help="Input zephyr ELF binary")

parser.add_argument("-i", "--subsystems", required=False,
help='''Specifies a list of subsystem names to append to
the driver subsystems list.''')

parser.add_argument(
"-g", "--gperf-output", required=False,
help="Output list of kernel object addresses for gperf use")
Expand All @@ -365,6 +348,9 @@ def parse_args():
def main():
parse_args()

if args.subsystems:
subsystems.extend([s + '_driver_api' for s in args.subsystems.split(';')])

if args.gperf_output:
assert args.kernel, "--kernel ELF required for --gperf-output"
eh = ElfHelper(args.kernel, args.verbose, kobjects, subsystems)
Expand Down

0 comments on commit 6538c28

Please sign in to comment.