I tried to declare this array in "const" format, then my program works fine.
Is this mean the data array too big ?
in which scope you declare the array: global or local in a function?
Depending on this the array is located in the DATA-area of RAM or in the STACK-area. The stack which is available for each thread you define during thread-creation. So I assume you got a stack-overflow with your large arrray because the thread-stack is too small.
If you declare your array as "const" it is located in DATA-area of memory (this ensures the linker) which is usually much larger than the stack. The size of the DATA-area you can define in the linker-script.
I get this too.... " Use the "-vectorload yes" option to retain this code." I just ignore it. Does not seem to bother anything.
Thanks for your explanation. My stack is too small.
BTW, anyone knows this warning message's meaning ?
Warning: 256 bytes of interrupt vector code have been removed from the image.
Use the "-vectorload yes" option to retain this code. // What is this Warning mean? Should I follow this instruction?
I don't follow this instruction now and everything seems like ok. But, I am afraid this will cause side effect.
you can ignore this message! It's a message from elf2img-tool and the explanation for that you can find in the readme.txt in the elf2img-folder ( <install_path>\EZ-USB FX3 SDK\1.1util\elf2img\ ):
The ARM926EJ-S core on the FX3 device has its reset and interrupt vectors
stored in the first 256 bytes of memory (address range 0x00 - 0x100). It
is not advisable to load any code directly into this address range as it
may interfere with the boot loader or active firmware operation. The FX3
firmware library and default linker settings ensure that no valid code is
to be loaded directly into this address range. The interrupt vectors are
safely copied into this area once the firmware starts running.
The elf2img utility in default mode removes any data in the address range
0x00 - 0x100 while generating the boot image. This is safe because the
recommended linker settings ensure that no valid code/data is placed in
this address range.
This behavior can be over-ridden using the -vectorload command line option.
The <vecload> value is a yes/no string, which when set to "yes" causes
the tool to retain any data in this address range in the boot image. The
default value for this parameter is "no".
Thanks for your detailed explanation.