[coldfire-gnu-discuss] Access Error When Running Factorical Sample on M52235EVB with CodeSourcery G++ Version 4.2-59-m68k-elf

Daniel McLean daniel.mclean at optusnet.com.au
Wed Apr 9 23:05:40 UTC 2008


Thanks for the quick reply..

I was using the hosted example with a Processor type of MCF52235 and a Board
Type of m52235evb Eval (60MHz)...

I have not modified any of the startup code.  I followed stps specified in
the Getting Started Guide (Chapter 5.2 - Building Applications).
 
I'm using the hosted configuration so that I can see the output from
printf/write in the Debug Output window.

For the debug section I chose Sourcery G++ Debug Sprite for Coldfire ELF.
In the Coldfire Settings tab of the Debug dialog, I chose the PE Micro Pod
(USB1: USB-ML-CF Rev 0 (PE6012677)).

I selected the config file m52235evb for debugging.

I've tried the small-factorial.c you suggested and it runs fine from RAM or
ROM.  I get this output: 

factorial (0) = 1
factorial (1) = 1
factorial (2) = 2
factorial (3) = 6
factorial (4) = 24
factorial (5) = 120
factorial (6) = 720
factorial (7) = 5040
factorial (8) = 40320
factorial (9) = 362880

For building the application I just selected build all....

I built a new project again following the Getting Started Guide to the
letter and have tried both the small-factorial.c (which worked), as well as
factorial.c and pi.c (which didn't work) and I get the same problem... 

I get the same issue inside __locale_charset:

test Debug [C/C++ Local Application]	
	Sourcery G++ Debug Sprite for ColdFire ELF (10/04/08 08:38)
(Suspended)	
		Thread [0] (Suspended: Signal 'SIGTRAP' received.
Description: race/breakpoint trap.)	
			5 __cs3_isr_access_error() coldfire-isrs.c:564
0x00008e5a	
			4 <symbol is not available> 0x44082700	
			3 __locale_charset()
\opt\codesourcery\m68k-elf\src\newlib\newlib\libc\locale\locale.c:275
0x00005b7a	
			2 printf()
\opt\codesourcery\m68k-elf\src\newlib\newlib\libc\stdio\printf.c:52
0x000017b4	
			1 main() C:\Documents and
Settings\maczor\workspace2\test\pi.c:26 0x00000672	
	m68k-elf-gdb (10/04/08 08:37)	
	C:\Documents and Settings\maczor\workspace2\test\Debug\test
(10/04/08 08:38)	


As a side issue how can I generate a linker file so that I can see where the
linker/compiler is putting the objects..  -M and -Map seem to fail saying
that there was no link occurring in the build process..

Thanks
Daniel

-----Original Message-----
From: Carlos O'Donell [mailto:carlos at codesourcery.com] 
Sent: Thursday, 10 April 2008 2:46 AM
To: Daniel McLean
Cc: coldfire-gnu-discuss at codesourcery.com
Subject: Re: [coldfire-gnu-discuss] Access Error When Running Factorical
Sample on M52235EVB with CodeSourcery G++ Version 4.2-59-m68k-elf

Daniel McLean wrote:
> I can successfully run and debug all the samples from ROM (or RAM if 
> they fit) except for the factorial.c example.

There is a small-factorial.c example 
(share/sourceryg++-m68k-elf-examples/small-factorial/small-factorial.c) 
which should fit anywhere.

> This occurs on both the Dev Kit (M52235EVB) and a custom board I have 
> here (both using the PE Micro pod).

What board did you select for your project?

Is your project using a hosted or unhosted target configuration?

What board did you select when you created the debug configuration?

>  6 __cs3_isr_access_error()  0x000094d2
>  5 <symbol is not available> 0x44082700

This isn't a valid memory address for the board, which is why you faulted.

How did you build the example?

>  4 _localeconv_r()  0x00005174  
>  3 vfprintf()  0x0000257c
>  2 printf()  0x000005a6   
>  1 main() at C:\Documents and 
> Settings\maczor\workspace\sample\factorial.c:15 0x0000051c       

Cheers,
Carlos.
-- 
Carlos O'Donell
CodeSourcery
carlos at codesourcery.com
(650) 331-3385 x716




More information about the coldfire-gnu-discuss mailing list