Keil FreeRTOS project build error

Sysprogs forums Forums VisualGDB Keil FreeRTOS project build error

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #24734
    linshi
    Participant

    Hi,

    I import a keil FreeRTOS project  generated by STM32CubeMX but can not build.

    A lot of error message about the portmacro.h file. But the Keil MDK can build and have not problem at all.

     

    Another problem is import keil project error under vs2019, error message picture is attached. (vs2017 is OK. )

    Attachments:
    You must be logged in to view attached files.
    #24738
    support
    Keymaster

    According to our records, it looks like your trial period has expired. In order to get further technical support, please consider purchasing a license.
    Please note that installing VisualGDB on another PC, editing registry to affect the trial counter, or creating further forum accounts does not reset your trial period from the support point of view.
    As providing quality technical support for our users requires continuous effort on our side, we do expect our users to play fair and are not able to offer any help once the original trial period expires.

    #24760
    linshi
    Participant

    I have purchased a license yesterday (details removed for privacy) and update the software to the lastest version. (to be honest, I uesd some cracked version before….)

    I reinstalled visualGDB several times and the errors still there.

    Please help.

    Attachments:
    You must be logged in to view attached files.
    #24768
    support
    Keymaster

    Thanks for playing fair. Do do appreciate it as it takes considerable effort on our side to provide a maintained and supported product.

    The problem you are experiencing is most likely caused by the Keil trying to compile a C++ file as an assembly file, or vice versa. In order to diagnose it, please follow the steps below:

    1. Try narrowing down the problem to a specific source file. Check the build output (View->Output) to see what files are built just before the problem triggers. Then try building that specific file by opening it in Visual Studio and pressing Ctrl-F7 (or right-clicking in Solution Explorer and selecting “build”).
    2. Once you can reproduce the problem with a specific file, please check its type and input language via File Properties. If you are not sure, please let us know the file extension, the values of Configuration Properties -> Item Type and Configuration Properties -> C/C++ -> Advanced -> Compile As, and also the exact build output.

    We have tried reproducing the issue with VS2019, however could not get the behavior you described. Based on the screenshot, it looks like VisualGDB is trying to save the solution before creating the project and Visual Studio fails to complete the save. Please try updating VS2019 to the latest version and also check if the problem can be reproduced when creating a new GCC-based project from scratch. If not, please try comparing the working and non-working setups to narrow down a specific setting that triggers the issue, so that we could add a workaround on our side.

    #24769
    linshi
    Participant

    I find that the freertos.c cause the problem.

    I set the ‘compile as’ to ‘Plain C’ and tried again.

    Here is the output.

    (And vs2019 import project works fine today, I don’t why….It is not a problem now.)

    Attachments:
    You must be logged in to view attached files.
    #24798
    support
    Keymaster

    Thanks for the update. This looks like some of the macros (e.g. portFORCE_INLINE) was not properly expanded. Most likely, this happens because the Keil project overrides some of the advanced settings that were not picked up by the VisualGDB’s project importer.

    We have just published a detailed tutorial on extracting comparing the build command lines used by VisualGDB and Keil: https://visualgdb.com/tutorials/arm/import/diagnose/

    Please feel free to follow it. As you have already pinpointed a specific source file, you will only need steps 20-25, although we advise reading through the entire tutorial in order to understand the role of the RSP files and various build settings.

    If you are not sure, please share the build flags for the problematic file from both Keil and VisualGDB, and also confirm that you can reproduce the problem by building the file manually via command line (per step 22) and we will help you find the root cause.

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