MPC885 BSP Problems

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

MPC885 BSP Problems

4,060 Views
termita
Contributor I
good morning:
 
 
Today i installed mpc885 bsp from metrowerks download site because I need a bsp for a 8xx with libc 2.2.1 or later.
 
Ok, with PCS i build the filesystem and rootfsdir was build fine. When i launch AppTRK.elf contained on bsp, segmentation fault appear on shell.
 
I can't run AppTRK.elf contained on bsp,always segmentation fault appear. Why?
 
 
thanks in advice
Labels (1)
0 Kudos
Reply
4 Replies

898 Views
marc_paquette
Contributor V

What CodeWarrior product and version are you using? What version of AppTRK is on your BSP? Can you determine what the address is of the seg fault?

Thanks.

Marc.

0 Kudos
Reply

898 Views
termita
Contributor I

i'm using codewarrior ide 5.7, and platform creation suite 3.0.1 Revision 1.

App don't show any message. Execution resumes:

# /usr/bin/AppTRK.elf :5005
Segmentation fault
#

At this point, i try to run using strace. We can see next messages:

 /usr/bin/strace /usr/bin/AppTRK.elf :5002
execve("/usr/bin/AppTRK.elf", ["/usr/bin/AppTRK.elf", ":5002"], [/* 6 vars */]) = 0
uname({sys="Linux", node="10.10.10.9", ...}) = 0
brk(0)                                  = 0x1003c164
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30016000
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("/lib/libthread_db.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0\024"..., 1024) = 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=30955, ...}) = 0
mmap(0xffdb000, 83756, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xffdb000
mprotect(0xffe0000, 63276, PROT_NONE)   = 0
mmap(0xffeb000, 20480, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xffeb000
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++

Other apps like ls, cp, etc works fine. Maybe a network layer problem? I try to run ping, and there is no error.

I hope this info will be usefull.

 

 

 

 

 

 

 

 

 

0 Kudos
Reply

898 Views
marc_paquette
Contributor V
I'm told that the AppTRK executable on your BSP probably needs to be rebuilt:
1. Make sure that you are using the 20040421 version of the bsp.  Lookat the bsp dir in /opt/Embedix/bsp to verify the date on the bsp dir.
cd <prj dir>/merge
2. untar the 885ADS_libthread.tar.gz: 
tar xzvf 885ADS_libthread.tar.gz
This will give you a merge/lib/ with some libthread stuff in it thatwill be placed in the root file system during the deploy.
3. Force rebuild gilbc in TW by right clicking on the glibc node andselect "force rebuild component"
4. Build (not force rebuild) the entire project: build --> build
5. Deploy to the target.  Make sure to have the deploy wizard rebuildthe file system so the new libthread stuff gets included.
7. On the target verify that the AppTRK.elf is running correctly by
# /usr/bin/AppTRK.elf
This should return something like this:
---------------------# /usr/bin/AppTRK.elfUsage: AppTRK.elf [-v] [:tcpport | serialdevice | '|']---------------------If you do not get the above response then it is not working correctly.If you get the above response then:
8. Start AppTRK for real: 
# /usr/bin/AppTRK.elf :1000 &
0 Kudos
Reply

898 Views
termita
Contributor I
i'm very pleased with you, thanks marc.
 
Ok, i verify the bsp version, and is 20050413. Sorry to avoid this info in previous messages.
 
Version of apptrk is:
 
Version 1.16 implementing MetroTRK API version 2.5
 
I'm going to follow your instructions, but i tried to rebuild glibc previously and lpc only have install methods. I'll adapt mpc860fads bsp glibc lpc for 885, decompress libpthread and rebuild glibc.
 
 
0 Kudos
Reply