From b009b10df4df42a0b1469515760695f171bc3594 Mon Sep 17 00:00:00 2001 From: Frederic Pillon Date: Tue, 1 Oct 2019 22:21:56 +0200 Subject: [PATCH 1/3] Add source files wrapper library Allow to not archive HAL/LL object files to core.a. This avoid the linker to select weak definitions instead of non-weak ones when 'whole-archive' option is not used. See: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka15833.html Signed-off-by: Frederic Pillon --- cores/arduino/syscalls.c | 112 ------------------ libraries/SrcWrapper/keywords.txt | 15 +++ libraries/SrcWrapper/library.properties | 9 ++ .../SrcWrapper/src}/HAL/stm32yyxx_hal.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_adc.c | 0 .../src}/HAL/stm32yyxx_hal_adc_ex.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_can.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_cec.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_comp.c | 0 .../src}/HAL/stm32yyxx_hal_comp_ex.c | 0 .../src}/HAL/stm32yyxx_hal_cordic.c | 0 .../src}/HAL/stm32yyxx_hal_cortex.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_crc.c | 0 .../src}/HAL/stm32yyxx_hal_crc_ex.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_cryp.c | 0 .../src}/HAL/stm32yyxx_hal_cryp_ex.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_dac.c | 0 .../src}/HAL/stm32yyxx_hal_dac_ex.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_dcmi.c | 0 .../src}/HAL/stm32yyxx_hal_dcmi_ex.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_dfsdm.c | 0 .../src}/HAL/stm32yyxx_hal_dfsdm_ex.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_dma.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_dma2d.c | 0 .../src}/HAL/stm32yyxx_hal_dma_ex.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_dsi.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_eth.c | 0 .../src}/HAL/stm32yyxx_hal_eth_ex.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_exti.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_fdcan.c | 0 .../src}/HAL/stm32yyxx_hal_firewall.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_flash.c | 0 .../src}/HAL/stm32yyxx_hal_flash_ex.c | 0 .../src}/HAL/stm32yyxx_hal_flash_ramfunc.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_fmac.c | 0 .../src}/HAL/stm32yyxx_hal_fmpi2c.c | 0 .../src}/HAL/stm32yyxx_hal_fmpi2c_ex.c | 0 .../src}/HAL/stm32yyxx_hal_gfxmmu.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_gpio.c | 0 .../src}/HAL/stm32yyxx_hal_gpio_ex.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_hash.c | 0 .../src}/HAL/stm32yyxx_hal_hash_ex.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_hcd.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_hrtim.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_hsem.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_i2c.c | 0 .../src}/HAL/stm32yyxx_hal_i2c_ex.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_i2s.c | 0 .../src}/HAL/stm32yyxx_hal_i2s_ex.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_ipcc.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_irda.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_iwdg.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_jpeg.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_lcd.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_lptim.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_ltdc.c | 0 .../src}/HAL/stm32yyxx_hal_ltdc_ex.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_mdios.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_mdma.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_mmc.c | 0 .../src}/HAL/stm32yyxx_hal_mmc_ex.c | 0 .../src}/HAL/stm32yyxx_hal_msp_template.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_nand.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_nor.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_opamp.c | 0 .../src}/HAL/stm32yyxx_hal_opamp_ex.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_ospi.c | 0 .../src}/HAL/stm32yyxx_hal_pccard.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_pcd.c | 0 .../src}/HAL/stm32yyxx_hal_pcd_ex.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_pka.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_pwr.c | 0 .../src}/HAL/stm32yyxx_hal_pwr_ex.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_qspi.c | 0 .../src}/HAL/stm32yyxx_hal_ramecc.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_rcc.c | 0 .../src}/HAL/stm32yyxx_hal_rcc_ex.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_rng.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_rtc.c | 0 .../src}/HAL/stm32yyxx_hal_rtc_ex.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_sai.c | 0 .../src}/HAL/stm32yyxx_hal_sai_ex.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_sd.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_sd_ex.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_sdadc.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_sdram.c | 0 .../src}/HAL/stm32yyxx_hal_smartcard.c | 0 .../src}/HAL/stm32yyxx_hal_smartcard_ex.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_smbus.c | 0 .../src}/HAL/stm32yyxx_hal_spdifrx.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_spi.c | 0 .../src}/HAL/stm32yyxx_hal_spi_ex.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_sram.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_swpmi.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_tim.c | 0 .../src}/HAL/stm32yyxx_hal_tim_ex.c | 0 ...tm32yyxx_hal_timebase_rtc_alarm_template.c | 0 ...m32yyxx_hal_timebase_rtc_wakeup_template.c | 0 .../HAL/stm32yyxx_hal_timebase_tim_template.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_tsc.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_uart.c | 0 .../src}/HAL/stm32yyxx_hal_uart_ex.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_usart.c | 0 .../src}/HAL/stm32yyxx_hal_usart_ex.c | 0 .../SrcWrapper/src}/HAL/stm32yyxx_hal_wwdg.c | 0 .../SrcWrapper/src}/LL/stm32yyxx_ll_adc.c | 0 .../SrcWrapper/src}/LL/stm32yyxx_ll_bdma.c | 0 .../SrcWrapper/src}/LL/stm32yyxx_ll_comp.c | 0 .../SrcWrapper/src}/LL/stm32yyxx_ll_cordic.c | 0 .../SrcWrapper/src}/LL/stm32yyxx_ll_crc.c | 0 .../SrcWrapper/src}/LL/stm32yyxx_ll_crs.c | 0 .../SrcWrapper/src}/LL/stm32yyxx_ll_dac.c | 0 .../src}/LL/stm32yyxx_ll_delayblock.c | 0 .../SrcWrapper/src}/LL/stm32yyxx_ll_dma.c | 0 .../SrcWrapper/src}/LL/stm32yyxx_ll_dma2d.c | 0 .../SrcWrapper/src}/LL/stm32yyxx_ll_exti.c | 0 .../SrcWrapper/src}/LL/stm32yyxx_ll_fmac.c | 0 .../SrcWrapper/src}/LL/stm32yyxx_ll_fmc.c | 0 .../SrcWrapper/src}/LL/stm32yyxx_ll_fsmc.c | 0 .../SrcWrapper/src}/LL/stm32yyxx_ll_gpio.c | 0 .../SrcWrapper/src}/LL/stm32yyxx_ll_hrtim.c | 0 .../SrcWrapper/src}/LL/stm32yyxx_ll_i2c.c | 0 .../SrcWrapper/src}/LL/stm32yyxx_ll_lptim.c | 0 .../SrcWrapper/src}/LL/stm32yyxx_ll_lpuart.c | 0 .../SrcWrapper/src}/LL/stm32yyxx_ll_mdma.c | 0 .../SrcWrapper/src}/LL/stm32yyxx_ll_opamp.c | 0 .../SrcWrapper/src}/LL/stm32yyxx_ll_pka.c | 0 .../SrcWrapper/src}/LL/stm32yyxx_ll_pwr.c | 0 .../SrcWrapper/src}/LL/stm32yyxx_ll_rcc.c | 0 .../SrcWrapper/src}/LL/stm32yyxx_ll_rng.c | 0 .../SrcWrapper/src}/LL/stm32yyxx_ll_rtc.c | 0 .../SrcWrapper/src}/LL/stm32yyxx_ll_sdmmc.c | 0 .../SrcWrapper/src}/LL/stm32yyxx_ll_spi.c | 0 .../SrcWrapper/src}/LL/stm32yyxx_ll_swpmi.c | 0 .../SrcWrapper/src}/LL/stm32yyxx_ll_tim.c | 0 .../SrcWrapper/src}/LL/stm32yyxx_ll_ucpd.c | 0 .../SrcWrapper/src}/LL/stm32yyxx_ll_usart.c | 0 .../SrcWrapper/src}/LL/stm32yyxx_ll_usb.c | 0 .../SrcWrapper/src}/LL/stm32yyxx_ll_utils.c | 0 libraries/SrcWrapper/src/SrcWrapper.h | 4 + platform.txt | 20 +++- 141 files changed, 44 insertions(+), 116 deletions(-) delete mode 100644 cores/arduino/syscalls.c create mode 100644 libraries/SrcWrapper/keywords.txt create mode 100644 libraries/SrcWrapper/library.properties rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_adc.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_adc_ex.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_can.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_cec.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_comp.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_comp_ex.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_cordic.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_cortex.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_crc.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_crc_ex.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_cryp.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_cryp_ex.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_dac.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_dac_ex.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_dcmi.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_dcmi_ex.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_dfsdm.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_dfsdm_ex.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_dma.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_dma2d.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_dma_ex.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_dsi.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_eth.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_eth_ex.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_exti.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_fdcan.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_firewall.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_flash.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_flash_ex.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_flash_ramfunc.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_fmac.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_fmpi2c.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_fmpi2c_ex.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_gfxmmu.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_gpio.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_gpio_ex.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_hash.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_hash_ex.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_hcd.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_hrtim.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_hsem.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_i2c.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_i2c_ex.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_i2s.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_i2s_ex.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_ipcc.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_irda.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_iwdg.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_jpeg.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_lcd.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_lptim.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_ltdc.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_ltdc_ex.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_mdios.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_mdma.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_mmc.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_mmc_ex.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_msp_template.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_nand.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_nor.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_opamp.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_opamp_ex.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_ospi.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_pccard.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_pcd.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_pcd_ex.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_pka.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_pwr.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_pwr_ex.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_qspi.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_ramecc.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_rcc.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_rcc_ex.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_rng.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_rtc.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_rtc_ex.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_sai.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_sai_ex.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_sd.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_sd_ex.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_sdadc.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_sdram.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_smartcard.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_smartcard_ex.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_smbus.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_spdifrx.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_spi.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_spi_ex.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_sram.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_swpmi.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_tim.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_tim_ex.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_timebase_rtc_alarm_template.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_timebase_rtc_wakeup_template.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_timebase_tim_template.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_tsc.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_uart.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_uart_ex.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_usart.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_usart_ex.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/HAL/stm32yyxx_hal_wwdg.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/LL/stm32yyxx_ll_adc.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/LL/stm32yyxx_ll_bdma.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/LL/stm32yyxx_ll_comp.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/LL/stm32yyxx_ll_cordic.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/LL/stm32yyxx_ll_crc.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/LL/stm32yyxx_ll_crs.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/LL/stm32yyxx_ll_dac.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/LL/stm32yyxx_ll_delayblock.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/LL/stm32yyxx_ll_dma.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/LL/stm32yyxx_ll_dma2d.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/LL/stm32yyxx_ll_exti.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/LL/stm32yyxx_ll_fmac.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/LL/stm32yyxx_ll_fmc.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/LL/stm32yyxx_ll_fsmc.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/LL/stm32yyxx_ll_gpio.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/LL/stm32yyxx_ll_hrtim.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/LL/stm32yyxx_ll_i2c.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/LL/stm32yyxx_ll_lptim.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/LL/stm32yyxx_ll_lpuart.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/LL/stm32yyxx_ll_mdma.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/LL/stm32yyxx_ll_opamp.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/LL/stm32yyxx_ll_pka.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/LL/stm32yyxx_ll_pwr.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/LL/stm32yyxx_ll_rcc.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/LL/stm32yyxx_ll_rng.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/LL/stm32yyxx_ll_rtc.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/LL/stm32yyxx_ll_sdmmc.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/LL/stm32yyxx_ll_spi.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/LL/stm32yyxx_ll_swpmi.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/LL/stm32yyxx_ll_tim.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/LL/stm32yyxx_ll_ucpd.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/LL/stm32yyxx_ll_usart.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/LL/stm32yyxx_ll_usb.c (100%) rename {cores/arduino/stm32 => libraries/SrcWrapper/src}/LL/stm32yyxx_ll_utils.c (100%) create mode 100644 libraries/SrcWrapper/src/SrcWrapper.h diff --git a/cores/arduino/syscalls.c b/cores/arduino/syscalls.c deleted file mode 100644 index a477795d6b..0000000000 --- a/cores/arduino/syscalls.c +++ /dev/null @@ -1,112 +0,0 @@ -/** - * \file syscalls_stm32.c - * - * Implementation of newlib syscall. - * - */ - -#include "stm32_def.h" -#if defined ( __GNUC__ ) /* GCC CS3 */ -#include -#endif -#include -#undef errno -extern int errno; - -extern size_t uart_debug_write(uint8_t *data, uint32_t size); - -// Helper macro to mark unused parameters and prevent compiler warnings. -// Appends _UNUSED to the variable name to prevent accidentally using them. -#ifdef UNUSED -#undef UNUSED -#endif -#ifdef __GNUC__ -#define UNUSED(x) x ## _UNUSED __attribute__((__unused__)) -#else -#define UNUSED(x) x ## _UNUSED -#endif - -__attribute__((weak)) -caddr_t _sbrk(int incr) -{ - extern char _estack; /* Defined in the linker script */ - extern char _Min_Stack_Size; /* Defined in the linker script */ - extern char _end; /* Defined by the linker */ - static char *heap_end = &_end ; - char *prev_heap_end = heap_end; - - if (heap_end + incr > (char *)__get_MSP()) { - /* Heap and stack collision */ - errno = ENOMEM; - return (caddr_t) -1; - } - /* Ensure to keep minimun stack size defined in the linker script */ - if (heap_end + incr >= (char *)(&_estack - &_Min_Stack_Size)) { - errno = ENOMEM; - return (caddr_t) -1; - } - - heap_end += incr ; - return (caddr_t) prev_heap_end ; -} - -__attribute__((weak)) -int _close(UNUSED(int file)) -{ - return -1; -} - -__attribute__((weak)) -int _fstat(UNUSED(int file), struct stat *st) -{ - st->st_mode = S_IFCHR ; - return 0; -} - -__attribute__((weak)) -int _isatty(UNUSED(int file)) -{ - return 1; -} - -__attribute__((weak)) -int _lseek(UNUSED(int file), UNUSED(int ptr), UNUSED(int dir)) -{ - return 0; -} - -__attribute__((weak)) -int _read(UNUSED(int file), UNUSED(char *ptr), UNUSED(int len)) -{ - return 0; -} - -__attribute__((weak)) -int _write(UNUSED(int file), char *ptr, int len) -{ -#ifdef HAL_UART_MODULE_ENABLED - return uart_debug_write((uint8_t *)ptr, (uint32_t)len); -#else - (void)ptr; - return len; -#endif -} - -__attribute__((weak)) -void _exit(UNUSED(int status)) -{ - for (; ;) ; -} - -__attribute__((weak)) -int _kill(UNUSED(int pid), UNUSED(int sig)) -{ - errno = EINVAL; - return -1; -} - -__attribute__((weak)) -int _getpid(void) -{ - return 1; -} diff --git a/libraries/SrcWrapper/keywords.txt b/libraries/SrcWrapper/keywords.txt new file mode 100644 index 0000000000..8c790f63e5 --- /dev/null +++ b/libraries/SrcWrapper/keywords.txt @@ -0,0 +1,15 @@ +####################################### +# Syntax Coloring Map For SrcWrapper +####################################### + +####################################### +# Datatypes (KEYWORD1) +####################################### + +####################################### +# Methods and Functions (KEYWORD2) +####################################### + +####################################### +# Constants (LITERAL1) +####################################### diff --git a/libraries/SrcWrapper/library.properties b/libraries/SrcWrapper/library.properties new file mode 100644 index 0000000000..6d37361ff1 --- /dev/null +++ b/libraries/SrcWrapper/library.properties @@ -0,0 +1,9 @@ +name=Source Wrapper +version=1.0.0 +author=Frederic Pillon +maintainer=stm32duino +sentence=Source files wrapper (HAL, LL,...) +paragraph=Allow to not archive source object files to core.a. This avoid the linker to select weak definitions instead of non-weak ones when 'whole-archive' option is not used. +category=Other +url= +architectures=stm32 diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_adc.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_adc.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_adc.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_adc.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_adc_ex.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_adc_ex.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_adc_ex.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_adc_ex.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_can.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_can.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_can.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_can.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_cec.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_cec.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_cec.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_cec.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_comp.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_comp.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_comp.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_comp.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_comp_ex.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_comp_ex.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_comp_ex.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_comp_ex.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_cordic.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_cordic.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_cordic.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_cordic.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_cortex.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_cortex.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_cortex.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_cortex.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_crc.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_crc.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_crc.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_crc.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_crc_ex.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_crc_ex.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_crc_ex.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_crc_ex.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_cryp.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_cryp.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_cryp.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_cryp.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_cryp_ex.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_cryp_ex.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_cryp_ex.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_cryp_ex.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_dac.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_dac.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_dac.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_dac.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_dac_ex.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_dac_ex.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_dac_ex.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_dac_ex.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_dcmi.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_dcmi.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_dcmi.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_dcmi.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_dcmi_ex.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_dcmi_ex.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_dcmi_ex.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_dcmi_ex.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_dfsdm.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_dfsdm.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_dfsdm.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_dfsdm.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_dfsdm_ex.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_dfsdm_ex.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_dfsdm_ex.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_dfsdm_ex.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_dma.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_dma.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_dma.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_dma.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_dma2d.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_dma2d.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_dma2d.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_dma2d.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_dma_ex.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_dma_ex.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_dma_ex.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_dma_ex.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_dsi.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_dsi.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_dsi.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_dsi.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_eth.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_eth.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_eth.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_eth.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_eth_ex.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_eth_ex.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_eth_ex.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_eth_ex.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_exti.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_exti.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_exti.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_exti.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_fdcan.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_fdcan.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_fdcan.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_fdcan.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_firewall.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_firewall.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_firewall.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_firewall.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_flash.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_flash.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_flash.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_flash.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_flash_ex.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_flash_ex.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_flash_ex.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_flash_ex.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_flash_ramfunc.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_flash_ramfunc.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_flash_ramfunc.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_flash_ramfunc.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_fmac.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_fmac.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_fmac.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_fmac.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_fmpi2c.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_fmpi2c.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_fmpi2c.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_fmpi2c.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_fmpi2c_ex.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_fmpi2c_ex.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_fmpi2c_ex.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_fmpi2c_ex.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_gfxmmu.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_gfxmmu.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_gfxmmu.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_gfxmmu.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_gpio.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_gpio.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_gpio.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_gpio.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_gpio_ex.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_gpio_ex.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_gpio_ex.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_gpio_ex.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_hash.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_hash.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_hash.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_hash.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_hash_ex.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_hash_ex.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_hash_ex.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_hash_ex.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_hcd.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_hcd.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_hcd.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_hcd.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_hrtim.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_hrtim.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_hrtim.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_hrtim.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_hsem.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_hsem.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_hsem.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_hsem.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_i2c.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_i2c.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_i2c.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_i2c.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_i2c_ex.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_i2c_ex.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_i2c_ex.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_i2c_ex.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_i2s.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_i2s.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_i2s.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_i2s.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_i2s_ex.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_i2s_ex.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_i2s_ex.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_i2s_ex.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_ipcc.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_ipcc.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_ipcc.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_ipcc.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_irda.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_irda.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_irda.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_irda.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_iwdg.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_iwdg.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_iwdg.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_iwdg.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_jpeg.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_jpeg.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_jpeg.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_jpeg.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_lcd.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_lcd.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_lcd.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_lcd.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_lptim.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_lptim.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_lptim.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_lptim.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_ltdc.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_ltdc.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_ltdc.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_ltdc.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_ltdc_ex.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_ltdc_ex.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_ltdc_ex.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_ltdc_ex.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_mdios.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_mdios.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_mdios.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_mdios.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_mdma.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_mdma.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_mdma.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_mdma.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_mmc.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_mmc.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_mmc.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_mmc.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_mmc_ex.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_mmc_ex.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_mmc_ex.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_mmc_ex.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_msp_template.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_msp_template.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_msp_template.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_msp_template.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_nand.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_nand.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_nand.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_nand.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_nor.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_nor.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_nor.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_nor.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_opamp.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_opamp.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_opamp.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_opamp.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_opamp_ex.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_opamp_ex.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_opamp_ex.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_opamp_ex.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_ospi.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_ospi.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_ospi.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_ospi.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_pccard.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_pccard.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_pccard.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_pccard.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_pcd.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_pcd.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_pcd.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_pcd.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_pcd_ex.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_pcd_ex.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_pcd_ex.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_pcd_ex.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_pka.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_pka.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_pka.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_pka.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_pwr.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_pwr.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_pwr.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_pwr.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_pwr_ex.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_pwr_ex.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_pwr_ex.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_pwr_ex.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_qspi.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_qspi.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_qspi.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_qspi.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_ramecc.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_ramecc.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_ramecc.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_ramecc.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_rcc.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_rcc.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_rcc.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_rcc.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_rcc_ex.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_rcc_ex.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_rcc_ex.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_rcc_ex.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_rng.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_rng.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_rng.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_rng.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_rtc.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_rtc.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_rtc.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_rtc.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_rtc_ex.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_rtc_ex.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_rtc_ex.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_rtc_ex.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_sai.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_sai.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_sai.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_sai.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_sai_ex.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_sai_ex.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_sai_ex.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_sai_ex.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_sd.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_sd.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_sd.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_sd.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_sd_ex.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_sd_ex.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_sd_ex.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_sd_ex.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_sdadc.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_sdadc.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_sdadc.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_sdadc.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_sdram.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_sdram.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_sdram.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_sdram.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_smartcard.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_smartcard.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_smartcard.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_smartcard.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_smartcard_ex.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_smartcard_ex.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_smartcard_ex.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_smartcard_ex.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_smbus.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_smbus.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_smbus.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_smbus.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_spdifrx.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_spdifrx.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_spdifrx.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_spdifrx.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_spi.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_spi.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_spi.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_spi.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_spi_ex.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_spi_ex.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_spi_ex.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_spi_ex.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_sram.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_sram.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_sram.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_sram.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_swpmi.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_swpmi.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_swpmi.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_swpmi.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_tim.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_tim.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_tim.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_tim.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_tim_ex.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_tim_ex.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_tim_ex.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_tim_ex.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_timebase_rtc_alarm_template.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_timebase_rtc_alarm_template.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_timebase_rtc_alarm_template.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_timebase_rtc_alarm_template.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_timebase_rtc_wakeup_template.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_timebase_rtc_wakeup_template.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_timebase_rtc_wakeup_template.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_timebase_rtc_wakeup_template.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_timebase_tim_template.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_timebase_tim_template.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_timebase_tim_template.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_timebase_tim_template.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_tsc.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_tsc.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_tsc.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_tsc.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_uart.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_uart.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_uart.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_uart.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_uart_ex.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_uart_ex.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_uart_ex.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_uart_ex.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_usart.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_usart.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_usart.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_usart.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_usart_ex.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_usart_ex.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_usart_ex.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_usart_ex.c diff --git a/cores/arduino/stm32/HAL/stm32yyxx_hal_wwdg.c b/libraries/SrcWrapper/src/HAL/stm32yyxx_hal_wwdg.c similarity index 100% rename from cores/arduino/stm32/HAL/stm32yyxx_hal_wwdg.c rename to libraries/SrcWrapper/src/HAL/stm32yyxx_hal_wwdg.c diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_adc.c b/libraries/SrcWrapper/src/LL/stm32yyxx_ll_adc.c similarity index 100% rename from cores/arduino/stm32/LL/stm32yyxx_ll_adc.c rename to libraries/SrcWrapper/src/LL/stm32yyxx_ll_adc.c diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_bdma.c b/libraries/SrcWrapper/src/LL/stm32yyxx_ll_bdma.c similarity index 100% rename from cores/arduino/stm32/LL/stm32yyxx_ll_bdma.c rename to libraries/SrcWrapper/src/LL/stm32yyxx_ll_bdma.c diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_comp.c b/libraries/SrcWrapper/src/LL/stm32yyxx_ll_comp.c similarity index 100% rename from cores/arduino/stm32/LL/stm32yyxx_ll_comp.c rename to libraries/SrcWrapper/src/LL/stm32yyxx_ll_comp.c diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_cordic.c b/libraries/SrcWrapper/src/LL/stm32yyxx_ll_cordic.c similarity index 100% rename from cores/arduino/stm32/LL/stm32yyxx_ll_cordic.c rename to libraries/SrcWrapper/src/LL/stm32yyxx_ll_cordic.c diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_crc.c b/libraries/SrcWrapper/src/LL/stm32yyxx_ll_crc.c similarity index 100% rename from cores/arduino/stm32/LL/stm32yyxx_ll_crc.c rename to libraries/SrcWrapper/src/LL/stm32yyxx_ll_crc.c diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_crs.c b/libraries/SrcWrapper/src/LL/stm32yyxx_ll_crs.c similarity index 100% rename from cores/arduino/stm32/LL/stm32yyxx_ll_crs.c rename to libraries/SrcWrapper/src/LL/stm32yyxx_ll_crs.c diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_dac.c b/libraries/SrcWrapper/src/LL/stm32yyxx_ll_dac.c similarity index 100% rename from cores/arduino/stm32/LL/stm32yyxx_ll_dac.c rename to libraries/SrcWrapper/src/LL/stm32yyxx_ll_dac.c diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_delayblock.c b/libraries/SrcWrapper/src/LL/stm32yyxx_ll_delayblock.c similarity index 100% rename from cores/arduino/stm32/LL/stm32yyxx_ll_delayblock.c rename to libraries/SrcWrapper/src/LL/stm32yyxx_ll_delayblock.c diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_dma.c b/libraries/SrcWrapper/src/LL/stm32yyxx_ll_dma.c similarity index 100% rename from cores/arduino/stm32/LL/stm32yyxx_ll_dma.c rename to libraries/SrcWrapper/src/LL/stm32yyxx_ll_dma.c diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_dma2d.c b/libraries/SrcWrapper/src/LL/stm32yyxx_ll_dma2d.c similarity index 100% rename from cores/arduino/stm32/LL/stm32yyxx_ll_dma2d.c rename to libraries/SrcWrapper/src/LL/stm32yyxx_ll_dma2d.c diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_exti.c b/libraries/SrcWrapper/src/LL/stm32yyxx_ll_exti.c similarity index 100% rename from cores/arduino/stm32/LL/stm32yyxx_ll_exti.c rename to libraries/SrcWrapper/src/LL/stm32yyxx_ll_exti.c diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_fmac.c b/libraries/SrcWrapper/src/LL/stm32yyxx_ll_fmac.c similarity index 100% rename from cores/arduino/stm32/LL/stm32yyxx_ll_fmac.c rename to libraries/SrcWrapper/src/LL/stm32yyxx_ll_fmac.c diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_fmc.c b/libraries/SrcWrapper/src/LL/stm32yyxx_ll_fmc.c similarity index 100% rename from cores/arduino/stm32/LL/stm32yyxx_ll_fmc.c rename to libraries/SrcWrapper/src/LL/stm32yyxx_ll_fmc.c diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_fsmc.c b/libraries/SrcWrapper/src/LL/stm32yyxx_ll_fsmc.c similarity index 100% rename from cores/arduino/stm32/LL/stm32yyxx_ll_fsmc.c rename to libraries/SrcWrapper/src/LL/stm32yyxx_ll_fsmc.c diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_gpio.c b/libraries/SrcWrapper/src/LL/stm32yyxx_ll_gpio.c similarity index 100% rename from cores/arduino/stm32/LL/stm32yyxx_ll_gpio.c rename to libraries/SrcWrapper/src/LL/stm32yyxx_ll_gpio.c diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_hrtim.c b/libraries/SrcWrapper/src/LL/stm32yyxx_ll_hrtim.c similarity index 100% rename from cores/arduino/stm32/LL/stm32yyxx_ll_hrtim.c rename to libraries/SrcWrapper/src/LL/stm32yyxx_ll_hrtim.c diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_i2c.c b/libraries/SrcWrapper/src/LL/stm32yyxx_ll_i2c.c similarity index 100% rename from cores/arduino/stm32/LL/stm32yyxx_ll_i2c.c rename to libraries/SrcWrapper/src/LL/stm32yyxx_ll_i2c.c diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_lptim.c b/libraries/SrcWrapper/src/LL/stm32yyxx_ll_lptim.c similarity index 100% rename from cores/arduino/stm32/LL/stm32yyxx_ll_lptim.c rename to libraries/SrcWrapper/src/LL/stm32yyxx_ll_lptim.c diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_lpuart.c b/libraries/SrcWrapper/src/LL/stm32yyxx_ll_lpuart.c similarity index 100% rename from cores/arduino/stm32/LL/stm32yyxx_ll_lpuart.c rename to libraries/SrcWrapper/src/LL/stm32yyxx_ll_lpuart.c diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_mdma.c b/libraries/SrcWrapper/src/LL/stm32yyxx_ll_mdma.c similarity index 100% rename from cores/arduino/stm32/LL/stm32yyxx_ll_mdma.c rename to libraries/SrcWrapper/src/LL/stm32yyxx_ll_mdma.c diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_opamp.c b/libraries/SrcWrapper/src/LL/stm32yyxx_ll_opamp.c similarity index 100% rename from cores/arduino/stm32/LL/stm32yyxx_ll_opamp.c rename to libraries/SrcWrapper/src/LL/stm32yyxx_ll_opamp.c diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_pka.c b/libraries/SrcWrapper/src/LL/stm32yyxx_ll_pka.c similarity index 100% rename from cores/arduino/stm32/LL/stm32yyxx_ll_pka.c rename to libraries/SrcWrapper/src/LL/stm32yyxx_ll_pka.c diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_pwr.c b/libraries/SrcWrapper/src/LL/stm32yyxx_ll_pwr.c similarity index 100% rename from cores/arduino/stm32/LL/stm32yyxx_ll_pwr.c rename to libraries/SrcWrapper/src/LL/stm32yyxx_ll_pwr.c diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_rcc.c b/libraries/SrcWrapper/src/LL/stm32yyxx_ll_rcc.c similarity index 100% rename from cores/arduino/stm32/LL/stm32yyxx_ll_rcc.c rename to libraries/SrcWrapper/src/LL/stm32yyxx_ll_rcc.c diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_rng.c b/libraries/SrcWrapper/src/LL/stm32yyxx_ll_rng.c similarity index 100% rename from cores/arduino/stm32/LL/stm32yyxx_ll_rng.c rename to libraries/SrcWrapper/src/LL/stm32yyxx_ll_rng.c diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_rtc.c b/libraries/SrcWrapper/src/LL/stm32yyxx_ll_rtc.c similarity index 100% rename from cores/arduino/stm32/LL/stm32yyxx_ll_rtc.c rename to libraries/SrcWrapper/src/LL/stm32yyxx_ll_rtc.c diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_sdmmc.c b/libraries/SrcWrapper/src/LL/stm32yyxx_ll_sdmmc.c similarity index 100% rename from cores/arduino/stm32/LL/stm32yyxx_ll_sdmmc.c rename to libraries/SrcWrapper/src/LL/stm32yyxx_ll_sdmmc.c diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_spi.c b/libraries/SrcWrapper/src/LL/stm32yyxx_ll_spi.c similarity index 100% rename from cores/arduino/stm32/LL/stm32yyxx_ll_spi.c rename to libraries/SrcWrapper/src/LL/stm32yyxx_ll_spi.c diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_swpmi.c b/libraries/SrcWrapper/src/LL/stm32yyxx_ll_swpmi.c similarity index 100% rename from cores/arduino/stm32/LL/stm32yyxx_ll_swpmi.c rename to libraries/SrcWrapper/src/LL/stm32yyxx_ll_swpmi.c diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_tim.c b/libraries/SrcWrapper/src/LL/stm32yyxx_ll_tim.c similarity index 100% rename from cores/arduino/stm32/LL/stm32yyxx_ll_tim.c rename to libraries/SrcWrapper/src/LL/stm32yyxx_ll_tim.c diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_ucpd.c b/libraries/SrcWrapper/src/LL/stm32yyxx_ll_ucpd.c similarity index 100% rename from cores/arduino/stm32/LL/stm32yyxx_ll_ucpd.c rename to libraries/SrcWrapper/src/LL/stm32yyxx_ll_ucpd.c diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_usart.c b/libraries/SrcWrapper/src/LL/stm32yyxx_ll_usart.c similarity index 100% rename from cores/arduino/stm32/LL/stm32yyxx_ll_usart.c rename to libraries/SrcWrapper/src/LL/stm32yyxx_ll_usart.c diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_usb.c b/libraries/SrcWrapper/src/LL/stm32yyxx_ll_usb.c similarity index 100% rename from cores/arduino/stm32/LL/stm32yyxx_ll_usb.c rename to libraries/SrcWrapper/src/LL/stm32yyxx_ll_usb.c diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_utils.c b/libraries/SrcWrapper/src/LL/stm32yyxx_ll_utils.c similarity index 100% rename from cores/arduino/stm32/LL/stm32yyxx_ll_utils.c rename to libraries/SrcWrapper/src/LL/stm32yyxx_ll_utils.c diff --git a/libraries/SrcWrapper/src/SrcWrapper.h b/libraries/SrcWrapper/src/SrcWrapper.h new file mode 100644 index 0000000000..e49d68a6d7 --- /dev/null +++ b/libraries/SrcWrapper/src/SrcWrapper.h @@ -0,0 +1,4 @@ +#ifndef __SRCWRAPPER_H__ +#define __SRCWRAPPER_H__ + +#endif /* __SRCWRAPPER_H__ */ diff --git a/platform.txt b/platform.txt index a6e8ed9640..2b2dc8ef97 100644 --- a/platform.txt +++ b/platform.txt @@ -9,7 +9,7 @@ version=1.0.0 # STM compile variables # ---------------------- -compiler.stm.extra_include="-I{build.source.path}" "-I{build.core.path}/avr" "-I{build.core.path}/stm32" "-I{build.core.path}/stm32/LL" "-I{build.core.path}/stm32/usb" "-I{build.core.path}/stm32/usb/hid" "-I{build.core.path}/stm32/usb/cdc" "-I{build.system.path}/Drivers/{build.series}_HAL_Driver/Inc/" "-I{build.system.path}/Drivers/{build.series}_HAL_Driver/Src/" "-I{build.system.path}/{build.series}/" "-I{build.system.path}/Middlewares/ST/STM32_USB_Device_Library/Core/Inc" "-I{build.system.path}/Middlewares/ST/STM32_USB_Device_Library/Core/Src" +compiler.stm.extra_include="-I{build.source.path}" "-I{build.core.path}/avr" "-I{build.core.path}/stm32" "-I{build.core.path}/stm32/LL" "-I{build.core.path}/stm32/usb" "-I{build.core.path}/stm32/usb/hid" "-I{build.core.path}/stm32/usb/cdc" "-I{build.system.path}/Drivers/{build.series}_HAL_Driver/Inc" "-I{build.system.path}/Drivers/{build.series}_HAL_Driver/Src" "-I{build.system.path}/{build.series}" "-I{build.system.path}/Middlewares/ST/STM32_USB_Device_Library/Core/Inc" "-I{build.system.path}/Middlewares/ST/STM32_USB_Device_Library/Core/Src" compiler.warning_flags=-w compiler.warning_flags.none=-w @@ -92,10 +92,22 @@ build.opt.name=build_opt.h build.opt.sourcepath={build.source.path}/{build.opt.name} build.opt.path={build.path}/sketch/{build.opt.name} +build.src_wrapper.path={build.path}/sketch/SrcWrapper.cpp + +# Create sketch dir if not exists +recipe.hooks.prebuild.1.pattern.windows=cmd /c if not exist "{build.path}\sketch" mkdir "{build.path}\sketch" +recipe.hooks.prebuild.1.pattern.linux=bash -c "[ -f {build.path}/sketch ] || mkdir -p {build.path}/sketch" +recipe.hooks.prebuild.1.pattern.macosx=bash -c "[ -f {build.path}/sketch ] || mkdir -p {build.path}/sketch" + # Create empty {build.opt} if not exists in the sketch dir -recipe.hooks.prebuild.1.pattern.windows=cmd /c if not exist "{build.opt.sourcepath}" mkdir "{build.path}\sketch" & type NUL > "{build.opt.path}" -recipe.hooks.prebuild.1.pattern.linux=bash -c "[ -f {build.opt.sourcepath} ] || (mkdir -p {build.path}/sketch && touch {build.opt.path})" -recipe.hooks.prebuild.1.pattern.macosx=bash -c "[ -f {build.opt.sourcepath} ] || (mkdir -p {build.path}/sketch && touch {build.opt.path})" +recipe.hooks.prebuild.2.pattern.windows=cmd /c if not exist "{build.opt.sourcepath}" type NUL > "{build.opt.path}" +recipe.hooks.prebuild.2.pattern.linux=bash -c "[ -f {build.opt.sourcepath} ] || touch {build.opt.path}" +recipe.hooks.prebuild.2.pattern.macosx=bash -c "[ -f {build.opt.sourcepath} ] || touch {build.opt.path}" + +# Force include of SrcWrapper library +recipe.hooks.prebuild.3.pattern.windows=cmd /c echo #include ^ > "{build.src_wrapper.path}" +recipe.hooks.prebuild.3.pattern.linux=bash -c "echo $0 > {build.src_wrapper.path}" "#include " +recipe.hooks.prebuild.3.pattern.macosx=bash -c "echo $0 > {build.src_wrapper.path}" "#include " # compile patterns # --------------------- From 7d1a46661f9e38f1f37e2ba9860bb8cceccfd6a2 Mon Sep 17 00:00:00 2001 From: Frederic Pillon Date: Sun, 29 Sep 2019 16:11:48 +0200 Subject: [PATCH 2/3] Remove use of whole-archive Signed-off-by: Frederic Pillon --- platform.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform.txt b/platform.txt index 2b2dc8ef97..bb15f181a9 100644 --- a/platform.txt +++ b/platform.txt @@ -125,7 +125,7 @@ recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} {build.i recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" ## Combine gc-sections, archives, and objects -recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.c.elf.extra_flags} {compiler.ldflags} {compiler.arm.cmsis.ldflags} -o "{build.path}/{build.project_name}.elf" "-L{build.path}" -Wl,--start-group {object_files} -Wl,--whole-archive "{archive_file_path}" -Wl,--no-whole-archive -lc -Wl,--end-group -lm -lgcc -lstdc++ +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.c.elf.extra_flags} {compiler.ldflags} {compiler.arm.cmsis.ldflags} -o "{build.path}/{build.project_name}.elf" "-L{build.path}" -Wl,--start-group {object_files} "{archive_file_path}" -lc -Wl,--end-group -lm -lgcc -lstdc++ ## Create output (.bin file) recipe.objcopy.bin.pattern="{compiler.path}{compiler.objcopy.cmd}" {compiler.elf2bin.flags} {compiler.elf2bin.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" From 53508b1d295b414137cdc2261f77138915503a38 Mon Sep 17 00:00:00 2001 From: Frederic Pillon Date: Thu, 3 Oct 2019 17:19:36 +0200 Subject: [PATCH 3/3] Move newlib syscall implementation outside core archive Due to a bug in the arm none eabi gcc with lto which raise an unresolved reference if syscall is in the archive (_sbrk,...) See: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka15833.html Signed-off-by: Frederic Pillon --- libraries/SrcWrapper/src/syscalls.c | 112 ++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 libraries/SrcWrapper/src/syscalls.c diff --git a/libraries/SrcWrapper/src/syscalls.c b/libraries/SrcWrapper/src/syscalls.c new file mode 100644 index 0000000000..a477795d6b --- /dev/null +++ b/libraries/SrcWrapper/src/syscalls.c @@ -0,0 +1,112 @@ +/** + * \file syscalls_stm32.c + * + * Implementation of newlib syscall. + * + */ + +#include "stm32_def.h" +#if defined ( __GNUC__ ) /* GCC CS3 */ +#include +#endif +#include +#undef errno +extern int errno; + +extern size_t uart_debug_write(uint8_t *data, uint32_t size); + +// Helper macro to mark unused parameters and prevent compiler warnings. +// Appends _UNUSED to the variable name to prevent accidentally using them. +#ifdef UNUSED +#undef UNUSED +#endif +#ifdef __GNUC__ +#define UNUSED(x) x ## _UNUSED __attribute__((__unused__)) +#else +#define UNUSED(x) x ## _UNUSED +#endif + +__attribute__((weak)) +caddr_t _sbrk(int incr) +{ + extern char _estack; /* Defined in the linker script */ + extern char _Min_Stack_Size; /* Defined in the linker script */ + extern char _end; /* Defined by the linker */ + static char *heap_end = &_end ; + char *prev_heap_end = heap_end; + + if (heap_end + incr > (char *)__get_MSP()) { + /* Heap and stack collision */ + errno = ENOMEM; + return (caddr_t) -1; + } + /* Ensure to keep minimun stack size defined in the linker script */ + if (heap_end + incr >= (char *)(&_estack - &_Min_Stack_Size)) { + errno = ENOMEM; + return (caddr_t) -1; + } + + heap_end += incr ; + return (caddr_t) prev_heap_end ; +} + +__attribute__((weak)) +int _close(UNUSED(int file)) +{ + return -1; +} + +__attribute__((weak)) +int _fstat(UNUSED(int file), struct stat *st) +{ + st->st_mode = S_IFCHR ; + return 0; +} + +__attribute__((weak)) +int _isatty(UNUSED(int file)) +{ + return 1; +} + +__attribute__((weak)) +int _lseek(UNUSED(int file), UNUSED(int ptr), UNUSED(int dir)) +{ + return 0; +} + +__attribute__((weak)) +int _read(UNUSED(int file), UNUSED(char *ptr), UNUSED(int len)) +{ + return 0; +} + +__attribute__((weak)) +int _write(UNUSED(int file), char *ptr, int len) +{ +#ifdef HAL_UART_MODULE_ENABLED + return uart_debug_write((uint8_t *)ptr, (uint32_t)len); +#else + (void)ptr; + return len; +#endif +} + +__attribute__((weak)) +void _exit(UNUSED(int status)) +{ + for (; ;) ; +} + +__attribute__((weak)) +int _kill(UNUSED(int pid), UNUSED(int sig)) +{ + errno = EINVAL; + return -1; +} + +__attribute__((weak)) +int _getpid(void) +{ + return 1; +}