Hi
I would solve the second problem first because it may be related - apart from the file system trying to access none-existent memory (as in the link that you pointed out) I don't see the reason for the board to crash when it tries to list the files (
check also that SD Card is disabled - although this shouldn't actually disturb since without a connected SD card it will default to the internal file system).
In the problem 2 it looks as though you are compiling for a boot-loader target with the start code linked to
0x1000. It should be linked to start at
0x0000 and then will also have the other sectors (these are FLASH configuration, start-up and then the application).
For the M52259 use the
M5223X_ROM target - the linker script is the same as used for M5223X and the only thing to change when debugging is the target (from M52235 to M52259) so that the registers are displayed correctly (actually compiling will not result in differences). Only use
M5225X_BM_ROM (
Bare-Minimum boot loader) when there is a boot loader installed. The USB demo has a boot loader installed and that is why it jumps to the start of your code when it is in place (!). It may also allow you to load a BM-target via USB if this is the build ;-) (although it may be size limited (?)).
Note that the BM build uses the linker script file
M5225X_BOOT_APP_FLASH.lcf with following FLASH configuration:
flash (RX) : ORIGIN = 0x00001000, LENGTH = 0x0003F000The M5223X_ROM build uses
M52235EVB_FLASH.lcf with:
flash1 (RX) : ORIGIN = 0x00000000, LENGTH = 0x000400
flashconfig (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000018
flash2 (RX) : ORIGIN = 0x00000420, LENGTH = 0x003FBE0I have understood that you only ran the code together with the boot loader part from the USB demo binary. If this is the case it may be restricting something (like the file system listing) - I can't actually explain what it could be but I would get the project working stand-alone first and then see whether it helps. If not I would disable the watchdog and try to debug the exception according to this guide:
http://www.utasker.com/forum/index.php?topic=123.msg468#msg468 . If it is really try to access unavailable FLASH (a valid reason for a crash) it would probably be quite obvious and the cure also.
Good luck.
Regards
Mark