m52233demo

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

m52233demo

Jump to solution
1,381 Views
jonasb
Contributor I

hey, I'm new here, I want to use multiple demo boards as a client to sent data to a server pc but I dont have a clue to start. I can not chance the flash software in the board. And I don't know how to implement the stack in the board.

 

Please help.

It's for education purpose.

my email: jonas.baert@student.katho.be

Labels (1)
0 Kudos
1 Solution
350 Views
RichTestardi
Senior Contributor II

If you just want to get a telnet(ish) client running on the M52233DEMO and talk to it with a command-line, I have a skeleton source code project that you might have luck starting from.

 

It is at: http://www.cpustick.com/downloads/skeleton.zip

 

You'll need CW 7.1 installed, and then open project.mcp, select the Skeleton 52233 target, and build it.  You can then edit skeleton/skeleton.c to intercept the command-line requests.  Then flash it to the DEMO board.

 

You connect to the M52233DEMO board using a telnet/hyperterm to raw TCP/IP port 1234 at the board's DHCP address.

 

If you want something even simpler, you can just flash StickOS to the DEMO board (download from http://www.cpustick.com/downloads.htm) and run it and then log into the MCU using telnet/hyperterm as above.

 

With StickOS, you can then write a BASIC program to manipulate the 52233 pins/peripherals right in your terminal emulator, save it, run it, and collect data, etc., and send it back to your PC thru "print" statements...

 

For example, to gather accelerometer data is simply:

 

<Enter>

Welcome to StickOS for Freescale MCF52233 v1.50j!
Copyright (c) 2008; all rights reserved.
info:
http://www.cpustick.com
bugs: support@cpustick.com
(checksum 0xa8eb)
> 10 dim x as pin an4 for analog input
> 20 dim y as pin an5 for analog input
> 30 dim z as pin an6 for analog input
> 40 dim gsel1 as pin gpt0 for digital output
> 50 dim gsel2 as pin gpt1 for digital output
> 60 dim wake as pin gpt2 for digital output
> 70 let gsel1 = 0
> 80 let gsel2 = 0
> 90 let wake = 1
> 100 while 1 do
> 110   print "x =", x, "; y =", y, "; z =", z
> 120   sleep 1 s
> 130 endwhile
> run
x = 2028 ; y = 1591 ; z = 2707
x = 1830 ; y = 1845 ; z = 2599
x = 1810 ; y = 1852 ; z = 2606
x = 1811 ; y = 1851 ; z = 2581
x = 1794 ; y = 1879 ; z = 2593

<Ctrl-C>
STOP at line 120!
>

 

You can also connect to either the skeleton project or StickOS using the DEMO board's RS232 connection -- just set your terminal emulator to 9600 baud, 8 data bits, no parity, and xon/xoff flow control.  Press <Enter> to get a command prompt.

 

You can get an infinite amount of documentation on StickOS here: http://www.cpustick.com/index.htm

 

And there is an introduction post here:

http://forums.freescale.com/freescale/board/message?board.id=CFCOMM&message.id=5125#M5125

 

-- Rich

 

View solution in original post

0 Kudos
2 Replies
350 Views
J2MEJediMaster
Specialist I

You can download the free Special Edition of CodeWarrior for ColdFire from this web site. It's limited, but can compile enough code so that you can experiment and learn what to do. Also, the installation has code examples that you can study. Specifically, you want to study the startcf.c file, which does the stack setup and run-time environment initialization. HTH.

 

---Tom

0 Kudos
351 Views
RichTestardi
Senior Contributor II

If you just want to get a telnet(ish) client running on the M52233DEMO and talk to it with a command-line, I have a skeleton source code project that you might have luck starting from.

 

It is at: http://www.cpustick.com/downloads/skeleton.zip

 

You'll need CW 7.1 installed, and then open project.mcp, select the Skeleton 52233 target, and build it.  You can then edit skeleton/skeleton.c to intercept the command-line requests.  Then flash it to the DEMO board.

 

You connect to the M52233DEMO board using a telnet/hyperterm to raw TCP/IP port 1234 at the board's DHCP address.

 

If you want something even simpler, you can just flash StickOS to the DEMO board (download from http://www.cpustick.com/downloads.htm) and run it and then log into the MCU using telnet/hyperterm as above.

 

With StickOS, you can then write a BASIC program to manipulate the 52233 pins/peripherals right in your terminal emulator, save it, run it, and collect data, etc., and send it back to your PC thru "print" statements...

 

For example, to gather accelerometer data is simply:

 

<Enter>

Welcome to StickOS for Freescale MCF52233 v1.50j!
Copyright (c) 2008; all rights reserved.
info:
http://www.cpustick.com
bugs: support@cpustick.com
(checksum 0xa8eb)
> 10 dim x as pin an4 for analog input
> 20 dim y as pin an5 for analog input
> 30 dim z as pin an6 for analog input
> 40 dim gsel1 as pin gpt0 for digital output
> 50 dim gsel2 as pin gpt1 for digital output
> 60 dim wake as pin gpt2 for digital output
> 70 let gsel1 = 0
> 80 let gsel2 = 0
> 90 let wake = 1
> 100 while 1 do
> 110   print "x =", x, "; y =", y, "; z =", z
> 120   sleep 1 s
> 130 endwhile
> run
x = 2028 ; y = 1591 ; z = 2707
x = 1830 ; y = 1845 ; z = 2599
x = 1810 ; y = 1852 ; z = 2606
x = 1811 ; y = 1851 ; z = 2581
x = 1794 ; y = 1879 ; z = 2593

<Ctrl-C>
STOP at line 120!
>

 

You can also connect to either the skeleton project or StickOS using the DEMO board's RS232 connection -- just set your terminal emulator to 9600 baud, 8 data bits, no parity, and xon/xoff flow control.  Press <Enter> to get a command prompt.

 

You can get an infinite amount of documentation on StickOS here: http://www.cpustick.com/index.htm

 

And there is an introduction post here:

http://forums.freescale.com/freescale/board/message?board.id=CFCOMM&message.id=5125#M5125

 

-- Rich

 

0 Kudos