[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Some beginner's questions
- Date: Fri, 06 Aug 1999 00:54:06 +0200
- From: corsepiu at faw.uni-ulm.de (Ralf Corsepius)
- Subject: Some beginner's questions
John Mills wrote:
> Hello -
> I have built RTEMS tools (sh-rtems-*) using 'bit' and rtems-4.0.0 using
> 'bit_rtems' under Gnu/Linux-2.2.5 (RH6.0), and the 'hello_world_c' example
> ('test.*') with apparent success. I will initially be targeting Hitachi's
> EDK7045F developer's board. My two next questions are:
> 1) How and from which directory should I invoke 'size_rtems' to get a scale
> for what was built, or is that appropriate at this stage?
IMO, this script is not worth the effort :-)
> 2) Where should I add code for a simple console, so it will be built into my
At the moment the drivers for on-cpu devices of the sh are below
The directory is named sh7032 because this was the processor we actually used
for porting RTEMS to the SH1.
In general, all drivers for on-chip devices of the sh1, should be compatible to
and reuseable on all variants of SH1, thus the name of this directory might be
I would suggest to use libcpu/sh/sh7032/<your-driver> as directory for the
driver, assuming that sh7230 should mean sh1.
> I have written serial I/O drivers as a stand-alone demo.
The SH port uses an approach that is different from all other ports of rtems.
Instead of having designated /dev/console we redirect /dev/console to other
serial devices, in a similar way a sym-link called /dev/console would point to
a serial device (eg. /dev/ttyS0) under unix. Which device to use as console is
specified via the define CPU_CONSOLE_DEVNAME.
I.e. to access your serial driver as /dev/console, add
-DCPU_CONSOLE_DEVNAME=\"/dev/your-device\" to CPU_CFLAGS in your BSPs
make/custom/*.cfg file or add #define CPU_CONSOLE_DEVNAME "/dev/your-device" to
your BSP's libbsp/sh/<your-bsp>/include/bsp.h
> I expect I need to touch the startup code as well as the console driver.
The standard approach is to start to write a BSP of your own if the code in
gensh1 doesn't match your requirements and can't be adapted by passing
suiteable CFLAGS etc. in make/custom/<your-bsp>.cfg.
I don't know the details about your board, so having to touch the startup code
might be possible, but I doubt you need to touch the console driver.
> found the 'no_bsp_console' example, but need to know where to put a
> filled-in version and to have it linked.
Forschungsinstitut fuer Anwendungsorientierte Wissensverarbeitung (FAW)
Helmholtzstr. 16, 89081 Ulm, Germany Tel: +49/731/501-8690
mailto:corsepiu at faw.uni-ulm.de FAX: +49/731/501-999