Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » assembly ide
assembly ide [message #1840668] Wed, 21 April 2021 16:48 Go to next message
thierry boibzary is currently offline thierry boibzaryFriend
Messages: 1
Registered: April 2021
Junior Member
Hi,
is there an assembly IDE in eclipse?
thanks
Re: assembly ide [message #1849317 is a reply to message #1840668] Wed, 12 January 2022 16:58 Go to previous messageGo to next message
Todd Longfellow is currently offline Todd LongfellowFriend
Messages: 2
Registered: January 2022
Junior Member
I do not believe that Eclipse has a specific plug-in for assembly language, however, you can use the C/C++ version of Eclipse to do assembly language programming. The following steps are for Linux, but if you are using Windows, you can download and install the nasm assembler.

Download and install Eclipse C/C++ IDE. Create a new project and select C Managed Build. Name your project in the next dialog box; select Empty Project and choose Linux GCC (assuming you are using Linux). Click Finish. At this point, Eclipse will have created the necessary directories under your project. With your project name selected in the project navigation window, go up to the File menu and select New Source File. In the New Source File dialog box, type in a source file name - something like test.asm - where test can be any name, but give it the extension .asm. Click Finish. You will now have an empty source code file for your assembly language source code.

Next, Eclipse needs to know about the assembler and linker. Go up to the Project Menu and select Properties. In the Properties dialog window, choose to expand the C/C++ Build group. Select Settings. For assembly language, you can ignore the GCC C Compiler group. Click on the GCC C Linker group. In the Command text box, change GCC to ld. Next, click on the GCC Assembler group. In the Command text box, change "as" to nasm (assuming that is the assembler you have installed and want to use. Move down to the Expert settings: and in the Command lin pattern: text box, between the closing brace of COMMAND and the dollar sign ($) of FLAGS, type in the nasm options you want. Something like: -f elf64 -F -g. Click on Apply and Close. You are now set up to assemble and link your assembly language program.
Re: assembly ide [message #1849708 is a reply to message #1849317] Sun, 30 January 2022 19:27 Go to previous message
Alex Freidin is currently offline Alex FreidinFriend
Messages: 32
Registered: July 2009
Member
I find it useful to use the C preprocessor in assembly. To use it, name your files with capital .S and in your project properties (assuming GCC toolchain) change:
1. GCC Assembler > Command: from "as" to "gcc"
2. GCC Assembler > General > Assembler flags: add "-c"
3. GCC Linker > General - check the "No startup or default libs (-nostdlib)" if you do not need to link with standard C libraries and startup code.
This way the assembly sources will be compiled and linked using GCC and can use all its preprocessor features.

Unfortunately, assembly editor is very basic. I guess it's because Eclipse supports many architectures with different ISA.
Previous Topic:undefined reference to `log'
Next Topic:static library artifact extension .a additionally added
Goto Forum:
  


Current Time: Thu Oct 06 01:55:26 GMT 2022

Powered by FUDForum. Page generated in 0.02134 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top