4 Replies Latest reply on Feb 28, 2012 1:20 PM by user_62908756

    Inline assembly for PSoC5

    user_62908756

      Hi,

         

      question is in the subject: is it possible write inline assembly for PSoC5? For PSoC3 is possible; there are several post about and it appears in documentation. But I found nothing about PSoC5

         

      Thanks

        • 1. Re: Inline assembly for PSoC5
          user_1377889

          The assembly for an ARM Cortex is so complicated, that everybody says : Hands off.

             

          The fact is, it is a 3-address assembler with the opportunity to modify the third operand before its usage.

             

          Have a look at the ARM website and get your shivers.

             

           

             

          Bob

          • 2. Re: Inline assembly for PSoC5
            ki.leung

            I tried but it is just too time consuming. May do it if really have to. however, I still prefer to use C unless needed to :-)

            • 3. Re: Inline assembly for PSoC5
              yfs

              I'm not recommending ASM development either but it is perfectly possible. There is nothing more difficult about it on an ARM processor as opposed to a 8-bitter, imho, but C compiles so efficiently on ARM that it seems a pain I can live without. Anyway, since I do plenty of things that are bad for me I'll tell you how and then leave it to your own conscience!

                 

              The procedure is simple enough.

                 
                    
              1. Open the Workspace Explorer and right-click on the "Source Files" folder.
              2.     
              3. Select "New Item..." to open the dialog.
              4.     
              5. Choose either "GNU ARM Assembly File" or "RealView ARM Assembly File" and give your file a name.
              6.     
              7. Write ASM code, build, curse, fix ASM code, build, curse, cry, give up, etc
              8.    
                 

              One thing to note is that the choice in step 3 depends on the compiler (which defines the assembler) you are going to use. GNU ASM is not compatible with RealView or MDK ASM. So check that before you take the plunge.

                 

              Good luck and enjoy yourself!

                 

              -- Mark.

              • 4. Re: Inline assembly for PSoC5
                user_62908756

                I imagined these answers. Sometimes customers do "strange" questions

                   

                I asked to this customer why this but I've not answer yet. But I've couriosity.

                   

                Thanks