Tuesday, January 24, 2006

 

Tips for the week: Jan 24 2006

Q: How do I find out quickly what boards are supported for my release?

A: Depends on the OSE release. For OSE4.5.2, cd to $OSE_ROOT// and look for directories starting with "bsp-". You can check in the examples as well:
cd $OSE_ROOT/examples/common/make
grep on bsp within select_cpu_and_bsp.mk
Filter this grep for BOARD and also PLATFORM strings.
See also
powerpc/doc/bsp.txt
although this is probably not an updated list. In 4.5.2 there is new documentation in the online help for DDA User's Guide in Core->DDA User. There doesn't appear to be a DDA Reference Guide. However, the nuts and bolts appear to be described within Platform Services -> BSP User and -> BSP Reference.

In OSE4.6 the supported bsps were moved into the refsys/boards directory. Unsupported boards were moved over to /contrib. Also some of the code was shuffled around and moved to refsys/common/core_supervisor.c .


Q: I want to use one of my own BSPs, or one in the /contrib directory.


A: You must not define BOARD variable in userconf.mk for this purpose. (OSE4.5.2) See note within examples/bsp/make/userconf.mk for explanation.


Q: I'm trying out my first real board, after using sfk for a while. I put # at the beginning of my lines in rtose.conf (rtose4.conf, rtose5.conf etc) in order to comment them, but now I get errors when I build. What is wrong?

--- Preprocessing configuration file rtose4.conf
rtose4.conf:80:2: invalid preprocessing directive #ntp
rtose4.conf:81:2: invalid preprocessing directive #ntp
make[1]: *** [obj/rtose_debug/rtose4.conf] Error 1
--- Error building RTOSE(debug) for mbx860

A: Well guess what. You're in a different realm now and those # directives don't work anymore (!) In the case of hard target .conf files, you comment the lines that you don't want read using conventional /* */ C style commenting. Haven't tried the inline style // but don't count on it!


Q: I'm migrating to OSE4.6 which seems different from 4.5.2 and the older 4.x releases. Where is the /examples directory?

A: It's moved under /contrib. This is where stuff ends up when engineering decides it's not going to be officially supported anymore. However, don't look to be able to easily compile examples here now - once you're here in this release, stuff doesn't just compile anymore with dmake. You'll hit errors related to dmake being unable to find crt0 - due to the new heirarchy nothing works as before. (Probably this is by design.)

Q: OH???? Well... I need to find an example of [widget] that works in OSE4.6. The configuration is different and I need to get a look at the modified form. Where is that?

A: Hard to say. If you want examples for most common stuff - e.g. NTP, Emanate, INET etc they're all still there but moved to $OSE_ROOT/refsys/modules now. In order to add them you have to compile them as a load module and load them in or compile it into the kernel. For the latter case, you have an additional step of adding a MODS entry to your rtose.mk file for your refsys target:
override MODS += name
where is the name of the directory residing under modules which has the cool option you'd like your refsys build to include.

Q: Compiling the sfk-win32 for the first time, I am unable to get it working because I don't have MS Visual Studio or MS Visual C compiler, and the build is choking on cl.exe .

A: If you don't have Visual C already installed with the cl.exe compiler etc, you might want to install it in a root-level directory without spaces. It is much easier to use it for refsys. Otherwise the existing directory has to be moved to one without spaces. Then edit the file:
$OSE_ROOT/refsys/compilers/msvc.mk
and change the value of MSVCROOT ?= to point to your MSVC/VC98 directory or wherever your sub-toplevel is. You should also run the batch file used to set the environment for MSVC:
MSVC/VC98/bin/vcvars32.bat
Wait - you're still not done though. If you get an error about "msbpd60.dll missing" you'll need to copy over that .dll file from the neighboring MSVC directory MSVC/common into MSVC/VC98/bin directory. Now all should be working for you to compile the sfk-win32.

Q: I gave up on Visual C a long time ago, and I'd like to use gcc. I understand there's a gcc option to compile sfk-win32 - is that true?

A: Certainly, although this requires a change to the file:
refsys/rtose/sfk-win32/rtose.mk
where you must declare the COMPILER = gcc_soft.mk
And you'll most likely also have to change the file:
refsys/compilers/gcc_soft.mk
to set the GCCROOT = to the proper directory. DON'T TRY TO USE THE GCC3.4.2 SHIPPED WITH OSE5.1 . It doesn't work. You will get millions of errors on a 4.6 sfk-win32 build. Stick with your native gcc, you'll be much happier.

Tuesday, January 17, 2006

 

Tips for the week: Jan 16 2006

Q: How do I test the SNMP utilities shipped with Emanate Lite? (getone, getmany etc)

A: First you need to have an agent running. (OSE4.5.2 example)
$OSE_ROOT/examples/emanate_lite/obj/MOTO*/emanate_lite.elf
Get this going on a target and verify ose_snmp process is running.

Then ensure your host environment is correct:
$ env | grep SR
SR_MGR_CONF_DIR=C:\OSE\OSE5.1\cygwin\etc\srconf\mgr
ll $SR_MGR_CONF_DIR
-rw-r--r-- 1 Administ None 663 Jan 12 15:36 mgr.cnf
-rw-r--r-- 1 Administ None 75916 Jan 13 10:37 snmpinfo.dat

Now you can issue a basic host command using getone:
$OSE_ROOT/3part/emanate_lite/md5nodes/w32.bin/getone.exe

Use args for SNMPv1 and SNMPv2:
getone -v1 10.11.1.20 public sysDescr.0
getone -v2c 10.11.1.20 public sysDescr.0

Both these should return same:
sysDescr.0 = SNMPv1/SNMPv2c/SNMPv3 agent from SNMP Research, Inc.

You can try out the SNMPv3 version but it requires authentication. If you know the password, try it!


Q: Okay I tried it all out, but it doesn't work. I get this error:

OpenConfigFile: Can't open C:\OSE\OSE5.1\cygwin\etc\srconf\mgr/snmpinfo.dat for
reading: No such file or directory
at line 192 in file k_fileio.c
Failure in snmpinfo.dat

A: This means your environment isn't right. You need to set up the SR_MGR_CONF_DIR variable to point somewhere that exists (preferable within /etc/srconf), and you need to have at a minimum mgr.cnf and snmpinfo.dat files. Both are included with the Emanate Lite distribution within OSE in $OSE_ROOT/3part/md5nodes/config/mgr/ directory. You will find several versions of snmpinfo.dat elsewhere as well.


Q: I didn't even get that far, I got this error:
retrying . . .
at line 185 in file getone.c

A: That's even worse - means your host is not communicating with your target running the agent. Check the connection with the target.


Q: Okay, I'm not really using the OSE demo but I still need to run a quick test. How can I find fields in the code that are relevant and which I can use with host commands like getone?

A: Check in the source files for something like this:
"community public 0.0.0.0 read 4",

The "community" tells you this is a SNMPv1 entry, and the "public" is the community username. A common MIB-2 object every system has to implement is sysDescr.0 so you can use that for the test variable_name .

This page is powered by Blogger. Isn't yours?

free web hit counter
free invisible web counter