Compiling Demonstration for 32L0538DISCOVERY on SW4STM32
Hi Shirokuma, if possible split request and use best Title to help other search topic.
About cubemx add library you need adapt your project or new board to existing product selection by board type.
From your writing appear you are using an ST board so:
Select board where you are working instead of processor based seems the best way to have BSP included.
If other package from preloaded: select middleware, enable product and fill relative configure page.
Last resource is to use project manager and add there remaining software/ add as library on generated code.
Also check FAQ:
http://www.openstm32.org/Creating%2Ba%2Bnew%2Bproject
http://www.openstm32.org/tiki-view_faq.php?faqId=5#q14
Best regards
Roberto