BSP issue - programs don't seem to be loading

I’m relatively new to QNX.

I’ve got a board we designed. Very similar to the Icecube Reference Board.
I’ve taken the Icecube BSP stuff, and modified it for my board.

We’re running 6.2.1B with a PowerPC 5200.

It gets through the IPL and the Startup code. It loads the kernel, the
kernel starts, it executes builtin kernel functions like display_msg and
waitfor.

The problem is that when I try to run any program, it does not seem to load.
The first thing I do is write some values to SRAM that will there after a
reset.
I still see the values that I wrote during the IPL. I’ve also tried turning
on the
LEDs on the board (both of these through a pointer from mmap_device_memory).

It fails on the devc driver, on a small program I wrote, and on slogger.

Any ideas what I’m doing wrong? It seems like it’s probably something in
the
boot header but the values are very similar to the ones on the Icecube
board.


Here’s the build script - most of the harder things like networking are
commented out:
###########################################################################

Neutrino on a JTRS Eval

###########################################################################

original was image=0x20000

#[virtual=ppcbe,srec +compress] .bootstrap = {

#[virtual=ppcbe,srec] .bootstrap = {

#[ram=0x00020000-0x07ffffff]

[image=0x00020000]

[virtual=ppcbe,srec +compress] .bootstrap = {

startup-jtrs -v

PATH=/proc/boot procnto-600 -vvv

}

[+script] .script = {

display_msg Welcome to QNX Neutrino on the JTRS Eval Board

display_msg Loading devc-serpsc with 33MHz clock

waitfor /dev/xx 1


\

Serial driver for Motorola Lite5200 EVB Version 2.0

#devc-serpsc -c 132000000 -u 1 -e -F -S -b 115200 &

devc-serpsc -c 32768000 -u 1 -e -F -S -b 115200 0xf0002000,65 &

devc-cmf -c 32768000 -u 1 -e -F -S -b 115200 0xf0002000,65 &

display_msg Waiting for ser1 to appear


waitfor /dev/ser1

reopen /dev/ser1


leds 3

display_msg “After PSC load”

These env variables inherited by all the programs which follow

SYSNAME=nto

TERM=qansi

HOME=/

TZ=EST5EDT4

I’m setting this here to try to get momentix to run 12/22/03 -cmf

LD_LIBRARY_PATH=./:/proc/boot:/usr/lib:/usr/local/lib

SHELL=/bin/ksh

LOGNAME=root



slogger -l /tmp/slog &

pipe

display_msg “After slogger and pipe”

\

PCI driver

pci-mgt5200

waitfor /dev/pci

display_msg “After PCI”

display_msg Starting Flash Driver

Flash driver

devf-mgt5200 -s 0xff800000,8M,0,8M,64K

devf-cmf -s 0xff800000,8M,0,8M,64K -r -b5 -u2 -t1 &

waitfor /usr/lib

waitfor /bin

waitfor /sbin

waitfor /etc

display_msg Flash Driver Initialized

Network driver

Setup Best Comm (DMA) for on-board ethernet driver

parameters from 6.2.1a motorola build file

display_msg Starting Bestcomm DMA driver

bestcomm5200

bestcomm5200 -n 6 -m ff

display_msg Starting up on-board ethernet with Large stack and cache -
144.177.209.210

io-net -c1 -ptcpip cache=1 -dmpc5200 mac=0001af520130 -v

io-net -c1 -ptcpip cache=1 -dcmf mac=0001af520130 -v

waitfor /dev/io-net/en0 4

ifconfig en0 147.177.209.210 netmask 255.255.240.0

route add default 147.177.208.1

display_msg Network Started.

USB driver

devu-ohci-mgt5200 -a0xf0001000 -i38

/bin/mqueue &

display_msg Starting Momentics programs

/bin/pdebug 10000 &

qconn

display_msg Start the run control script.

[+session] /proc/boot/ksh /proc/boot/rc

display_msg Starting Shell

[+session] PATH=/proc/boot:/bin:/etc ksh &

}

[type=link] /dev/console=/dev/ser1

