CF2PicoDOSBeta228b1Notes.htm February 2, 2003
The 2.28b1 beta release of PicoDOS for CF2 fixes all known major bugs, adds several new features, tweaks to the build tools to support future enhancements, and addresses changes to the build model and directory structure required for operation with the new CodeWarrior Development Studio for Palm OS Platform v9. The beta release merges into your current PicoDEV tools with most components installing into a new (Beta) directory in the MotoCross Support folder. Switching between the 2.28b1 and 2.27r1 is made possible by two new XML Settings Panels which you can select between from the CodeWarrior IDE.
After installation and setup of the beta tools, take a look at the new CF2Beta228Tests project in the (Beta)\CFX\Examples folder for examples of some of the new features. You'll also find a pre-release pdf version of the CF2 API Reference Manual in (Beta)\CFX\Docs. Please contact Persistor technical support (228b1@Persistor.com) if you think you've discovered some new and unexpected behavior from the new tools.
CFx NEW ATA New patchable ATABlockingError for CF and BIA drivers
CF2 CHG BIOS Modify BIOS entry for legacy BIOSInit calls
CF2 CHG BIOS Combine BIOS&PICO (CF1 stays separate)
CFx FIX MX RunMxPicoDOSApp was limiting static data to 128KB
CFx CHG PDEV Replace <cfx...> with the new multiple headers
CFx CHG PDEV Replace CW MSL headers with new PII versions
CFx FIX PICO Loaded and PXE apps now start in unbuffered uart mode
CFx FIX PICO Fixed DIR and COPY commands odd behaviors with subdirectories
CFx FIX PICO Memory display/modify commands were not honoring size switches
CF2 FIX PICO BOOT to APP printed "ReRunBootingFlashApp()"
CFx FIX PICO Fixed baud reporting error in BAUD command
CFx FIX PICO RUN/PXE limited was to 192KB in TryExec()
CFx FIX PICO Mount command reversed free and size reporting
CFx FIX PICO APP from Pico no longer attempts if FFFF's at E40000
CFx FIX PICO REN common within subdirectory copied to root
CFx NEW PICO Add displayable binary patch number
CFx NEW PICO Allow change drive with execstr("D:")
CF2 FIX PWR Revoved potential aborted PWRSuspendSecs request lockup mode
CFx FIX PWR Added required SCSInit after SUSPEND
CF2 FIX PWR /WAKE while running killed MSP430 after first suspend
CF2 FIX QPB CF2 QPB couldn't run more than one SPI device at a time
CF2 NEW QPB Add SYS.QPBCS to allow choice of SPI PCS linesnotes
CF2 FIX RTC Five calls to set time was resettng the CF2
CFX FIX RTC RTCInit was not allowing 1Hz interrupts
CF2 FIX RTC TLC microcode caused SetTime synchronization problems
CFx FIX STDC ENOERR was defined as 10 !
CFx FIX SCI SCITxPutByte blocked in handshake mode ignoring block param
CFx FIX SCI SCIRxGetXXXX NEVER returned overflow errors
CFx FIX SCI SCIRxGetCharXXXX was masking high error bits
CF2 FIX TPU TPU DIO functions had no way to get back to DIO
CF2 CHG TPU Removed useless TPUSetTCR1Prescale from headers
CF2 NEW TPU Allow loadable TPU image (file or flash address)
CF2 NEW TPU Add SYS.TCR1P and SYS.PSCK VEE vars for write-once prescalers
CF2 CHG TU TUTxPrintf was not translating '\n' to '\n','\r'
CF2 NEW TU Added TUTxBreak function for TPU UARTs
CF2 NEW TU Add TUChanLookup function for patching TPU UART ISR functions
CFx CHG VEE Identical entries with identical data are not re-written
CFx NEW VEE PicoDOS complains at startup if VEE is corrupted
The beta ships as a single zip exe file that expects to
install to C:\ and expects to find your
PicoDEV tools installed as recommended in the CD instructions. It has an an
internal folder structure that starts at:
C:\Program Files\Persistor\MotoCross
Support\(Beta)
All other files and folders end up in the (Beta) folder which in turn has a
folder structure similar to MotoCross Support.
After unzipping the beta files, you will need to copy the new
MxCPU32PostLinker.dll from the folder named:
…\(Beta)\Copy contents to Program
Files_Metrowerks_CodeWarrior_Bin_Plugins_Linker
to:
C:\Program
Files\Metrowerks\CodeWarrior\Bin\Plugins\Linker
The best way to install all of the new firmware onto your CF2 is to copy all of the needed files from the newly installed (Beta)\CFX\bin\CF2\ folder over to the root directory of a spare CompactFlash card. You can also achieve similar results the hard way using MotoCross to download the files. Move to CF card with the copied files over to your CF2 and perform a power cycle. From the PicoDOS C:\ prompt, type restore2<enter>. Reply Y<enter> when the restore2 program displays Restore CF2228B1.APP [N] ?
When restore2 completes, it will reset the CF2 and you should see:
----------------------------------------------------------------
Persistor CF2I5 SN 01207 PicoDOS
V2.28b1 PBM V2.27
(C) 1998-2003 Persistor Instruments Inc. -
www.persistor.com
----------------------------------------------------------------
!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!
!!! BETA
1 !!! Feb 2 2003
12:18:44 !!! BETA 1 !!!
!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!
Warning:
You should update your SPV firmware!
C:\>
The MSP430 supervisor coprocessor also needs new firmware and the new SPV firmware warning displayed after startup will not go away until you perform an update. From the C:\ prompt, type spv307<enter>. Reply Y when asked if you are sure. You will see the following:
C:\>msp307
*********************************************************
** CF2 MSP430 Firmware Update **
**
(C) 2003 Persistor Instruments Inc. **
*********************************************************
MSP430
Firmware: 3.07
Updater
version: 1.00
Build:
Jan 23 2003 14:43:11
This
program will update the firmware in the CF2's MSP430
from
version 3.07 to version 3.07. Are you
sure (Y or N) ?
PREPARING
TO PROGRAM...
ERASING...
PROGRAMMING.............
VERIFYING.............
Finished!
Turn
OFF the power to the CF2 and then back on to complete the process.
Type VER at the PicoDOS prompt and you will see SPV version is now 3.07.
Choose Edit:Preferences… from CodeWarrior and click the Source Trees selector on the left in the IDE Preferences window. If you have made custom modifications to the IDE Source Trees, this would be a good time to export them to convenient folder for future reference or to merge with the beta changes.
Click Import Panel… and navigate to:
C:\Program Files\Persistor\MotoCross
Support\(Beta)\CFX\XMLSettingsPanels\IDE\
then select:
Source Trees_CF2Beta_IDEGlobalPref.xml
Before compiling projects that were previously compiled with different Source Trees, you must tell CodeWarrior to forget any assumptions about where files are located by choosing Re-search for Files from the IDE Project menu.
If you want to stop working with the beta tools and go back to
the previous build tools, follow the above procedure but select a saved XML IDE
panel or on of the standard XML IDE panels in:
C:\Program Files\Persistor\MotoCross
Support\CFX\XMLSettingsPanels\IDE
If you're currently using CodeWarrior for Palm OS v8 solely for Persistor development, there's no compelling reason to upgrade to v9. In fact, the v9 compiler uses a new calling convention that's more Palm friendly but adds about 10% to size of programs. The only possible benefit would be a few slight enhancements to the IDE. If you're concurrently developing application for Palm OS computers, you may find the upgrade worthwhile. Visit the Metrowerks web site for details on the v9 changes.
All of the changes described below are taken care of in the beta release. The following information is provided for migrating to CW9 with older PicoDEV tools.
Metrowerks has moved the location of the standard C library
files from:
C:\Program
Files\Metrowerks\CodeWarrior\(MSL for Palm OS)\
to:
C:\Program
Files\Metrowerks\CodeWarrior\CW for Palm OS Support\MSL\
The MSL is designed for use with an ever growing list of target processors and different operating systems. This means MSL is constantly changing to support the new targets. Though the changes seldom have any benefit to our use of the tools, they often result in incompatibilities with the PicoDEV tools. To minimize these occurrences in the future, we're providing a much simplified set of standard C headers and XML Source Tree panels starting with the 2.28 beta releases. If you want to use CW9 with the older tools, you'll need to make the following changes.
There are several ways to adapt the CodeWarrior IDE to look in
the new location instead of the old location because the MotoCross tools were
designed to use the Source Trees features to allow for such changes. Though you
can make these changes manually by editing the CxStdC and CxStdC++ source trees
from the IDE preferences:Source Trees dialog, it's quicker and safer to just
import either of the two new v9 XML files from
(Beta)\CFX\XMLSettingsPanels\IDE:
CW9withPre228PicoDev\Source
Trees_CF2+CWPalm9_IDEGlobalPref.xml
CW9withPre228PicoDev\Source
Trees_CF1+CWPalm9_IDEGlobalPref.xml
Renamed Build Constants
Metrowerks has also made some name changes to a few
components in the Standard C Libraries and these require the addition of a few
lines of text to one of the MotoCross header files. The steps to manually
modify the <mxcpu32.h> are described ahead, but it's easiest to just copy
the updated version from picodev_cw8_to_cw9.zip and replace the older one at:
C:\Program
Files\Persistor\MotoCross Support\CPU32\Headers
The changes made to <mxcpu32.h> are all additions of new text:
(near line 58)
after: #pragma fp_library on // our CWPro floating point runtime support
add: #pragma fp_pilot_traps off // our CWPalm floating point runtime support
(near line 185)
after: #define _TIME_T_DEFINED
add: #define _MSL_TIME_T_DEFINED // CW9
(near line 136)
after: #undef __PALMOS_TRAPS__
add: #define _MSL_C_LOCALE_ONLY 1 // CW9
add: #define __ctype_mapC __ctype_map // CW9
add: #define __lower_mapC __lower_map // CW9
add: #define __upper_mapC __upper_map // CW9
Add Missing New Glue Functions
The C compiler in v9 emits code that makes calls to two
helper functions not currently in the libraries. For now, we add the source
into CFxPicoPreMain.c which is common to all MotoCross projects. The steps to
manually modify CFxPicoPreMain.c are described ahead, but it's easiest to just
copy the updated version from picodev_cw8_to_cw9.zip and replace the older one
at:
C:\Program
Files\Persistor\MotoCross Support\CFX\Source
The changes made to CFxPicoPreMain.c are all additions of new text:
(near the
bottom)
just above: #ifdef __cplusplus
add:
void *__copy(char *to, char *from, size_t size); // CW9
void *__copy(char *to, char *from, size_t size)
{
void *memmove(void *s, const void *ct, size_t n);
if (to)
memmove(to, from, size);
return to;
}
void *__clear(void *to, size_t size); // CW9
void *__clear(void *to, size_t size)
{
void *memset(void *s, int c, size_t n);
if (to)
memset(to, 0, size);
return to;
}
New Project (.mcp file) Structure
Metrowerks has also made changes to the structure of the .mcp project files that form the basis of all of your MotoCross projects. The changes are transparent to your Persistor work but will require to respond yes to CodeWarrior's request to update your old project files and any older example or stationery projects before use. Simply click OK and CodeWarrior will make a copy of the original and rename it from XXXX.mcp to XXXX.old.mcp.