...where are all my asm instructions gone....?

All design tool related questions: compiler, assembler, linker. Embedded programming questions: assembler, C code.

Moderator: nferre

Glorfindel
Posts: 8
Joined: Mon Dec 11, 2006 8:05 pm

...where are all my asm instructions gone....?

Thu Jul 17, 2014 9:38 am

using Atmel Studio 6.2.1153 with Atmel ARM GNU Toolchain 4.8.1426 installed.

Still trying to get Assembler with my Sam3sD8B under my fingers... :?

Where are all the asm instructions gone...:
ret, stmfd , ldr, etc.... are not found by the compiler/assembler:
bad instruction `ret'

using the same instruction using inline asm , e.g

Code: Select all

asm volatile("ldr r1, =0xfff");
everthing is ok ?!?!?!?



any kind off help,links,manuals,tutorials,books...would be fine..

Thx in Advance...
Glorfindel
jharley
Posts: 238
Joined: Thu Dec 06, 2012 6:40 am

Re: ...where are all my asm instructions gone....?

Thu Jul 17, 2014 9:41 pm

'ret' ? not a supported instruction

A good place to start is the ARM Information Center

Information on the Cortex-M3
http://infocenter.arm.com/help/topic/co ... l#cortexm3

The instruction set:
http://infocenter.arm.com/help/topic/co ... IHJGA.html

Application note for the M3
http://infocenter.arm.com/help/topic/co ... index.html
Glorfindel
Posts: 8
Joined: Mon Dec 11, 2006 8:05 pm

Re: ...where are all my asm instructions gone....?

Fri Jul 18, 2014 9:04 am

thx for your help!

I Think its something about the IDE. Inline Assembler works Fine, but separating code in *.s or *.S Files doesn´t work.

May be i have to add some Header Files or some IDE Options that i have still not found....?

Send a Ticket to Atmel about this topic...but it is still open.

Thx
Glorfindel
jharley
Posts: 238
Joined: Thu Dec 06, 2012 6:40 am

Re: ...where are all my asm instructions gone....?

Fri Jul 18, 2014 2:00 pm

;) np.
I Think its something about the IDE. Inline Assembler works Fine, but separating code in *.s or *.S Files doesn´t work.
BTW: This works on my end.
Glorfindel
Posts: 8
Joined: Mon Dec 11, 2006 8:05 pm

Re: ...where are all my asm instructions gone....?

Tue Jul 22, 2014 7:39 am

...and that´s what Atmel said...

Dear Customer,

The Cortex ARM cores are simplified by ARM to optimize the use of C language. But of course you can also use assembly language for this.

As of now it is not possible to create pure assembly project in Atmel Studio 6 for Atmel ARM devices.

The general practice is to use C/C++ Projects (If needed we can use assembly file in a C/C++ Project) remove main.c and add assembly files (.s) and then if we compile the assembler will assemble the assembly code.

ARM GCC inline assembler is supported in Atmel studio 6. There is some useful information available at
http://www.ethernut.de/en/documents/arm-inline-asm.html


Best Regards,
Niyas Hameed
Atmel Technical Support Team
rpucl
Posts: 1
Joined: Fri Dec 12, 2014 4:27 pm

Re: ...where are all my asm instructions gone....?

Fri Dec 12, 2014 5:50 pm

Hello,

I bought an ATSAM4C board and would like to develop some stuff with it.

Many functions will be criticals and will need to be implemented in ASM. Since I will have to do many ASM code, inline functions might not be appropriate.

I would like to do a C project and call some ASM functions. I tried to use some instructions in my .s file, but I got the same problem as you, wondering why "ret" does not work etc....

Did you/somehone find how to do code in ASM with atmel studio 6 within a C project ?

Also, if someone can has a doc to mix C and ASM function, I would also appreciate. I'm kind of new to this field.

Thanks a lot.

Romain.
riakhan
Posts: 1
Joined: Fri Jan 23, 2015 9:35 am

Re: ...where are all my asm instructions gone....?

Fri Jan 23, 2015 9:39 am

How can I find out what the MCU are doing at the moment? Can I see/pinpoint the C-code line at which the MCU is currently executing? Which command do I give Atmel Studio to achieve this?


_____________________________________
Get free demos for a+ course exam and mcts security plus practice exams exam with security+ test guaranteed success. Our best quality  prepares you well before appearing in the final exams of www.bgsp.edu and mcts with Quincy University

Return to “Development Tools”

Who is online

Users browsing this forum: No registered users and 1 guest