-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add 96Boards WisTrio board support #12354
Add 96Boards WisTrio board support #12354
Conversation
Found the following issues, please fix and resubmit: License issuesIn most cases you do not need to do anything here, especially if the files
|
Codecov Report
@@ Coverage Diff @@
## master #12354 +/- ##
==========================================
+ Coverage 52.5% 52.5% +<.01%
==========================================
Files 318 318
Lines 46526 46526
Branches 10754 10754
==========================================
+ Hits 24428 24429 +1
Misses 17198 17198
+ Partials 4900 4899 -1
Continue to review full report at Codecov.
|
@nashif, I'm surprised with the warning on Cube files license. It's usual BSD-3 clause as used in already in tree versions. Is there anything new on that front? |
@erwango Do you have any idea about the Sanity check failure? |
@Mani-Sadhasivam, please fix Licence issues for files that are not under ext/. For files under ext/, warning will be discarded. |
9606a4f
to
bf85be4
Compare
@erwango Fixed the license for non ext/ files. But I'm not sure about the shippable failure for the testcase. |
|
||
config NUM_IRQS | ||
int | ||
default 32 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you double check this value?
You're using IRQ num > 32 in dts, this should be causing the issue detected by shippable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah. It is 45. Updated in next revision!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doc additions LGTM, thanks!
@Mani-Sadhasivam , can you rebase on top of #12024, this is GPIO driver refactoring, will spare you some code (bit late though ;-)) |
bf85be4
to
c38df42
Compare
@erwango I'd like to rebase once that PR gets merged. Or we can do the conversion as an incremental PR after merging this! |
@Mani-Sadhasivam, this is now merged. Please take it into account as of now, I prefer not merging code I know it is already obsolete. Besides, due to factorization, this will be less code to review :-) |
@Mani-Sadhasivam, btw, and so you're not disappointed, there are significant changes on going (particularly on dt front), which might have impact on SoC porting and general and hence on this PR. These changes are meant to be integrated in 1.14 LTS. |
config SOC_SERIES_STM32L1X | ||
bool "STM32L1x Series MCU" | ||
select CPU_CORTEX_M3 | ||
select CPU_CORTEX_M_HAS_VTOR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to select CPU_CORTEX_M_HAS_VTOR here because it's already selected by CPU_CORTEX_M3.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack
@@ -43,6 +43,8 @@ | |||
#define EXTI_LINES 24 | |||
#elif defined(CONFIG_SOC_SERIES_STM32L0X) | |||
#define EXTI_LINES 30 | |||
#elif defined(CONFIG_SOC_SERIES_STM32L1X) | |||
#define EXTI_LINES 40 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where does this number come from? I'd say it should be more like 24 for L1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah... It is 24. Will change it!
drivers/i2c/Kconfig.stm32
Outdated
@@ -14,7 +14,7 @@ if I2C_STM32 | |||
|
|||
config I2C_STM32_V1 | |||
bool "STM32 V1 Driver (F1/F4X)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
L1 here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack
bsd-new is bsd-3 clause |
c38df42
to
c521f96
Compare
dts/arm/st/l1/stm32l15XXB.dtsi
Outdated
*/ | ||
|
||
#include <mem.h> | ||
#include <st/l1/stm32l1.dtsi> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a package .dtsi file. It can't include directly the series common common l1.dtsi.
Please add intermediate stm32l151.dtsi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't find any specific difference to add stm32l151.dtsi
file, that's why I added stm32l15XXB.dtsi
with common stm32l1.dtsi
. Can you please help?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem, stm32l151.dtsi could be empty.
Aim is to have same hierarchy as on other series, which proved to scale easily when new SoCs have to be ported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, cool. Added!
soc/arm/st_stm32/stm32l1/soc.h
Outdated
#ifndef _STM32L1_SOC_H_ | ||
#define _STM32L1_SOC_H_ | ||
|
||
#define GPIO_REG_SIZE 0x400 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a leftover from gpio factorization. Please rebase on #12459 (or wait it is merged)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay
*/ | ||
|
||
/* Port A */ | ||
#define STM32L1X_PINMUX_FUNC_PA0_PWM2_CH1 \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you check all these?
Or is that a copy/paste from other series?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of them are copied from L4X. Will cross check this in next iteration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, txs
soc/arm/st_stm32/stm32l1/soc.h
Outdated
#include <stm32l1xx_ll_i2c.h> | ||
#endif | ||
|
||
#ifdef CONFIG_SPI_STM32 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any SPI related work in this PR, please remove.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay
@@ -711,6 +730,35 @@ static void __stm32_exti_connect_irqs(struct device *dev) | |||
CONFIG_EXTI_STM32_EXTI15_4_IRQ_PRI, | |||
__stm32_exti_isr_4_15, DEVICE_GET(exti_stm32), | |||
0); | |||
#elif defined(CONFIG_SOC_SERIES_STM32L1X) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rebase on top of #12463 for factorization
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll wait for it to get merged.
4490fde
to
ff705cd
Compare
055612f
to
82b9c19
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last update otherwise it should be fine
bool "STM32L1x Series MCU" | ||
select CPU_CORTEX_M3 | ||
select SOC_FAMILY_STM32 | ||
select SYS_POWER_LOW_POWER_STATE_SUPPORTED |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Has been renamed into SYS_POWER_LOW_POWER_STATES_SUPPORTED
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
82b9c19
to
1294fb6
Compare
@erwango I think this PR won't make it for v1.14 LTS? |
Indeed, it won't. But it will be soon merged once 1.15 window is open. |
Some minor things that need fixing up. |
Something is wrong with $ sudo apt-get install -y wget python3 python3-yaml python3-pyelftools make cmake gperf git
$ cd ~
$ wget https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.10.0/zephyr-sdk-0.10.0-setup.run
$ mkdir zephyr-sdk
$ cd zephyr-sdk/
$ export TMPDIR=/tmp
$ sh ../zephyr-sdk-0.10.0-setup.run -- -d $(pwd)
$ cd ~
$ git clone https://github.com/Mani-Sadhasivam/zephyr
$ cd zephyr
$ git checkout 96b_wistrio
$ git describe
v1.8.99-15325-ga3d76ee3ef
$ export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
$ export ZEPHYR_SDK_INSTALL_DIR=~/zephyr-sdk
$ source zephyr-env.sh
$ cd samples/hello_world
$ rm -rf build && mkdir build && cd build
$ cmake -DBOARD=96b_wistrio ..
$ make
...
[ 94%] Building C object zephyr/CMakeFiles/zephyr_prebuilt.dir/misc/empty_file.c.obj
[ 95%] Linking C executable zephyr_prebuilt.elf
Memory region Used Size Region Size %age Used
FLASH: 11212 B 128 KB 8.55%
SRAM: 4116 B 16 KB 25.12%
IDT_LIST: 120 B 2 KB 5.86%
/home/antony/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/8.3.0/../../../../arm-zephyr-eabi/bin/ld: libzephyr.a(soc.c.obj): in function `stm32l1_init':
/home/antony/zephyr/soc/arm/st_stm32/stm32l1/soc.c:35: undefined reference to `_ClearFaults'
collect2: error: ld returned 1 exit status
make[2]: *** [zephyr/CMakeFiles/zephyr_prebuilt.dir/build.make:96: zephyr/zephyr_prebuilt.elf] Error 1
make[1]: *** [CMakeFiles/Makefile2:455: zephyr/CMakeFiles/zephyr_prebuilt.dir/all] Error 2
make: *** [Makefile:84: all] Error 2 |
it got renamed to |
This commit adds the STM32CUBE HAL for STM32L1x series MCUs. Origin: ST Microelectronics License: BSD-3-Clause URL: http://www.st.com/en/embedded-software/stm32cubel1.html Commit: 1.8.0 Purpose: HAL layer for STM32L1 Maintained-by: External Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Add STM32L1 SoC series support with STM32L15XXB as the target SoC. Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Add clock support for STM32L1X SoC series. Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
a3d76ee
to
18636f4
Compare
Add UART support for STM32L1 series SoCs. Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Add pinmux support for STM32L1X SoC series. Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Add GPIO driver support for STM32L1X SoC series. Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Add EXTI support for STM32L1X SoC series. Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Add I2C support for STM32L1X SoC series based on I2C_STM32_V1 driver. Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Add board support for 96Boards WisTrio LoRa Tracker board from RAK Wireless. This board is one of the 96Boards IoT Edition platform. Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
18636f4
to
55d9744
Compare
@galak Fixed the issues! |
Add myself as the codeowner for 96Boards Wistrio. Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
This PR adds 96Boards WisTrio board support with STM32L1 SoC series and HAL.
Fixes #9333
Signed-off-by: Manivannan Sadhasivam manivannan.sadhasivam@linaro.org