Thanks for answer, but i already found my mistake. Trouble was in piece of
code where hardware has to be initialized, there was some mess with memory
pointers that's why status_callback was changing its address


Hi,
>
> have you first tried testing your GPS device with standard Ubuntu version,
> if you do the same you will find some pointers to bring up your device.
> I brought up my device in similar manner.
>
> Thanks,
> Venkat Raju.
>
> On Sat, Feb 11, 2012 at 1:55 PM, Ivan Savygin <bendert...@gmail.com>wrote:
>
>> Hello, everyone
>> I'm trying to port gps library on gingerbread 2.3.4 (rowboat), the
>> library based on gps_freerunner sources.
>> I've managed to start gps initialization and main loop but virtual
>> machine crashes.
>>
>> V/HAL     (   89): loaded HAL id=gps path=/system/lib/hw/
>> gps.default.so hmi=0x7 handle=0xb000eac0
>> D/gps     (   89): open_gps() is called
>> D/gps     (   89): gps_get_hardware_interface() is called
>> D/gps     (   89): freerunner_gps_init() is called
>> D/gps     (   89): gps_state_init() is called
>> D/gps     (   89): gps will read from /dev/ttyS0
>> D/gps     (   89): gps state initialized
>> D/gps     (   89): freerunner_gps_get_extension() is called
>> D/gps     (   89): freerunner_gps_get_extension() is called
>> D/gps     (   89): gps_state_thread() is called
>> D/gps     (   89): nmea_reader_init() is called
>> D/gps     (   89): nmea_reader_update_utc_diff() is called
>> D/gps     (   89): epoll_register() is called
>> D/gps     (   89): epoll_register() is called
>> D/gps     (   89): gps thread running
>> D/gps     (   89): gps_dev_init() is called
>> I/DEBUG   (   43): pid: 89, tid: 194  >>> system_server <<<
>> I/DEBUG   (   43): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault
>> addr 604210ad
>> I/DEBUG   (   43):  r0 4cc2cc7c  r1 4cc2c7b8  r2 b1bcde9a  r3 b1bcde9a
>> I/DEBUG   (   43):  r4 60421081  r5 811031cc  r6 81104260  r7 00000003
>> I/DEBUG   (   43):  r8 00000089  r9 811041a8  10 81102e04  fp 811041a8
>> I/DEBUG   (   43):  ip afa03108  sp 4cc2cc28  lr 8110154d  pc
>> 811023d2  cpsr 60000030
>> I/DEBUG   (   43):  d0  3f80000000015180  d1  42b504f040000000
>> I/DEBUG   (   43):  d2  3f3504f400000040  d3  c19b504ffffffffe
>> I/DEBUG   (   43):  d4  bf8000013668f876  d5  00000000bf3504f4
>> I/DEBUG   (   43):  d6  3f3504f43f3504f4  d7  00015180bf3504f4
>> I/DEBUG   (   43):  d8  0000000000000000  d9  0000000000000000
>> I/DEBUG   (   43):  d10 0000000000000000  d11 0000000000000000
>> I/DEBUG   (   43):  d12 0000000000000000  d13 0000000000000000
>> I/DEBUG   (   43):  d14 0000000000000000  d15 0000000000000000
>> I/DEBUG   (   43):  d16 40f5180800000000  d17 3fe0000000000000
>> I/DEBUG   (   43):  d18 0000000000000000  d19 0000000000000000
>> I/DEBUG   (   43):  d20 3ff0000000000000  d21 8000000000000000
>> I/DEBUG   (   43):  d22 0000000000000000  d23 3fcc7288e957b53b
>> I/DEBUG   (   43):  d24 3fc74721cad6b0ed  d25 3fc39a09d078c69f
>> I/DEBUG   (   43):  d26 0000000000000000  d27 0000000000000000
>> I/DEBUG   (   43):  d28 0000000000000000  d29 3ff0000000000000
>> I/DEBUG   (   43):  d30 0000000000000000  d31 3ff0000000000000
>> I/DEBUG   (   43):  scr 60000010
>> I/DEBUG   (   43):
>>
>> I/DEBUG   (   43):          #00  pc 000023d2  /system/lib/hw/
>> gps.default.so
>> I/DEBUG   (   43):          #01  pc 00030766  /system/lib/
>> libandroid_runtime.so
>> I/DEBUG   (   43):          #02  pc 0001ce3a  /system/lib/libutils.so
>> I/DEBUG   (   43):          #03  pc 00011d9c  /system/lib/libc.so
>> I/DEBUG   (   43):          #04  pc 00011960  /system/lib/libc.so
>>
>> With the help of objdump i've found that machine crashes when
>> status_callback is called:
>>
>>        GpsStatus gps_status;
>>        gps_status.status = GPS_STATUS_ENGINE_ON;
>>    23ce:       a815            add     r0, sp, #84
>>    23d0:       8087            strh    r7, [r0, #4]
>>        state->status_callback(&gps_status);
>>    23d2:       6ae6            ldr     r6, [r4, #44]
>>    23d4:       47b0            blx     r6
>>
>> status->status_callback for testing inited in gps_state_init:
>> gps_state_init( GpsState*  state, GpsCallbacks* callbacks )
>> {
>> ...
>>   state->status_callback = callbacks->status_cb;
>> }
>>
>> freerunner_gps_init(GpsCallbacks* callbacks)
>> {
>>    GpsState*  s = _gps_state;
>>    s->callbacks = *callbacks;
>>    D("%s() is called", __FUNCTION__);
>>    if (!s->init)
>>        gps_state_init(s, callbacks);
>>    if (s->fd < 0)
>>        return -1;
>>    return 0;
>> }
>>
>> Can anyone provide me some help with that?
>>
>> --
>> unsubscribe: android-porting+unsubscr...@googlegroups.com
>> website: http://groups.google.com/group/android-porting
>>
>
>

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting

Reply via email to