Hm... simple append of some strings to the end of files is trivial, but it anyway must be checked later by hand. Quick and dirty solution:
Code: Select all
#/bin/sh
# $1 is first command line argument for script
echo $1
echo '/*
* SDC driver system settings.
*/
#define STM32_SDC_SDIO_DMA_STREAM STM32_DMA_STREAM_ID(2, 3)
#define STM32_SDC_SDIO_DMA_PRIORITY 3
#define STM32_SDC_SDIO_IRQ_PRIORITY 9
#define STM32_SDC_SDIO_UNALIGNED_SUPPORT TRUE' >> $1
save this to "testhal/STM32F4xx/update_mcuconf.sh". I think content of script is self descriptive.
than cd to "testhal/STM32F4xx" and call from command line (it works in Cygwin too)
Code: Select all
find . -name 'mcuconf.h' -exec ./update_mcuconf.sh '{}' \;
probably after that you must call
Code: Select all
find . -name 'mcuconf.h' -exec unix2dos '{}' \;
to fix new line symbols.
Insertion of code somewhere in middle of halconf.h needs special markers (something like /* end of HAL_USE */ )