
rej06j0012_shc_startup3_an| Application Note
APPLICATION NOTE
SuperH RISC engine C/C++ Compiler Package
Application notes: [Introduction guide] Sample file Guide for SH-3, SH-4, and SH-4A
This document explains precautions for generating files and performing initial coding in High-performance Embedded Workshop (herein as HEW), for SuperH RISC engine C/C++ compiler V.9. Table of contents
1. Generating a Sample Program ......................................................................................................... 2 1.1 Project Generator Settings................................................................................................................ 2 1.2 List of Generated Files .................................................................................................................... 10 2. 2.1 2.2 2.3 3. 3.1 3.2 3.3 3.4 4. 4.1 4.2 4.3 4.4 Reset Processing ............................................................................................................................ 12 Reset Handlers (vhandler.src, vecttbl.src, env.src, env.inc) ........................................................... 12 Reset Function (resetprg.c)............................................................................................................. 15 Stack Size Settings (stacksct.h).................................................................................................
..... 17 Non-reset Exceptions ...................................................................................................................... 18 Processing Handlers for Non-reset Exceptions (vhandler.src, vecttbl.src, env.src) ....................... 18 General Exception Processing Handler (_INTHandlerPRG) .......................................................... 19 Setting Vector Base Registers (VBR) (set_vbr function) ................................................................ 23 Exception Processing Routine (intprg.src)...................................................................................... 24 Memory Initialization........................................................................................................................ 25 Memory Initialization Function _INTSCT (dbsct.c).......................................................................... 25 If Initialized Data Areas Other Than the D Section Exist ................................................................
26 If Unitialized Data Areas Other Than the B Section Exist ............................................................... 26 ROM Support Functionality ............................................................................................................. 27
5. Low-level Interface Routine Settings............................................................................................... 28 5.1 Memory Management (sbrk.c, sbrk.h) ............................................................................................ 28 5.2 I/O (lowlvl.src, lowsrc.c, lowsrc.h) ................................................................................................... 29 6. Precautions Regarding C++ Usage (_CALL_INIT Function and CALL_END Function) ................ 30
7. Using C to Code Exception Processing Programs ......................................................................... 32 7.1 Without Multiple Interrupts .............................................................................................................. 32 7.2 With Multiple Interrupts ................................................................................................................... 34 8. Frequently Asked Questions ........................................................................................................... 37 8.1 End Processing ............................................................................................................................... 37 8.2 C++ Functions and Reciprocal C Function Calls ............................................................................ 37 Website and Support
REJ06J0012-0100/Rev.1.00
June 2007
Page 1 of 39
rej06j0012_shc_startup3_an Application Note renesas Download PDF
Add this permalink to your bookmarks for future download of rej06j0012_shc_startup3_an ApplicationNote
Permalink: http://application.emcelettronica.com/renesas/rej06j0012_shc_startup3_an