[type=link] /usr/lib/ldqnx.so.2=/proc/boot/libc.so.2

[type=link] /tmp=/dev/shmem

[type=link] /bin/sh=/proc/boot/ksh

[type=link] /bin/ksh=/proc/boot/ksh

[type=link] /bin/cat=/proc/boot/cat

[type=link] /bin/cp=/proc/boot/cp

[type=link] /bin/ls=/proc/boot/ls

[type=link] /bin/slay=/proc/boot/slay

[type=link] /bin/fs-cifs=/proc/boot/fs-cifs

[type=link] /bin/route=/proc/boot/route

[type=link] /bin/ifconfig=/proc/boot/ifconfig

[type=link] /bin/ping=/proc/boot/ping

[type=link] /bin/pidin=/proc/boot/pidin

[type=link] /bin/sloginfo=/proc/boot/sloginfo

[type=link] /bin/io-net=/proc/boot/io-net

[type=link] /bin/pipe=/proc/boot/pipe

[type=link] /bin/pdebug=/proc/boot/pdebug

[type=link] /bin/qconn=/proc/boot/qconn

[type=link] /bin/flashctl=/proc/boot/flashctl

[type=link] /usr/lib/libsocket.so.2=/proc/boot/libsocket.so.2

[type=link] /usr/lib/libm.so.2=/proc/boot/libm.so.2

#[type=link] /usr/local/lib/libcpp.so.2=/usr/lib/libcpp.s0.2

#[type=link] /usr/local/bin/netconfig=/proc/boot/netconfig

[perms=+r,+x]

[+keeplinked]

libc.so

fpemu.so.2

libm.so.2

[data=c]

devc-cmf

devc-serpsc

pci-mgt5200

leds

#

## uncomment for Network driver

libsocket.so.2

npm-tcpip.so

libdma-bestcomm5200.so.1

devn-mpc5200.so

devn-cmf.so

#

## uncomment for Network driver

bestcomm5200

io-net

ifconfig

ping

#

## uncomment for Flash driver

devf-mgt5200

devf-cmf

#devf-cmf2

flashctl

startup-jtrs

#

## uncomment for USB driver

# devu-ohci-mgt5200

# usb

#

## general commands

#

# 12/16/03 added cat -cmf

cat

cp

ls

pidin

ksh

pci

pipe

slogger

sloginfo

slay

route

pdebug

qconn

fs-cifs



# 12/16/03 added scripts -cmf

/proc/boot/bootup.ksh = {

if [[ -a /etc/bootup.ksh ]]; then

/etc/bootup.ksh

fi

}



/proc/boot/rc = {

echo Type this to access NT: "fs-cifs -a -l //sc077270:147.177.6.184:/temp
/nt"

# /etc/bootup.ksh is gone.

#if [[ ! -e /etc/bootup.ksh ]]; then

# ln -s /etc/bootup.config.ksh /etc/bootup.ksh

#fi

# This gives you a shell in case

# /etc/rc is gone.

if [[ -e /etc/rc ]]; then

echo /etc/rc path

.. /etc/profile

exec /proc/boot/ksh /etc/rc

else

echo while loop path

.. /etc/profile

/etc/bootup.ksh

while /bin/true; do

/proc/boot/ksh

done

/bin/shutdown -v -S system

fi

}

Chris Fischer <cfischer@harris.com> wrote:

I’m relatively new to QNX.

I’ve got a board we designed. Very similar to the Icecube Reference Board.
I’ve taken the Icecube BSP stuff, and modified it for my board.

We’re running 6.2.1B with a PowerPC 5200.

It gets through the IPL and the Startup code. It loads the kernel, the
kernel starts, it executes builtin kernel functions like display_msg and
waitfor.

The problem is that when I try to run any program, it does not seem to load.
The first thing I do is write some values to SRAM that will there after a
reset.
I still see the values that I wrote during the IPL. I’ve also tried turning
on the
LEDs on the board (both of these through a pointer from mmap_device_memory).

Hi Chris,

I notice that you’ve commented out all the calls to start the serial
driver, but you still have some waitfor /dev/ser* calls there. I’d
remove those as well.

