Compiler Runtime Environment
5.7
STARTUP AND INITIALIZATION
5.7.1
Provisions
The following provisions are made regarding the runtime model:
? Kernel mode only
? KSEG1 only
? RAM functions are attributed with __ramfunc__ or __longramfunc__ ,
meaning that all RAM functions end up in the .ramfunc section
5.7.2
PIC32MX Startup Code
The PIC32MX startup code must perform the following:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
5.7.2.1
JUMP TO NMI HANDLER IF AN NMI OCCURRED
If an NMI caused entry to the reset vector, a jump to an NMI handler procedure
( _nmi_handler ) occurs. A weak version of the NMI handler procedure is provided
that performs an ERET . The _nmi_handler function must be attributed with
nomips16 [e.g., __attribute__((nomips16)) ] since the startup code jumps to
this function.
5.7.2.2
INITIALIZE STACK POINTER AND HEAP
The Stack Pointer ( sp ) register must be initialized in the startup code. To enable the
startup code to initialize the sp register, the linker script must initialize a variable which
points to the end of KSEG1 data memory 1 . This variable is named _stack . The user
can change the minimum amount of stack space allocated by providing the command
line option --defsym _min_stack_size= N to the linker. _min_stack_size is
provided by the linker script with a default value of 1024 .
On a similar note, the user may wish to utilize a heap with their application. While the
startup code does not need to initialize the heap, the standard C libraries ( sbrk ) must
be made aware of the heap location and its size. The linker script creates a variable to
identify the beginning of the heap. The location of the heap is the end of the utilized
KSEG1 data memory. This variable is named _heap . The user can change the
minimum amount of heap space allocated by providing the command line option
--defsym _min_heap_size= M to the linker. _min_heap_size is provided by the
1. The end of data memory are different based on whether RAM functions exist. If RAM functions exist, then
part of the DRM must be configured for kernel program to contain the RAM functions, and the Stack
Pointer is located one word prior to the beginning of the DRM kernel program boundary address. If RAM
functions do not exist, then the Stack Pointer is located at the true end of DRM.
? 2007 Microchip Technology Inc.
DS51686A-page 61
相关PDF资料
SW300003-EVAL LIBRARY SOFT MODEM-EVAL ONLY
SW300010-EVAL SPEECH RECOG LIBRARY-EVAL ONLY
SW300040-EVAL LIBRARY NOISE SUPPR-EVAL ONLY
SW300060-EVAL LIBRARY ACOUSTIC ECHO-EVAL ONLY
SW300070-EVAL SOFTWARE LIBR ENC/DEC EVAL ONLY
SW500012 HI-TECH C PRO FOR PIC32
SY87701LHI-EVAL BOARD EVAL SY87701 EXPERIMENT
SY87729LHI-EVAL BOARD EVAL N SY87729 EXPERIMENT
相关代理商/技术参数
SW006021-1 制造商:Microchip Technology 功能描述:MPLAB XC8 STANDARD COMPILER 制造商:Microchip Technology Inc 功能描述:COMPILER MPLAB XC8 STD 制造商:Microchip Technology Inc 功能描述:COMPILER MPLAB XC8 STANDARD 制造商:Microchip Technology Inc 功能描述:COMPILER, MPLAB XC8, STANDARD 制造商:Microchip Technology Inc 功能描述:MPLAB XC8 ANSI C Compiler for the PIC10 (12),(16),(18) (Workstation License) 制造商:Microchip Technology Inc 功能描述:MPLAB XC8 Standard Compiler 制造商:Microchip Technology Inc 功能描述:OPTOCOUPLERS; Core Architecture:PIC; Software Edition:Standard
SW006021-1N 制造商:Microchip Technology 功能描述:MPLAB XC8 STANDARD COMPILER (F 制造商:Microchip Technology Inc 功能描述:MPLAB XC8 STANDARD COMPILER (FLOATING LICENSE) - Boxed Product (Development Kits) 制造商:Microchip Technology Inc 功能描述:COMPILER MPLAB XC8 STD FLOAT LIC 制造商:Microchip Technology Inc 功能描述:MPLAB XC8 Standard Compiler (Fltng Lic)
SW006021-2 制造商:Microchip Technology 功能描述:MPLAB XC8 PRO COMPILER WORKSTATION LICENSE 制造商:Microchip Technology Inc 功能描述:MPLAB XC8 PRO COMPILER - Boxed Product (Development Kits) 制造商:Microchip Technology Inc 功能描述:COMPILER MPLAB XC8 PRO 制造商:Microchip Technology Inc 功能描述:COMPILER, MPLAB XC8, PRO 制造商:Microchip Technology Inc 功能描述:MPLAB XC8 ANSI PRO Compiler for the PIC10 (12),(16),(18) (Workstation License) 制造商:Microchip Technology Inc 功能描述:MPLAB XC8 PRO Compiler 制造商:Microchip Technology Inc 功能描述:SOFTWARE TOOL, MPLAB XC8 PRO COMPILER; Core Architecture:PIC; Supported Families:PIC10, PIC16, PIC18; Software Edition:Linux; License Type:Floating - node; No. of User Licenses:1; Supported Hosts:-
SW006021-2C 制造商:Microchip Technology Inc 功能描述:COMPILER MPLAB XC8 PRO CHI
SW006021-2N 功能描述:开发软件 MPLAB XC8 PRO Compiler (Fltng Lic) RoHS:否 制造商:Atollic Inc. 产品:Compilers/Debuggers 用于:ARM7, ARM9, Cortex-A, Cortex-M, Cortex-R Processors
SW006022-1 制造商:Microchip Technology 功能描述:MPLAB XC16 STANDARD COMPILER 制造商:Microchip Technology Inc 功能描述:MPLAB XC16 STANDARD COMPILER - Boxed Product (Development Kits) 制造商:Microchip Technology Inc 功能描述:COMPILER MPLAB XC16 STD 制造商:Microchip Technology Inc 功能描述:COMPILER MPLAB XC16 STANDARD 制造商:Microchip Technology Inc 功能描述:COMPILER, MPLAB XC16, STANDARD 制造商:Microchip Technology Inc 功能描述:MPLAB XC16 Standard Compiler (Workstation License) 制造商:Microchip Technology Inc 功能描述:OPTOCOUPLERS; Core Architecture:PIC, dsPIC; Software Edition:Standard
SW006022-1N 制造商:Microchip Technology 功能描述:MPLAB XC16 STANDARD COMPILER ( 制造商:Microchip Technology Inc 功能描述:MPLAB XC16 STANDARD COMPILER (FLOATING LICENSE) - Boxed Product (Development Kits) 制造商:Microchip Technology Inc 功能描述:COMPILER MPLAB XC16 FLOAT LIC 制造商:Microchip Technology Inc 功能描述:MPLAB XC16 Standard Compiler (Fltng Lic)
SW006022-2 功能描述:开发软件 MPLAB XC16 PRO Compiler RoHS:否 制造商:Microchip Technology 产品: 用于: