Running mpc8548cds "Welcome to CodeWarrior" sample project in QEMU

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Running mpc8548cds "Welcome to CodeWarrior" sample project in QEMU

1,817 Views
demiban_diaz
Contributor II

i'm trying to run the sample "Welcome to CodeWarrior" project for the mpc8548cds in qemu with this command:

qemu-system-ppc -M mpc8544ds -cpu MPC8548 -kernel hello_world-core00.elf  -serial stdio -net nic,model=e1000 -net user

but i'm getting the following error:

rom: requested regions overlap (rom phdr #1: Desktop/hello_world-core00.elf. free=0x00000000000018d8, addr=0x0000000000000000)

rom loading failed

I've used this same command to run a kernel zimage for the mpc8548cds and it worked.

I'm building the project in windows 7 64 bit with codewarrior 10.5.0 and running qemu in ubuntu 14.04 with virtual box.

Can anyone help me with this?

0 Kudos
8 Replies

1,092 Views
qian_tang
Contributor I

hello,i meet the problem too,i observe the elf segment using  '''readelf  -l  INTC_SW-ram.elf:1555918085.png

why PhysAddr is null? In qemu ,the api(rom_check_and_register_reset) not pass,Can anyone help me with this?

0 Kudos

1,092 Views
marius_grigoras
NXP Employee
NXP Employee

Hi,

Have you tried the ROM target or the RAM target of the 8548CDS project in CW? Never tried qemu, but from the error seems that is requesting the ROM project and not the RAM one.

Thank you,

Marius

0 Kudos

1,092 Views
lunminliang
NXP Employee
NXP Employee

Hello Marius,

Do you think this is possible? I never heard of a way like this on QEMU, I suppose a target board is a must here?

Regards

Lunmin

0 Kudos

1,092 Views
marius_grigoras
NXP Employee
NXP Employee

Hi Lunmin,

Never tried to run a bare-metal application using qemu. I think is possible (at least for the ROM target - because is a stand-alone application - all initialization stuff is already included in the code). Mostly, somebody with more experience on this side should have the final answer.

On a short quick on the command used, I think the parameters are incorrect ( -kernel hello_world-core00.elf - the qemu is trying to match some kernel specific sections and that's why will show that error).

Thank you,

Marius

0 Kudos

1,092 Views
demiban_diaz
Contributor II

Bare metal software can be run in qemu. I've done it for ARM using this guide:

Hello world for bare metal ARM using QEMU | Freedom Embedded

so i'm trying to do the same for mpc8548 since qemu also supports it.

i think i need to do some changes in the startup code or the linker file from the code warrior example but don't know what specific changes I would need to make.

i did replicate this succesfully for the mpc8548 based on this guide:

Booting Linux with U-Boot on QEMU ARM | Freedom Embedded

just changed the command for this one:

qemu-system-ppc -M mpc8544ds -cpu MPC8548 -kernel zImage -initrd rootfs.img -append "root=/dev/ram rdinit=/bin/sh"  -serial stdio -net nic,model=e1000 -net user

i think it may work,  just need to figure out how to configure the linker and start up code for the codewarrior sample projects.

what you guys think?

0 Kudos

1,092 Views
marius_grigoras
NXP Employee
NXP Employee

You can make a try with the ROM target but using the .bin file instead of the elf file (from your ARM guide I see that is used a bin file and not an elf)

For generating the bin file go to Project Properties > C/C++ Build > Settings > PowerPC Linker > Output > from Generate Binary File tab select One

8548CDS-core00.bin will be displayed in the ROM folder in the stationary CW project.

Regards,

Marius

0 Kudos

1,092 Views
demiban_diaz
Contributor II

I've done that but gives me this error:

qemu: could not load kernel 'hello_world-core00.bin'

the elf is the one it tries to load.

0 Kudos

1,092 Views
demiban_diaz
Contributor II

i've changed to ROM target and still getting the same error.

Do you think i need to make changes in the address to the rom linker file.

0 Kudos