[okl4-developer] lcd simulation problem with okl4 sdk
Nelson Tam
nelson at ok-labs.com
Thu Mar 6 12:48:49 EST 2008
Hi Gabi,
On 05/03/2008, at 10:37 AM, Gabi Voiculescu wrote:
> I hope you can help me. My lcd simulation does not work.
> My goal is to understand the way I can access a physical address
> register from Iguana environment. (If anyone can show me some
> example to do that bare metal, I would appreciate it.)
OK. If you want to understand how OKL4 accesses physical address
registers, I suggest the timer driver is the best place to start
with. In particular, in drivers/s3c2410_timer/src, read
s3c2410_timer.dx and main.c. The first file defines register offsets
and names, from which generates register accessor functions.
See build/iguana/object/drivers_s3c2410_timer/src/s3c2410_timer.h.
main.c makes use of functions within.
> I started with a LCD driver (I can write and get feedback).
>
> I got my inspiration from the s3c2410_lcd.c example driver for the
> gta01 platform.
> I see however that there is no runnable demo for the lcd in current
> OKL4 release.
>
> I've started by porting the s3c2410_lcd driver to pxa, but
> simulation in skyeye hanged.
>
> So I got back to gta01 (the original platform) and saw the same
> problems.
>
> I use skyeye-124 compiled with gcc-4.1.2. I have verified that it
> works (can simulate with or without LCD) by running the arm
> testsuite (including the s3c2410 binary example that had an lcd
> peripheral).
>
>
> I have added the following to gta01.skyeye in tools/sim_config/
> lcd: state=on, type=s3c2410x, mod=gtk
>
> However I'm unable to successfully simulate the build resulting from
> either one of these commands. Simulation stops right before starting
> OKL4. I can't trigger the KDB console, if specified from the build
> line.
So if I'm understanding this correctly:
1. OKL4 and s3c2410_lcd driver are not modified.
2. The skyeye configuration is changed, only adding the lcd: line.
3. Simulation stops before OKL4 starts, and more importantly, before
the driver framework and LCD driver is loaded.
Wouldn't this suggest a problem with skyeye? We know for a fact that
skyeye can simulate s3c2410 with a few peripherals (timer and serial),
excluding the LCD. So if you've changed the skyeye config to enable
LCD, and the simulation hangs, I'd point my finger at skyeye.
> tools/build.py machine=gta01 project=iguana example=naming
> skyeye -c tools/sim_config/gta01.skyeye -e build/images/image.boot
>
> tools/build.py machine=gta01 project=iguana wombat=yes
> BUILD_DIR=build2
> skyeye -c tools/sim_config/gta01.skyeye -e build2/images/image.boot
>
> Is this platform buggy? Any way to fix it to run with Skyeye?
If you specifically want to experiment with the OpenMoko LCD device on
simulation, please use the QEMU simulator instead of skyeye. Here at
OKL we use both, depending on whether we want to test the LCD or not.
Here are a few pointers to get you started:
http://wiki.openmoko.org/wiki/OpenMoko_under_QEMU
http://wiki.openmoko.org/wiki/Using_QEMU_with_MokoMakefile
http://wiki.openmoko.org/wiki/OpenMoko_under_QEMU_on_Gentoo
http://wiki.openmoko.org/wiki/QEMU_command_line
Take note that when you run the qemu command, the -kernel argument
should point to your OKL4 image.elf.
Hope this helps,
--
(nt)
Nelson Tam
nelson at ok-labs.com
More information about the Developer
mailing list