Page 1 of 1

STM32 DMA Macro Exporting

Posted: Tue Dec 13, 2016 12:26 am
by meatball
The notes in the STM32 -> LLD -> DMAv1 -> notes.txt say's the following:


The file registry must export:

STM32_ADVANCED_DMA - TRUE not used by the DMA drivers but other
drivers use it to enable checks on DMA
channels. Probably will be removed in the
future.
STM32_DMA_SUPPORTS_CSELR - TRUE if the DMA have a CSELR register.
STM32_DMAn_NUM_CHANNELS - Number of channels in DMAs "n" (1..2).
STM32_DMAn_CHx_HANDLER - Vector name for IRQ "x" (1..7). If the macro
is not exported then the ISR is not declared.
STM32_DMAn_CHx_NUMBER - Vector number for IRQ "x" (1..7).


I can't get my port to Embitz IDE to build because of these HAL DMA definitions. They do not appear to be defined anywhere, but are checked for and used by loads of macros. I suppose I need to define these somewhere. Is that what the note means by "export"? Where should I define these things?

The file registry must export:


Registry? Does it mean to define these in stm32_registry.h?

Any advice on where to put these, and what to set them as? It is just not clear enough for me to feel comfortable moving forward without breaking the configuration.

Re: STM32 DMA Macro Exporting

Posted: Tue Dec 13, 2016 6:58 am
by Giovanni
Hi,

Yes, it is stm32_registry.h. You don't need to define anything, the provided registry files already contain those definitions.

Giovanni

Re: STM32 DMA Macro Exporting

Posted: Tue Dec 13, 2016 4:53 pm
by meatball
Thanks. I think STM32F4 should use the DMAv2 module, not v1. This must have changed between ChibiOS 3 and 16.1.4.

Re: STM32 DMA Macro Exporting

Posted: Tue Dec 13, 2016 7:17 pm
by Giovanni
Hi,

Yes, it changed, now DMA drivers are "unified". It is a good practice to make sure to take all the material from the same version, everything progresses as a whole.

Giovanni