Image dont boot with STK52xx

Hi,

I have the Board STK52xx from TQ with MPC5200. For building an OS
Image I have downloaded the BSP :

bsp-freescale-mgt5200-1.0.1-20043551543-qnx6.sh 1.0.1

Is this the right BSP, ther is another :
bsp-mgt5200-6.3.0-20041560847-qnx6.sh

Under $QNX_TARGET/ppcbe/boot/build there is a buildfile. With makeifs
-vvvv I made an image.ifs. I placed this Image to an TFTP Server on
my host. My target is loading this Image, but it dont boot. The
problem is Bad Magic Number. Have I perhaps used the wrong BSP, or
have I to say the Buildprocess where the Image is later placed
(address)? Is it possible that I have to use another command like
mksrec, I thik my image.ifs looks like srec.

Thanks, Stephan

Here is my host console:

U-Boot 1.1.2 (Dec 23 2004 - 09:00:50)
CPU: MPC5200 v1.2 at 396 MHz
Bus 132 MHz, IPB 132 MHz, PCI 66 MHz
Board: TQM5200 (TQ-Components GmbH)
on a STK52XX baseboard
I2C: 85 kHz, ready
DRAM: 64 MB
Top of RAM usable for U-Boot at: 04000000
Reserving 544k for U-Boot at: 03f78000
Reserving 192k for malloc() at: 03f48000
Reserving 68 Bytes for Board Info at: 03f47fbc
Reserving 64 Bytes for Global Data at: 03f47f7c
Stack Pointer at: 03f47f58
New Stack Pointer is: 03f47f58
Now running in RAM - U-Boot at: 03f78000
POST memory PASSED
FLASH: 32 MB
In: serial
Out: serial
Err: serial
U-Boot relocated to 03f78000
Net: FEC ETHERNET
POST i2c PASSED
POST cpu PASSED
IDE: Bus 0: not available
SRAM: 512 kB
VGA: SMI501 (Voyager) with 8 MB
PS/2: No device found
Kbd: reset failed, no ACK
Type “run flash_nfs” to mount root filesystem over NFS
Hit any key to stop autoboot: 0
Using FEC ETHERNET device

TFTP from server 192.168.100.219; our IP address is 192.168.100.218
Filename ‘image.ifs’.
Load address: 0x200000
Loading:
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################

done
Bytes transferred = 1829440 (1bea40 hex)

Booting image at 00200000 …

Bad Magic Number
=>

Stephan,

The “bsp-freescale-mgt5200-1.0.1-20043551543-qnx6.sh” BSP is matched with 6.3.0SP1 and the “bsp-mgt5200-6.3.0-20041560847-qnx6.sh” BSP is matched for 6.3.0. But regardless, this isn’t the problem you are seeing.

The MGT5200 BSP build file was set for loading from the dBUG monitor and uses a “srec” image format. The U-Boot monitor (in my experience), takes a “raw” image format.

You can change this in the build file on the line which reads:

[virtual=ppcbe,srec +compress]
to
[virtual=ppcbe,raw]

And assuming that the STK52xx doesn’t have different clock values or memory mappings from the MGT5200, it should just work for you.

Thanks,
-Jay.

sh263 wrote:

Hi,

I have the Board STK52xx from TQ with MPC5200. For building an OS
Image I have downloaded the BSP :

bsp-freescale-mgt5200-1.0.1-20043551543-qnx6.sh 1.0.1

Is this the right BSP, ther is another :
bsp-mgt5200-6.3.0-20041560847-qnx6.sh

Under $QNX_TARGET/ppcbe/boot/build there is a buildfile. With makeifs
-vvvv I made an image.ifs. I placed this Image to an TFTP Server on
my host. My target is loading this Image, but it dont boot. The
problem is Bad Magic Number. Have I perhaps used the wrong BSP, or
have I to say the Buildprocess where the Image is later placed
(address)? Is it possible that I have to use another command like
mksrec, I thik my image.ifs looks like srec.

Thanks, Stephan

Here is my host console:

U-Boot 1.1.2 (Dec 23 2004 - 09:00:50)
CPU: MPC5200 v1.2 at 396 MHz
Bus 132 MHz, IPB 132 MHz, PCI 66 MHz
Board: TQM5200 (TQ-Components GmbH)
on a STK52XX baseboard
I2C: 85 kHz, ready
DRAM: 64 MB
Top of RAM usable for U-Boot at: 04000000
Reserving 544k for U-Boot at: 03f78000
Reserving 192k for malloc() at: 03f48000
Reserving 68 Bytes for Board Info at: 03f47fbc
Reserving 64 Bytes for Global Data at: 03f47f7c
Stack Pointer at: 03f47f58
New Stack Pointer is: 03f47f58
Now running in RAM - U-Boot at: 03f78000
POST memory PASSED
FLASH: 32 MB
In: serial
Out: serial
Err: serial
U-Boot relocated to 03f78000
Net: FEC ETHERNET
POST i2c PASSED
POST cpu PASSED
IDE: Bus 0: not available
SRAM: 512 kB
VGA: SMI501 (Voyager) with 8 MB
PS/2: No device found
Kbd: reset failed, no ACK
Type “run flash_nfs” to mount root filesystem over NFS
Hit any key to stop autoboot: 0
Using FEC ETHERNET device

