Hi, We have run-up the CC1110 in the Keil IDE. In the first we developped one demo project to test the basic memory models. The startup file is the default startup.A51 file in the keil install directory. We use three functions to test the stack of function calls.
The 1st: unsigned char SumValue1( unsigned char x, unsigned char y) {
return x+y; }
The 2nd: unsigned short SumValue2( unsigned short x, unsigned short y ) {
The 3rd: unsigned long SumValue3( unsigned long x, unsigned long y ) {
In the main functions, we test the return value with the following format: z = SumValue( 100, 16 ); We expect that the return value Z is 116 in unsigned char/short/long.
To our surprise, only the char and short invocation is correct, the long format invocation is wrong!
We have step into the SumValue3, it is found that the parameter X and Y is totally incorrect in the function body!
We have checked the CC1110 memory map view, it is found that the memory initialization after power up may be wrong, because we found that the device data-base for CC1110:
CPU=IRAM(0-0xFE) XRAM(0xF000-0xFEFF) IROM(0-0x7FFF) CLOCK(26000000) MODC2 MON=S8051.DLL SmartRF04Mon.DLL("-pCC1110") REGFILE=ioCC1110.h("Chipcon") SFILE="LIB\STARTUP.A51" ("Standard 8051 Startup Code") SIM=S8051.DLL DP51.DLL("-pCC1110")
Should we modify this startup.a51 file? is the problem rise from this startup.a51 file?
If yes for this question where can I find a correct startup.a51 file for the CC1110?
Thanks & Best Regards!