Interrupt Handling Model: ------------------------- This example provides source code for AndeScore to 1. perform startup initialization for C language support as well as for SoC. 2. hook up C-based interrupt service routines. Independent of SoC types, assembly code supports the following interrupt functionality which C-based ISR can assume: 1. IVIC mode is used with 6 unique interrupt vectors, HW0 ~ HW5. 2. HW0 has the highest priority while HW5 has the lowest priority. 3. By default, a higher priority interrupt can preempt a lower priority one. Source code: 0. readme.txt: this file 1. SoC-independent code to support this interrupt model: * crt0.S: startup root and interruption table * interrupt.h: assembly macros used in crt0.S * init-default.c: control code to provide initialization sequence, default behavior, and customization points based on weak functions. * config.h: define compilation modes (for debugger or for flash) 2. Example code to be replaced based on SoC and user applications: * ag101.h: example SoC header file * ag101_16mb.h: example SoC header file * init-soc.c: example SoC-specific initialization. * interrupt.c: example ISR routines * interrupt-c-ext.c: example ISR routines to implement with C-extension * uart.c: example code for UART * main.c: example foreground task * remap.S: remap dram and flash * main-lm.c: example code for local memory * main-standby.c: example code for standby * main-pfm.c: example code for performance counter * main-cache.c: example code for cache * nds32.ld: linker script to compile to work with debugger or burning to flash * nds32-burn.ld: linker script to compile for burning to flash and do not remap flash and dram * nds32-burn-16mb.ld: the same as nds32-burn.ld but for 16MB memory space platform * Makefile: makefile to make the startup demo * libnds32_vec4.a: vector table for C extension ISR to use Building the example: --------------------- 0). For burning this startup code to xc5's flash, please change "config.h" to #define BURN 1 1). For running this startup code in a 16MB memory map SoC, please define CONFIG_AG101P_16MB in "config.h". #define CONFIG_AG101P_16MB 2). For building the interrupt startup code demo, type make 3). For building the local memory startup code demo, type make LM=1 The default configuration is cpu transmission.If you want to configure it as DMA transmission,define "USE_LM_DMA" in config.h 4). For building the standby startup code demo, type make STANDBY=1 5). For building the performance counter startup code demo, type make PFM=1 6). For building the cache startup code demo, type make CACHE=1 7). For building the C extension startup code demo, type make CEXT=1 8). For building the C extension startup code demo In 4GB memory map, type make LS1=1 In 16MB memory map, type make LS1=1 16MB=1 9). For building the C extension startup code demo, type make LS2=1 10). For building the C extension startup code demo, type make LS3=1