Skip to main content
Visitor II
March 26, 2024
Solved

How to remove CubeMX common source files from Keil project for STM32H5

  • March 26, 2024
  • 3 replies
  • 2074 views

Hi,

I'm creating a Keil project (uVision V5.36.0.0) for a STM32H563ZITx target using the reference https://developer.arm.com/documentation/ka003120/latest/

After choosing STM32CubeMX under Run time Environment settings and generating the gdsc file from CubeMX and pasting it manually where the Keil project requires it to be present, I see that the project now has 'STM32CubeMX:Common Sources' section.

stm_h5.png

I want to delete main.c from Common sources and use my own source file but I am unable to delete the files under this group. Does anyone know how to resolve this?

    This topic has been closed for replies.
    Best answer by Pavel A.

    Exclude the unwanted main.c from build. Add your own file that contains main() function somewhere.

     

    3 replies

    Graduate
    March 28, 2024

    I would benefit from the answer to this question a lot as well.

    Pavel A.Answer
    Super User
    March 28, 2024

    Exclude the unwanted main.c from build. Add your own file that contains main() function somewhere.

     

    WCareyAuthor
    Visitor II
    April 1, 2024

    Thanks. But I want to remove the .ioc file too. Actually, I would like to know the purpose of that file.

    Super User
    April 1, 2024

    Purpose of the .ioc file?  Hmm...  Yes you can just remove it. The Keil IDE won't mind.

     

    WCareyAuthor
    Visitor II
    April 3, 2024

    Keil (.36.0.0) does not allow to delete STMCubeMX:Common sources group or its members. So I excluded the main.c from the build and put a dummy .ioc file.

    Thanks for your response.