Announcements
IMPORTANT: Cypress Developer Community is transitioning on October 20th. To learn more and be prepared for this change, check out our latest announcement.
cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

Anonymous
Not applicable

 There was a requirement to write assembly code for PSoC5 project and since the compiler is ARM GCC the inline assemblty code goes as below

   

   
asm( "mov     r0, r0\n\t" "mov     r0, r0\n\t" "mov     r0, r0\n\t" "mov     r0, r0" ); 
   
The above assembly code is just 4 NOP.  For single NOP it will look like  
asm( "mov     r0, r0");  I know its hard to learn assembly. So if you need to write assembly instructions, do these steps- Install Notepad++ Write a code in C Build the project In the generated files go to directory Cortex- M3->ARM_GCC_441->Debug Open main.lst using Notepad++- here you can see how each C code is made up of assembly instructions You can optimise the code and replace the C code with asembly
0 Likes
0 Replies