Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
7 years, 5 months ago.
STM32L452RE compatibility
Hi,
the NUCLEO-L452RE is presented as mbed-enabled (http://www.st.com/content/st_com/en/products/evaluation-tools/product-evaluation-tools/mcu-eval-tools/stm32-mcu-eval-tools/stm32-mcu-nucleo/nucleo-l452re.html) but still unavailable on mbed board list. When it will be added?
Thanks in advance!
Stefano
2 Answers
7 years, 2 months ago.
Hi,
This board is not planned to be added on mbed for the moment by the ST team.
Here some instructions to add it:
https://os.mbed.com/teams/ST/wiki/steps-to-create-a-new-STM32-platform
We'll review the pull-request.
Thanks.
6 years, 11 months ago.
Dear Support Team,
I've just bought STM32L452RE-P Nucleo Board, and I'm having the same problem.
Do you found the right solution to use mbed with this board ?
I already tried to create the target on my own, and I'm having a lot of trouble (Errors).
Is it possible that you include this board on mbed ??
Errors Encountered: mbed compile -m NUCLEO_L452RE_P Building project mbed-os-example-blinky (NUCLEO_L452RE_P, GCC_ARM) Scan: . Scan: mbed Scan: env Compile [ 0.3%]: AnalogIn.cpp [Error] mbed_rtx.h@105,2: #error "INITIAL_SP is not defined for this target in the mbed_rtx.h file" [Error] stm32l4xx_hal_dfsdm.h@144,3: 'DFSDM_Channel_TypeDef' does not name a type [Error] stm32l4xx_hal_dfsdm.h@216,3: 'DFSDM_Filter_TypeDef' does not name a type [ERROR] In file included from ./mbed-os/rtos/TARGET_CORTEX/mbed_rtx_conf.h:25:0, from ./mbed-os/rtos/TARGET_CORTEX/rtx5/RTX/Config/RTX_Config.h:31, from ./mbed-os/rtos/TARGET_CORTEX/rtx5/RTX/Include/rtx_evr.h:31, from ./mbed-os/rtos/TARGET_CORTEX/rtx5/RTX/Source/rtx_lib.h:38, from ./mbed-os/rtos/TARGET_CORTEX/mbed_rtos_storage.h:43, from ./mbed-os/rtos/Mutex.h:28, from ./mbed-os/platform/PlatformMutex.h:29, from ./mbed-os/drivers/AnalogIn.h:25, from ./mbed-os/drivers/AnalogIn.cpp:17: ./mbed-os/targets/TARGET_STM/mbed_rtx.h:105:2: error: #error "INITIAL_SP is not defined for this target in the mbed_rtx.h file"
- error "INITIAL_SP is not defined for this target in the mbed_rtx.h file" ^~~~ In file included from ./mbed-os/targets/TARGET_STM/TARGET_STM32L4/device/stm32l4xx_hal_conf.h:227:0, from ./mbed-os/targets/TARGET_STM/TARGET_STM32L4/device/stm32l4xx_hal.h:48, from ./mbed-os/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L452xE/device/stm32l4xx.h:221, from ./mbed-os/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L452xE/device/cmsis.h:35, from ./mbed-os/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L452xE/objects.h:33, from ./mbed-os/targets/TARGET_STM/TARGET_STM32L4/device.h:38, from ./mbed-os/platform/platform.h:29, from ./mbed-os/drivers/AnalogIn.h:19, from ./mbed-os/drivers/AnalogIn.cpp:17: ./mbed-os/targets/TARGET_STM/TARGET_STM32L4/device/stm32l4xx_hal_dfsdm.h:144:3: error: 'DFSDM_Channel_TypeDef' does not name a type DFSDM_Channel_TypeDef *Instance; /*!< DFSDM channel instance */ ^~~~~~~~~~~~~~~~~~~~ ./mbed-os/targets/TARGET_STM/TARGET_STM32L4/device/stm32l4xx_hal_dfsdm.h:216:3: error: 'DFSDM_Filter_TypeDef' does not name a type DFSDM_Filter_TypeDef *Instance; /*!< DFSDM filter instance */ ^~~~~~~~~~~~~~~~~~~
[mbed] ERROR: "/usr/bin/python" returned error code 1.
Thank you in advance.
Best regards, Rodrigo Iga.
Instruction: In mbed-os\targets\TARGET_STM folder Add the new device (if not already present) in the mbed_rtx.h file in the correct memory area.
Which of the following is the correct memory area for STM32L452RE-P board (and then for INITIAL_SP variable) ?
0x20002000UL 0x20003000UL 0x20004000UL 0x20005000UL 0x20008000UL 0x2000A000UL 0x20010000UL 0x20014000UL 0x20018000UL 0x20020000UL 0x20030000UL 0x20040000UL 0x20050000UL 0x20080000UL
??
Thank you in advance.
posted by 18 Jan 2018These values correspond to the RAM top address.
The STM32L152RE has 80KB of RAM which is equal to 0x14000 in hexadecimal. The top address is then equal to 0x20014000.
The STM32L152RE_P device is identical to the STM32L152RE in term of FLASH/RAM.
You should declare the STM32L152RE MCU in the targets.json file (in extra_labels_add and device_name fields). This way you will have nothing to change in the mbed_rtx.h file.
posted by 19 Jan 2018Hi,
Thank you for your answer.
I have solved this problem, but now I'm having others (log below). By the way, STM32L452RE-P has 160Kbytes of SRAM and 512 Kbytes of Flash Memory, so it's different to the STM32L152RE one, but I got the idea, thank you again. This kind of platform should be plug & play, as Arduino, I'm really disappointed that some models are supported and some others not, it's really a shame.
If I continue doing this on my own, I will never stop having errors. I only wanted to program something simple on this board, and not having to read all the datasheet to became a ARM processor expert :( It's really a shame.
New error log:
Building project mbed-os-example-blinky (NUCLEO_L452RE_P, GCC_ARM) Scan: . Scan: mbed Scan: env Compile [ 0.3%]: AnalogIn.cpp [Error] stm32l4xx_hal_dfsdm.h@144,3: 'DFSDM_Channel_TypeDef' does not name a type [Error] stm32l4xx_hal_dfsdm.h@216,3: 'DFSDM_Filter_TypeDef' does not name a type
[ERROR] In file included from ./mbed-os/targets/TARGET_STM/TARGET_STM32L4/device/stm32l4xx_hal_conf.h:227:0, from ./mbed-os/targets/TARGET_STM/TARGET_STM32L4/device/stm32l4xx_hal.h:48, from ./mbed-os/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L452xE/device/stm32l4xx.h:221, from ./mbed-os/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L452xE/device/cmsis.h:35, from ./mbed-os/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L452xE/objects.h:33, from ./mbed-os/targets/TARGET_STM/TARGET_STM32L4/device.h:38, from ./mbed-os/platform/platform.h:29, from ./mbed-os/drivers/AnalogIn.h:19, from ./mbed-os/drivers/AnalogIn.cpp:17: ./mbed-os/targets/TARGET_STM/TARGET_STM32L4/device/stm32l4xx_hal_dfsdm.h:144:3: error: 'DFSDM_Channel_TypeDef' does not name a type DFSDM_Channel_TypeDef *Instance; /*!< DFSDM channel instance */ ^~~~~~~~~~~~~~~~~~~~ ./mbed-os/targets/TARGET_STM/TARGET_STM32L4/device/stm32l4xx_hal_dfsdm.h:216:3: error: 'DFSDM_Filter_TypeDef' does not name a type DFSDM_Filter_TypeDef *Instance; /*!< DFSDM filter instance */ ^~~~~~~~~~~~~~~~~~~
[mbed] ERROR: "/usr/bin/python" returned error code 1.
[mbed] ERROR: Command "/usr/bin/python -u /Volumes/Users/igarodri/NUCLEO/mbed-os-example-blinky/mbed-os/tools/make.py -t GCC_ARM -m NUCLEO_L452RE_P source . build ./BUILD/NUCLEO_L452RE_P/GCC_ARM" in "/Volumes/Users/igarodri/NUCLEO/mbed-os-example-blinky"
Thank you again. RIga.
posted by 19 Jan 2018Hello everyone,
I have continue trying to reconstruct the target NUCLEO_L452RE_P (STM32L452RE-P) for the mbed environment, and I get the following.
After installing 6 GB when trying with different environments, compilers, etc, I have reconstructed the correct files for this microprocessor version, taking it from STMCubeMX. Only after that I can compile almost all my bllink project using mbed environment, but the only file I continue having problems is "PeripheralPins.c" file provided by ARM Mbed compiler.
I'm having the following Errors (If someone could help, I can finish it and publish it on mbed site, for everyone having access to it like with the rest of the models) :
Compile [ 65.9%]: PeripheralPins.c [Error] PeripheralPins.c@94,18: 'I2C_4' undeclared here (not in a function) [Error] PeripheralPins.c@108,18: initializer element is not constant [Error] PeripheralPins.c@111,18: initializer element is not constant [Error] PeripheralPins.c@114,18: initializer element is not constant [Error] PeripheralPins.c@130,18: 'PWM_3' undeclared here (not in a function) [Error] PeripheralPins.c@130,0: initializer element is not constant [Error] PeripheralPins.c@132,18: initializer element is not constant [Error] PeripheralPins.c@139,18: initializer element is not constant [Error] PeripheralPins.c@141,18: initializer element is not constant [Error] PeripheralPins.c@143,18: initializer element is not constant [Error] PeripheralPins.c@144,18: initializer element is not constant [Error] PeripheralPins.c@155,18: initializer element is not constant [Error] PeripheralPins.c@156,18: initializer element is not constant [Error] PeripheralPins.c@157,18: initializer element is not constant [Error] PeripheralPins.c@158,18: initializer element is not constant [Error] PeripheralPins.c@165,18: 'UART_4' undeclared here (not in a function) [Error] PeripheralPins.c@165,0: initializer element is not constant [Error] PeripheralPins.c@174,18: initializer element is not constant [Error] PeripheralPins.c@180,18: initializer element is not constant
[ERROR] .\mbed-os\targets\TARGET_STM\TARGET_STM32L4\TARGET_STM32L452xE\TARGET_NUCLEO_L452RE_P\PeripheralPins.c:94:18: error: 'I2C_4' undeclared here (not in a function) {PB_7, I2C_4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF5_I2C4)}, ^~~~ .\mbed-os\targets\TARGET_STM\TARGET_STM32L4\TARGET_STM32L452xE\TARGET_NUCLEO_L452RE_P\PeripheralPins.c:108:18: error: initializer element is not constant {PB_6, I2C_4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF5_I2C4)}, ...... (I have cut the errors here)
For the moment I decide to use the combination of "Atollic TrueSTUDIO for STM32" + "STMCubreMX" who is working very well, even using debug.
Thank you in advance.
Regards, Rodrigo Iga.
posted by 25 Jan 2018
nobody can answer to this question ? thanks!
posted by Stefano Mammolito 19 Jul 2017