Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Core Dump in32(__addr=4294967295): (7 Items)
   
Core Dump in32(__addr=4294967295)  
I have a Resource Manager that manages LEDs.  LEDs are just IO, turn on and off with in32 out32.
the resmgr, turns LED on, off, or blink at one of two different rates.
If we run a system simulation, the LED resource manager will core dump after a few hours.

If you look at the core dump thru gdb it shows:
#0 0x00101178 in in32 (__addr=4294967295)
     at c:/QNX650/target/qnx6/usr/include/arm/inout.h:78

the address shown in gdb is 0xFFFFFFFF, however when I call in32, the address it sends are all constants in code (#
define LED_ADDR....)

how can it be getting an address of 0xFFFFFFFF?  

Could it be an issue with an interrupt happening during the call to in32 and when it returns from interrupt the address 
is wrong?  
Do I need some protection against that happening?
Re: Core Dump in32(__addr=4294967295)  
>>>how can it be getting an address of 0xFFFFFFFF?  
Sounds like memap_device_io() failed and returned -1.  Are you checking the return code?
Re: Core Dump in32(__addr=4294967295)  
No I am not (i am a newbie), thanks for pointing that out.

Do you know of a cause for mmap_device_io to fail that intermittently?
Re: Core Dump in32(__addr=4294967295)  
>>> cause for mmap_device_io to fail that intermittently?
Intermittently, no.  Most common faiilure cse would be not calling this first -

    ThreadCtl( _NTO_TCTL_IO, 0 );

...to enable privilege.
Re: Core Dump in32(__addr=4294967295)  
Or a virtual address leak... are you mapping and unmapping each time?

Sent from my BlackBerry 10 smartphone on the Rogers network.
  Original Message
From: Dennis Kellly
Sent: Tuesday, January 7, 2014 11:15 AM
To: ostech-core_os
Reply To: ostech-core_os@community.qnx.com
Subject: Re: Core Dump in32(__addr=4294967295)


>>> cause for mmap_device_io to fail that intermittently?
Intermittently, no.  Most common faiilure cse would be not calling this first -

    ThreadCtl( _NTO_TCTL_IO, 0 );

...to enable privilege.




_______________________________________________

OSTech
http://community.qnx.com/sf/go/post107792
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com
Re: Core Dump in32(__addr=4294967295)  
not unmapping, should I be?
everytime the function to write to IO is called it calls mmap_device_io:
switch (OnOff)
{
	case LED_OFF:
	    mBase = mmap_device_io(4,Led_Addr); 	// GPIO7-7 DR
	   out32(mBase,  in32(mBase) &~(Led_Bit));
	break;
	case LED_ON:
	 mBase = mmap_device_io(4,Led_Addr); 	// GPIO7-7 DR
	out32(mBase,  in32(mBase) | (Led_Bit));
	 mBase = mmap_device_io(4,Led_Dir_Addr); 	// GPIO7-7 DR
 	 out32(mBase,  in32(mBase) | (Led_Bit));
	break;
Re: Core Dump in32(__addr=4294967295)  
You need to call mmap_device_io() only ONCE in main() - not inside the loop.

If the addresses Led_Add, Led_Bit and Led_Dir_Addr are within a small range of addresses, then you can mmap the entire 
range in one call.  Set the first parameter to the number of bytes in the range - then use pointer arithmetic to access 
each register in the loop.