Commit Graph

24 Commits

Author SHA1 Message Date
Erwan Gouriou 12142ce39b stm32cube: update stm32f1 to version V1.8.3
Update Cube version for STM32F1xx series
on https://github.com/STMicroelectronics
from version v1.8.2
to version v1.8.3

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-03-03 12:12:58 -06:00
Alexandre Bourdiol 1e5111a2c1 stm32cube:add systematic compilation of '_hal_rcc_ex.c'
Add systematic compialtion of '..._hal_rcc_ex.c' in 'CMakeLists.txt'
generation. There is more and more dependence of HAL IP to
'..._hal_rcc_ex.c'

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2020-10-27 08:03:47 -05:00
Alexandre Bourdiol 1a68ea080a stm32cube: update stm32f1 to version V1.8.2
Update Cube version for STM32F1xx series
on https://github.com/STMicroelectronics
from version v1.8.0
to version v1.8.2

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2020-10-27 08:03:47 -05:00
Giancarlo Stasi 6e2d3f9514 stm32cube: extend public SetFlashLatency API to all families
The LL_SetFlashLatency public API is now defined for families
beyond G4, L4 and L5. In most case the private function has been
made public, in one case (H7) it's built on top of existing ones.

Signed-off-by: Giancarlo Stasi <giancarlo.stasi.co@gmail.com>
2020-06-24 21:45:39 +02:00
Erwan Gouriou fc5cb1a603 stm32cube: update stm32f1xx cube version to V1.8.0
Update Cube version for STM32F1XX series
from version: V1.7.0
to version: V1.8.0

Includes following fixes:
    *Update LSI_VALUE to 40 KHz
     Impacted files:
      drivers/include/stm32f1xx_ll_rcc.h
     ST Bug tracker ID: 37419

    *Use of (__packed uint32_t *) produces warning
      Using GNU 8.2.0, (__packed uint32_t *) generates warning.
      Replace with CMSIS macros __UNALIGNED_UINT32_READ and
      __UNALIGNED_UINT32_WRITE.
     Impacted files:
      drivers/include/stm32f1xx_ll_usb.c
     ST Bug tracker ID: 61323

    *Fix warnings for extraneous parentheses
      Using clang 7.0.1, if ((htim->State == HAL_TIM_STATE_BUSY))
      generates warnings.  Remove the extra parentheses
     Impacted files:
      drivers/src/stm32f1xx_hal_tim.c
      drivers/src/stm32f1xx_hal_tim_ex.c
     ST Bug tracker ID: 63614


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-14 15:30:36 +01:00
Marc Herbert 2077622128 make stm32cube a zephyr_library()
Stops leaking very long source paths in build directories; makes them
deterministic.

This is identical to what was already merged in
https://github.com/zephyrproject-rtos/hal_nordic/pull/6
or https://github.com/zephyrproject-rtos/zephyr/pull/19531
see previous code reviews there.

See also CMake issue https://gitlab.kitware.com/cmake/cmake/issues/19475
for more details.

This is basically a search/replace of "zephyr_sources" with
"zephyr_library_sources"

For instance, when running sanitycheck -p stm3210c_eval, this changes
the build directories from:

sample.helloworld/
└── zephyr
    ├── CMakeFiles
    │   │   ├── HOME
    │   │   │   └── JOHN
    │   │   │      └── ZEPHYRPROJECT
    │   │   │          └── modules
    │   │   │             └── hal
    │   │   │                └── stm32
    │   │   │                    └── stm32cube
    │   │   │                       └── stm32f1xx
    │   │   │                          ├── drivers
    │   │   │                          │  └── src
    │   │   │                          │     ├── stm32f1xx_hal.c.obj
    │   │   │                          │     ├── stm32f1xx_hal_rcc.c.obj
    │   │   │                          │     └── stm32f1xx_ll_utils.c.obj
    │   │   │                          └── soc
    │   │   │                              └── system_stm32f1xx.c.obj

... to:

