Bsp and CPU porting

James Yates j.yates at quartzuk.com
Wed Nov 5 09:25:33 UTC 2003


I am new to RTEMS and am currently trying to perform a port for a custom Sh2 based board. I have used rtems-4.6.0pre5 as a starting point and downloaded and installed all the binaries needed according to the download helper on the website.

I have successfully peformed a build for the gensh2 target, so I know that my environment is setup correctly.
Next I looked at what SH2 cpus are supported. I am using a 7145 which is not in the list but is similar to the 7045, just with more peripherals. I copied the sh7045 dir in libcpu/sh naming it sh7145. I then went through this entire directory structure changing every reference of 7045 to 7145. I have added all extra functionality, changed register addresses etc as required.

   Next I copied the gensh2 directory in libbsp/sh naming this dir fu0018 again making sure any references to 7045 were changed to 7145.

I then copied the gensh2.cfg file in /make/custom namig this fu0018.cfg. Changing RTEMS_CPU_MODEL to sh7145 and RTEMS_BSP_FAMILY to fu0018.

I then configured a directory using the command:

mkdir build-rtems
cd build-rtems
../rtems-4.6.0pre5/configure --target=sh-rtems \
    --disable-posix --disable-networking --disable-cxx \
    --enable-rtemsbsp=fu0018 \
    --prefix=/opt/rtems/builds/fu0018

After this had finished, I entered the build-rtems directory and ran 'make all'.

After some time the build failed with :
make[4]: Entering directory `/opt/rtems/build-rtems/sh-rtems/c/fu0018/lib/libcpu'
Making preinstall in sh
make[5]: Entering directory `/opt/rtems/build-rtems/sh-rtems/c/fu0018/lib/libcpu/sh'
Making preinstall in sh7145
make[6]: Entering directory `/opt/rtems/build-rtems/sh-rtems/c/fu0018/lib/libcpu/sh/sh7145'
Makefile:338: *** missing separator.  Stop.
make[6]: Leaving directory `/opt/rtems/build-rtems/sh-rtems/c/fu0018/lib/libcpu/sh/sh7145'
make[5]: *** [preinstall-recursive] Error 1
make[5]: Leaving directory `/opt/rtems/build-rtems/sh-rtems/c/fu0018/lib/libcpu/sh'
make[4]: *** [preinstall-recursive] Error 1
make[4]: Leaving directory `/opt/rtems/build-rtems/sh-rtems/c/fu0018/lib/libcpu'
make[3]: *** [preinstall-recursive] Error 1
make[3]: Leaving directory `/opt/rtems/build-rtems/sh-rtems/c/fu0018'
make[2]: *** [fu0018] Error 1
make[2]: Leaving directory `/opt/rtems/build-rtems/sh-rtems/c'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/rtems/build-rtems/sh-rtems/c'
make: *** [all-recursive] Error 1

I figured that there was an error in my CPU port. I modified /make/custom/fu0018.cfg Changing RTEMS_CPU_MODEL back to sh7045 , performed the build steps again, which succeeded. So then I backed up my CPU port, copied the sh7045 directory again, renaming everything with 7045 in to 7145 but without modifying or changing any other code. Also changed fu0018.cfg back to use sh7145. Performed build process again and again it failed the same as above.

Does anyone have any ideas what I might have done wrong? Have I missed a reference in a file somewhere else in the tree. All I have done for the CPU is to rename header files in the format *7045*.h to *7145*.h and any references to these, but still it fails.

Any help would be gratefully received.

		James Yates



More information about the users mailing list