I am working on adding an absolute encoder and was looking to repurpose some of the GPIO pins. I made the relevant modifications in CubeMX and then generated the code. Then I created a new Makefile and compiled the code but receive an error as shown below:
$ make
arm-none-eabi-gcc -c -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -D__weak=attribute((weak)) -D__packed=attribute((packed)) -DUSE_HAL_DRIVER -DSTM32F405xx -D__weak=attribute((weak)) -D__packed=attribute((packed)) -DUSE_HAL_DRIVER -DSTM32F405xx -IDrivers/CMSIS/Device/ST/STM32F4xx/Include -IDrivers/CMSIS/Include -IDrivers/DRV8301 -IDrivers/STM32F4xx_HAL_Driver/Inc -IDrivers/STM32F4xx_HAL_Driver/Inc/Legacy -IInc -IMiddlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc -IMiddlewares/ST/STM32_USB_Device_Library/Core/Inc -IMiddlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS -IMiddlewares/Third_Party/FreeRTOS/Source/include -IMiddlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F -IMotorControl -O0 -Wall -fdata-sections -ffunction-sections -g -gdwarf-2 -std=c99 -MD -MP -MF .dep/drv8301.o.d -Wa,-a,-ad,-alms=build/drv8301.lst Drivers/DRV8301/drv8301.c -o build/drv8301.o
/usr/bin/sh: -c: line 0: syntax error near unexpected token(' /usr/bin/sh: -c: line 0:
arm-none-eabi-gcc -c -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -D__weak=attribute((weak)) -D__packed=attribute((packed)) -DUSE_HAL_DRIVER -DSTM32F405xx -D__weak=attribute((weak)) -D__packed=attribute((packed)) -DUSE_HAL_DRIVER -DSTM32F405xx -IDrivers/CMSIS/Device/ST/STM32F4xx/Include -IDrivers/CMSIS/Include -IDrivers/DRV8301 -IDrivers/STM32F4xx_HAL_Driver/Inc -IDrivers/STM32F4xx_HAL_Driver/Inc/Legacy -IInc -IMiddlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc -IMiddlewares/ST/STM32_USB_Device_Library/Core/Inc -IMiddlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS -IMiddlewares/Third_Party/FreeRTOS/Source/include -IMiddlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F -IMotorControl -O0 -Wall -fdata-sections -ffunction-sections -g -gdwarf-2 -std=c99 -MD -MP -MF .dep/drv8301.o.d -Wa,-a,-ad,-alms=build/drv8301.lst Drivers/DRV8301/drv8301.c -o build/drv8301.o’
make: *** [build/drv8301.o] Error 1
Has anybody else had the same error?
Thanks