TFTP from server 192.168.100.219; our IP address is 192.168.100.218
Filename ‘image.ifs’.
Load address: 0x200000
Loading:
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################

done
Bytes transferred = 1829440 (1bea40 hex)

Booting image at 00200000 …

Bad Magic Number

Hi,

If you want to use the bootm command of u-boot, you must use the mkimage
tool (provided with U-Boot) on the
file created by mkifs.
In your build file, you must generate a raw image or an elf image:

[virtual=ppcbe/elf +compress] .bootstrap = {
startup…
PATH=/proc/boot procnto-600
}

Best regards

sh263 wrote:

Hi,

I have the Board STK52xx from TQ with MPC5200. For building an OS
Image I have downloaded the BSP :

bsp-freescale-mgt5200-1.0.1-20043551543-qnx6.sh 1.0.1

Is this the right BSP, ther is another :
bsp-mgt5200-6.3.0-20041560847-qnx6.sh

Under $QNX_TARGET/ppcbe/boot/build there is a buildfile. With makeifs
-vvvv I made an image.ifs. I placed this Image to an TFTP Server on
my host. My target is loading this Image, but it dont boot. The
problem is Bad Magic Number. Have I perhaps used the wrong BSP, or
have I to say the Buildprocess where the Image is later placed
(address)? Is it possible that I have to use another command like
mksrec, I thik my image.ifs looks like srec.

Thanks, Stephan

Here is my host console:

U-Boot 1.1.2 (Dec 23 2004 - 09:00:50)
CPU: MPC5200 v1.2 at 396 MHz
Bus 132 MHz, IPB 132 MHz, PCI 66 MHz
Board: TQM5200 (TQ-Components GmbH)
on a STK52XX baseboard
I2C: 85 kHz, ready
DRAM: 64 MB
Top of RAM usable for U-Boot at: 04000000
Reserving 544k for U-Boot at: 03f78000
Reserving 192k for malloc() at: 03f48000
Reserving 68 Bytes for Board Info at: 03f47fbc
Reserving 64 Bytes for Global Data at: 03f47f7c
Stack Pointer at: 03f47f58
New Stack Pointer is: 03f47f58
Now running in RAM - U-Boot at: 03f78000
POST memory PASSED
FLASH: 32 MB
In: serial
Out: serial
Err: serial
U-Boot relocated to 03f78000
Net: FEC ETHERNET
POST i2c PASSED
POST cpu PASSED
IDE: Bus 0: not available
SRAM: 512 kB
VGA: SMI501 (Voyager) with 8 MB
PS/2: No device found
Kbd: reset failed, no ACK
Type “run flash_nfs” to mount root filesystem over NFS
Hit any key to stop autoboot: 0
Using FEC ETHERNET device

TFTP from server 192.168.100.219; our IP address is 192.168.100.218
Filename ‘image.ifs’.
Load address: 0x200000
Loading:
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################

done
Bytes transferred = 1829440 (1bea40 hex)

Booting image at 00200000 …

Bad Magic Number

Hi, thanks for your help. Now I can boot the BSP. Another problem is
that the start adresses are different between the TQ and the
Freescale board, that is to change in the sources. What BSP is better
for my TQ board
bsp-freescale-mgt5200… ore bsp-mgt5200…? Do you know what the
difference is between the Freescale and the TQ board. I have bought a
CAN driver for the Freescale board and I want to work with the TQ
board. I thought it makes no different. I think the CAN controller is
complete in the MPC5200? Or are there some registers for CAN outside
the processor? So when I use the Freescale BSP although the Interrupt
have to be the same, its not important wheather I use TQ ore
Freescale?

Thanks and regards, Stephan

Stephan,

The two BSPs are for the same board, just for different versions of the OS. Either will give you what you need in order to run on a MPC5200 core - it will be up to you to modify your drivers to fit the needs of the TQ board.

Thanks,
-Jay.

sh263 wrote:

Hi, thanks for your help. Now I can boot the BSP. Another problem is
that the start adresses are different between the TQ and the
Freescale board, that is to change in the sources. What BSP is better
for my TQ board
bsp-freescale-mgt5200… ore bsp-mgt5200…? Do you know what the
difference is between the Freescale and the TQ board. I have bought a
CAN driver for the Freescale board and I want to work with the TQ
board. I thought it makes no different. I think the CAN controller is
complete in the MPC5200? Or are there some registers for CAN outside
the processor? So when I use the Freescale BSP although the Interrupt
have to be the same, its not important wheather I use TQ ore
Freescale?

Thanks and regards, Stephan

Jay Greig wrote:

Stephan,

The two BSPs are for the same board, just for different versions of the
OS. Either will give you what you need in order to run on a MPC5200
core - it will be up to you to modify your drivers to fit the needs of
the TQ board.