If you place commands like ‘pidin’ or ‘ls’ in your build script, those
should execute without a serial driver running, using the debug callouts,
just like the display_msg calls. If they execute normally,
and you see output from them, then that indicates that processes can
load correctly, and perhaps it’s a serial driver problem. If they don’t
execute, it may be a memory issue. Check your init_raminfo.c file,
and make sure you’re not specifying more DRAM than is actually present
on the board. If that’s not the problem, it could be a DRAM initialization
issue in your IPL. Is the DRAM exactly the same as on the Icecube board?
If not, then the DRAM init code in the IPL may need to be reworked.


It fails on the devc driver, on a small program I wrote, and on slogger.

Any ideas what I’m doing wrong? It seems like it’s probably something in
the
boot header but the values are very similar to the ones on the Icecube
board.



Here’s the build script - most of the harder things like networking are
commented out:
###########################################################################

Neutrino on a JTRS Eval

###########################################################################

original was image=0x20000

#[virtual=ppcbe,srec +compress] .bootstrap = {

#[virtual=ppcbe,srec] .bootstrap = {

#[ram=0x00020000-0x07ffffff]

[image=0x00020000]

[virtual=ppcbe,srec +compress] .bootstrap = {

startup-jtrs -v

PATH=/proc/boot procnto-600 -vvv

}

[+script] .script = {

display_msg Welcome to QNX Neutrino on the JTRS Eval Board

display_msg Loading devc-serpsc with 33MHz clock

waitfor /dev/xx 1


Serial driver for Motorola Lite5200 EVB Version 2.0

#devc-serpsc -c 132000000 -u 1 -e -F -S -b 115200 &

devc-serpsc -c 32768000 -u 1 -e -F -S -b 115200 0xf0002000,65 &

devc-cmf -c 32768000 -u 1 -e -F -S -b 115200 0xf0002000,65 &

display_msg Waiting for ser1 to appear



waitfor /dev/ser1

reopen /dev/ser1



leds 3

display_msg “After PSC load”

These env variables inherited by all the programs which follow

SYSNAME=nto

TERM=qansi

HOME=/

TZ=EST5EDT4

I’m setting this here to try to get momentix to run 12/22/03 -cmf

LD_LIBRARY_PATH=./:/proc/boot:/usr/lib:/usr/local/lib

SHELL=/bin/ksh

LOGNAME=root



slogger -l /tmp/slog &

pipe

display_msg “After slogger and pipe”


PCI driver

pci-mgt5200

waitfor /dev/pci

display_msg “After PCI”

display_msg Starting Flash Driver

Flash driver

devf-mgt5200 -s 0xff800000,8M,0,8M,64K

devf-cmf -s 0xff800000,8M,0,8M,64K -r -b5 -u2 -t1 &

waitfor /usr/lib

waitfor /bin

waitfor /sbin

waitfor /etc

display_msg Flash Driver Initialized

Network driver

Setup Best Comm (DMA) for on-board ethernet driver

parameters from 6.2.1a motorola build file

display_msg Starting Bestcomm DMA driver

bestcomm5200

bestcomm5200 -n 6 -m ff

display_msg Starting up on-board ethernet with Large stack and cache -
144.177.209.210

io-net -c1 -ptcpip cache=1 -dmpc5200 mac=0001af520130 -v

io-net -c1 -ptcpip cache=1 -dcmf mac=0001af520130 -v

waitfor /dev/io-net/en0 4

ifconfig en0 147.177.209.210 netmask 255.255.240.0

route add default 147.177.208.1

display_msg Network Started.

USB driver

devu-ohci-mgt5200 -a0xf0001000 -i38

/bin/mqueue &

display_msg Starting Momentics programs

/bin/pdebug 10000 &

qconn

display_msg Start the run control script.

[+session] /proc/boot/ksh /proc/boot/rc

display_msg Starting Shell

[+session] PATH=/proc/boot:/bin:/etc ksh &

}

[type=link] /dev/console=/dev/ser1

