I'm trying to run an application on Renode that uses ADC and DMA for the STM32F030F4P, I created a stm32f0.repl
file with the dma
and adc
as follows:
dma: DMA.STM32LDMA @ sysbus 0x40020000
[0] -> nvic@[9]
adc: Analog.STM32F0_ADC @ sysbus 0x40012400
referenceVoltage: 3.3
externalEventFrequency: 1000
-> nvic@12
dmaChannel: 1
dmaPeripheral: dma
When I run Renode, I get the following error:
For parameter 'dmaPeripheral' of type 'Antmicro.Renode.Peripherals.DMA.IDMA' found attribute at C:\Program Files\Renode\platforms\cpus\stm32f0.repl:151:5 with value [ReferenceValue: dma]
Parameter is not assignable from the reference value, constructor rejected.
At C:\Program Files\Renode\platforms\cpus\stm32f0.repl:146:6:
adc: Analog.STM32F0_ADC @ sysbus 0x40012400
^
What is the correct value for dmaPeripheral
?
As it's optional, you can remove it completely. This would lead to DMA not being used.
It seems that what you have written should be doable, and it's a bug that it's not possible. The
STM32LDMA
should implement theIDMA
interface and it doesn't.I would suggest filing a bug on Renode's GitHub
Disclaimer: I'm one of Renode developers