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.
A: Depends on the OSE release. For OSE4.5.2, cd to $OSE_ROOT/
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
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.
free invisible web counter