sample.helloworld/
├── modules
│   ├── stm32
│   │   ├── CMakeFiles
│   │   └── stm32cube
│   │       ├── CMakeFiles
│   │       │   └── ..__modules__hal__stm32__stm32cube.dir
│   │       │       └── stm32f1xx
│   │       │           ├── drivers
│   │       │           │   └── src
│   │       │           │       ├── stm32f1xx_hal.c.obj
│   │       │           │       ├── stm32f1xx_hal_rcc.c.obj
│   │       │           │       └── stm32f1xx_ll_utils.c.obj
│   │       │           └── soc
│   │       │               └── system_stm32f1xx.c.obj
│   │       ├──
│   │       ├── lib..__modules__hal__stm32__stm32cube.a

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2019-10-23 06:37:43 -05:00
Erwan Gouriou 274220117b stm32cube: Disable Legacy CAN API
Remove fixes on Cube packages to use Legacy API.
Applied to STM32F0, F1, F3, F4, F7 and L4.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-07-03 06:49:59 -05:00
Erwan Gouriou a08f607680 stm32cube: Disable I2C HAL when defining I2C_SPEED_STANDARD
On some STM32 series, I2C HAL defines I2C_SPEED_STANDARD and
I2C_SPEED_FAST. These definitions conflict with Zephyr I2C API.

Since Zephyr I2C STM32 driver uses LL API, we can disable I2C HAL.
Disable I2C HAL for L1 and F2 series. Deactivation is already done
2 other impacted series F1 and F4.

Additionally, on F1 series, add the commented definition line to
make the change more visible.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-06-28 08:45:51 -05:00
Erwan Gouriou b1361d596c stm32cube: update stm32f1xx cube version
Update Cube version for STM32F1XX series
from version: V1.6.1
to version: V1.7.0

This package contains new CAN API. Since Zephyr driver still
uses the (now) Legacy CAN API, deactivate new API and enable
CAN Legacy API.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-06-21 09:32:07 -04:00
Erwan Gouriou caf862e556 stm32cube/stm32f1xx: Re-fix LSI_VALUE
Fixed LSI_VALUE had been overwritten during a previous cube
update.
Re-instantiate the fix to the valid value.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-06-21 09:32:07 -04:00
Erwan Gouriou db2a2f3d25 ext/hal/st: stm32cube: Update License Link for stm23cube packages
License link provided in stm32cube abstract packages was not
reflecting the actual license in use for these packages.
Update the link to BSD 3-Clause official.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-05-06 08:54:14 -05:00
Kumar Gala 50ab89d1fd ext/hal: stm32f1xx: Fix warnings for extraneous parentheses
Building with clang reports the following warnings:

stm32f1xx_hal_tim.c: error: equality comparison with extraneous
parentheses [-Werror,-Wparentheses-equality]
  else if((htim->State == HAL_TIM_STATE_READY))
           ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~

Removing the extra () fixes the warning

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-04-17 16:46:17 -05:00
Erwan Gouriou 656cb012c3 ext/hal: stm32f1xx: Use of (__packed uint32_t *) produces warnings
Using Zephyr SDK 0.10.0-rc2, GNUCC 8.2.0 is used and
(__packed uint32_t *) are now generating warnings..
Replace with CMSIS macros __UNALIGNED_UINT32_READ and
__UNALIGNED_UINT32_WRITE

ST internal reference: 61323

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-02-11 11:37:06 -06:00
Erwan Gouriou 223dff5f43 ext: stm32cube: update stm32f1xx cube version
Update Cube version for STM32F1XX family
from version: V1.6.0
to version: V1.6.1