Stefan, just what I told you … :wink:
we have to adapt our DACHS-MSCAN driver for the MPC5200 to your TQ board.

It’s up to each hardware manufacturer how to map the CAN controller in
the I/O area, how to handle the external interface of the tranceivers,
the clock-rate of the processor, etc. … that means the driver must be
simply adapted.

Cheers,
Jutta


Thanks,
-Jay.

sh263 wrote:

Hi, thanks for your help. Now I can boot the BSP. Another problem is
that the start adresses are different between the TQ and the
Freescale board, that is to change in the sources. What BSP is better
for my TQ board
bsp-freescale-mgt5200… ore bsp-mgt5200…? Do you know what the
difference is between the Freescale and the TQ board. I have bought a
CAN driver for the Freescale board and I want to work with the TQ
board. I thought it makes no different. I think the CAN controller is
complete in the MPC5200? Or are there some registers for CAN outside
the processor? So when I use the Freescale BSP although the Interrupt
have to be the same, its not important wheather I use TQ ore
Freescale?

Thanks and regards, Stephan

Hi Jay,
thanks so I use the newer Version.
Regards Stephan

Hallo Frau Steinhoff,
danke für Ihre Antwort. Denken Sie wirklich, ich kanns fast nicht
glauben g. Das CAN Interface ist komplett im Prozessor. Das erste
CAN Register ist BASE_ADDR + irgendwas. Der Offset ist immer gleich.
Die Basisadresse ist
u.U. etwas anders. Steht die fest in Ihrem Treiber, oder kann man die
durch ein Propertiyfile setzen?
Der Prozessortakt müsste doch auch egal sein. Ihr Treiber schreibt
doch in Register und wartet auf Interrupts.
Viele Grüße, Stephan

sh263 wrote:

Hi Jay,
thanks so I use the newer Version.
Regards Stephan

Hallo Frau Steinhoff,
danke fuer Ihre Antwort. Denken Sie wirklich, ich kanns fast nicht
glauben g. Das CAN Interface ist komplett im Prozessor. Das erste
CAN Register ist BASE_ADDR + irgendwas. Der Offset ist immer gleich.
Die Basisadresse ist u.U. etwas anders. Steht die fest in Ihrem
Treiber, oder kann man die durch ein Propertiyfile setzen?
Der Prozessortakt muesste doch auch egal sein. Ihr Treiber schreibt
doch in Register und wartet auf Interrupts.
Viele Gruesse, Stephan

Hello Stephan,

first of all, this is an English speaking NG, so please write in English
:wink:

You are right, the MPC5200 processor has 2 MSCAN controllers, but it
doesn’t mean that they are handled in every hardware design in the same way.

The base address is dependent of the hardware design and is fixed via
the BSP-configuration.
Propertyfiles make no sense in this case as there are still too many
other parameters which are important.

With ‘mapping’ is not meant simple ‘I/O mapping’, I was talking about
‘mapping’ of CAN-signals to GPIO- or PSCx-ports … and that’s dependent
of the hardware design!!

  • Do you think the clock rate of the processor doesn’t matter?
    It’s not the case as the bus clock is dependent of it and the bus clock
    defines the bit-timing-parameters… and when not knowing these clock
    rates, you can’t send or receive CAN frames :wink:

  • Do you think the driver writes simply in registers and waits for
    interrupts?
    Oh noooo, … it’s not as easy as that :slight_smile:

Unfortunately for de-multiplexing of PPC interrupts is often used a CPLD
which has to be initialized. Additional the CPLD is used often for
setting signal levels on the transceivers as e.g. in the Total5200 Box
from Motorola/Freescale.

Please have in mind that the TQ-Board doesn’t have only the MPC5200 and
a ‘little bit’ memory :wink:

We are supporting many different CAN controllers on boards from various
vendors as well as on customized boards. Believe me, we know about what
we are talking when telling you that the MSCAN driver must be adapted
:wink:

Cheers,
Jutta

Hi Jutta, ok i see. So we have to buy a board from freescale, or to
pay for the CAN portion for the tq board. I think we will try the
cheaper way. Its a big adventure for only a master thesis but I learn
a lot -:),
so thanks a lot for your help, have a nice day, regards Stephan

sh263 wrote:

Hi Jutta, ok i see. So we have to buy a board from freescale, or to
pay for the CAN portion for the tq board. I think we will try the
cheaper way. Its a big adventure for only a master thesis but I learn
a lot -:),
so thanks a lot for your help, have a nice day, regards Stephan

Hi Stephan,
we have agreed with TQ Components to support fieldbuses on their
hardware, too. So e.g. DACHS-MSCAN for STK52xx will be available in ~ 1
month what’s very late for you as you lost already much time and want to
speed up with your master thesis …
BTW, the price for the C-Developer’s Seat will be the same like for the
Lite5200 EVB or the Total5200 Box, and DACHS-MSCAN eval. CDs will be
added to the STK52xx at next, too.

Have a nice weekend,
Jutta

Hi Jutta,

thanks for your answer. Have a nice day, regards Stephan