Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
..
Hello,For a project generated with STM32CubeMX I have to update the memory map in the linker file to be able to use it with a bootloader. The linker file is generated by CubeMX but I don’t see an option to define the starting address of the application in flash. The default address is 0x08000000 but I want to change it to a higher value.My question is: How can I configure a different starting address of the firmware in flash?If that option is not available in CubeMX I would like to know how I can exclude the linker file from being overwritten when the project is regenerated.The STM32CubeMX version used is 5.1.0.With kind regards
When CubeMX project is generated with FreeRTOS enabled and using CMSIS RTOS v2, function definitions for memory pool functionality are declared in 'cmsis_rtos2.h' file but their implementations are completely missing from 'cmsis_rtos2.c' or anywhere else in the project. Naturally this results in build failing with "undefined reference to 'X' " error report.I'm using CubeMX v5.2.0 and STM32F4 series package v1.24.1 in Atollic TrueStudio.
Hi,recently I installed STM32CubeMX. When I click 'Check for update' menu item 'STM32CubeF1 Firmware Package V1.7.0 / 09-October-2018' is shown. But when I press 'Install Now' the following error happens:In the log I see:2018-11-20 23:56:39,197 [ERROR] ServerAccessManage:919 - Problem, file not found on Server2018-11-20 23:56:39,197 [ERROR] ServerAccessManage:491 - Problem, file not found on Server : stm32cube_fw_f1_v170.zip.Is v1.7.0 package available to download?thanks,Dmitri
Hello,I have used CubeMx to generate a project which should do the following:configure PA8 as MCO1 and on it I want to output HSI clock which as I understand is by default 16MhzSo in CubeMx I configured PA8 as MCO1.The generated code was this:/* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.c * @brief : Main program body ****************************************************************************** * @attention * * <h2><center>&copy; Copyright (c) 2019 STMicroelectronics. * All rights reserved.</center></h2> * * This software component is licensed by ST under BSD 3-Clause license, * the "License"; You may not use this file except in compliance with the * License. You may obtain a copy of the License at: * opensource.org/licenses/BSD-3-Clause * ****************************************************************************** */ /* USER CODE END Header */ /* Inclu
Code should not end with dos line ending at Linux?
I would like to implement PPPoS on a STM32 without ethernet (STM32F401RE) and need a TCP/IP stack to complete the networking, but CubeMX does not have the option to include LWIP. How can I add LWIP to my CubeMX project?
I'm using STM32CubeMX 5.3.0 on Linux and following the commands according to "UM1718 User manual STM32CubeMX for STM32 configuration and initialization C code generation" But the commands doesn't work and cubemx just opens directly with an error mentionning that the command is not found.
I need to use Touch Sensing middleware on STM32L053R8. Firstly, I chose G4_IO1 as Sampling, and I selected G4_IO2(as TouchKey). Secondly, I configured TOUCHSENSING middleware. I set the parameter TSLPRM_TOTAL_TOUCH_B as 1. Then, I want to set IO_TOUCH_KEY_B1 as G4_IO2, but it cannot be selected. Additionaly, after I unselect G4_IO2, the IO is available in settings of TOUCHSENSING. So after I made sure that G4_IO2 is available, I set IO_TOUCH_KEY_B1 as G4_IO2, and I select G4_IO2. But IO_TOUCHKEY_B1 showed an error. Same trouble occurs on other IOs. Is this a bug of CubeMX? How can I solve this trouble?
Hello,I would like to know why if you are building a project with code-generated makefile for the MCU STM32F407IGTx (QFP176 pins) the linker file STM32F407ICTx_FLASH.ld tells the compiler the RAM origin at 0x20000000 has a length of 128K instead of 192K.And another question is: I connected two STATIC RAM CHIPS (IS61VW5128BLL 512Kx8) in the STCubeMX telling wich I am using TWO CHipSelect for this two chips. Everything in compiled correctly.Now I want to place some code in this external RAM address (total of 1024k - 512k + 512k). I would like to know how to setup the linker file for this area (without declaring two area-spaces))Thank you in advanceRegards,Gianluca
Hi, I need to develop a tracker with a STM32L072RBT6, I tried to generate code with STM32CubeMX v5.3.0 I'm going to use Atollic TrueStudio but Cube MX doesn't generate any code. I tries to generate a Cube MX IDE project but it's the same.is STM32L072RB a unsupported MCU? or something like that.Thanks a lot.
Migrating a STM32F1 project from STM32CubeMX 5.0.1 to 5.3.0 doesn't work. STM32CubeMX just hangs during migration of the project. Complete log output and *.ioc file is attached"Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: com.st.microxplorer.codegenerator.CodeGenerator.prepareFunctionList()Ljava/util/ArrayList; at com.st.microxplorer.plugins.projectmanager.ProjectManagerView.propertyChange(ProjectManagerView.java:370)"
The QubeMX 5.2.1 is showing update to to 5.3.0 but it fails .... also the www.st.com sometimes fails to load with direct 403 forbidden response .. some consistency will be nice :(
From STM32 CubeMX 5.2.1 release, the LWIP is grey'd out. What am I missing to include this?
Hello, I am struggling to understand how i would set up my uart to receive data until it sees a carriage return (\n) then to check this the rx and then to act on it. For example if i sent " on\r" it would turn an LED onI am using the STM32Cube, Nucleo-103RB and Keil IDEI have set up HAL_UART_Receive_IT so i can see the data being stored from the Tx, once 5 characters it will call HAL_UART_RxCpltCallback where this will toggle my LED and restart the interrupt reception. i did try and use strcmp() to compare strings but i couldn't get this to work.i did read about setting up a idle line interrupt but ,again, i didn't understand it.is there a simple way for receiving uart messages without knowing the length?(im looking to use the HAL Drivers)any help or guidance would be appreciated!Kind regards,Mike
I tried to implement 7 touch buttons on a STM32L476, 3 on IO2,3 of group 1, 3 on IO 2,3 and 4 on group 2 and 1 on io2 of group 3. Samping caps are always on IO1 of the respective group.As I wanted to process the buttons all at the same time, I created 1 bank. I then have the effect that all buttons on the same group seem to react on any touch of the 3. So i could only detect 3 out of 7 buttons really, 1 on each group.I then created 7 banks, each with 1 button. And then it does work well.So my first question is, as there was no example project with more than 1 button, has the software really been validated on the STM32L4? Because I think this is a bug. I could combine 6 of the buttons in a rotary or linear touch sensor, but there was no such example for the STM32L4 in the STMCube firmware. Is this still to come? Should I look at other microcontroller families and copy from there?
How can I have more info about this device? Datasheet, examples and so on..Why I can't find it on the CubeMX (neither in Keil device list) also installing the F0 v1.0.0 package?Which device I've to set in Keil?Thanks in advance,Antonio
hello,i generated the code using CubeMX and the last version of F7-Package(V1.15.0) and i noticed that the generated code used the wrong pins for RMII.the wrong generated code used:PB11 ------> ETH_TX_ENPB12 ------> ETH_TXD0the right one should be:PG11 ------> ETH_TX_ENPG13 ------> ETH_TXD0this should be modified in two functions:void HAL_ETH_MspInit(ETH_HandleTypeDef* ethHandle)void HAL_ETH_MspDeInit(ETH_HandleTypeDef* ethHandle)
CubeMX generates the main.c like this:int main(void){... MX_GPIO_Init(); MX_RTC_Init(); MX_NVIC_Init(); MX_FREERTOS_Init();...}We observe a sporadic crash during boot which we traced to an GPIO interrupt whose ISR calls into the FreeRTOS API (xQueueSendToBackFromISR) before MX_FREERTOS_Init(); has been called.Moving MX_NVIC_Init(); below MX_FREERTOS_Init(); reliably fixes the situation for us. How can we tell CubeMX to generate the init code persistently in that order. As of now, we must manually change the init order after each code regeneration.
I would like to migrate an older projekt based on stm32l151.I created a new config with STM32CubeMX5.2.1 with firmware package STM32Cube FW_L1 V1.9.0. I used USB CDC to create a virtual COM. But I don't get any device listed on my Host PC.I compared most of the code with the old projekt and everything seems similar.Are there any known bugs for the stm32l151?The compiled software runs (flashing LED via GPIO) but ony the USB stack seems not to work.
Hello,I would like to change the following settings in stm32f1xx_hal_conf.h, which is generated by STM32CubeMX :#define ETH_RXBUFNB ((uint32_t)8) /* 4 Rx buffers of size ETH_RX_BUF_SIZE */ #define ETH_TXBUFNB ((uint32_t)4) /* 4 Tx buffers of size ETH_TX_BUF_SIZE */Since there is no USER section in this file, I cant #undef and redefine these.Here are the available settings in STM32CubeMX:Nothing in Advanced Parameters as well.They are indeed very important parameters (RXBUF is set to 8 so Rx_Buff has a footprint of 12kbyte in RAM which is a lot in a 64kbyte RAM device...)I'm using a STM32F107, with STM32Cube package v1.6.1 and STM32CubeMX software v4.27.0Please provide a workaround or fix this in the next release ST! :smiling_face_with_smiling_eyes: Thanks
Hi,I would like to Re-org files and folder structure, which is generated by CubeMx.Re-org means a totally different files and folder structure.Can it be done?Can you please share a detailed example for such a template? Would be better if your example relates the below "My wish (briefly)"My wish (briefly):CubeMx (folder) [level 1] --> CubeMx.ioc (file) [level 2]EWARM (folder) [level 1] --> CubeMx.ewp (file) [level 2] --> CubeMx.eww (file) [level 2]Src (folder) [level 1] --> APP (folder) [level 2] --> Common.h (file) [level 3] --> Drivers (folder) [level 2] --> STM32F1xx_HAL_Driver (folder) [level 3] --> .. (files) [level 4] --> dma.c (file) [level 3] --> dma.h (file) [level 3] --> RTOS (folder) [level 2] --> FreeRTOS (folder) [level 3] --> ... (files) [level 4]Thanks,Aviv
void HAL_CAN_MspInit(CAN_HandleTypeDef* hcan) { GPIO_InitTypeDef GPIO_InitStruct = {0}; if(hcan->Instance==CAN1) { /* USER CODE BEGIN CAN1_MspInit 0 */ /* USER CODE END CAN1_MspInit 0 */ /* Peripheral clock enable */ __HAL_RCC_CAN1_CLK_ENABLE(); __HAL_RCC_GPIOA_CLK_ENABLE(); /**CAN1 GPIO Configuration PA11 ------> CAN1_RX PA12 ------> CAN1_TX */ GPIO_InitStruct.Pin = GPIO_PIN_11|GPIO_PIN_12; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; GPIO_InitStruct.Alternate = GPIO_AF9_CAN1; HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); /* CAN1 interrupt Init */ HAL_NVIC_SetPriority(CAN1_RX0_IRQn, 0, 0); HAL_NVIC_EnableIRQ(CAN1_RX0_IRQn); HAL_NVIC_SetPriority(CAN1_RX1_IRQn, 0, 0); HAL_NVIC_EnableIRQ(CAN1_RX1_IRQn); /* USER CODE BEGIN CAN1_MspInit 1 */ /* USER CODE END CAN1_MspInit 1 */ } } /** * @brief CAN1 Initialization Function * @param None * @retv
ST Community highlights – April to June 2026
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.