Giovanni Lovato wrote:
> Maarten Brock wrote:
>> Giovanni,
>>
>> In the embedded world "Hello World" is usually replaced by the much 
>> more basic "Blinky" application which only blinks a LED. After you 
>> have done that you have verified that your processor at least starts 
>> up and runs your program. Then it is time to start thinking about 
>> more sophisticated stuff like "Hello World". Where would you expect 
>> the output by the way? On the other end of the wireless connection 
>> maybe?
> 
> I'm very new on the embedded world :)
>  To start, I would like to understand how to get a minimal application
> compiled for CC2430 and be able to get a feedback of its correctness
> when simulated with ucsim...

So, no hints or suggestions? I tried a code found on the net:

#include <stdio.h>
#include <8051.h>

void main (void)  {
  SCON  = 0x50; /* SCON: mode 1, 8-bit UART, enable rcvr */
  TMOD |= 0x20; /* TMOD: timer 1, mode 2, 8-bit reload */
  TH1   = 0xf3; /* TH1:  reload value for 2400 baud */
  TR1   = 1;    /* TR1:  timer 1 run */
  TI    = 1;    /* TI:   set TI to send first char of UART */

  printf("Hello, world!\n");

  while (1) {
    ;
  }
}

then compiled with `sdcc main.c' and tried to simulate:

# echo run | s51 -s/dev/pts/1 main.ihx

but I get no output on /dev/pts/1!
 What am I missing?

Thank you!

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to