Note: git shows 100% diff on all files.
You need to tick "Ignore space change" in git UI to see real
differences. I tried different things to fix this without
success (dos2unix, file encoding, files access right).

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-06-27 12:27:15 -05:00
Erwan Gouriou 6cb44379b2 ext/hal: stm32cube: Update STM32F1 README file
To comply with Zephyr Contributing guidelines regarding
ext/ components, update README for STM32F1 series

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-03-08 08:47:15 -06:00
Erwin Rol 96a0ae7a6d ext: hal: stm32cube: allow HAL/LL files to be selected via Kconfig
By providing USE_STM32_HAL_* and USE_STM32_LL_* menuconfig
options drivers and user aplications can select parts of the HAL
without needing to change the Zephyr source code.

Signed-off-by: Erwin Rol <erwin@erwinrol.com>
2018-01-23 08:46:16 -06:00
Yannis Damigos eacdca0178 ext: hal: stm32cube: Fix LSI_VALUE for F1, F3 families
This patch sets the correct LSI_VALUE, according to
STM32F3 reference manual's (RM0316) section 9.2.5 and
STM32F1 reference manual's (RM0008) section 7.2.5.

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2017-10-20 12:28:11 -05:00
Erwan Gouriou 7a1f4ef3fd stm32cube: Add impacted files in README Patch List
To further ease stm32cube packages update, add impacted lines
section in Patch List section.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-09-25 12:31:59 -05:00
Erwan Gouriou ae7f923964 ext: stm32cube: update stm32f1xx cube version
Update Cube version for STM32F1XX family
from version: V1.5.0
to version: V1.6.0

Update Patch list, since this version corrects bug 33517

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-09-25 12:31:59 -05:00
Erwan Gouriou 34f006b986 ext: hal: stm32cube: Update README with former fixups
Commit "ext: hal: stm32f1x and stm32f4x: disable i2c HAL"
and "stm32cube: Fix warning when SPI LL API is compiled"
modified stm32cube HAL but this was not documented in
series README file, which makes it hazardous to update
stm32cube packages.
This commit corrects this oversight.
Additionally STM32Cube README file to provide this information
and how to use it

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-09-25 12:31:59 -05:00
Jorge Ramirez-Ortiz bdfe774539 ext: hal: stm32f1x and stm32f4x: disable i2c HAL
Enabling the HAL and the LL flags duplicate definitions when
compiling in driver.

Since the i2c HAL is not needed, disable it.
This is a HAL issue that needs to be addressed (not zephyr)

Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
2017-07-01 08:36:51 -04:00
Erwan Gouriou 8916d3e82c ext: stm32cube: update stm32f1xx cube version
Update Cube version for STM32F1XX family
from version: V1.14.0
to version: V1.15.0

Add support for Low Level API on stm32f1 family

Change-Id: I8cb5fe2fd94be3a320e863c7b5ed59e4c2312e87
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-04-28 15:06:40 -05:00
Erwan Gouriou 214b4497aa stm32cube: Add Zephyr build system files for stm32f1 series
Following previous commits, adding build system files with
minimum files inclusion to initiate stm32cube based porting
in zephyr

Change-Id: I02be8161a8c63cf05cc6b2de2f3fb0c0a4ef490f
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2016-11-03 20:29:04 +00:00
Erwan Gouriou 39f33bc3cf ext/hal: Introduce STM32Cube SDK for STM32F1xx family
With this commit we provide header and HAL/LL files for all STM32F1
SoCs (V1.4.0).
Using STM32Cube provides generic access to all families, maximizes
code reuse across different STM32 families and helps taking benefit
of a mature SDK

Origin: STM32Cube
URL: http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32cube-embedded-software/stm32cubef1.html
Purpose: Introduction of STM32F1xx STM32Cube definitions
	 and Abstraction Layers
Maintained-by: External

Original STM32Cube tree structure has been modified to a minimum
structure for a better fit into Zephyr. hal is split into 2 parts:
-driver: initially Drivers/STM32F1xx_HAL_Driver, contains HAL and LL
-soc: initially Drivers/CMSIS/Device/ST/STM32F1xx, contains stm32f1xx
socs header files

Change-Id: Ibfe08cea5f7fee54417ec9ecb6e9b4f33c04ec95
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2016-11-03 20:29:03 +00:00