Please refer to AN5651 Update procedure and configuration in DTM firmware for X-NUCLEO-BNRG2A1
The (prebuilt) firmware image can be found in BlueNRG-M2 web page, selecting the Documentation tab and then Utilities at the page bottom.
https://www.st.com/content/st_com/en/products/wireless-connectivity/short-range/bluetooth-low-energy-application-processors/bluenrg-m2.html
By default, the DTM image (stack v2.1c) for the BlueNRG-M2SP is: en.BlueNRGM2SA_M2SP_DTM_Stack_v2_1c\BlueNRGM2SA_M2SP_DTM_Stack_v2.1c\BLUENRGM2SP_32MHz_RO_SMPS_off\SPI\BLUENRG-M2SP_DTM_SPI.hex
Alternately, as you've knew, you can build the image from BlueNRG-1/2 DK, with DTM project:
C:\Users\<user id>\ST\BlueNRG-1_2 DK 3.2.1\Project\BLE_Examples\DTM\
The BLUENRG-M2SP module has:
- 32 MHz crystal oscillator
- LDO converter
So the DTM project should be customized with followed preprocessors:
- HS_SPEED_XTAL=HS_SPEED_XTAL_32MHZ
- LS_SOURCE=LS_SOURCE_INTERNAL_RO
- SMPS_INDUCTOR=SMPS_INDUCTOR_NONE