Page 1 of 1
mcuconf.h
Posted: Wed May 09, 2012 10:12 pm
by Tinker
I noticed that the mcuconf.h for the M4's is pretty different from the Cortex-M3's. Is there a way of creating one that works for both or should I just stick with using 2?
Re: mcuconf.h
Posted: Wed May 09, 2012 10:21 pm
by Giovanni
Hi,
mcuconf.h does not depend on the CPU type, it contains peripheral settings, the STM32F1xx and STM32F4xx have different clock settings and defaults so the file has to be different in that section.
If you want a single file you may use #ifdefs checking the MCU type defined in board.h.
Giovanni
Re: mcuconf.h
Posted: Sat May 12, 2012 12:50 am
by Tinker
How about STM32-F4 statements like these?
#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 5)
#define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7)
Are these ignored by the Cortex-M3 initialization?
Re: mcuconf.h
Posted: Sat May 12, 2012 6:43 am
by Giovanni
Those would generate a warning because that macro is also defined inside the various drivers.
Giovanni