I want to use an native interrupt counter on Fez Panda II as the managed interrupt handler can only achieve ~3.6kHz which is way too slow for my goal. Now I thought RLP would be the solution.
I have YAGARTO installed and I compiled a test C source file with the make command. So far so good. But now the elf file is 32Kb!!! When I look into it with a hex editor. 99% of the file is just 0x00. This is the code of the C file, it is just to see if I can get RLP to work.
int a = 0;
int b = 0;
int GetA(unsigned int *generalArray, void **args, unsigned int argsCount, unsigned int *argSize)
{
return a;
}
int SetA(unsigned int *generalArray, void **args, unsigned int argsCount , unsigned int *argSize)
{
int (value) = *(int*)args[0];
a = value;
return a;
}
This is my console output of compilation:
[quote]C:\RLPExample>make
rm ./Output/.elf ./Output/.map
rm: cannot remove ./Output/*.elf': No such file or directory rm: cannot remove./Output/*.map’: No such file or directory
make: [clean] Error 1 (ignored)
arm-none-eabi-gcc -c -Os -g0 -mlittle-endian -mcpu=arm7tdmi -Wall -I. -I./inclu
de -mapcs-frame -fno-builtin RLPExample.c -o RLPExample1.o
arm-none-eabi-gcc -nostartfiles -Wl,–Map -Wl,./Output/RLPExample.map -lc -lgcc
-T RLP_LinkScript.lds -o ./Output/RLPExample.elf RLPExample1.o
rm *.o[/quote]
As you can see I have used -Os to optimize for size.
Any hints on how to use RLP on Fez Panda II? As Fez says (with a very small managed application of loading the elf and blinking a led) that its out of memory when loading the resource elf file.
I have read there should be examples in the RLP_user.zip file for all GHI platforms, but I only find the examples for EMX. Am I right, or should I download the files somewhere else?
EDIT:
When I compile without make, directly using gcc with this commandline: [quote]C:\yagarto-4.5.1\bin\arm-none-eabi-gcc.exe -g3 -s -Os -mlittle-end
ian -mcpu=arm7tdmi -Wall -I. -c C:\RLPExample\RLPExample.c -o C:/RLPExample/Out
put/RLPExample.elf[/quote] it produces a 8KB file. Haven’t tested whether it works on Panda II though.
Edit 2:
I have tested the elf file with ~8k of size. Now the resource can be loaded, no OutOfMemory Exception anymore. But now a exception is thrown by
Looks like you’re using the data for EMX instead of USBizi
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!! The user must set these settings according to the used platform !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// ChipworkX
//#define RLP_ADDRESS 0xA0000000
//#define RLP_SIZE 0x001FB3FC
// EMX
#define RLP_ADDRESS 0xA0F00000
#define RLP_SIZE 0x000FFFFC
// USBizi
//#define RLP_ADDRESS 0x40000440
//#define RLP_SIZE 0x000027FC
//