We have a project that is based on MQX 4.1. This was ported forward from a similar project that was done with 4.0. In this project we have a bootloader and our main application that runs on MQX at 0x4000 in flash.
In our previous project, we would run into the bootloader, transfer an image stored in external SPI flash into CPU flash starting at 0x4000 for about 300k bytes or so. Then, we will vector to _boot (the address for that). In that project it was fine.
In this project, our bootloader is virtually the same. However, when we try to vector into the same place, the system will get an unhandled interrupt.
When it vectors, I can step through assembly code to an external function called __call_static_initializers. In this code on a successful vector, there is a check for a null pointer.If it it is null, it will move on and run. In the newer code, it will be non null. Actually, the address is 0x2000 (nothing lives there) and will crash.
The only difference I can see between projects is that in 4.1 the code model went from being ewl to being c9x by default. This _call_static_initializers call lives in the EWL support files.
I have no idea if this has anything to do with it or not. Any ideas on how to narrow this down is greatly appreciated.