AN_156 Vinculum II ProgLoader and BootLoader Explained

Future Technology Devices International Ltd.
Vinculum II ProgLoader and
BootLoader Explained
Application Note AN_156
Document Reference No.: FT_000351
Version 1.0
Issue Date: 2010-10-29
This application note describes the difference between the Vinculum II ProgLoader code and
the Bootloader code. It describes when each is used and why.
Future Technology Devices International Ltd (FTDI)
Unit 1, 2 Seaward Place, Centurion Business Park, Glasgow, G41 1HH, United Kingdom
Tel.: +44 (0) 141 429 2777
Fax: + 44 (0) 141 429 2758
E-Mail (Support): [email protected]
Web: http://www.ftdi.com
Neither the whole nor any part of the information contained in, or the product described in this manual, may be adapted or reproduced
in any material or electronic form without the prior written consent of the copyright holder. This product and its documentation are
supplied on an as-is basis and no warranty as to their suitability for any particular purpose is either made or implied. Future Technology
Devices International Ltd will not accept any claim for damages howsoever arising as a result of use or failure of this product. Your
statutory rights are not affected. This product or any variant of it is not intended for use in any medical appliance, device or system in
which the failure of the product might reasonably be expected to result in personal injury. This document provides preliminar y
information that may be subject to change without notice. No freedom to use patents or other intellectual property rights is implied by
the publication of this document. Future Technology Devices International Ltd, Unit 1, 2 Seaward Place, Centurion Business Park,
Glasgow, G41 1HH, United Kingdom. Scotland Registered Number: SC136640
Copyright © 2010 Future Technology Devices International Limited
Document Reference No.: FT_000351
AN_156 Vinculum II ProgLoader and BootLoader Explained
`
1
Version 1.0
Clearance No.: FTDI# 179
Introduction
The Vinculum II device (VNC2) is a microcontroller based IC targeted at USB applications. VNC2 is
delivered to users with no application firmware loaded. VNC2 is delivered programmed only with what is
referred to as the ProgLoader. Specific applications must generate the Bootloader code and the
application code which is programmed into the EEFLASH memory of VNC2 by the user.
This application note describes the purposes and the function of ProgLoader and BootLoader to allow
access to the device for programming the EEFLASH memory of VNC2.
Copyright © 2010 Future Technology Devices International Limited
1
Document Reference No.: FT_000351
AN_156 Vinculum II ProgLoader and BootLoader Explained
Version 1.0
Clearance No.: FTDI# 179
`
Table of Contents
1
Introduction .................................................................... 1
2
ProgLoader...................................................................... 3
3
BootLoader...................................................................... 4
4
Protected Memory ........................................................... 5
5
Contact Information ........................................................ 6
Appendix A – References ................................................................. 7
Appendix B – Revision History ......................................................... 8
Copyright © 2010 Future Technology Devices International Limited
2
Document Reference No.: FT_000351
AN_156 Vinculum II ProgLoader and BootLoader Explained
Version 1.0
Clearance No.: FTDI# 179
`
2
ProgLoader
ProgLoader is programmed into VNC2 EEFLASH during production. ProgLoader is a small application that
resides in the protected area of VNC2 FLASH. If the VNC2 PROG# pin is pulled to a logic 0 before the
device is brought out of the reset state then this ProgLoader code will be run.
The code enables the IO_MUX of the VNC2 device and assigns the default pinout of the VNC2. This allows
users to connect the UART RXD, TXD, RTS, CTS of the VNC2 to a PC and a .ROM file may be loaded onto
the VNC2 via the UART interface (as opposed to using the alternative programming method via the debug
pin).
64 Pin pkg pin No.
48 Pin pkg Pin No.
32 Pin pkg Pin No.
UART TXD
39
31
23
UART RXD
40
32
24
UART RTS
41
33
25
UART CTS
42
34
26
PROG#
10
10
9
RESET#
9
9
10
Debug Port
11
11
11
Table 1: Default pinout for Programming over UART
If a user is programming using the UART interface, then a TTL-232R-3V3 cable from FTDI could be used
to connect to the PC and then utility FT_PROG may be used to load the .ROM file generated by the
Vinculum II toolchain.
FT_PROG is available from the FTDI website at: http://www.ftdichip.com/Support/Utilities.htm
The Vinculum II toolchain is also available at http://www.ftdichip.com/Firmware/VNC2tools.htm
Additionally because the default setting of the IO_MUX is restored, the debug pin is mapped to its default
location. (Changing the pin assignment for the debugger is not recommended.)
Copyright © 2010 Future Technology Devices International Limited
3
Document Reference No.: FT_000351
AN_156 Vinculum II ProgLoader and BootLoader Explained
`
3
Version 1.0
Clearance No.: FTDI# 179
BootLoader
BootLoader is added to an application by the linker when a user compiles a program with the Vinculum II
toolchain. The purpose of the BootLoader section of the .ROM image is to initialise the VNC2 CPU, the
peripheral blocks and memory. On completion of this, BootLoader will then load the user application’s
initialised variables into the appropriate area of RAM before jumping to the start of the program.
BootLoader is only available when the user has loaded their application .ROM file into the VNC2.
Additionally Bootloader only runs if the PROG# pin is logic 1 when VNC2 comes out from the reset state,
otherwise the ProgLoader is invoked.
The bootloader code is built into the toolchain and cannot be modified. The BootLoader also holds the
jump table for hardware interrupts.
Copyright © 2010 Future Technology Devices International Limited
4
Document Reference No.: FT_000351
AN_156 Vinculum II ProgLoader and BootLoader Explained
`
4
Version 1.0
Clearance No.: FTDI# 179
Protected Memory
The VNC2 ROM (EEFLASH) is 256kBytes in total. The first 15 pages are reserved as a protected area. One
page is 128 bytes in size and begins at address 0.
This protected area is programmed with the ProgLoader application during manufacture and is resident in
all “blank” devices. The protected area and ProgLoader cannot be altered by the end user.
If the VNC2 is powered up with the PROG# pin at logic 0 then the interrupt table starts at address 0 and
execution starts at address 0, otherwise the interrupt table and code execution begin at the first non
protected area in ROM.
As part of the application code, the bootLoader is not in the protected area.
All ROM Memory beyond the protected area is available for user application code.
Copyright © 2010 Future Technology Devices International Limited
5
Document Reference No.: FT_000351
AN_156 Vinculum II ProgLoader and BootLoader Explained
`
5
Version 1.0
Clearance No.: FTDI# 179
Contact Information
Head Office – Glasgow, UK
Future Technology Devices International Limited
Unit 1, 2 Seaward Place,
Centurion Business Park
Glasgow, G41 1HH
United Kingdom
Tel: +44 (0) 141 429 2777
Fax: +44 (0) 141 429 2758
E-mail (Sales)
[email protected]
E-mail (Support) [email protected]
E-mail (General Enquiries) [email protected]
Web Site URL
http://www.ftdichip.com
Web Shop URL
http://www.ftdichip.com
Branch Office – Taipei, Taiwan
Future Technology Devices International Limited (Taiwan)
2F, No 516, Sec. 1 NeiHu Road
Taipei 114
Taiwan, R.O.C.
Tel: +886 (0) 2 8791 3570
Fax: +886 (0) 2 8791 3576
E-mail (Sales)
[email protected]
E-mail (Support) [email protected]
E-mail (General Enquiries) [email protected]
Web Site URL
http://www.ftdichip.com
Branch Office – Hillsboro, Oregon, USA
Future Technology Devices International Limited (USA)
7235 NW Evergreen Parkway, Suite 600
Hillsboro, OR 97123-5803
USA
Tel: +1 (503) 547 0988
Fax: +1 (503) 547 0987
E-Mail (Sales)
[email protected]
E-Mail (Support) [email protected]
E-Mail (General Enquiries) [email protected]
Web Site URL
http://www.ftdichip.com
Branch Office – Shanghai, China
Future Technology Devices International Limited (China)
Room 408, 317 Xianxia Road,
ChangNing District,
ShangHai, China
Tel: +86 (21) 62351596
Fax: +86(21) 62351595
E-Mail (Sales): [email protected]
E-Mail (Support): [email protected]
E-Mail (General Enquiries): [email protected]
Web Site URL
http://www.ftdichip.com
Distributor and Sales Representatives
Please visit the Sales Network page of the FTDI Web site for the contact details of our distributor(s) and sales
representative(s) in your country.
Copyright © 2010 Future Technology Devices International Limited
6
Document Reference No.: FT_000351
AN_156 Vinculum II ProgLoader and BootLoader Explained
`
Version 1.0
Clearance No.: FTDI# 179
Appendix A – References
Vinculum II datasheet
http://www.ftdichip.com/Support/Documents/DataSheets/ICs/DS_Vinculum-II.pdf
Application and Technical Notes available at
http://www.ftdichip.com/Support/Documents/AppNotes.htm
Vinculum-II IO Mux Explained
http://www.ftdichip.com/Support/Documents/AppNotes/AN_139_VinculumII%20IO_Mux%20Explained.pdf
Vinculum-II IO Cell Description
http://www.ftdichip.com/Support/Documents/AppNotes/AN_137_VinculumII%20IO_Cell_Description.pdf
Vinculum-II Debug Interface Description
http://www.ftdichip.com/Support/Documents/AppNotes/AN_138_VinculumII_Debug_Interface_Description.pdf
Vinculum-II Toolchain Getting Started Guide
http://www.ftdichip.com/Support/Documents/AppNotes/AN_142_VinculumII_Tool_Chain_Getting_Started_Guide.pdf
Vinculum-II Toolchain Installation Guide
http://www.ftdichip.com/Support/Documents/AppNotes/AN_145_VinculumII_Toolchain_Installation_Guide.pdf
Vinculum-II Errata Technical Note
http://www.ftdichip.com/Support/Documents/TechnicalNotes/TN_118_VNC2%20Errata%20Technical
%20Note.pdf
Vinculum II Toolchain (IDE)
http://www.ftdichip.com/Firmware/V2TC/VNC2toolchain.htm
FT_Prog
http://www.ftdichip.com/Support/Utilities/FT_Prog_v1.10.zip
Copyright © 2010 Future Technology Devices International Limited
7
Document Reference No.: FT_000351
AN_156 Vinculum II ProgLoader and BootLoader Explained
`
Version 1.0
Clearance No.: FTDI# 179
Appendix B – Revision History
Version 1.0
First Release
Copyright © 2010 Future Technology Devices International Limited
29th October2010
8