Hi, I want to write some subroutines with µVision3 in assembler and use this in my C-Funktions (Philips LPC2148). For example I have wrote(copied) this one:
//-------------------------------------------- //cpu_asm.asm //-------------------------------------------- NO_INT EQU 0xC0 AREA OSCPUSRSave, CODE PUBLIC __OSCPUSRSave __OSCPUSRSave PROC CODE32 MRS R0,CPSR ORR R1,R0,#NO_INT MSR CPSR_c,R1 MRS R1,CPSR AND R1,R1,#NO_INT CMP R1,#NO_INT BNE __OSCPUSRSave BX LR ENDP END //--------------------------------------------
After that i declared in a C-File:
extern void __OSCPUSRSave(void);
Now i get every time the error Message: ***Warning L123: UNRESOLVED EXTERNAL SYMBOLS and ***ERROR L128: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: __OSCPUSave?T ADDRESS: 000003AAH I think the linker have to find the procedur because i wrote: PUBLIC __OSCPUSRSave , but he didn't. I hope someone can help me, thanks.
Franjo,
I was wondering if this problem of yours is for some kind of RTOS for LPC2148? I have the same problems (I'm trying to port uC/OS-II using Keil). Did you solve your problems?
Thank you
BTW: where are you from? I'm from Slovenia
Hi,
yeah i'm from croatia and i have solved the problem. When you want to port µC/OS you can visit the homepage http://www.micrium.com. There you can find a lot of portations. I have writen a OSEK conform OS based on µC/OS 2 knowlage.
I have forgot how i solved my problem but here is the source code which i'm using now:
AREA OSCPU, CODE ... PUBLIC __OSCPUSRSave?A ... __OSCPUSRSave?A PROC CODE32 STMFD SP!, {R1} MRS R0,CPSR ORR R1,R0,#NO_INT MSR CPSR_c,R1 MRS R1,CPSR AND R1,R1,#NO_INT CMP R1,#NO_INT BNE __OSCPUSRSave?A LDMFD SP!, {R1} BX LR ENDP
When you have some other questions you can write me a mail. I hope it help you
"you can visit the homepage http://www.micrium.com. "
Note that the forum has included the full-stop in the hyperlink - so it won't work.
Presumably, it should be: http://www.micrium.com (seemed to take a very long tie to load the first time)
Seems to be the same as: www.ucos-ii.com/.../about.html
It still works.
"It still works."
So it does!
http://www.micrium.com./
Must just've been that it was taking so long that I gave up, and tried without the dot - and then got lucky!