Using printf with CW8.2.3

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using printf with CW8.2.3

1,523 Views
Gibson
Contributor II

Hi,

I'm begining a new projet with the MC56F8002 and CW8.2.3 SE (on XP and programming with an USB TAP). I want to dump some data in a console window using printf but I have some linker error. I made a search on this forum's section for printf, but find noting to help me.

 

This is my simple code:

 

#include  "Cpu.h"

#include  "Events.h"

#include  "stdio.h"

 

#include  "PE_Types.h"

#include  "PE_Error.h"

#include  "PE_Const.h"

#include  "IO_Map.h"

 

void main(void)

{

    PE_low_level_init();

    printf("Hello\n");

    for(;:smileywink: {}

}

 

 

Now, when I try to compile it, I get this error:

 

Link Error : Segment overflow: .p_Code

Reserved size is 0x00001e68 -- Overflow 0x00001ba4

 

Link Error : Segment overflow: .x_Data

Reserved size is 0x000007fe -- Overflow 0x000005b0

 

Link failed

 

I think it must be a simple memory configuration problem but I have no clue how and where to fix it,

 

Need some help!

 

Thanks

 

Gibson

Labels (1)
Tags (1)
0 Kudos
Reply
1 Reply

374 Views
trytohelp
NXP Employee
NXP Employee

Hi,

 

I checked in the examples delivered on the installation.

It seems we don't recommend to use printf function (too large for this chip).

 

On the example we used another function named __ConsoleWrite(...).

Please see attached

 printf_example.zip using __ConsoleWrite(...)

 

Another interresting example.

Please refer to your installation under:

 \CodeWarrior for DSC56800E v8.2.3\(CodeWarrior_Examples)\DSP56800x_hostIO\projects

 

Hope this will help you.

Regards

Pascal

 

printf_example.zip

Message Edited by t.dowe on 2009-09-02 03:22 PM
0 Kudos
Reply