On Wed, Jun 14, 2017 at 09:09:41AM -0700, will sanfilippo wrote: > Ugo: > > I believe that there is -DBSP_NAME passed to everything. Here is an excerpt > debug output from a build. You can see BSP_NAME=nrf52dk > > 2017/06/14 09:07:57.635 [DEBUG] arm-none-eabi-gcc -DADC_ENABLED=0 > -DAPP_NAME=bletest -DAPP_bletest -DARCH_NAME=cortex_m4 -DARCH_cortex_m4 > -DBLETEST -DBLETEST_CONCURRENT_CONN_TEST=1 -DBSP_NAME=nrf52dk -DBSP_nrf52dk > -DCLOCK_ENABLED=1 -DCOMP_ENABLED=1 -DEGU_ENABLED=0 -DGPIOTE_ENABLED=1 > -DI2S_ENABLED=1 -DLPCOMP_ENABLED=1 -DNRF52 -DPDM_ENABLED=0 > -DPERIPHERAL_RESOURCE_SHARING_ENABLED=1 -DPWM0_ENABLED=1 -DPWM1_ENABLED=0 > -DPWM2_ENABLED=0 -DQDEC_ENABLED=1 -DRNG_ENABLED=1 -DRTC0_ENABLED=0 > -DRTC1_ENABLED=0 -DRTC2_ENABLED=0 -DSAADC_ENABLED=1 -DSPI0_CONFIG_MISO_PIN=25 > -DSPI0_CONFIG_MOSI_PIN=24 -DSPI0_CONFIG_SCK_PIN=23 -DSPI0_ENABLED=1 > -DSPI0_USE_EASY_DMA=1 -DSPI1_ENABLED=0 -DSPI2_ENABLED=0 > -DSPIS0_CONFIG_MISO_PIN=25 -DSPIS0_CONFIG_MOSI_PIN=24 > > That should do the trick.
Just a small addition: For conditional compilation, you will want to use the other BSP define (BSP_nrf52dk in the above example). The BSP_NAME define is only useful when you need a string, e.g., for logging. Since the preprocessor only understands integers, you can't use the string form in an #if directive. Chris