As the subject suggests, I am having trouble getting r402 to compile (we need r402 because it has the same remote definitions for our transmitter). The steps I have taken:
-download and install Crossworks for ARM (current version)
-installed the STM32 CPU Support Package in CrossWorks
-download the AutoQuad code (r402)
-download the mavlink code, placed in the AutoQuad folder at the same level as onboard and ground
-download the stm32 standard peripheral library from st.com and placed it as indicated in this post:
-added "#define DIMU_VERSION 11" in aq.h
-select build target THUMB Release
When I build, I get 38 errors. Most have to do with the CANx macro in stm32f407xx.h being expanded in stm32f4xx_can.h function prototypes. A few of the others are:
rcc.h: unknown type name 'RCC_ClocksTypeDef'
main_ctl.c: 'NVIC_PriorityGroup_2' undeclared (first use in this function)
In an attempt to get around this, I tracked RCC_ClocksTypeDef to stm32f4xx_rcc.h and NVIC_PriorityGroup_2 to misc.h (also in STM peripherals). If I add these includes and change the CANx parameter names in the function prototypes (thinking that maybe the macro wasn't meant to be expanded here), more missing includes into STM are revealed. This all gives me the impression that the STM library is not linking correctly to my autoquad project, but I am really not sure.
Any help that you could offer would be greatly appreciated.