Hi "what is your name",

On Fri, 2013-07-05 at 01:42 +0000, myungwoon go wrote:
> sample source with option 
> 
> #include <stdio.h>
> #include <stdlib.h>
> 
> static inline int putz()

Remove the "static inline" and your function is called
from and not included in to main().


> {
>     printf ("hello hello");
>     return 1;
> }
> 
> int main(void)

This should be "void main(void)".


> {
>     puts("!!!Hello World!!!");
>     putz();
>     return 0; // EXIT_SUCCESS;

An embedded program can not return because there is
nothing to return to, so substitute the return with
this :
        while(1)
        {
        }


> }

Also, your main code usually goes in between the brackets of
the while(1) instruction.

And do not forget that the puts() function needs an output
to put the data on, like the serial port. You need to provide
the code for that.

Roelof




------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to