I have an application that works using the emulator but not when booting from flash. (how many times have we heard this one?)
I broke in with the emulator with no gel file loaded, and the bootcfg register was as expected but the bootcmplt register had a nonzero value in the error field. According to the dm6435 datasheet, I should check SPRAAG0 for the error codes. I couldn't find any specific error codes there, only a mention that errors would be written.
That being said, I place my .bss section and a few buffers in L1DSRAM and I believe this is what is causing my issues. According to SPRAAG0, I can't place any initialized memory sections in the lower 20k of L1D or it will wax the bootloader. I'm reserving a large amount of sysmem in L1D for my heap, and I think (?) that if I could ensure the linker placed it in this lower 20k boundary that it would resolve my problem. Do I just need to declare 2 sections in L1D, one for my heap starting at the low value, and 1 for the .bss and remainder, or is there a better way to do this?
Edit: I tried this and it didn't work. Apparently there are 2 words worth of initialized data at the beginning of the heap. I have 70k of heap in L1D, so I can't meet the 20k requirement no matter where I place my heap. Is there a workaround? I vaguely seem to remember something about run time initialization of variables as opposed to load time... is this my answer, and is there a way to limit it on a section by section basis?