Sysprogs forums › Forums › VisualGDB › Keil FreeRTOS project build error
- This topic has 5 replies, 2 voices, and was last updated 5 years, 7 months ago by support.
-
AuthorPosts
-
April 24, 2019 at 09:16 #24734linshiParticipant
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.April 24, 2019 at 16:06 #24738supportKeymasterAccording 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.April 25, 2019 at 02:50 #24760linshiParticipantI 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.April 25, 2019 at 03:34 #24768supportKeymasterThanks 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:
- 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”).
- 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.
April 25, 2019 at 04:29 #24769linshiParticipantI 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.April 26, 2019 at 06:37 #24798supportKeymasterThanks 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.
-
AuthorPosts
- You must be logged in to reply to this topic.