Can't run my application in release mode

Hello,

I’m using NET+OS 7.4.2 on a ConnectCore9P 9215.

I have a project based on the HTTP AWS sample. I can run it fine in Debug mode.
For the Release mode, I upload the rom.bin file and the image.bin file through ftp while the application is running in debug. I restart the application between the 2 files.

But, when I unplug the JTAG and power my unit, the application doesn’t start. On the STDIO port, it displays the IP address, FTP and HTTP server has started.

However, I can’t access the unit using the IP address, and there is no activity at all (LED are not blinking).

Does anybody have any ideas about it?

Thanks.

It looks like your application is starting if you can see the dialog menu on the serial port since that is generated by the application image. Can you log into it through that menu and change settings? Can you set it to defaults?

My bet is that there is a problem in your application start that is causing the image to hang after it boots.

I would try to do some printf debugging to see if you can figure out where is is crashing.

Add a printf statement, that you’ll recognize, in your root.c file. Does this statement print?

What type of IP address are you seeing in the dialog, AUTOIP, DHCP or statically allocated?

One thing to remember is that when running through the debugger, the debugger scripts set up the chip selects and all other bsp-related settings. When running from FLASH, you bsp sets all that stuff up. So if you have made changes to the bsp (deviates from the default) you’d need to ensure that all of that is correct.

Hello,

Thanks a lot for your reply and suggestions.

The problem was coming from optimization.
In debug mode, optimization is 0, and the application was running fine.
In release mode, optimization is 2 by default, and the application was reseting because of the watchdog. All the init was done properly, but once it reached a specific “tx_queue_send” (in my code), the application was stuck there. Waiting for the watchdog to reply.

I did turn off the optimization in release mode and it is now working fine.