 | Discussion Forum |  |
|
|
PROBLEM WHILE INSERTING ASM CODE INTO C FILESNext Thread | Thread List | Previous Thread Start a Thread | Settings | Details | Message |
|---|
Read-Only Author PADMANABHAM HAMSA Posted 27-Dec-2003 07:51 GMT Toolset C51 |  PROBLEM WHILE INSERTING ASM CODE INTO C FILES PADMANABHAM HAMSA Hello, Iam facing problem with inserting asm code into my c file, what i did is I have opend new project and target controller is at89c51, and added following c file to project. *************************************** #pragma SRC #pragma LARGE
#include <stdio.h> #include <intrins.h> #include <at89x51.h>
void main(void) { #pragma asm MOV A,#21H JMP $ #pragma endasm }
******************************* the above was the sample file, i am trying to learn inline asm
then i press F7 compiler shows some error like src control to be active.
then i right click on my .c file and i activated "Assemble SRC file" option the shows error following. ******************* *** FATAL ERROR L210: I/O ERROR ON INPUT FILE: EXCEPTION 0021H: PATH OR FILE NOT FOUND FILE: D1.OBJ ******************* then again i right click on my .c file and i activated "Generate Assemble SRC file" option then while compiling shows error is
******************** C51 FATAL-ERROR - ACTION: PRASING INVOKE-/#PRAGMA -LINE LINE: #pragma SRC ERROR: RESPECIFIED OR CONFLICTING CONTROL. ********************
Why the above was happening, is any thing i am doing wrong?. Please help me Regarding above.
THANKING YOU, PADMANABHAM | | Read-Only Author Andy Neil Posted 27-Dec-2003 12:42 GMT Toolset C51 |  RE: PROBLEM WHILE INSERTING ASM CODE INTO C FILES Andy Neil
*** FATAL ERROR L210: I/O ERROR ON INPUT FILE:
EXCEPTION 0021H: PATH OR FILE NOT FOUND
FILE: D1.OBJ As I keep on repeating, you just have to read the message literally: http://www.keil.com/forum/docs/thread3511.asp http://www.keil.com/forum/docs/thread3531.asp
The first thing to note is that it's a Linker message - you can see that in the uVision Output window because it comes after "linking..." (the 'L' in the error number - L210 - also identifies it as a Linker message)
Therefore, the Compiler & Linker have both done their stuff. Did they give you any errors or warnings? If so, you must resolve them first. There's no point trying to resolve Linker errors when the Compiler and/or Linker have already told you that there's problems earlier in the process!
Now to the actual message: "PATH OR FILE NOT FOUND; FILE: D1.OBJ" As I said - just read this literally: it's looking for a file (or path) "D1.OBJ", and it couldn't find it! Obvious, eh?!
Presumably, your earlier translations should've created this from one of your source files? So, either they didn't create it, or they put it in the wrong place and/or gave it the wrong name.
You can take it from here... | | Read-Only Author PADMANABHAM HAMSA Posted 27-Dec-2003 12:56 GMT Toolset C51 |  RE: PROBLEM WHILE INSERTING ASM CODE INTO C FILES PADMANABHAM HAMSA sir, i have not found the answer to my problem that you suggested two threads, My problem is i want to insert asm code in c file as i writen in above post, my code(programming) is correct or not if not what is the correction to my code for inserting inline asm code(inserting asm code in to c file) please help me. PADMANABHAM | | Read-Only Author Andy Neil Posted 27-Dec-2003 13:38 GMT Toolset C51 |  RE: PROBLEM WHILE INSERTING ASM CODE INTO C FILES Andy Neil "i have not found the answer to my problem that you suggested two threads"
They do not answer the problem for you - they tell you how to solve it yourself!
Why did I cite those threads? I said: "As I keep on repeating, you just have to read the message literally"
The cited threads merely illustrate the fact that I keep repeating: you just have to read the message literally
I then gave you step-by-step instructions on how to do that for one of the messages you gave. Have you followed those steps? Have you found the D1.OBJ file, or determined why it is missing? | | Read-Only Author PADMANABHAM HAMSA Posted 28-Dec-2003 14:57 GMT Toolset C51 |  RE: PROBLEM WHILE INSERTING ASM CODE INTO C FILES PADMANABHAM HAMSA Sir, This is true that file d1.obj does not exists in that folder, i think the reason is that when compiling very first time the errors are comming and is giving "Target not created" message. and for that reason only i have suspected my code/compiling sequence/method. Then i asked help me on is code is fault or compiling method problem. on my first post. still i am confused. And i have tried a removing first two lines ie. #pragma SRC, #pragma LARGE and put tick mark for Genrerate asm src file options then compiled. This time ok but warning comes is unresolved external ?c_startup etc. but program works fine. Any way thanks for helping and i am very sorry for taking your valueble time, becasue of i am not expert in c programming and also in ENGLISH LANGUAGE to discuss with other people who knows english only.
PADMANABHAM | | Read-Only Author Andy Neil Posted 1-Jan-2004 23:05 GMT Toolset C51 |  RE: PROBLEM WHILE INSERTING ASM CODE INTO C FILES Andy Neil "unresolved external ?c_startup"
http://www.keil.com/support/docs/1980.htm
Note: I found that by simply cutting "unresolved external ?c_startup" from your post, and pasting it into the 'Search' function on this very site: http://www.keil.com/support/search.asp
That's always a good place to start with any problem! | |
Next Thread | Thread List | Previous Thread Start a Thread | Settings |
|