Currently STM32 LLD DMA driver is enabled by drivers defining STM32_DMA_REQUIRED.
Thus if no devices are selected in chconf then the LLD DMA library is not included.
However, in some cases use of the DMA library is desired for hand coded device access when no other devices are using DMA.
Currently to enable LLD DMA a define can be added to makefile.
Maybe a more obvious/general approach would be add a definition to chconf and then expand the test in LLD DMA that enables LLD DMA.
For example in chconf.c add a new section for DMA...
Code: Select all
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
#define HAL_USE_WDG TRUE
#endif
/** @} */
/**
* @brief Enables the DMA subsystem.
*/
#if !defined(HAL_USE_DMA) || defined(__DOXYGEN__)
#define HAL_USE_DMA TRUE
#endif
/** @} */
Then in stm32_dma.c modify as follows...
Code: Select all
/* The following macro is only defined if some driver requiring DMA services
has been enabled.*/
#if defined(STM32_DMA_REQUIRED) || defined(HAL_USE_DMA) || defined(__DOXYGEN__)
What do you think?
Bob