8 years ago.

import problem in AC6 IDE

I imported the LoRawan PingPong project in the AC6 IDE (Linux Eclipse). Unfortunately the compiler reports some errors, some warnings and one info.

/home/rob/workspace/SX1276PingPong/mbed/TARGET_NUCLEO_L476RG/stm32l476xx.h:1339:29: error: expected identifier before '(' token

  1. define CAN ((CAN_TypeDef *) CAN1_BASE) ^ /home/rob/workspace/SX1276PingPong/mbed/./CAN.h:67:7: note: in expansion of macro 'CAN' class CAN { ^ /home/rob/workspace/SX1276PingPong/mbed/TARGET_NUCLEO_L476RG/stm32l476xx.h:1339:43: error: expected ')' before '*' token
  2. define CAN ((CAN_TypeDef *) CAN1_BASE) ^ /home/rob/workspace/SX1276PingPong/mbed/./CAN.h:67:7: note: in expansion of macro 'CAN' class CAN { ^ /home/rob/workspace/SX1276PingPong/mbed/TARGET_NUCLEO_L476RG/stm32l476xx.h:1339:43: error: expected ')' before '*' token
  3. define CAN ((CAN_TypeDef *) CAN1_BASE) ^ /home/rob/workspace/SX1276PingPong/mbed/./CAN.h:67:7: note: in expansion of macro 'CAN' class CAN { ^ ../SX1276Lib/sx1276/sx1276-hal.cpp:285:1: error: expected '}' at end of input } ^ SX1276Lib/sx1276/subdir.mk:21: recipe for target 'SX1276Lib/sx1276/sx1276-hal.o' failed make: * [SX1276Lib/sx1276/sx1276-hal.o] Error 1

##

all of them occurs at line

  1. define CAN ((CAN_TypeDef *) CAN1_BASE) in the file 'stm32l476xx.h'.

Please, any help is greatly appreciated.

Question relating to:

At moment I found no solution, the only way to allow gcc to compile the code is to set "0" the symbol DEVICE_CAN, so disabling the code related to the CAN peripheral.

posted by Roberto Di Stefano 28 Nov 2016
Be the first to answer this question.