score:1
Accepted answer
you have a couple choices. i don't know about eclipse, (i just use vim and make directly) but the compilation procedure should be the same.
you can:
- write a mostly c project, in-lining whatever assembly you want. this is usually the easiest method. check out the avr-gcc inline assembler cookbook.
- write a purely asm application that doesn't use the linker at all. e.g. a one-file application (or one file that directly includes the rest of the project explicitly). you'll have to tell your build tool what to do to process the file, but it can be as simple as one invocation of avra or avr-as. you must be sure to carefully do all the low-level initialization and build a complete interrupt vector table for the mcu you're using, or you may get unexpected behavior.
- write a mixed c and asm application linking between object files from both languages. to do that you do the same thing you would for a pure c project, except some (maybe all) of your source files will need to be assembly. you'll have to tell your build tool how to assemble them in to object files. in a makefile this would be writing the correct rule (or more likely setting up the ${as} macro to use the correct assembler). in eclipse there is probably a project setting for it, but with any ide ymmv. this is probably the hardest option, as you'll have to know the calling convention and abi of your compiler to successfully execute your pure asm code.
Source: stackoverflow.com
Related Query
- AVR Assembler in Linux
- Linux c++ error: undefined reference to 'dlopen'
- Where does Eclipse look for eclipse.ini under Linux
- How to cleanly shutdown Eclipse from Linux command line?
- Connect Eclipse RSE with remote Linux server using public key attained from Amazon ec2
- Profiling Node.JS (code) execution time in Linux
- How do I view JRE's source code in Eclipse on linux (debian)
- Define remote interpreter on remote Linux machine using Pydev and RSE Server
- Linux Eclipse CDT profiler
- Changing color of Eclipse links in quick fix or Eclipse links in preferences on Linux
- How to transfer Eclipse workspace and project from Windows to Linux and Mac
- linux thread suspended by real-time signal when running in eclipse
- Add windows encoding to Eclipse on linux
- Sharing an Eclipse workspace between Linux and Windows
- Cannot set "Part title font" in Eclipse on Linux
- Eclipse Luna UI rendering in Linux
- eclipse Charset for working with Windows & Linux on same Project
- Recommended Linux Distro for Android Development Workstation
- Setting up Netbeans/Eclipse for Linux Kernel Development
- Eclipse: Ctrl + Shift + ? hotkeys in Linux / KDE?
- Tomcat not deploying new version of files at all - linux / eclipse
- How to set up headers and libraries for Linux development
- How to remove auto-discovered paths after compiling on Linux from Eclipse CDT project?
- Change .eclipse folder in Linux
- Eclipse Dark Theme on Linux Mint Cinammon
- How to convert a .java or a .jar file into a Linux executable file ( without a .jar extension, which means it's not a .jar file )
- Linux Shared Libraries c++
- Linux Development/Deployment for Samsung Galaxy S3
- Configuring Eclipse for Linux Kernel module development
- Linux Kernel's build configuration with Eclipse
More Query from same tag
- Why does one long string take MORE space than lots of small strings?
- Image not showing in webapp maven project in eclipse oxyegen?
- Could not instrument class IllegalArgumentException
- How to create a new server in Eclipse
- how to generate javadoc in eclipse Ubuntu 11.10
- I have added dependency in Pom.xml but Maven is not picking up, maven build gets fails
- Finding variable value in Eclipse Debug Perspective
- java nio - How does Paths.get() finds a folder in the root directory of a project?
- Xdebug/Eclipse PDT doesn't show progess while debugging
- How to use different versions of Eclipse in the same project and the same source base
- Using Selenium webdriver for Internet Explorer. Tests won't run
- Help with creation of refactoring plugins in Eclipse?
- Spaces instead of tabs in Eclipse (Galileo 3.52)?
- Build Path in eclipse
- Define layout without using Xml
- Errors in Mainactivity.java
- Get Selection of ComboBoxPropertyDescriptor in Eclipse Plugin
- How can I install ojdbc6 on eclipse, getting error: unknown lifecycle phase "mvn"?
- How can you import M2E Maven projects into Eclipse from the command line?
- Visual Studio style Output Console Window in Eclipse
- Ubuntu 11.04 Eclipse Java not running
- Adding the required jars to the Application under Eclipse
- Focus event on CTabFolder selection
- Tomcat port 80 doesn't work
- Maven - Load resources from JAR?
- How to import a Jar into Eclipse
- Use org.eclipse cut/copy/paste in custom RCP application
- birt rcp report designer 4.8 java 8 startup problem
- Android emulator for eclipse on Windows Server 2008
- AttributeError: 'module' object has no attribute 'TextUnit_Character'