Application built with M2M studio reboots


I’m experiencing a frustrating problem while using M2M studio and are wondering if anyone else experienced the same problem as me.

The problem is this : When I compile my fairly large application under M2M for Target Mode, the application reboots continously after it is loaded on the target HW. I get no errors or warnings when I compile my application under M2M. If I then compile the same application using the older GCC compiler and using command line “wmmake” method, then it runs correctly on the same target HW.

Note that I use exactly the same source code and same hardware . Only difference is M2M compiler versus the older one. The dwl generated by the old compiler works, but the one generated by M2M does not. But if I compile small sample applications in M2M studio, they run correctly. It is only my big application that does does like M2M.

I’m not sure if this is important but I also noticed the size of the DWL binaries from the two compilers is quite different in size. The M2M one is 151.3 Kb while the older GCC one yields a 155.6 Kb sized binary when compiling exactly the same source code.

Did anyone else experience the same?


What about your call stack size?

Old IDE V1 used to implicitely multiply your call stack by 3 before the compilation when yau are using GCC: if you compare the .c file in the src directory, and the one in the gcc/out directory, you will see what I mean.

M2M Studio seems not to do the same (since it doesn’t copy source files before compiling them).

It adds a stack size “*3” factor when:

  • you create a sample from the wizard
  • you use the IDE V1 project import wizard

It doesn’t add the “*3” factor when you simply drag’n drop or import manually your source files in an already created project.


It is a good suggestion to look at the stack size. However, even after I manually tripled the stack size in main.c of my application, it still reboot if compiled with M2M. Thanks for the suggestion anyway.


After the reset, trying to retrieve teh BAckTraces, that should give you a reason for the reset.

Also the binary size is less when compiled with M2M Studio is because, M2M studio uses the “ARM_ELF GCC cross compiler” which is a better optimized compiler than the GCC compiler used previous IDE.