Compile error with CubeMX import

Sysprogs forums Forums VisualGDB Compile error with CubeMX import

This topic contains 3 replies, has 2 voices, and was last updated by  support 1 week, 2 days ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #11002

    Dubbie
    Participant

    Hi,

    I have followed the tutorial successfully with an STM32F0 project and everything worked fine.

    Now I am starting a STM32F4 project and can’t get a blank new project to compile.

    Once again I have followed the tutorial exactly.

    Here is my error:

    I am not sure where I am going wrong. If I click the error, Intellisense happily sees the definition of `APBPrescTable’ without any trouble, so I’m not really sure what I can change to make it work.

    My visualGDB makefile include paths are as follows:

    View post on imgur.com

    Thanks for any hints you can throw my way,

    R

    • This topic was modified 1 week, 4 days ago by  Dubbie.
    • This topic was modified 1 week, 4 days ago by  Dubbie.
    #11012

    support
    Keymaster

    Hi,

    Please double-check that your project includes a system_stm32xxxx.c file. It should either come from the code generated by STM32CubeMX or from the VisualGDB BSP directory (enabled by referencing ‘default system file’ framework on the Embedded Frameworks page of VisualGDB Project Properties).

    #11019

    Dubbie
    Participant

    It does include a system_stm32xxx.c file. However, I just realised that in that file, the definition for AHBPrescTable[16] is present, but there is nothing for APBPrescTable[8].

    No idea why this is the case.
    I added a new line:

    const uint8_t APBPrescTable[8] = { 0, 0, 0, 0, 1, 2, 3, 4 };

    And now it seems to build fine.
    Thankyou for pointing me in the right direction.

    R

    #11022

    support
    Keymaster

    Hi,

    If you had to add a line manually, there could be a version mismatch between your system file and the HAL library and that could cause further cryptic errors. We would strongly encourage double-checking this and getting the correct version rather than just adding a missing line, as it would help avoid really tough-to-pinpoint problems.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.