PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : probleme: Basic-Stamp2-Compiler (bstamp) & Linux



nomad
20-12-2004, 15:16
betr: probleme: Basic-Stamp2-Compiler (bstamp) & Linux

hi leute,
hoffentlich bin ich da richtig?
da ich mich mit den BasicStamps von Parallax beschaeftige,
fand ich amerikanischen Linux-Journal(Jan.2005 issue 129)
einen hinweis, dass man auch mit linux basicStamps2 programmieren
kann:
unter: www.linuxjournal.com/article/7741
fand ich = bstamp-2004.05.15

vielleicht hat schon von euch, erfahrungen damit????

installation auszug aus readme.txt:
" the following commands will allow you to install the bstamp utilities:
Extract the bstamp program source code to a directory, and move into
directory.

> make clean
> make
> cp bstamp_run /usr/local/bin
> cp bstamp_tokenizer /usr/local/bin
> cp tokenizer.so /usr/local/lib/libbstamptokenizer.so
das ging alles glatt

das compilieren der source gemaes readme.txt:
also
1 - First, create a program for your BASIC Stamp using the PBASIC language.
2 - Save the PBASIC code as an plain ASCII text file. (e.g., "hello.bs2")
3 - run the "bstamp_tokenize" program on the PBASIC code.
bstamp_tokenize hello.bs2 hello.tok
== libbstamptokenizer.so: cannot open shared object file:
No such file or directory: Success
PBASIC Tokenizer Library version 1.16
ein *.tok-file wurde erzeugt
4 - bstamp_run hello.tok
Error: No BASIC Stamp identified!
Probably the stamp isn't connected, perhaps your stamp version isn't supported?
Try looking at the help, try 'bstamp_run -h' for more information.

jetzt faengt das problem an:
bei der installation wird im readme.txt
folgendes vorgeschlagen:
zitat: if necessary, make the com1 serial port
> MAKEDEV /dev/ttyS0
Then you must make a symbolic link to the proper serial port.
This can be done with:
> ln -s /dev/ttyS0 /dev/bstamp

Das "MAKEDEV" geht bei mir (Suse 9.1. prof) eindeutig nicht.
und das device bstamp ist bei mir leer?????
da sollte vermutlich mit makedev ein device namens bstamp
erzeugt werden.

frage: wie kann ich dieses device erzeugen.

in den mailinglisten ist wohl ein problem mit "Error: No BASIC Stamp identified!"
vorhanden, es bezieht sich meiner meinung aber nur darauf, dass nur BS2-controller
erkannt werden...

waere um jede hilfe und jede erfahrung dankbar,
mfg nomad

Joghurt
20-12-2004, 16:16
Der Linker findet die neue Bibliothek nicht, die du nach /usr/local/lib kopiert hast.

Die Library-Datenbank der Linkers muss noch aktualisert werden.
1. Stelle sicher, dass in der /etc/ld.so.conf das Verzeichnis /usr/local/lib mit eingetragen ist, wenn nicht, füge es ein
2. Starte als root /sbin/ldconfig

Das sollte es dann gewesen sein.

nomad
21-12-2004, 15:36
hi,
vielen dank fuer deine antwort.
werds morgen frueh mal ausproblieren.
mfg nomad

nomad
22-12-2004, 10:09
hi,
hab dass so gemacht wie du es vorgeschlagen hast:
ss. unten.
ergebnis: Error

unten ist das help-file vom bstamp:
auszug
"If the serial port doesn't work, you might try 'MAKEDEV /dev/ttyS0'
You may need to be root to accomplish this, try 'su' to become root.
When done with MAKEDEV and creating the symlink, type exit."

also muesste etwas wie Makedev gemacht werden.

denn, die serielle schnittstelle ist ok
kann mit windows den stamp programmieren
und bekomm mit linux via ttyS0 den output auf den screen,
-----------------------------------------------------------------------
ausschnitt aus: der /etc/ld.so.conf
/usr/i386-suse-linux/lib
/usr/local/lib
/usr/openwin/lib
-----------------------------------------------------------------------

