Skip to content

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
  • Loading branch information
perigoso committed May 4, 2023
1 parent 3386bf9 commit 9d6c71d
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 184 deletions.
12 changes: 7 additions & 5 deletions meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
project('Black Magic Firmware', 'c',
version: 'v1.8',
version: 'v1.9.1',
license: 'GPL-3.0',
default_options: [
'optimization=s',
Expand All @@ -11,12 +11,14 @@ project('Black Magic Firmware', 'c',
subproject_dir: 'lib',
)

if not meson.is_cross_build()
error('Black Magic Firmware must be cross-compiled to the target probe/platform and cannot be built for the host machine')
endif

subdir('src')

if probe != 'bmda'
if not meson.is_cross_build()
error('Black Magic Firmware must be cross-compiled to the target probe/platform and when not built for the host machine')
endif
endif

# ----------------------------------------------------------------------------------------------------------------------
# Project wide flags
# ----------------------------------------------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion meson_options.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
option('probe', type: 'string', description: 'target probe', value: 'native')
option('targets', type : 'array', value : ['cortexm', 'nrf', 'sam', 'stm', 'lpc', 'nxp', 'efm', 'ti', 'rp'], description: 'enabled debug targets')
option('targets', type : 'array', value : ['cortexm', 'nrf', 'sam', 'stm', 'lpc', 'nxp', 'efm', 'ti', 'rp', 'renesas'], description: 'enabled debug targets')
option('bmp_bootloader', type: 'boolean', value: 'true', description: 'use bmp bootloader, not relevant for all targets')
13 changes: 7 additions & 6 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,17 @@ src_includes = include_directories(

src_sources = files(
'command.c',
'hex_utils.c',
'main.c',
'crc32.c',
'remote.c',
'gdb_hostio.c',
'rtt.c',
'exception.c',
'gdb_packet.c',
'gdb_hostio.c',
'gdb_main.c',
'gdb_packet.c',
'hex_utils.c',
'main.c',
'maths_utils.c',
'morse.c',
'remote.c',
'rtt.c',
'timing.c',
)

Expand Down
6 changes: 3 additions & 3 deletions src/platform/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ platform_includes = [include_directories(
)]

platform_sources = [files(
'common/cdcacm.c',
'common/jtagtap.c',
'common/swdptap.c',
# 'common/cdcacm.c',
# 'common/jtagtap.c',
# 'common/swdptap.c',
)]

platform_args = []
Expand Down
8 changes: 4 additions & 4 deletions src/platform/stm32/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ platform_includes += include_directories(
)

platform_sources += files(
'serialno.c',
'usbuart.c',
'traceswo.c',
'traceswodecode.c',
'traceswoasync.c',
'traceswo.c',
# 'rtt_if.c',
'traceswodecode.c',
'serialno.c',
'gdb_if.c',
'traceswoasync_f723.c',
'timing_stm32.c',
)

Expand Down
1 change: 0 additions & 1 deletion src/platform/tm4c/meson.build
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

platform_sources += files(
'usbuart.c',
'traceswo.c',
'gdb_if.c',
)
Expand Down
28 changes: 17 additions & 11 deletions src/target/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,18 @@ target_includes = include_directories(
)

target_sources = files(
'target.c',
'adiv5.c',
'adiv5_swdp.c',
'adiv5_jtagdp.c',
'jtag_scan.c',
'adiv5_swdp.c',
'adiv5.c',
'gdb_reg.c',
'jtag_devs.c',
'target_probes.c',
# 'swdptap_generic.c',
# 'jtagtap_generic.c',
'jtag_scan.c',
'jtagtap_generic.c',
'sfdp.c',
'swdptap_generic.c',
'target_flash.c',
'target_probe.c',
'target.c',
)

# targets specific files dictionary
Expand All @@ -27,26 +30,29 @@ target_dicts = {
{'files': ['efm32.c'],
'depends': ['cortexm']},
'lpc':
{'files': ['lpc_common.c', 'lpc15xx.c', 'lpc43xx.c', 'lpc546xx.c', 'lpc17xx.c', 'lpc11xx.c'],
{'files': ['lpc_common.c', 'lpc11xx.c', 'lpc15xx.c', 'lpc17xx.c', 'lpc40xx.c', 'lpc43xx.c', 'lpc546xx.c', 'lpc55xx.c'],
'depends': ['cortexm']},
'nrf':
{'files': ['nrf51.c'],
'depends': ['cortexm']},
'nxp':
{'files': ['nxpke04.c', 'kinetis.c'],
{'files': ['imxrt.c', 'kinetis.c', 'nxpke04.c'],
'depends': ['cortexm']},
'rp':
{'files': ['rp.c'],
'depends': ['cortexm']},
'sam':
{'files': ['samx5x.c', 'sam3x.c', 'samd.c', 'sam4l.c'],
{'files': ['sam3x.c', 'sam4l.c', 'samd.c', 'samx5x.c'],
'depends': ['cortexm']},
'stm':
{'files': ['stm32f1.c', 'ch32f1.c', 'stm32g0.c', 'stm32l4.c', 'stm32l0.c', 'stm32f4.c', 'stm32h7.c',],
{'files': ['ch32f1.c', 'stm32f1.c', 'stm32f4.c', 'stm32g0.c', 'stm32h7.c', 'stm32l0.c', 'stm32l4.c'],
'depends': ['cortexm']},
'ti':
{'files': ['lmi.c', 'msp432.c'],
'depends': ['cortexm']},
'c':
{'files': ['renesas.c'],
'depends': ['cortexm']},
}

# loop through selected targets and add respective sources, check for dependencies if present
Expand Down
1 change: 1 addition & 0 deletions src/target/target_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include <general.h>
#include "platform_support.h"
#include "target_probe.h"

Expand Down
87 changes: 0 additions & 87 deletions src/target/target_probes.c

This file was deleted.

66 changes: 0 additions & 66 deletions src/target/target_probes.h

This file was deleted.

0 comments on commit 9d6c71d

Please sign in to comment.