cancel
Showing results for 
Search instead for 
Did you mean: 

Porting X-CUBE-TIMCOOKER from F302R8 to F401RE

Ronny Landsverk
Associate III

I want to port the TIMCOOKER examples from STM32F302R8 to STM32F401RE. This is easily done according to the data-brief, as the examples are generated using CubeMX. However, there are no .ioc files present in the repository so I guess you need to change all files, e.g. stm32f3xx to stm32f4xx manually, both for BSP files, startup-files, source files and the HAL driver files ? Do I need to do this manually ? Is there documentation for porting CubeMX generated projects where .ioc files are missing ?

Also, I've got EWARM licence for v8.3. I get errors trying to build the TIMCOOKER examples so I guess they are built using a newer version. But I don't know because neither the TIMCOOKER data-brief, the associated readme.txt files for each project, nor the AN4776 application notes says which version is required. Is this information simply missing ?

2 REPLIES 2
RhSilicon
Lead

Using the same IDE, It really is laborious to manually migrate a series (STM32F3) to a different series (STM32F4), or even to the same series but with different features. These MCUs have a lot of resources, and therefore need a lot of files to make it easier for a human to program.

An interesting tip for new projects is to avoid using an old series, the F4 series was already launched in 2011 (It's harder to get help, anyone who has knowledge of the old MCU may already be forgetful, or be interested in other current models).

After having made several STM32CubeIDE updates I started to prefer to create a new project, likewise, migrating a project to another IDE. A new project is better than adapting an old project, incompatibilities with code versions can occur, mainly in core files. External device drivers can usually be used without the need for rewriting (if they were written in a HAL-compatible way for example, it is more unlikely to run into incompatibilities with a project that uses HAL or to have to remember code logic).

(It's interesting to keep an eye out for user feedback about bugs in new IDE updates. And instead of just updating, it might be interesting to use a virtual machine (Virtualbox for example) to test the updates and make sure they don't affect the projects, otherwise the return time for the version that was satisfactory may be greater than to delete the virtual machine.)

If you still prefer to manually migrate the project to another MCU, it may be necessary to change more files as well, such as Middleware files.

About the file version, unfortunately the files may not have the version in the file header, which can make it even more difficult to find core files of the same version. I opened a issue about this, but it was not accepted (closed as not planned). In addition to the IDE version, it can be important to note the version of the Patch_CubeFx files, in case it is necessary to reinstall the system without having to update the project.

/**
******************************************************************************
* @file stm32f407xx.h
* @author MCD Application Team
* @brief CMSIS STM32F407xx Device Peripheral Access Layer Header File.
*
* This file contains:
* - Data structures and the address mapping for all peripherals
* - peripherals registers declarations and bits definition
* - Macros to access peripheral’s registers hardware
*
******************************************************************************
* @attention
*
* Copyright (c) 2017 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/

 

Ronny Landsverk
Associate III

Thanks for your input. I think the application note AN4776 is pretty widely used, so I'm sure others have ported the projects to different MCUs. I'm a bit surprised though that the process isn't shown in the application note, nor included in the repository - as the examples are relevant for all STM32 MCUs.