请问EEWORLD的工程师,小弟第一次烧写2812,结果程序运行到一个FOR循环时卡住出不来了(我在FOR循环后加了个亮灯的语句,结果没有亮灯,去掉FOR循环,亮灯正常,故得出程序卡在FOR循环里了)还请达人指点一下啊。我在编译时,曾报这样的警告:
>> warning: creating .stack section with default size of 400 (hex) words.
Use
-stack option to change the default size.
不知道跟这个有没有关系?
我的CMD配置文件如下:
MEMORY
{
PAGE 0: /* Program Memory */
/* Memory (RAM/FLASH/OTP) blocks can be moved to PAGE1 for data allocation */
ZONE0 : origin = 0x002000, length = 0x002000 /* XINTF zone 0 */
ZONE1 : origin = 0x004000, length = 0x002000 /* XINTF zone 1 */
ZONE2 : origin = 0x080000, length = 0x080000 /* XINTF zone 2 */
ZONE6 : origin = 0x100000, length = 0x080000 /* XINTF zone 6 */
OTP : origin = 0x3D7800, length = 0x000800 /* on-chip OTP */
FLASHJ : origin = 0x3D8000, length = 0x002000 /* on-chip FLASH */
FLASHI : origin = 0x3DA000, length = 0x002000 /* on-chip FLASH */
FLASHH : origin = 0x3DC000, length = 0x004000 /* on-chip FLASH */
FLASHG : origin = 0x3E0000, length = 0x004000 /* on-chip FLASH */
FLASHF : origin = 0x3E4000, length = 0x004000 /* on-chip FLASH */
FLASHE : origin = 0x3E8000, length = 0x004000 /* on-chip FLASH */
FLASHD : origin = 0x3EC000, length = 0x004000 /* on-chip FLASH */
FLASHC : origin = 0x3F0000, length = 0x004000 /* on-chip FLASH */
FLASHA : origin = 0x3F6000, length = 0x001F00 /* on-chip FLASH */
romfunc : origin = 0x3f7f00, length = 0x0000f0 /* used to store ram function */
BEGIN : origin = 0x3F7FF6, length = 0x000002 /* Part of FLASHA. Used for \"boot to Flash\" bootloader mode. */
ramfunc : origin = 0x3f8000, length = 0x0000f0 /* used for ram function */
RAMH0 : origin = 0x3F80f0, length = 0x001f0e /* on-chip RAM block H0 */
/* BEGIN : origin = 0x3F9ffe, length = 0x000002*/
/* ZONE7 : origin = 0x3FC000, length = 0x003FC0 /* XINTF zone 7 available if MP/MCn=1 */
ROM : origin = 0x3FF000, length = 0x000FC0 /* Boot ROM available if MP/MCn=0 */
RESET : origin = 0x3FFFC0, length = 0x000002 /* part of boot ROM (MP/MCn=0) or XINTF zone 7 (MP/MCn=1) */
VECTORS : origin = 0x3FFFC2, length = 0x00003E /* part of boot ROM (MP/MCn=0) or XINTF zone 7 (MP/MCn=1) */
PAGE 1 : /* Data Memory */
/* Memory (RAM/FLASH/OTP) blocks can be moved to PAGE0 for program allocation */
/* Registers remain on PAGE1 */
/* Allocate sections to memory blocks.
Note:
codestart user defined section in DSP28_CodeStartBranch.asm used to redirect code
execution when booting to flash
ramfuncs user defined section to store functions that will be copied from Flash into RAM
*/
/* Allocate IQ math areas: */
IQmath : > RAMH0 PAGE = 0 /* Math Code */
IQmathTables : > ROM PAGE = 0, TYPE = NOLOAD /* Math Tables In ROM */
/* .reset indicates the start of _c_int00 for C Code.
/* When using the boot ROM this section and the CPU vector
/* table is not needed. Thus the default type is set to
/* DESECT */
.reset : > RESET, PAGE = 0, TYPE = DSECT
vectors : > VECTORS PAGE = 0, TYPE = DSECT
/* ------------------------------------------------------------- */
/* The following allocations are required for the DSP28 Header file
examples. Each allocation maps a structure defined in the DSP28
header files to the memory location of those registers.
*/