Skip to content

Commit

Permalink
asm,cortex-m: Add warning at configure time if soc bus definition is …
Browse files Browse the repository at this point in the history
…missing.

This may help while porting to new SoC.
  • Loading branch information
fvalette-ledger committed Sep 30, 2024
1 parent 5114efa commit f5b02f0
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions kernel/include/sentry/arch/asm-cortex-m/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ core_h = custom_target('gen_core',
command: [ jinja_cli, '-d', svd_json, '-o', '@OUTPUT@', '@INPUT@' ],
)

arch_header_set.add(
irq_def_h.to_list(),
layout_h.to_list(),
core_h.to_list(),
)

# the way we generate the buses list depend on the SoC family. To do
# that, the input jinja template is selected depending on the configured SOC
# family or subfamily
Expand All @@ -58,16 +64,15 @@ buses_h_in_set.add(when: 'CONFIG_SOC_SUBFAMILY_STM32U5', if_true: files('stm32l4
# here, we can add other templates for other ARM SoC famillies if needed
buses_h_in_set_config = buses_h_in_set.apply(kconfig_data, strict: false)

buses_h = custom_target('gen_buses',
input: buses_h_in_set_config.sources(),
output: 'buses.h',
depends: [ svd_json ],
command: [ jinja_cli, '-d', svd_json, '-o', '@OUTPUT@', '--define', 'NAME', 'RCC', '@INPUT@' ],
)
if buses_h_in_set_config.sources().length() != 0
buses_h = custom_target('gen_buses',
input: buses_h_in_set_config.sources(),
output: 'buses.h',
depends: [ svd_json ],
command: [ jinja_cli, '-d', svd_json, '-o', '@OUTPUT@', '--define', 'NAME', 'RCC', '@INPUT@' ],
)

arch_header_set.add(
irq_def_h.to_list(),
layout_h.to_list(),
core_h.to_list(),
buses_h.to_list(),
)
arch_header_set.add(buses_h.to_list())
else
warning('Missing bus definition for SoC @0@'.format(kconfig_data.get('CONFIG_ARCH_SOCNAME')))
endif

0 comments on commit f5b02f0

Please sign in to comment.