CW for ARM1.2 link or load problem?
CASTalk.com Forum Index CASTalk.com
Discussion of DSP, FPGA, storage and embedded system.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web castalk.com
CW for ARM1.2 link or load problem?

 
Post new topic   Reply to topic    CASTalk.com Forum Index -> Embedded System
Author Message
Not Really Me
Guest





Posted: Tue Jan 04, 2005 9:08 pm    Post subject: CW for ARM1.2 link or load problem? Reply with quote

Using CW for ARMDS v1.2 I am building an embedded app, linked at 0. If I
build a small test app it loads fine. If I exceed a certain size, it either
doesn't link or doesn't load properly. In the code sample before, if I make
the const char array smaller than 898 bytes, the code loads fine. If 898 or
larger, it overwrites the 32-bit word at 0x0 with 0. Add more bytes and the
word at 0x4 gets overwritten with zero also, etc.

Location zero has the "bl InitReset" from the exception vectors. The build
includes Cstartup.s, Usart.c, retarget.c, startup.c and the code below.
Compiler command line equivalent shows as: -O0 -W -DUSE_SERIAL_PORT
Linker CL equivalent shows as: -remove (dbg) -entry scott -ro-base
0x00000000 -nolocals -list C:\Test\Source\scotty.lst -first
cstartup.o(reset)

Any suggestions?

#include "stdio.h"

int main(void);
void argh(void);

int main(void)
{
printf("Hello?");
argh();
}

//const char big[898] = { 'a', 'b', 'c', 'd', '\0' }; // fails
const char big[897] = { 'a', 'b', 'c', 'd', '\0' }; // works

void argh( void )
{
printf(" %s", &big);
}

Scott
Back to top
 
Post new topic   Reply to topic    CASTalk.com Forum Index -> Embedded System All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




VoIP Electronics Powered by phpBB