Reply by Art Johnson November 12, 20022002-11-12


-----Original Message-----
From: Art Johnson
Sent: Tuesday, November 12, 2002 9:49 AM
To: 'Roger Flor'
Subject: RE: Question About Bugs in CodeWarrior Hi Roger,

Sorry for the delay in getting back to you, yesterday was a holiday here in
Canada.

I have attached the CodeWarrior version 5.0.2 release notes file, so you can see
which bugs were fixed. The "volatile variable" bug that is now fixed in version
5.0.2 is one that we considered to be very serious, and it was not fixed in the
earlier patch (5.0.1), so I would strongly recommend that you install the 5.0.2
patch. The 5.0.2 patch also fixed some errors in mixed 16-bit/32-bit integer
calculations.

I don't think your problem with viewing the local array inside main() is a
serious problem (other than with the CodeWarrior debugger), it is NOT an
indication that the 5.0 version still has the compiler problems I mentioned.
You should also remember that until Metrowerks does a major upgrade on the
debugger, it does NOT show correct information about data on the stack (like
your local array) unless you choose Optimization Level 0.

I am posting this message to the motoroladsp discussion group, as this
information should be useful to other members.

Regards,

Art Johnson
Senior Systems Analyst
PMC Prime Mover Controls Inc.
3600 Gilmore Way
Burnaby, B.C., Canada
V5G 4R8
Phone: 604 433-4644
FAX: 604 433-5570
Email:
http://www.pmc-controls.com
-----Original Message-----
From: Roger Flor [mailto:]
Sent: Sunday, November 10, 2002 10:32 PM
To: Art Johnson
Subject: Question About Bugs in CodeWarrior Dear Mr Johnson:

Following is a quote from one of your emails to the group. This was dated
September 18, 2002.
quote
CodeWarrior version 4.0 has several extremely serious bugs, which have all
been
fixed on version 5.0 with the 5.0.2 patch. I would very strongly recommend
that anyone with an older version of CodeWarrior should upgrade to version
5.0
with the 5.0.2 patch. Two of these extremely serious bugs are described
below
(there are quite a few other bugs besides these 2):

1) Local variables inside a function are saved on the stack, but when you
use
them the compiler loads the value from a global memory location that has
nothing to do with the stack. Obviously, this can cause your program to have
spectacular and extremely hard-to-find crashes.

2) Memory locations that you have declared as volatile (for example, all of
the
DSP chip internal registers) are not accessed correctly. If you read a
volatile memory location several

unquote
My question is: If I have version 5.0 but has not installed the 5.02 patch,
are the problems you mentioned above still existent? Do I really have to
install the 5.02 patch?

I have been tinkering around with the CodeWarrior, and I have found out that
if I declare an array inside main, I could not see the values of the array
in the variables pane of the ExtRam.elf. But if I declare the array as
global, I could see the values in the view global variables window. Is this
an indication that the 5.0 version still has the problems you mentioned
above?

Thanks a lot in advance. Roger _________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?pageatures/junkmail


================================================================================\
=
Metrowerks "CodeWarrior for Motorola DSP56800 Embedded Systems" Version 5.0.2
"What's New"
================================================================================\
=
Version: 5.0.2
Date: 7/17/02
Author: Robert St. John
========================================================================

These notes describe what is new in:
"CodeWarrior for Motorola DSP Embedded Systems" Version 5.0.2

========================================================================
What's new in this release
========================================================================

This patch is primarily designed to fix bugs found in version 5.0.1 ========================================================================
Bugs fixed in this release
========================================================================
The following is a list of some of the issues in version 5.0.1 that was
addressed in version 5.0.2. Compiler Fixes:
-Incorrect value generated for nested ? Operators using long operands
(WB1-36524)
-The divide can fail when compiled for speed (WB1-35971)
-compiler generated internal compiler error (WB1-33627)
-Code Generation incorrect when optization turned on too level 2. (WB1-35397)
-Stack parameters not accessed correctly when #pragma interrupt is used
(WB1-37010)
-Internal compiler error generated for nested ? operators at optimization level
2 (WB1-37401)
-Volatile variable cached in register rather than reloaded from memory
(WB1-34685)
-The #pragma interrupt called break parameter passing for the function
(WB1-35218)

Runtime Fixes:
-long unsigned divide routine not working in an ISR (WB1-36989)
-The operation (__longfixed__ /__longfixed__ fails) (wb1-24241)
-Test pass on simulator but fails when runnning on board (IR0002-0477) ========================================================================
Contacting Metrowerks
========================================================================

For bug reports, technical questions, and suggestions, please use the
forms in the Release Notes folder on the CD, and send them to
See the CodeWarrior on the Nets document in the Release Notes folder for
more contact information, including a list of Internet newsgroups,
online services, and patch and update sites.

========================================================================

Metrowerks Corporation