kenneth wikeroey

I Can almost generate AN2250 SW3 for my Wytec 9S12C128 DragonFly,but gets Link Error : L1102

Discussion created by kenneth wikeroey on Sep 3, 2006
Latest reply on Nov 9, 2006 by kenneth wikeroey
The explanation to the Link Error L1102 is :
Out of allocation space in segment ROM_C000 at address 0xC053

Im trying to compile/link AN2250 SW3 on CodeWarrior Ver 5.7.0

I have read Help etc trying to understand why I get this problem.

I have successfully done AN2250 SW2. This application is now producing char arrays from a WAV file.

AN2250 SW3 is to use these char arrays in flash ,and play them.16K pr array.

In Output.h it looks like this ;
-----------------------------------
#pragma CONST_SEG __PPAGE_SEG WAV01
extern const unsigned char wav01[];

#pragma CONST_SEG __PPAGE_SEG WAV02
extern const unsigned char wav02[];

etc etc

#pragma CONST_SEG DEFAULT
-----------------------------------

Each wav01[] etc is exactly 16K .

Here is the start of one such array ;

#pragma CONST_SEG PPAGE WAV02
const unsigned char wav02[]={
0x7E,0x03,0xA1,0x9E,0x98,0x8D,0x7F,0x72,0x6D,0x6F,
0x69,0x56,0x5C,0x77,0x90,0x9F,0xA6,0xA3,0x9A,0x8B,
etc etc


I created the project by starting with the Wizard in Codewarrior;
=================================================================
File->New->Selected New Project Wizard
Set "Project Name" to WavPlay
Set Location to something you like
Click Ok

Wizard starts->
Click Next
Select Correct MCU->MC9S12C128 in my case ,since its a DRAGONfly12 from Wytec
Select C as Language
Select No for Processor Expert
Select No for PCLint
Select ANSI startup code
Select None for float support
Select Banked memory
Select HCS12 Serial Monitor
Click Finish

In AN2250SW3 the main routine is in a file called pwmcontroller.c
=> Copy everything in pwmcontroller.c into main.c in our
wavplay project.
Now the main( ) function from pwmcontroller.c in AN2250SW3
exist in our main.c file.(in our new wavplay project)

try to make/compile/link our new project->you need pwmcontroller.h
Copy pwmcontroller.h from AN2250SW3 to our source directory
right besides main.c

Continue like this ; You will find that you need to copy
the following files from AN2250SW3 to our new source file area;

output.h
peripheral.h

s12_timer.h
s12_pwm.h
s12_pim.h
s12_page.h
s12_common.h
s12_register.h

The rest of the undefines are the wav-arrays from AN2250SW2;
Copy them too.

- Set -CpPPage option for compiler

Now I get

Link Error : L1102: Out of allocation space in segment ROM_C000
at address 0xC02A


Any ideas ,anyone ?

Outcomes