[type=link] /usr/lib/ldqnx.so.2=/proc/boot/libc.so.2

[type=link] /tmp=/dev/shmem

[type=link] /bin/sh=/proc/boot/ksh

[type=link] /bin/ksh=/proc/boot/ksh

[type=link] /bin/cat=/proc/boot/cat

[type=link] /bin/cp=/proc/boot/cp

[type=link] /bin/ls=/proc/boot/ls

[type=link] /bin/slay=/proc/boot/slay

[type=link] /bin/fs-cifs=/proc/boot/fs-cifs

[type=link] /bin/route=/proc/boot/route

[type=link] /bin/ifconfig=/proc/boot/ifconfig

[type=link] /bin/ping=/proc/boot/ping

[type=link] /bin/pidin=/proc/boot/pidin

[type=link] /bin/sloginfo=/proc/boot/sloginfo

[type=link] /bin/io-net=/proc/boot/io-net

[type=link] /bin/pipe=/proc/boot/pipe

[type=link] /bin/pdebug=/proc/boot/pdebug

[type=link] /bin/qconn=/proc/boot/qconn

[type=link] /bin/flashctl=/proc/boot/flashctl

[type=link] /usr/lib/libsocket.so.2=/proc/boot/libsocket.so.2

[type=link] /usr/lib/libm.so.2=/proc/boot/libm.so.2

#[type=link] /usr/local/lib/libcpp.so.2=/usr/lib/libcpp.s0.2

#[type=link] /usr/local/bin/netconfig=/proc/boot/netconfig

[perms=+r,+x]

[+keeplinked]

libc.so

fpemu.so.2

libm.so.2

[data=c]

devc-cmf

devc-serpsc

pci-mgt5200

leds

uncomment for Network driver

libsocket.so.2

npm-tcpip.so

libdma-bestcomm5200.so.1

devn-mpc5200.so

devn-cmf.so

uncomment for Network driver

bestcomm5200

io-net

ifconfig

ping

uncomment for Flash driver

devf-mgt5200

devf-cmf

#devf-cmf2

flashctl

startup-jtrs

uncomment for USB driver

devu-ohci-mgt5200

usb

general commands

12/16/03 added cat -cmf

cat

cp

ls

pidin

ksh

pci

pipe

slogger

sloginfo

slay

route

pdebug

qconn

fs-cifs
[/quote]

[quote]# 12/16/03 added scripts -cmf

/proc/boot/bootup.ksh = {

if [[ -a /etc/bootup.ksh ]]; then

/etc/bootup.ksh

fi

}
[/quote]

[quote]/proc/boot/rc = {

echo Type this to access NT: “fs-cifs -a -l //sc077270:147.177.6.184:/temp
/nt”

/etc/bootup.ksh is gone.

#if [[ ! -e /etc/bootup.ksh ]]; then

ln -s /etc/bootup.config.ksh /etc/bootup.ksh

#fi

This gives you a shell in case

/etc/rc is gone.

if [[ -e /etc/rc ]]; then

echo /etc/rc path

. /etc/profile

exec /proc/boot/ksh /etc/rc

else

echo while loop path

. /etc/profile

/etc/bootup.ksh

while /bin/true; do

/proc/boot/ksh

done

/bin/shutdown -v -S system

fi

}
[/quote]

David Green (dgreen@qnx.com)
QNX Software Systems Ltd.
http://www.qnx.com

>

“Dave Green” <dgreen@qnx.com> wrote in message
news:bvlk3u$4of$1@inn.qnx.com

Chris Fischer <> cfischer@harris.com> > wrote:
I’m relatively new to QNX.

I’ve got a board we designed. Very similar to the Icecube Reference
Board.
I’ve taken the Icecube BSP stuff, and modified it for my board.

We’re running 6.2.1B with a PowerPC 5200.

It gets through the IPL and the Startup code. It loads the kernel, the
kernel starts, it executes builtin kernel functions like display_msg and
waitfor.

The problem is that when I try to run any program, it does not seem to
load.
The first thing I do is write some values to SRAM that will there after
a
reset.
I still see the values that I wrote during the IPL. I’ve also tried
turning
on the
LEDs on the board (both of these through a pointer from
mmap_device_memory).

