Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Add ASSEMBLY CODE to your VS2012 sketch ? => Need help please (Read 5571 times)
joss
Newbies
*
Offline


Posts: 2
Joined: Oct 29th, 2013
Add ASSEMBLY CODE to your VS2012 sketch ? => Need help please
Oct 29th, 2013 at 3:10pm
Print Post  
SmileyHello everybody !

I'm trying to add asm code to teensy_pins.c in order to get an efficient port C interrupt,  in VS2012 (I bought vsMicro)
Here is my code :

void portc_isr(void)
{      
     uint32_t isfr = PORTC_ISFR;
     PORTC_ISFR = isfr;

     
     __asm(      "CLZ      R2, isfr;"                        // store leading zeros in r2
                 "CMP      R2, #19;"                        // Is there 19 leading zeros ?
     
                 "MOV      EQ R3, 0x400FF08C;"            // Move GPIOC_PTOR address to r3
                 "STREQ  0x100000, R3;"              // toggle pin 13, Port C-5 => (1 << 5)
     );
}

And I get the following errors (!!):

Compiling 'Interruption_pin12_led13' for 'Teensy 3.0'
cc7QmTvH.s* : : Assembler messages:
cc7QmTvH.s* : ARM register expected -- `clz R2,isfr'
cc7QmTvH.s* : ARM register expected -- `streq #0x100000,R3'

Could you help me please. Cheesy
Thanks, 
Joss.



  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Add ASSEMBLY CODE to your VS2012 sketch ? => Need help please
Reply #1 - Oct 29th, 2013 at 4:54pm
Print Post  
Hi Joss,

We aren't too good at assembler this question would be best asked in the Teensy or Arduino.cc forums.

Visual Micro ensures compatibility with Teensy and Arduino so you will have the same problem in the Arduino or Teensy Ide which means you can ask your question without confusing the issue by mentioning Visual Studio or Atmel Studio.

I hope this helps, sorry we can't help with generic coding requests
  
Back to top
IP Logged
 
joss
Newbies
*
Offline


Posts: 2
Joined: Oct 29th, 2013
Re: Add ASSEMBLY CODE to your VS2012 sketch ? => Need help please
Reply #2 - Oct 29th, 2013 at 8:20pm
Print Post  
Hi, 

Okay, I understand. 
Thanks for this fast reply !

I'm gonna ask on Bulletin Teensy so. If I find the solution, I'll post the answer here for anyone in same situation.

Have a good evening.

Joss. Wink
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Add ASSEMBLY CODE to your VS2012 sketch ? => Need help please
Reply #3 - Oct 29th, 2013 at 8:45pm
Print Post  
Thank you
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint