Improved Coldfire Lite V3.2
Updated
for
Codewarrior
7.2!
During
the
time
I
have
been
using Coldfire Lite in my iMetaf
project, I have
encountered a number of issues that frequently caused lockups in the
application. I managed to fix these issues and made the fixed version
of
Coldfire Lite available here, so other users can benefit also.
I sent the modifications to Freescale to make them official, but they
seem uninterested...
There are a couple of functional enhancements too. For a full list of
changes see below.
To find the changes in the code, use the "Compare files" function in
Codewarrior (Search → Compare files). Under "Source", choose the root
path of the ORIGINAL version of Coldfire Lite V3.2. Under
"Destination", select the PATCHED version. Now click "Compare". A
window will appear containing a list of files that differ between
source and destination. Double-click the files to view the differences
in the source code.
Download
:
Original version, compile with
stack
parameter passing (STD_ABI), only works when compiled with Codewarrior
for
Coldfire Processors versions 7.0.x and 7.1.x
Version modified to use register
parameter passing, intended to be compiled with Codewarrior for
Coldfire Processors versions 7.2.x,
but
can
also
be
compiled
with
older versions when the project settings
are set to register parameter passing (REG_ABI), and REG_ABI versions
of the
libraries are used where applicable.
Important
note:
Coldfire Lite
V3.2 with register parameter passing works fine when compiled with
Codewarrior 7.2, but in my project I have experienced problems when
using the TCP protocol when setting the compiler optimisation level
>1. At levels 0 or 1 everything worked as expected. This problem did
not occur when the exact same application was compiled with Codewarrior
7.1.2 (compiled with REG_ABI setting) at any optimisation level, so I
suspect a problem with code
optimisation in CW7.2 must be the cause.
Update
2010.06.19: the
Codewarrior 7.2.1 patch did not fix
this problem.
LIST
OF
CHANGES
MADE
BY
MARC
VANDENHENDE,
2010-05-08
mii.h
- Added some
extra register definitions that are specific to the PHY devices used in
the M52259DEMOKIT (KSZ8014) and M52259EVB (DP83640)
MCF52259_sysinit.c
- Small bug
fix in KSZ8041 PHY initialisation (bug was not harmful to proper
functionality).
- PHY
initialisation now automatically recognises KSZ8041 / DP83640 devices,
and can be extended for use with other PHY devices.
LIST
OF
CHANGES
MADE
BY
MARC
VANDENHENDE,
2010-02-15
*.lcf
- Updated to
reflect some of the comments in TN268.pdf
mcf5xxx_lo.s
cksum.s
tk_util.s
- Modified
for register based parameter passing
LIST
OF
CHANGES
MADE
BY
MARC
VANDENHENDE,
2009-10-12
MCF52235_sysinit.c
- Added
basic initialisation code for RTC
MCF52259_sysinit.c
- Added
basic initialisation code for RTC
- Minibus
initialisation only for M52259EVB, not for DEMO board
MCF52259_RTC.h
- Bug fix : MCF_RTC_RTCGOCU and MCF_RTC_RTCGOCL macros were
defined as 16 bit
registers.
While they actually are 16
bit registers, they must be
defined/accessed as 32
bit registers!
stdlib.c
LIST
OF
CHANGES
MADE
BY
MARC
VANDENHENDE,
2009-05-07
MCF52235_sysinit.c
- PHY
interrupt disabled (interrupt caused reset when ethernet disconnected).
MCF52259_evb_iflash.lcf
- Commented
out mram definition to
allow linking on Codewarrior Special Edition version.
MCF52259_sysinit.c
- Original
code only contains initialization for M52259EVB PHY (DP83640). Since this PHY is
different from the M52259DEMO PHY (KSZ8014), the original code
did not work on the DEMO board. Code
has been added to initialize the PHY of the demo board (via conditional
compilation). Code has also been modified to use the basic PHY
registers as much as possible, to improve compatibility between
different PHY types.
timeouts.c
- Code added
to automatically restart DHCP when:
- Link
returns after being disconnected
- DHCP
status not in the BOUND state for more than a minute
m_udp.c
dhcsetup.c
- Added
functionality related to auto restarting DHCP.
MENULIB.C
- Changed
FEC register numbers to their corresponding defined names. (No functional
changes)
RESHOST.C
- Some
cticks wrap around fixes.
TCPAPI.C
- Added a
timeout to m_connect. Otherwise the system will hang when the
connection attempt fails.
TCPUTIL.C
DHCPCLNT.C
- Added
function to read back the state of DHCP from external code. Used to
check if
in BOUND state by the DHCP auto restart
routines.
DNSCLNT.C
- Fix to
make dnc_lookup only
return an IP address when there is actually one
available.
Originally this would also return a (false) IP address when there was
no reply from the DNS server or if a fake URL was
entered.
- + some
more cticks wrap around fixes.
Back to main page
Page updated
2010.06.19