This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

using c function in inline assembly



hey all,


I am using inline assembly for some operation on  floating point numbers stored in array. I had created 2 functions in Embedded C in separate files to convert float to IQ format.now i want to convert the data stored ( floating point) in array into IQ format using these float to IQ function ( in C). please help me.

  • I dont know how to interface & call c function inline assembly language & use the data stored in array using assembly language to be used in c language to modify it.

  • Hi,

    I do not know you application to tell you it it is OK or not what you intend to do, but I would like you to read first the paragraph 2.5 from this document: SW-TM4C-IQMATH-UG-2.1.x.xxxxx.pdf to be found in your Tiva/docs folder - some global behavior may be changed and I ask if you already know that or not. Could change your view about application and make easy your life.
    As about inlining .asm, some documents may be useful for you:
    a) spnu151i.pdf - ARM Optimizing C/C++ Compiler v5.1
    b) spnu118K.pdf - ARM Assembly Language Tools User's Guide 
    c) in some cases it would be better to write directly in .asm, separate files and then link with your code. A good example for that is the file Tiva/boot_loader/bl_startup_ccs.S file
    These are for CCS - if you use another toolchain, search for similar documents.
    Petrei
  • Petrei makes multiple, most useful, source (learning) identifications.

    That said - might some "simplification" (i.e. KISS) aid your learning and speed your development?  You've interwoven several code techniques & requirements here - too often this fails - & the failure mechanism is then masked by the mass of your requirement.

    Suggest you work this issue, "one tightly defined objective at a time."  Juggling, "too many balls" often causes "drops/ball escape" - overly complex function juggling may be expected to yield similar...