-2

I am trying to add my existing project into IAR 6.50 Compiler. I have followed each and every step as mentioned in the User Guide to setup the compiler and project. Now when I build my project it's giving me errors as shown in below image enter image description here All of them are in .c file. I don't know what's the main problem.

Any help would be highly appreciated.

Community
  • 1
  • 1
  • 1
    What compiler did you use on this project previously? – user694733 Nov 07 '17 at 07:50
  • 1
    Don't post graphic screen shot graphics of text. Paste the text instead to make it readable. – harper Nov 07 '17 at 08:00
  • 1
    What is the first error message? – harper Nov 07 '17 at 08:01
  • @user694733 `IAR Embedded workbench` – usman hassan Nov 07 '17 at 08:51
  • @harper `#error "Unsupported Compiler!" /* Compiler defines not found */` is the first error. – usman hassan Nov 07 '17 at 08:52
  • Was it a different version of IAR compiler? If it was older version, you should check the migration guides that IAR has provided. – user694733 Nov 07 '17 at 08:55
  • @user694733 i was working on this compiler almost year before and all the things were working properly but for some reason my system crashed and i lost all the configurations of the compiler. I have tried each and every possible steps to regain the configuration but unfortunately i am unable to get my desired results. – usman hassan Nov 07 '17 at 08:59
  • Maybe your older project file had some preprocessor defines in project settings? These could be anything, so I cannot really help with those. You should inspect the code giving these errors to find out what defines are missing, and add them to your project settings. – user694733 Nov 07 '17 at 09:44
  • @usmanhassan [Edit] your question to include such essential info. Comments should be used for miscellanea only. – underscore_d Nov 07 '17 at 10:34

1 Answers1

0

You have to adapt at least the file "stm8l15x.h". You need to add support for the Compiler you want to use.

How the support is done for IAR Compiler is depending on the project that you want to port to the new compiler. The best idea would be contacting the author of the library. Probably you can find somebody here that used that (library?) project at StackOverflow. But this has low probability unless you reveal the Name of it.

EDIT: You have to check what causes the compiler to use the line #67 of the file "stm8l15x.h". Somehow the #ifdefs are not working anymore. Change the #ifdef chain or the #defines that you pass to the compiler when running it.

harper
  • 13,345
  • 8
  • 56
  • 105
  • The context of the rest of the answer shows that was a typo, and they mean that you - or preferably the author of that library - need to **adapt** that header, not only "adopt" (include) it. – underscore_d Nov 07 '17 at 11:47