dmitrystu / libusb_stm32

Lightweight USB device Stack for STM32 microcontrollers
Apache License 2.0
713 stars 163 forks source link

Missing stm32.h #5

Closed AlbanBedel closed 6 years ago

AlbanBedel commented 6 years ago

I'm trying to compile this library on Ubuntu for an STM32F048xx. I downloaded STM32CubeF0 v1.9.0 and added the following to the Makefile:

STARTUP.stm32f048xx  = $(CMSISDEV)/STM32L0xx/Source/Templates/gcc/startup_stm32f048xx.s
CFLAGS.stm32f048xx   = -mcpu=cortex-m0
DEFINES.stm32f048xx  = STM32F0 STM32F048xx

And try to build the module, but it fails:

$ make module CMSIS=../STM32Cube_FW_F0_V1.9.0/Drivers/CMSIS MCU=stm32f048xx
compiling src/usb_32v1.o
src/usb_32v1.c:18:19: fatal error: stm32.h: No such file or directory
 #include "stm32.h"

I'm new to the STM32 controllers so perhaps that should be obvious, but I wasn't able to find which library I'm missing here.

dmitrystu commented 6 years ago

Use this stm32.h Put it into ../STM32Cube_FW_F0_V1.9.0/Drivers/CMSIS/Device/ST/

AlbanBedel commented 6 years ago

Thanks! Perhaps this should be mentioned in the readme.