I have been working on different micro-controllers and I am new to Arm cortex architecture.

I have developed an application on NUCLEO-F207ZG (powered by STM32F207ZG).

The application is supposed to run on stm32f207vc.

Currently, I have made separate projects in STM32 Workbench, one for development board and other for the stand-alone microcontroller.

This seems to be an ugly approach to me as it involves a lot of hassle in copying files from one project to another and then working around to successfully build the project, and I am sure I am not aware of certain good approaches.

Is it possible to run the same project for both microcontrollers? (I think there should be a solution as both are from similar series, with different memory capacities and pin count). One thing that I see is that I may have to make a change in linker script, changing the amount of RAM and ROM that the target device houses.

Looking forward to methods to be able to develop applications faster.

Below is the link to the datasheet. Both devices are listed in the same datasheet for being similar.


Thanks and advance


closed as unclear what you're asking by Elliot Alderson, Chris Stratton, Sparky256, Bimpelrekkie, pipe Aug 4 at 15:56

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    \$\begingroup\$ Please list all of the important differences between the ZG and VC parts. Or, provide links to the datasheets for these devices. \$\endgroup\$ – Elliot Alderson Jul 23 at 11:36
  • \$\begingroup\$ What about using conditionals at compile time? \$\endgroup\$ – Scott Seidman Jul 23 at 11:37
  • \$\begingroup\$ @ElliotAlderson I have added datasheet of the device. Thanks \$\endgroup\$ – Rajeshwar Singh Jul 23 at 11:40
  • \$\begingroup\$ @ScottSeidman conditional compilation in the linker script section and startup files? Sorry for asking too many questions, the architecture is completely new to me. Thanks for response anyway \$\endgroup\$ – Rajeshwar Singh Jul 23 at 11:42
  • \$\begingroup\$ In the code: cs.auckland.ac.nz/references/unix/digital/AQTLTBTE/DOCU_078.HTM. you would still need to specify the processor the the compiler, but you use conditionals to include the right libtary files and such. \$\endgroup\$ – Scott Seidman Jul 23 at 11:48

A very quick scan of the datasheet suggests that the VC part is a strict subset of the ZG part. The VC part has fewer pins so you can't use ports F or G, and it has less flash memory.

If my interpretation is correct, and you should definitely spend some time to verify, then any code that runs on the VC should also run on the ZG. I suggest that you try writing all of your code with the VC version as the target. If I'm right then this code will run directly on the ZG part. At worst you might need to tell the tools to assume a different target processor and recompile.

  • \$\begingroup\$ Thank you for your response Elliot. \$\endgroup\$ – Rajeshwar Singh Jul 23 at 12:21
  • \$\begingroup\$ The Approach seems perfect. I've written application code considering VC. Code written for board(ZG) works on VC. I'm creating a separate project for creation of startup files and linker scrip accordingly, copying files from one project (ZG) to another (VC). I am debugging (print messages) on ZG board and commenting those debug statements in VC part (its a headache). The basic plan is to use conditional compilation for printing and getting rid of copying files. The only worry is if the code would behave same in real world by using same project for both. Guess hit and try is way to go. Thanks \$\endgroup\$ – Rajeshwar Singh Jul 23 at 12:35
  • \$\begingroup\$ Often leveraging the subsetting will work, but there are places in the STM32 family where you occasionally find things such as the same GPIO pin being connected to say UART2 on a high end variant, but UART1 on a lower end one. \$\endgroup\$ – Chris Stratton Jul 23 at 13:24
  • \$\begingroup\$ @ChrisStratton It made me curious, can you name an example? \$\endgroup\$ – berendi Jul 24 at 5:46
  • \$\begingroup\$ @chrisStratton thanks for bringing that up. I will definitely keep that in mind for future developments. Kindly share some references as well if possible. \$\endgroup\$ – Rajeshwar Singh Jul 24 at 14:24

This applies to Eclipse CDT + GNU MCU Eclipse plugin, and might work in other eclipse based IDEs like yours.

In the Project - Properties - C/C++ Build - Settings dialog there is a dropdown list at the top to select configurations, configured by default to switch between debug and release build. It's possible to define additional configurations there, e.g. a debug/release pair for the other MCU. Then you can adjust the linker settings to use another linker script file, define different macros in the compiler preprocessor settings for conditional compilation, have different include paths, etc.

  • \$\begingroup\$ Thank you for detailed description. I will check that ASAP. I am using system workbench which is powered by Eclipse itself. This might be the solution I am looking for. \$\endgroup\$ – Rajeshwar Singh Jul 24 at 14:26

Not the answer you're looking for? Browse other questions tagged or ask your own question.