Assembly program setup – Zilog ZUSBOPTS User Manual

Page 354

Advertising
background image

Program Configurations

UM017105-0511

326

Zilog Developer Studio II – ZNEO™
User Manual

4. Finally, add your modified start-up module to your project by selecting the

Included

in Project

button in the

Objects and Libraries

page of the

Project Settings

dialog

box (see

C Start-up Module

– see page 66) and also add the modified source code file

to your project using the Add Files command from the

Project

menu.

Assembly Program Setup

The Assembly program setup for the Copy to RAM Program Configuration is similar to
the Default Program Configuration with some additional guidelines, as described in this
section.

Write all of the executable program code (non-start-up code) under the CODE segment.
This segment belongs to EROM address space. To set up this configuration, you must
copy the CODE segment from EROM to RAM address space. Perform steps 2 and 3 from
the C Program Setup for this configuration, as described in the

C Program Setup

section

on page 324. In step 3, add the code to your assembly start-up code instead of the standard
C startup.

Special Case: Partial Copy to RAM

A special case of this configuration is when you want to copy program code from just one
assembly segment into RAM, while retaining the rest of the code in EROM. This allows
you to investigate whether there might be power or speed savings to be realized by parti-
tioning your application in this way. Perform the following steps:

1. Use a distinct segment name for the particular segment. For example:

Define main_TEXT, space=EROM

segment main_TEXT

; code goes here

2. To copy the

main_TEXT

segment from EROM to the RAM address space, perform

steps 2 and 3 from the C Program Setup, Special Case, for this configuration as
described in the

C Program Setup

section on page 324. In step 3, add the code to your

assembly start-up code instead of the standard C startup.

Advertising
This manual is related to the following products: