0

When I attach my own libraries (that have already worked on other devices) stm32f4xx_can.c goes crazy as shown in this photo:

Screenshot

Eclipse says it has something to do with these colons and semicolons, but that's apparently not the problem.

How do I handle this? What's the reason?

Michael Dodd
  • 10,102
  • 12
  • 51
  • 64
Manaslu
  • 228
  • 1
  • 13
  • Try running indexer again: rightclick project -> index -> rebuild. These errors are not compilation errors but just analysis done by Eclipse, which may not reflect actual problems. What matters is what you get during compilation. – J_S Feb 01 '17 at 15:17
  • It doesn't work, nothing changed :( – Manaslu Feb 02 '17 at 10:46
  • 1
    Does the project compile? If not, what are the errors given by the compiler ("Console" tab, not "Errors" tab)? – J_S Feb 02 '17 at 13:57
  • It builds but does not create binary file. Instead i found this "makefile", "objects.list", "objects.mk" and "sources.mk". It's an example from console: "C:/Users/Piotr/workspace/xcan/StdPeriph_Driver/inc/stm32f4xx_can.h:627:39: note: in expansion of macro 'CANx' ITStatus CAN_GetITStatus(CAN_TypeDef* CANx, uint32_t CAN_IT); In file included from ../src/main.c:2:0: C:/Users/Piotr/workspace/xcan/StdPeriph_Driver/inc/stm32f4xx_can.h:627:45: error: expected ';', ',' or ')' before 'uint32_t' ITStatus CAN_GetITStatus(CAN_TypeDef* CANx, uint32_t CAN_IT); " – Manaslu Feb 03 '17 at 08:41
  • Entire console is, like, kilometer long. Additional thing i cannot understand is error in CMSIS-> device-> stm32f4xx.h: "#define PERIPH_BASE ((uint32_t)0x40000000) /*!< Peripheral base address in the alias region" – Manaslu Feb 03 '17 at 08:45
  • Can you paste it all to pastebin or something similar? Those errors indicate some general problem with your project. For example, maybe you're missing the global MCU type definition, such as "STM32F40_41xxx". – J_S Feb 03 '17 at 08:49
  • I couldn't test it yet, but when I pasted code to new libraries instead of manually adding the files, program allowed me to build it without any errors and create bin. I have no idea what has just happened. – Manaslu Feb 03 '17 at 13:51
  • By "new libraries" do you mean STM32Cube? From the screenshot I can see you're trying to use Standard Peripheral drivers, which is not what Eclipse adds to a template project when a new project is created. If that's what you mean by "manually adding files", then there's more you have to do than just moving files. – J_S Feb 03 '17 at 23:24

0 Answers0