Hi Chris,

I notice that you’ve commented out all the calls to start the serial
driver, but you still have some waitfor /dev/ser* calls there. I’d
remove those as well.

I was leaving that in to make sure everything got out the serial port
before the system crashed.

If you place commands like ‘pidin’ or ‘ls’ in your build script, those
should execute without a serial driver running, using the debug callouts,
just like the display_msg calls. If they execute normally,
and you see output from them, then that indicates that processes can
load correctly, and perhaps it’s a serial driver problem. If they don’t
execute, it may be a memory issue.

I tried ls last week - same result. Mysterious hang.
my raminfo just has :
add_ram(0x00000000, MEG(128));



I removed an emulator dependency, and now it starts from a power-on.

Still crashes, but gives me more info. Now on any program load I get a:

Process 2 (devc-serpsc) terminated SIGILL code=1 fltno=2 ip=fe364cac
mapaddr=00

Which is a lot more info, but I’m still trying to figure out what is causing
the SIGILL.


Check your init_raminfo.c file,
and make sure you’re not specifying more DRAM than is actually present
on the board. If that’s not the problem, it could be a DRAM initialization
issue in your IPL. Is the DRAM exactly the same as on the Icecube board?
If not, then the DRAM init code in the IPL may need to be reworked.


It fails on the devc driver, on a small program I wrote, and on slogger.

Any ideas what I’m doing wrong? It seems like it’s probably something
in
the
boot header but the values are very similar to the ones on the Icecube
board.


Here’s the build script - most of the harder things like networking are
commented out:

###########################################################################

Neutrino on a JTRS Eval



###########################################################################

original was image=0x20000

#[virtual=ppcbe,srec +compress] .bootstrap = {

#[virtual=ppcbe,srec] .bootstrap = {

#[ram=0x00020000-0x07ffffff]

[image=0x00020000]

[virtual=ppcbe,srec +compress] .bootstrap = {

startup-jtrs -v

PATH=/proc/boot procnto-600 -vvv

}

[+script] .script = {

display_msg Welcome to QNX Neutrino on the JTRS Eval Board

display_msg Loading devc-serpsc with 33MHz clock

waitfor /dev/xx 1


\

Serial driver for Motorola Lite5200 EVB Version 2.0

#devc-serpsc -c 132000000 -u 1 -e -F -S -b 115200 &

devc-serpsc -c 32768000 -u 1 -e -F -S -b 115200 0xf0002000,65 &

devc-cmf -c 32768000 -u 1 -e -F -S -b 115200 0xf0002000,65 &

display_msg Waiting for ser1 to appear


waitfor /dev/ser1

reopen /dev/ser1


leds 3

display_msg “After PSC load”

These env variables inherited by all the programs which follow

SYSNAME=nto

TERM=qansi

HOME=/

TZ=EST5EDT4

I’m setting this here to try to get momentix to run 12/22/03 -cmf

LD_LIBRARY_PATH=./:/proc/boot:/usr/lib:/usr/local/lib

SHELL=/bin/ksh

LOGNAME=root



slogger -l /tmp/slog &

pipe

display_msg “After slogger and pipe”

\

PCI driver

pci-mgt5200

waitfor /dev/pci

display_msg “After PCI”

display_msg Starting Flash Driver

Flash driver

devf-mgt5200 -s 0xff800000,8M,0,8M,64K

devf-cmf -s 0xff800000,8M,0,8M,64K -r -b5 -u2 -t1 &

waitfor /usr/lib

waitfor /bin

waitfor /sbin

waitfor /etc

display_msg Flash Driver Initialized

Network driver

Setup Best Comm (DMA) for on-board ethernet driver

parameters from 6.2.1a motorola build file

display_msg Starting Bestcomm DMA driver

bestcomm5200

bestcomm5200 -n 6 -m ff

display_msg Starting up on-board ethernet with Large stack and cache -
144.177.209.210

io-net -c1 -ptcpip cache=1 -dmpc5200 mac=0001af520130 -v

io-net -c1 -ptcpip cache=1 -dcmf mac=0001af520130 -v

waitfor /dev/io-net/en0 4

ifconfig en0 147.177.209.210 netmask 255.255.240.0

route add default 147.177.208.1

display_msg Network Started.

USB driver

devu-ohci-mgt5200 -a0xf0001000 -i38

/bin/mqueue &

display_msg Starting Momentics programs

/bin/pdebug 10000 &

qconn

display_msg Start the run control script.

[+session] /proc/boot/ksh /proc/boot/rc

display_msg Starting Shell

[+session] PATH=/proc/boot:/bin:/etc ksh &

}

