Sysprogs forums › Forums › VisualGDB › VisualGDB + IAR compiler
- This topic has 14 replies, 5 voices, and was last updated 6 years, 10 months ago by support.
-
AuthorPosts
-
November 15, 2012 at 14:35 #567AnonymousParticipant
Hi! Can I use VisualGDB + IAR compiler for MSP430 devices?
November 15, 2012 at 14:39 #2414supportKeymasterUnfortunately, IAR compiler generates debugging data in a format that is incompatible with GDB. Thus, VisualGDB cannot debug it.
However, we could help you switch your project to the GCC toolchain. The toolchain is stable, widely used by community and we can answer your questions on GCC-specific syntax.January 12, 2014 at 21:19 #2419LostTime77ParticipantAs far as I know, IAR for ARM produces ELF files that are in the same exact format as what the gcc toolchain produces. On top of that, you guys already support debugging with Segger Jlink. Many companies use IAR + Jlink. It would be a very awesome feature if you guys supported IAR as well.
I am not sure if you were responding to his particular post with regards to the MSP430 series, but a huge number of IAR customers use ARM, which produces ELF files from the compiler.
I for one would buy this product if IAR was supported for ARM.
January 14, 2014 at 04:34 #2417supportKeymasterHi,
Last time we checked, IAR for MSP430 did not support producing ELF files with GDB-compatible symbols. If the ARM version supports it, you should be able to switch from GCC to IAR compiler by simply modfying the makefile generated by VisualGDB. As long as the ELF files are GDB-readable, VisualGDB will automatically support them.
Please let us know if you need more information on doing that.
January 14, 2014 at 20:37 #2418LostTime77ParticipantYes, IAR for ARM produces ELF files compatible with GDB. We use the JLink tool from segger, which takes as input our ELF files.
This would be extremely cool if we could use IAR with visual GDB. I am assuming I am going to have to heavily modify the makefile so that it uses the IAR compiler and puts in the proper command switches. I think that after we produce a few of the make files, it will all just be copy and paste anyways.
Now, there is only one issue to be resolved. I know for a fact the IAR compiler output is not in gcc format. However, I also understand that in order to populate the warning / error windows in visual studio you need to follow a certain output format for the output strings. If we simply parse the IAR output for strings from the compiler with a build step after running the compiler and put the strings in the proper format, will that populate the error / warning lists? Will we be able to click on an error / warning and be brought to the source file containing the item?
Thanks
January 15, 2014 at 12:33 #2416LostTime77ParticipantAfter doing a little more research, it seems like I was correct. All you should need to do is format the compiler output strings in a format visual studio understands, and they will automatically be picked up by the error and warning windows.
I am going to check out makefile theory, because I am not familiar with them: I am a windows guy 😛
January 16, 2014 at 03:40 #2415supportKeymasterVisualGDB already does the error message conversion from GCC format to Visual Studio format. It relies on regular expressions do parse the messages. You can override those regular expressions by creating a file called BuildMessageTemplates.xml in the VisualGDB directory with the following content:
^([^:]+|[a-zA-Z]:[^:]+|):([0-9]+): (error|fatal error|warning|note|Error):(.*)$
^([^:]+|[a-zA-Z]:[^:]+):([0-9]+): (undefined reference to .*)$
^([^:]+|[a-zA-Z]:[^:]+):([0-9]+): (multiple definition of .*)$
^([^:]+|[a-zA-Z]:[^:]+|[a-zA-Z]:/[^:]+):([0-9]+):([0-9]+): (error|fatal error|warning|note):(.*)$
make[([0-9]+)]: (Entering|Leaving) directory (.*)$
([^:]+):([0-9]+): *** (.*)$
Simply update the regular expressions there to match the IAR output and VIsualGDB will understand them.
November 27, 2016 at 01:19 #9599LostTime77ParticipantI am resurrecting this topic as VisualGDB has become an option again due to the latest 5.2 update. 3 or 4 years ago we investigated VisualGDB to replace the IAR + Eclipse solution we were using for development. There were 2 hanging items that caused us not to switch:
- VisualGDB only seems to fully support GCC. We need it to support IAR. This is a requirement; we cannot switch to GCC. There is not an issue with the compiler itself, but rather the crappy LD linker that GNU seems to use. IAR allows code objects to be placed inside non contiguous memory regions whereas LD requires you to explicitly place the objects by hand. This is a non negotiable feature in our development process as we are working on MCUs with non contiguous memory. Changes to the output memory map happen when each person compiles a new feature into the code base, and at times we have up to 10 developers working on the same code base, each with their own test setup. Imagine coordinating RAM memory placement across non contiguous memory with that many people. The IAR linker does this automatically – just tell the linker the memory regions and boom, its done.
- You could not specify per file / folder build options. For example, I want to exclude files / folders from specific build configurations for the build. It looks like this has changed with the migration to MSBuild; however, it does not look like you can do per folder options. This is not a breaking feature in the decision; we can work around that.
We would really like to get away from Eclipse as our development IDE, because its got a massive number of issues that the developers seem to plainly ignore. Visual Studio would be ideal, because its just awesome. However, we require IAR support.
Now, I am wondering if it is possible to put IAR support into VisualGDB manually by just building some of our own command line tools that can pre process the command line options being passed into and written out of the tools such as the compiler, assembler, and linker – basically ‘convert’ the gcc command lines to iar ones. Do you think this is possible or can you give me a place to start?
Also is IAR support planned at all?
- This reply was modified 8 years ago by LostTime77.
November 28, 2016 at 05:22 #9602supportKeymasterHi,
As most of our users rely on GCC, we indeed do not directly support the IAR compiler. It is possible however to modify a VisualGDB project to use any 3rd-party compiler.
We do have a detailed tutorial showing how to use the Keil ARM compiler with VisualGDB here: http://visualgdb.com/tutorials/arm/keil/; adding support for IAR should be very similar.
The steps described there only work for Make projects; MSBuild would require slightly different steps, but we could guide you through them.As Visual Studio itself does not support per-folder options, VisualGDB can’t do that out-of-the-box. You can achieve this by adding a few custom targets to your MSBuild project, but it won’t be easily configurable via GUI. Let us know if you want to go that way and we could give you a basic example.
P.S. If the only reason you are not using GCC is the lack of support for multiple memory regions, we could provide you with a custom tool that will re-link an existing ELF file to spread one data section across multiple regions using the relocation records generated by the compiler. If you are interested, please contact our sales and we will give you a quote for making this tool.
We currently don’t have any plans for supporting IAR compiler directly as it is not very popular among our users. We could add it as a paid customization if you believe this could save time, or we could just help you support it on your side by customizing VisualGDB projects.
December 9, 2016 at 14:34 #9757ewatsonParticipantHi,
We are also investigating the use of VisualGDB as a development solution and currently use IAR for ARM.VisualGDB is perfect for our development strategy, except for the compiler situation (only supports GCC). Who knows, maybe there are more users than you think that would like direct support for IAR ARM 🙂
A detailed tutorial showing how to use the IAR ARM compiler with VisualGDB would be very useful. I will see how I get on with the Keil version.
- This reply was modified 8 years ago by ewatson.
December 11, 2016 at 04:13 #9771supportKeymasterHi,
Thanks, we will consider adding a tutorial specific to IAR.
February 5, 2018 at 10:05 #19944SivaParticipantHi,
Is there any support tutorial for Integrating IAR (Compiler,Assembler & Linker ) into VisualGDB.
February 6, 2018 at 05:21 #19969supportKeymasterHi,
Sorry, not yet. We have added support for automatic import of IAR projects (converting them to GCC projects), but we don’t have a tutorial for the IAR compiler yet.
February 6, 2018 at 07:45 #19970SivaParticipantIs it possible to include IAR toolchain into VisualGDB?
Is there a way to get a *gdb.exe file for my IAR toolchain which was not listed in the toolchains, when we are creating a new embedded project.
Can i get the link for how to import IAR projects by converting into GCC?
February 7, 2018 at 04:53 #19972supportKeymasterHi,
Sorry, VisualGDB would not automatically detect your IAR toolchain yet. Similar to the Keil tutorial, we recommend simply creating a project using the GCC toolchain first and then editing the Makefile to run the IAR compiler instead.
No problem, we have published a tutorial about importing IAR projects here: https://visualgdb.com/tutorials/arm/import/iar/
-
AuthorPosts
- You must be logged in to reply to this topic.