RLP with FEZ Spider MF 4.2

Hi guys,

I just got my new FEZ Spider and wanted to port my RLP code from MF 4.1 and Panda II to MF 4.2 and FEZ Spider. Of course I changed the RLP address/size to EMX (0xA0F00000/0x000FFFFC).

I can’t load the *.elf file. Is really not necessary to Enable() and Unlock() RLP in MF 4.2?

The code after starting is simple:

byte[] elf_file = Resources.GetBytes(Resources.BinaryResources.RLPext_rs485);
RLP.LoadELF(elf_file); <-- Exception

Thanks a lot!

Harald

Hi, welcome to the comunity.
Could you please post the exact exception (from the output window)
Which Firmware do you use? 4.2.9 or older.
If older, then please try to update to 4.2.9 first.
And yes: unlock is not needed anymore.
Your Makefile would be interesting too

Hi,
Here’s the output:

#### Exception System.Exception - 0xffffffff (1) ####
#### Message: 
#### GHI.Premium.Native.RLP::LoadELF [IP: 0000] ####
#### GHI.Premium.Native.RLP::LoadELF [IP: 000a] ####
#### Bits.Controller.Program::ProgramStarted [IP: 002d] ####

A first chance exception of type ‘System.Exception’ occurred in GHI.Premium.Native.dll
The program ‘[5] Micro Framework application: Managed’ has exited with code 0 (0x0).

Yeah! This elf file works. I can load it and call for example “ReplaceFirst”.
So probably I have some wrong headers for compiling the c code or a wrong makefile. Are there any changes? I user following headers: irq.h, LPC23xx.h, RLP.h, type.h and uart.h. I have used for 4.1 and USBizi.
Thanks.

When I compile the StringUtils, the generated elf doesn’t work either. Could you send me your rlp.h and the RLP_LinkScript.lds?
Thanks a lot!

Thanks a lot. It finally works! The problem was the wrong origin and length in the RLP_LinkScript.lds.
Now I can cotinue testing my rs485 line.