Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
10/17/01 11:00
Read: times


 
#15760 - RE: Send a file through UART in assembly
seems Keil C51 compiler does not support ANSI C libruary such as fopen, fclose, fread....

Well, of course not: your average 8051 system doesn't even have an Operating System, let alone a file system!

If you want a file system on your 8051 target, you will have to implement it yourself - which will include providing library functions such as fopen, fclose, fread, etc to access it.
Or you'd have to obtain a 3rd-party file system (which would probably still require a lot of work to port to your target).

Also I cannot use standard C complier. Hex file generated by standard C compiler cannot run on microcontroller, right?

What do you mean by "standard?"

There are 2 things to consider for a Compiler (any compiler; also assemblers, etc):

1. The Host
A Compiler is itself just a software application, which needs a specific computer system to run on; this is called the Host system.

2. The Target
The output of a compiler is code which also needs a specific "computer system" to run on; this is called the Target system.

In the case where the Host and Target systems are the same, we call it a Native compiler.
Borland C++ Builder, MS Visual C, MS Visual Basic are all Native compilers: they are all Native to the IBM-PC architecture running certain versions of MS Windows (TM) on Intel x86 processors; ie, you need a Windows PC to run the compiler, and your generated code also needs a Windows PC - it won't run on UNIX, Linux, VAX/VMS, 8051, Apple, etc, etc, etc

In the case where the Host and Target systems are different, we call it a Cross compiler.
Keil is an example of a Cross compiler [1]: you need a Windows PC (the Host) to run the compiler, and your generated code needs an 8051 (the Target) to run on.

As you can imagine, there is a huge range of Cross Compilers to cope with all the vast array of both Hosts & Targets; eg, Keil have 3 different Cross Compilers targetted on 8051, C166, and 80251 processors.

[1] Actually Keil is a complete Cross-platform Tool set - Compiler, Assembler, Linker, etc, etc


List of 10 messages in thread
TopicAuthorDate
Send a file through UART in assembly            01/01/70 00:00      
RE: Send a file through UART in assembly            01/01/70 00:00      
RE: Send a file through UART in assembly            01/01/70 00:00      
RE: Send a file through UART in assembly            01/01/70 00:00      
RE: Cross-tools - PS            01/01/70 00:00      
RE: Send a file through UART in assembly            01/01/70 00:00      
RE: Send a file through UART in assembly            01/01/70 00:00      
RE: Send a file through UART in assembly            01/01/70 00:00      
RE: Send a file through UART in assembly            01/01/70 00:00      
query on serial communication            01/01/70 00:00      

Back to Subject List