RLP does not work after upgrade from 4.2 to 4.3

I am migrating from NETMF v4.2 (GHI SDK v4.2.11.1) to v4.3 (GHI SDK v4.3.6.0). I use the EMX (FEZ Cobra) and I want to support for the G120 (FEZ Cobra II Net).I have the following problem,the method RLP->GPIO.EnableInterruptInputMode always returns RLP_FALSE (0).
I updated RLP.h from the GHI website, changed the method parameters and changed "RLPext " to “RLP”. The 4.2 version was compiled with the Yagarto compiler and I used the same compiler for the 4.3 version. I also used the EmBlocks IDE included compiler (GCC I think).
I test to see what method retuns RLP_FALSE (0) by changing the return value to a number above 4. Except for “return RLP->GPIO.EnableInterruptInputMode(pinNo, &pinArgs, ISR_Pin_Triggered, (void*)0);”

Am I missing something? The compiler does not give any warning. Other methods work perfectly. If I want to enable a pin which is already used in the managed code the RLP->GPIO.ISReserved returns RLP_FALSE. Can someone help me out?

Code:

int RegisterPin(void **args)
{
	unsigned int pinNo = *(unsigned int*)args[0];
	if (RLP->GPIO.IsReserved(pinNo) == RLP_TRUE) return RLP_FALSE;

	RLP_InterruptInputPinArgs pinArgs;
	pinArgs.GlitchFilterEnable = *(unsigned int*)args[1]; // RLP_FALSE;
	pinArgs.IntEdge	 = *(unsigned int*)args[2]; // RLP_GPIO_INT_EDGE_LOW;
	pinArgs.ResistorState = *(unsigned int*)args[3]; // RLP_GPIO_RESISTOR_PULLDOWN;

	int i = 0;
	for(i = 0; i < 4; i++)
	{	
	    if (_pins[i] == pinNo)
        {   
            return RLP_FALSE;
        }
	    if (_pins[i] == -1)
		{	
		    _pins[i] = pinNo;
			return RLP->GPIO.EnableInterruptInputMode(pinNo, &pinArgs, ISR_Pin_Triggered, (void*)0);
		}
	}

	return RLP_FALSE;
}

void ISR_Pin_Triggered(unsigned int pin, unsigned int pinState, void* param)
{
	if (_pins[0] == pin) { _data[0]++; return; }
	if (_pins[1] == pin) { _data[1]++; return; }
	if (_pins[2] == pin) { _data[2]++; return; }
	if (_pins[3] == pin) { _data[3]++; return; }
}

The problem is solved. I removed the elf files from resource and project. The I copied the elf file from the old 4.2 project to test if that still works. I knew it would’t work but my plan was to update piece for piece. The I added the new elf files and test it again…and it works. Maybe removing and adding the resource files is the solution.

1 Like

Glad you got it sorted. I have always removed and re-added the RLP files when changed. No idea if I need to or not.