Imported STM32CubeIDE project missing some things

Sysprogs forums Forums VisualGDB Imported STM32CubeIDE project missing some things

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #30786
    GeneM
    Participant

    I created a project using STM32CubeIDE to get a start on setting the pin mappings and clock setup and other infrastructure correctly. When I import the project into VisualGDB using the Embedded Project Wizard > Automatically import a project in a different format > Import an existing STM32CubeIDe/SW4STM32 Project, some of the subroutines in the original STM32CubeIDE project don’t get imported into the new VisualGDB project and I don’t seem to be able to find them anywhere in the new project.  For example.  The STM32CubeIDE project starts with this.

    int main(void)
    {
    /* USER CODE BEGIN 1 */

    /* USER CODE END 1 */

    /* MCU Configuration--------------------------------------------------------*/

    /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
    HAL_Init();

    /* USER CODE BEGIN Init */

    /* USER CODE END Init */

    /* Configure the system clock */
    SystemClock_Config();

    /* USER CODE BEGIN SysInit */

    /* USER CODE END SysInit */

    /* Initialize all configured peripherals */
    MX_GPIO_Init();
    MX_DMA_Init();
    MX_USART1_UART_Init();
    MX_USART2_UART_Init();
    MX_I2C2_Init();
    MX_I2C3_Init();
    MX_I2C4_Init();
    MX_IWDG1_Init();
    MX_LPTIM1_Init();
    MX_LPTIM3_Init();
    MX_LPUART1_UART_Init();
    MX_UART4_Init();
    MX_UART7_Init();
    MX_UART8_Init();
    MX_UART9_Init();
    MX_USART3_UART_Init();
    MX_USART6_UART_Init();
    MX_USART10_UART_Init();
    MX_OCTOSPI1_Init();
    MX_OCTOSPI2_Init();
    MX_RTC_Init();
    MX_SPI1_Init();
    MX_SPI2_Init();
    MX_USB_OTG_HS_USB_Init();
    MX_WWDG1_Init();
    MX_FATFS_Init();
    MX_SDMMC1_SD_Init();
    MX_SPI4_Init();
    /* USER CODE BEGIN 2 */

    /* USER CODE END 2 */

    /* Infinite loop */
    /* USER CODE BEGIN WHILE */
    while (1)
    {
    /* USER CODE END WHILE */

    /* USER CODE BEGIN 3 */
    }

     

    And the new VGDB project starts with this.

    int main(void)
    {
    /* USER CODE BEGIN 1 */

    /* USER CODE END 1 */

    /* MCU Configuration--------------------------------------------------------*/

    /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
    HAL_Init();

    /* USER CODE BEGIN Init */

    /* USER CODE END Init */

    /* Configure the system clock */
    SystemClock_Config();

    /* USER CODE BEGIN SysInit */

    /* USER CODE END SysInit */

    /* Initialize all configured peripherals */
    MX_GPIO_Init();
    /* USER CODE BEGIN 2 */

    /* USER CODE END 2 */

    /* Infinite loop */
    /* USER CODE BEGIN WHILE */
    while (1)
    {
    /* USER CODE END WHILE */

    /* USER CODE BEGIN 3 */
    }
    /* USER CODE END 3 */
    }

    None of the subroutines after MX_GPIO_Init();

    seem to be anywhere in the new project.  I have both projects zipped up but it’s too big to attach here.

    #30790
    support
    Keymaster

    Hi,

    Please double-triple check that you are importing the correct project. The import logic of the wizard never generates any new files, it simply references existing files linked by the project file. You can find out the full path of the file containing the main() function by right-clicking on the tab header  in Visual Studio and selecting “Copy full path”. You can then compare it with the path of the file in the original STM32CubeIDE project.

    #30843
    GeneM
    Participant

    You are correct, I created the project in a way that put the source code somewhere different than I expected.  Thanks for pointing out my dumb mistake.

    • This reply was modified 3 years, 4 months ago by GeneM.
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.