[type=link] /dev/console=/dev/ser1

[type=link] /usr/lib/ldqnx.so.2=/proc/boot/libc.so.2

[type=link] /tmp=/dev/shmem

[type=link] /bin/sh=/proc/boot/ksh

[type=link] /bin/ksh=/proc/boot/ksh

[type=link] /bin/cat=/proc/boot/cat

[type=link] /bin/cp=/proc/boot/cp

[type=link] /bin/ls=/proc/boot/ls

[type=link] /bin/slay=/proc/boot/slay

[type=link] /bin/fs-cifs=/proc/boot/fs-cifs

[type=link] /bin/route=/proc/boot/route

[type=link] /bin/ifconfig=/proc/boot/ifconfig

[type=link] /bin/ping=/proc/boot/ping

[type=link] /bin/pidin=/proc/boot/pidin

[type=link] /bin/sloginfo=/proc/boot/sloginfo

[type=link] /bin/io-net=/proc/boot/io-net

[type=link] /bin/pipe=/proc/boot/pipe

[type=link] /bin/pdebug=/proc/boot/pdebug

[type=link] /bin/qconn=/proc/boot/qconn

[type=link] /bin/flashctl=/proc/boot/flashctl

[type=link] /usr/lib/libsocket.so.2=/proc/boot/libsocket.so.2

[type=link] /usr/lib/libm.so.2=/proc/boot/libm.so.2

#[type=link] /usr/local/lib/libcpp.so.2=/usr/lib/libcpp.s0.2

#[type=link] /usr/local/bin/netconfig=/proc/boot/netconfig

[perms=+r,+x]

[+keeplinked]

libc.so

fpemu.so.2

libm.so.2

[data=c]

devc-cmf

devc-serpsc

pci-mgt5200

leds

uncomment for Network driver

libsocket.so.2

npm-tcpip.so

libdma-bestcomm5200.so.1

devn-mpc5200.so

devn-cmf.so

uncomment for Network driver

bestcomm5200

io-net

ifconfig

ping

uncomment for Flash driver

devf-mgt5200

devf-cmf

#devf-cmf2

flashctl

startup-jtrs

uncomment for USB driver

devu-ohci-mgt5200

usb

general commands

12/16/03 added cat -cmf

cat

cp

ls

pidin

ksh

pci

pipe

slogger

sloginfo

slay

route

pdebug

qconn

fs-cifs

12/16/03 added scripts -cmf

/proc/boot/bootup.ksh = {

if [[ -a /etc/bootup.ksh ]]; then

/etc/bootup.ksh

fi

}

/proc/boot/rc = {

echo Type this to access NT: “fs-cifs -a -l
//sc077270:147.177.6.184:/temp
/nt”

/etc/bootup.ksh is gone.

#if [[ ! -e /etc/bootup.ksh ]]; then

ln -s /etc/bootup.config.ksh /etc/bootup.ksh

#fi

This gives you a shell in case

/etc/rc is gone.

if [[ -e /etc/rc ]]; then

echo /etc/rc path

. /etc/profile

exec /proc/boot/ksh /etc/rc

else

echo while loop path

. /etc/profile

/etc/bootup.ksh

while /bin/true; do

/proc/boot/ksh

done

/bin/shutdown -v -S system

fi

}

David Green (dgreen@qnx.com)
QNX Software Systems Ltd.
http://www.qnx.com[/quote]

>