2. Starte als root /sbin/ldconfig
nach meiner meinung ok
-----------------------------------------------------------------------
dann nochmals alles wie schon gestern beschrieben also
no 1
linux:/Develop/BS2Compiler/bstamp-2004.05.
15 # make clean
rm bstamp_run
rm bstamp_tokenize
rm *.o
# make
g++ -c -o bstamp_tokenize.o bstamp_tokenize.cpp
g++ -Wall bstamp_tokenize.o -o bstamp_tokenize -ldl
g++ -c -o bstamp_run.o bstamp_run.cpp
bstamp_run.cpp:3:1: warning: "_GNU_SOURCE" redefined
<command line>:4:1: warning: this is the location of the previous definition
g++ -Wall bstamp_run.o -o bstamp_run

linux:/Develop/BS2Compiler/bstamp-2004.05.15
# cp bstamp_run /usr/local/bin

linux:/Develop/BS2Compiler/bstamp-2004.05.15
# cp bstamp_tokenize /usr/local/bin

linux:/Develop/BS2Compiler/bstamp-2004.05.15
# cp tokenizer.so /usr/local/lib/libbstamptokenizer.so

linux:/Develop/BS2Compiler/bstamp-2004.05.
# ln -s /dev/ttyS0 /dev/bstamp
----------------------------------------------------------------------
erstellen des .tok-files

bstamp_tokenize hello.bs2 hello.tok
PBASIC Tokenizer Library version 1.16

dann der fehler:
bstamp_run hello.tok
Error: No BASIC Stamp identified!
Probably the stamp isn't connected,
perhaps your stamp version isn't supported?
Try looking at the help,
try 'bstamp_run -h' for more information.

weitere ideen?????
mfg nomad
--------------------------------------------------------------------------------------------------
help-file:

# bstamp_run -h

Basic Stamp Linux Programmer / Debugger

This program is used to program and run a basic stamp.
Before it can be used, some simple setup must be done (see below).
For more information about the Basic Stamp, see http://www.parallax.com

This is a modified version of bstamp available at http://bstamp.sourceforge.net
Options:
-h or -? : this help listing
-v : the program version
-a : about the program (brief history)
-s : use stdin instead of INFILE.TOK
alternately, to use stdin do not include any other arguments.

The basic stamp must be plugged into a local serial (COM) port.
Examples here use /dev/ttyS0 as the serial port,.
but you may need to use something else (like /dev/ttyS1).
A symlink named 'bstamp' in /dev must point to the com port you wish to use.
This can be done with 'ln -s /dev/ttyS0 /dev/bstamp'.
If the serial port doesn't work, you might try 'MAKEDEV /dev/ttyS0'
You may need to be root to accomplish this, try 'su' to become root.
When done with MAKEDEV and creating the symlink, type exit.

You must include a tokenized program when calling this program.
First run 'bstamp_tokenize INFILE.TXT OUTFILE.TOK' to make the tokenized program.
Next run 'cat INFILE.TOK | bstamp_run'

Standard Usage: bstamp_run INFILE.TOK
Or:
cat INFILE.TOK | bstamp_run
Or:
cat INFILE.BS2 | bstamp_tokenizer | bstamp_run
---------------------------------------------------------------------

Joghurt
22-12-2004, 14:22
1. ldconfig erst aufrufen, nachdem die Libraries in /usr/local/lib kopiert wurden. Ist hier aber nicht das problem

2. Hast du das ln -s /dev/ttyS0 /dev/bstamp ausgeführt?

3. An welchem COM-Port hängt denn dein Device? COM1 ist ttyS0, COM2 ist ttyS1
Versuch es also nochmal mit ttyS1:
rm /dev/bstamp
ln -s /dev/ttyS1 /dev/bstamp

nomad
22-12-2004, 15:23
hi,
AUOTE:
1. ldconfig erst aufrufen, nachdem die Libraries in /usr/local/lib kopiert wurden. Ist hier aber nicht das problem
== ja,

2. Hast du das ln -s /dev/ttyS0 /dev/bstamp ausgeführt?

== auch ja

3. An welchem COM-Port hängt denn dein Device? COM1 ist ttyS0, COM2 ist ttyS1
Versuch es also nochmal mit ttyS1:
Code:
rm /dev/bstamp
ln -s /dev/ttyS1 /dev/bstamp

== versuch ich, aber das komische daran ist, dass ich nem linux-pgm (ttyS0) vom stamp lesen kann.
auch mein winlaptop ist auf com1 eingestellt, der stamp auch.
vierlen dank fuer die antwort
mfg nomad