Build errors on fresh STM32CubeMX project

Sysprogs forums Forums VisualGDB Build errors on fresh STM32CubeMX project

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #13531
    AndyFraser
    Participant

    I imported a single STM32CubeMX project as detailed here: https://visualgdb.com/tutorials/arm/stm32/cube/

    When I build it I get a number of errors (shown in attached log file).

    Can you help ?

    Andy

    #13534
    support
    Keymaster

    Hi,

    Sorry, looks like the log file did not get attached. Could you please simply paste a few error messages in the post?

    Most of the import-related errors arise from conflicts between the startup files used in the project and the startup files shipped with VisualGDB. If the errors mention “multiple definition of XXX”, simply looking up both files mentioned in the error and removing one of them from the project should help.

    #13537
    AndyFraser
    Participant

    I have zipped up the log file which should be attached.

    Andy

    Attachments:
    You must be logged in to view attached files.
    #13578
    AndyFraser
    Participant

    Any thoughts on these error messages ?

    I really need to get started with coding for a customer job and if I can’t get passed these issues I am going to have to drop back to another IDE/Compiler which would be annoying as I paid for VisualGDB.

    Andy

    #13601
    support
    Keymaster

    Hi,

    Sorry for the delay. It looks like 2 known issues:

    1. You appear to be using lwIP in a mode where it tries to redefine the timeval structure that is already defined in the gcc toolchain. Double-clicking on the error message should open the related definition:

    #ifndef LWIP_TIMEVAL_PRIVATE
    #define LWIP_TIMEVAL_PRIVATE 1
    #endif
    
    #if LWIP_TIMEVAL_PRIVATE
    struct timeval {
      long    tv_sec;         /* seconds */
      long    tv_usec;        /* and microseconds */
    };
    #endif /* LWIP_TIMEVAL_PRIVATE */

    Simply defining LWIP_TIMEVAL_PRIVATE to 0 via Preprocessor Macros should resolve this (VisualGDB does it automatically when referencing lwIP via VisualGDB Embedded Frameworks, but cannot guess it if you are importing a 3rd-party project).

    The problem with syscalls.c looks similar – please examine the file and modify it to avoid redefining the timezone struct.

    2. You are building a source file meant for hardware floating point mode using a software FP setting. Please change the FP setting to hard via the first page of VisualGDB Project Properties.

    #13988
    AndyFraser
    Participant

    That did the trick 🙂

    Many thanks for your help.

    Andy

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.