AN2157 Freescale Semiconductor / Motorola, AN2157 Datasheet - Page 3

no-image

AN2157

Manufacturer Part Number
AN2157
Description
MSC8101 Programming the MSC8101ADS Flash Memory
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
4
5
Generating an S-record File
Loading the S-record File
The following steps generate an S-record file from an application that is later loaded into Flash memory.
1.
2.
3.
The following steps outline the procedure for programming the Flash memory in the MSC8101ADS with
an S-record file. The S-records are sent to the MSC8101ADS for the PC over an RS-232 connection
using the HyperTerminal application on the PC. There is also an MSC8101 application running on the
MSC8101ADS to service this link with the PC. This application is provided with the CodeWarrior
program production release 1.5 (see step 3).
1.
2.
Create a project for the application.
Using the
include all the relevant files for the application.
Set the CodeWarrior build settings.
Set up the project so that the generated S-records can execute out of Flash memory. Note that the
settings are not necessarily used for applications built to execute from internal SRAM memory:
a.
b.
c.
Build the application.
Building the application generates an S-record file. Refer to the C:\Program
Files\Metrowerks\CodeWarrior\CodeWarrior
Manuals\PDF\Targeting_Starcore.pdf file for information on this S-record generation
utility.
Set up the HyperTerminal application.
The HyperTerminal application is set up with the following parameters:
— Baud rate: 115200
— Data bits: 8
— Stop bits: 1
— Parity: none
— Handshaking: XON/XOFF
— <ASCII Setup…>, Line delay: 5 milliseconds.
It is important to verify that the PC can support the 115200 baud rate. If another data rate is used,
change it here and in the Flash loader application (calc.h).
Set up the serial connection.
Set up the proper environment and code generation options:
Target → StarCore Environment
StarCore Compiler → Enterprise Compiler
Use the proper linker command file and C start-up file:
Linker → Enterprise Linker → Start-Up File
Generate an S-record file:
Target → Target Settings → Post-Linker
Post-Linker → SC100 ELF to S-Record
Post-Linker → SC100 ELF to S-Record
file
Freescale Semiconductor, Inc.
For More Information On This Product,
Project->Add Files
Go to: www.freescale.com
menu option, create a project within the CodeWarrior directory and
. Enable Big Memory mode
. Enable Long Word Addressability
. Enter the desired Output File Name for the S-record
. SC100 ELF to S-Record
. Enable Init Variables from ROM
. Point to the flash_crt140b.eln file
Generating an S-record File
3

Related parts for AN2157