AnsweredAssumed Answered

STM32L0 and Cube framework

Question asked by stanzani.marco on Jul 22, 2015
Hello community
I am using the Cube Framework STM32Cube_FW_L0_V1.1.0 with an ASTM32L0x processor and ARM-MDK uVision 5.15
I started  with the template project where target device is set to STM32L053R8: when loading the template project I am warned that the selected device STM32L053R8 does not exhist and, asked to convert to the newest uVision environment (it looks like the template project is out of date).

So far so good: I can compile the project with no errors and warning

As long as I chang the device to L051K6 (BTW, why K4 is not listed? I can find in the product page)  I get zillion of warnings and errors (see below)
I am trying to fix this manually but still I wonder if there is any inconsistency with the device switching and when HAL drivers get involved
>>> UPDATEIt looks like the project rely on the defition of USB_typedef which cannot be found when the L0 device is selected. Is that correct that the L0 HAL is using USBI wonder why the HAL L0 package should expect the USB staff (in fact selecting the L0 prdevice run into troubles). As far as I understand the L0 does not have USB ... so why the L0 HAl does?I also find a number of USE_* defines in the template project ...\Inc\stm32l0xx_hal_conf.h*** Using Compiler 'V5.05 update 2 (build 169)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
compiling stm32l0xx_hal.c...
..\..\..\..\..\Drivers\STM32L0xx_HAL_Driver\Inc\stm32l0xx_hal_pcd.h(172): error:  #20: identifier "USB_TypeDef" is undefined
  typedef   USB_TypeDef PCD_TypeDef; 
..\..\..\..\..\Drivers\STM32L0xx_HAL_Driver\Src\stm32l0xx_hal.c: 0 warnings, 1 error
"..\..\..\..\..\Drivers\STM32L0xx_HAL_Driver\Src\stm32l0xx_hal.c" - 1 Error(s), 0 Warning(s).

Outcomes