Does anyone prog a SAM3s with GNU Assembler...

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

Does anyone prog a SAM3s with GNU Assembler...

Wed Jul 16, 2014 5:36 pm

...if Yes:
how can i use a c global var in assembler. E.G.

C Part:

Code: Select all

extern int _add(int a);
volatile int MyCValue;
int main (void){
	myValue = 10;
	result = _add(1);
ASM - Part

Code: Select all

.global _add
.extern MyCValue

.text
	_add:
		push	{r3, lr}
	??	add	r0, r0, #MyCValue ??
		pop	{r3, pc}
..as you can see....i´m at the beginning of it all ;)

if No:
please tell me why not .

Return to “Development Tools”

Who is online

Users browsing this forum: No registered users and 1 guest