Add support for NUCLEO-G491RE

As of today the NUCLEO-G491RE isn’t supported in mbed, support for the mcu already exists (TARGET_STM32G491xE) so adding board support shouldn’t be too complex.
Would someone from ST be able to add support? I could try adding the board target myself but not 100% sure how to do that.


you could see - mbed-os/targets/TARGET_STM at master · ARMmbed/mbed-os (
There you will find all necessary things for how to do that like custom target.

BR, Jan

Oops, I didn’t saw that README, thanks!

Sorry to bother you again, I tried that; specifically I ran python targets/TARGET_STM/tools/ -t M43_Nucleo_NUCLEO-G491RE_STM32G491RE_Board_AllConfig.ioc and my custom_targets.json looks like this:

  "NUCLEO_G491RE": {
    "inherits": [
    "supported_form_factors": [
    "device_name": "STM32G491RETx"

But mbedtools compile -m NUCLEO_G491RE -t GCC_ARM fails with fatal error: mbed_rtx.h: No such file or directory.
The board definition is more or less copied from NUCLEO_G474RE, that board builds fine though.
Do you have any clues on what I’m doing wrong?
Thanks in advance,

I don’t know how your custom target project looks like, but it must look like this


In your case the folder name Custom will be you project name and TARGET_TEST folder name will be replaced by TARGET_NUCLEO_G491RE. This folder need to be filled with all 3 files what you see.
Files around pins you have from the .py script, but these files still need a correction. But because TARGET_STM32G491xE target folder does not contain clock settings, then you need to make also clock settings. As a template you can use a system_clock.c file from another Nucleo-G4xx, but correct clock settings you need to take from STM32CubeMX.

BR, Jan

I think I got it to compile finally, I was missing a add_subdirectory(TARGET_NUCLEO_G491RE EXCLUDE_FROM_ALL) in my projects CMakeLists.txt, I’ll be doing more tests tomorrow probably.

Oh, you use Cmake, I did not know that.

BR, Jan