Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
BroadcastCommunity.qnx.com will be offline from May 31 6:00pm until June 2 12:00AM for upcoming system upgrades. For more information please go to https://community.qnx.com/sf/discussion/do/listPosts/projects.bazaar/discussion.bazaar.topc28418
Forum Topic - Problems Debugging Target with BDI on mpc8313: (5 Items)
   
Problems Debugging Target with BDI on mpc8313  
Hi,

we are trying to load a QNX image to our target (mpc8313) RAM, then starting the image. We attempt this using the 
BDI2000.

We cross checked the image by loading it via UBoot, it works on that eval board. When loading it with the BDI it crashes
 during boot, so there seems to be a major difference between the UBoot setup and the way our BDI does the setup 
(according to the BDI config file).

The BDI succeeds in stopping the CPU, it then setups the RAM at 0x0 etc... It is possible to load the QNX image to 
address 0x200000, and it verifies all right (using the BDI "verify" commmand). We are using the RAW image format, loaded
 using BDI with the "BIN" argument:
  load 0x200000 image.raw BIN

When starting the image using "go 0x200000", the following happens:
- qnx kernel messages are _not_ displayed on the serial console
- after sthe bsh script starts the serial drivers, the display_msg calls are displayed properly
- slogger and pipe start correctly as it seems
- as soon as I try to start any other driver (network, etfs, ...) the system freezes at that point. According to GDB, 
when halting, the PC is somewhere around 0xFExxxxxx - which is not valid memory!

I'm wondering how & why the CPU jumps there... usually, starting at 0xFExxxxxx the NOR memory is mapped, but why should 
it jump there? After all, this is not an image tailored to NOR boot, but a general image that can be loaded via NAND, 
TFTP or NOR... (verified to work with those three methods).

By the way, MBAR is set to 0xe0000000, just as QNX expects... so this should not be the problem?

Greetings
 Marc
Re: Problems Debugging Target with BDI on mpc8313  
Marc Roessler wrote:
> Hi,
> 
> we are trying to load a QNX image to our target (mpc8313) RAM, then starting the image. We attempt this using the 
BDI2000.
> 
> We cross checked the image by loading it via UBoot, it works on that eval board. When loading it with the BDI it 
crashes during boot, so there seems to be a major difference between the UBoot setup and the way our BDI does the setup 
(according to the BDI config file).
> 
> The BDI succeeds in stopping the CPU, it then setups the RAM at 0x0 etc... It is possible to load the QNX image to 
address 0x200000, and it verifies all right (using the BDI "verify" commmand). We are using the RAW image format, loaded
 using BDI with the "BIN" argument:
>   load 0x200000 image.raw BIN
> 
> When starting the image using "go 0x200000", the following happens:
> - qnx kernel messages are _not_ displayed on the serial console
> - after sthe bsh script starts the serial drivers, the display_msg calls are displayed properly
> - slogger and pipe start correctly as it seems
> - as soon as I try to start any other driver (network, etfs, ...) the system freezes at that point. According to GDB, 
when halting, the PC is somewhere around 0xFExxxxxx - which is not valid memory!
> 
> I'm wondering how & why the CPU jumps there... usually, starting at 0xFExxxxxx the NOR memory is mapped, but why should it jump there? After all, this is not an image tailored to NOR boot, but a general image that can be loaded via NAND, TFTP or NOR... (verified to work with those three methods).
> 
> By the way, MBAR is set to 0xe0000000, just as QNX expects... so this should not be the problem?
> 

What is the gdb version you are using?

I remember there was a bug we had to fix in order to get gdb 
to work correctly with BDI2000. If you are not using it 
already, I would suggest downloading the latest gdb.

I do not claim this would solve issues you are seeing, but 
latest gdb should work better, and hopefully help.


---
Aleksandar Ristovski
Re: Problems Debugging Target with BDI on mpc8313  
Hi Alex,

we are not using GDB for this, we are controlling the BDI2000 using its telnet interface...
We have quite some problems with the documented debug process (using BDI2000 and gdb), the image doesn't start properly 
at all there... will try a newer GDB for that, thanks.

However, this only improves diagnosis, the original problem remains: I'm unable to load QNX to RAM, then jump there... :
(

Thanks & Greetings,
 Marc
Re: Problems Debugging Target with BDI on mpc8313  
I think the basic question it all boils down to is:
what registers does QNX require to be set when it's started as a pre-requisite?
Does anyone happen to know this?

Greetings,
 Marc
Re: Problems Debugging Target with BDI on mpc8313  
Marc Roessler wrote:
> I think the basic question it all boils down to is:
> what registers does QNX require to be set when it's started as a pre-requisite?
> Does anyone happen to know this?
> 

I don't, but this forum is for the toolchain 
(gcc/binutils/gdb) mostly... I think it is better to ask 
this question in 'general-community' or 'OS'. There you may 
get answer sooner.


Thanks,

Aleksandar