!defined unknown to uvision4 for ARM?
Posted: Sun Jun 05, 2011 5:03 pm
Hello Giovanni,
i am trying to rebuild the example : ARMCM3-STM32F103 for Keil using ChibiOS 2.2.4
Target is an Olimex STM32-H107. I have customized the files in OLIMEX_STM32_P103 into
a new OLIMEX_STM32-H107 subdir in boards.
Copied the ARMCM3-STM32F103 into a new project folder and adapted
- halconf.h
- mcuconf.h
to my needs. I am planning to use all 3 SPI and USARTS 2 and 3 of the STM32F107VC.
Also changed the path to the board subdir in the Keil project.
All things went easy, so far.
Using the demo version of the Keil compiler i have tried to compile the project and first
found the problem with the clock generation and corrected it as proposed in the forum.
When i try to compile now i am getting following warnings :
..\..\..\os\hal\platforms\STM32\uart_lld.h(86): warning: #47-D: incompatible redefinition of macro "STM32_UART_USART1_IRQ_PRIORITY" (declared at line 124 of "..\mcuconf.h")
..\..\..\os\hal\platforms\STM32\uart_lld.h(93): warning: #47-D: incompatible redefinition of macro "STM32_UART_USART2_IRQ_PRIORITY" (declared at line 125 of "..\mcuconf.h")
..\..\..\os\hal\platforms\STM32\uart_lld.h(100): warning: #47-D: incompatible redefinition of macro "STM32_UART_USART3_IRQ_PRIORITY" (declared at line 126 of "..\mcuconf.h")
Project build/rebuild aborted.
I have changed the USART irq to 11, which should be OK because i do not using CAN.
Following this warnings i have consulted the Keil Manual and made some tests finding that the preprocessor
does not allow the syntax :
#if !defined(STM32_UART_USART1_IRQ_PRIO) || defined(__DOXYGEN__)
The preprocessor just misinterprets the line which is always not true, so the warning
is generated because default irq in uart_lld.h is 12.
I have found 256 occurrences of the !defined in the code.
Keil manual describes only #ifdef and #ifndef statements, so all occurances mut be replaced by nested
#ifdef and #ifndef.
Thank you for your help.
i am trying to rebuild the example : ARMCM3-STM32F103 for Keil using ChibiOS 2.2.4
Target is an Olimex STM32-H107. I have customized the files in OLIMEX_STM32_P103 into
a new OLIMEX_STM32-H107 subdir in boards.
Copied the ARMCM3-STM32F103 into a new project folder and adapted
- halconf.h
- mcuconf.h
to my needs. I am planning to use all 3 SPI and USARTS 2 and 3 of the STM32F107VC.
Also changed the path to the board subdir in the Keil project.
All things went easy, so far.
Using the demo version of the Keil compiler i have tried to compile the project and first
found the problem with the clock generation and corrected it as proposed in the forum.
When i try to compile now i am getting following warnings :
..\..\..\os\hal\platforms\STM32\uart_lld.h(86): warning: #47-D: incompatible redefinition of macro "STM32_UART_USART1_IRQ_PRIORITY" (declared at line 124 of "..\mcuconf.h")
..\..\..\os\hal\platforms\STM32\uart_lld.h(93): warning: #47-D: incompatible redefinition of macro "STM32_UART_USART2_IRQ_PRIORITY" (declared at line 125 of "..\mcuconf.h")
..\..\..\os\hal\platforms\STM32\uart_lld.h(100): warning: #47-D: incompatible redefinition of macro "STM32_UART_USART3_IRQ_PRIORITY" (declared at line 126 of "..\mcuconf.h")
Project build/rebuild aborted.
I have changed the USART irq to 11, which should be OK because i do not using CAN.
Following this warnings i have consulted the Keil Manual and made some tests finding that the preprocessor
does not allow the syntax :
#if !defined(STM32_UART_USART1_IRQ_PRIO) || defined(__DOXYGEN__)
The preprocessor just misinterprets the line which is always not true, so the warning
is generated because default irq in uart_lld.h is 12.
I have found 256 occurrences of the !defined in the code.
Keil manual describes only #ifdef and #ifndef statements, so all occurances mut be replaced by nested
#ifdef and #ifndef.
Thank you for your help.