diff --git a/card10-cross.ini b/card10-cross.ini index 5199d505c201d007fccbd6ecb3b233c95f175470..8ccc99632335e4d8585fd3241c53ee912498250b 100644 --- a/card10-cross.ini +++ b/card10-cross.ini @@ -8,7 +8,7 @@ c_args = ['-mthumb', '-mcpu=cortex-m4', '-mfloat-abi=softfp', '-mfpu=fpv4-s c_link_args = ['-mthumb', '-mcpu=cortex-m4', '-mfloat-abi=softfp', '-mfpu=fpv4-sp-d16', '-Wl,--start-group', '-lc', '-lnosys', '-Wl,--end-group', '--specs=nano.specs'] -target_defs = ['-DTARGET=32665', '-DTARGET_REV=0x4131', '-DBOARD_CARD10=1', '-DWSF_TRACE_ENABLED=TRUE', '-DWSF_ASSERT_ENABLED=TRUE', '-DWSF_MS_PER_TICK=1', '-DINIT_BROADCASTER', '-DINIT_PERIPHERAL', '-DINIT_ENCRYPTED'] +target_defs = ['-DTARGET=32665', '-DTARGET_REV=0x4131', '-DBOARD_CARD10=1'] [host_machine] system = 'none' diff --git a/lib/sdk/Libraries/BTLE/meson.build b/lib/sdk/Libraries/BTLE/meson.build index 36d6cda75c8538bc56c88915478c9822abd9915d..ab0db720687c87a7cc2763511090fbcfd2370104 100644 --- a/lib/sdk/Libraries/BTLE/meson.build +++ b/lib/sdk/Libraries/BTLE/meson.build @@ -414,22 +414,40 @@ sources = files( 'link_layer/controller/sources/common/sch/sch_list.c', ) + +ble_compileargs = [ + '-DWSF_ASSERT_ENABLED=TRUE', + '-DWSF_MS_PER_TICK=1', + '-DINIT_BROADCASTER', + '-DINIT_PERIPHERAL', + '-DINIT_ENCRYPTED', +] + +if get_option('ble_trace') + ble_compileargs += [ + '-DWSF_TRACE_ENABLED=TRUE', + ] +endif + lib = static_library( 'ble', sources, include_directories: includes, dependencies: [periphdriver, libcordiophy], - c_args: ['-w', - '-DLHCI_ENABLE_VS=TRUE', - '-DBB_CLK_RATE_HZ=1600000', - '-DLCTR_CONN_NO_TIFS_REASSEMBLY=1', - '-DBB_ENABLE_INLINE_ENC_TX=1', - '-DBB_ENABLE_INLINE_DEC_RX=1', - '-DFORCE_PMU_WAKEUP=1'] + c_args: [ + '-w', + '-DLHCI_ENABLE_VS=TRUE', + '-DBB_CLK_RATE_HZ=1600000', + '-DLCTR_CONN_NO_TIFS_REASSEMBLY=1', + '-DBB_ENABLE_INLINE_ENC_TX=1', + '-DBB_ENABLE_INLINE_DEC_RX=1', + '-DFORCE_PMU_WAKEUP=1', + ] + ble_compileargs, ) ble = declare_dependency( include_directories: includes, link_with: lib, + compile_args: ble_compileargs, dependencies: [periphdriver, libcordiophy], ) diff --git a/meson_options.txt b/meson_options.txt index e0a79c540133acc94716e895ed5e8697cfe2847b..bb96608f53ba3363e9e5a3b96dfb6eb6e11086df 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -5,3 +5,11 @@ option( description: 'Whether to print debug messages on the serial console' ) + +option( + 'ble_trace', + type: 'boolean', + value: false, + + description: 'Whether to enable WSF TRACE prints', +)