Hot!Harmony 2.04 Bootloader - Wont' work for real application.

Page: < 12 Showing page 2 of 2
Author
mrpackethead
packet mangler
  • Total Posts : 913
  • Reward points : 0
  • Joined: 2007/04/01 23:33:39
  • Location: 0
  • Status: offline
Re: Harmony 2.04 Bootloader - Wont' work for real application. 2017/11/15 17:37:13 (permalink)
0
So, this gets deeper and more twisted as we go on. 

After a lot of deeper looking into whats going on,  my application code is NOT completing running TCPIP_STACK_Intialize

It gets to line 633, goes away to create the heap, but never returns to complete.  

The behavior of the non bootloader code ( which is identical, except that there is not a bootloader linker ) is that it returns and runs.


Now working on debugging where in this heap that things are going wrong.
 
 
 
post edited by mrpackethead - 2017/11/15 17:51:43

Attached Image(s)

#21
NKurzman
A Guy on the Net
  • Total Posts : 15358
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: online
Re: Harmony 2.04 Bootloader - Wont' work for real application. 2017/11/15 18:42:00 (permalink)
0
Is the System Heap Bigger than the TCP/IP Heap?
#22
mrpackethead
packet mangler
  • Total Posts : 913
  • Reward points : 0
  • Joined: 2007/04/01 23:33:39
  • Location: 0
  • Status: offline
Re: Harmony 2.04 Bootloader - Wont' work for real application. 2017/11/15 18:43:01 (permalink)
5 (1)
Solved.  But i dont' know what is happening to cause the problem in the first place.
 
So, the problem is to do with the heap.     And while I’ve fixed it,  ( hurrah ) I don’t’ know why the change has made it work.
 
During development,  we adjusted the TCPIP STACK DRAM SIZE from the default of 39250 to 64000.    I’m still trying to find out why we did this.   It’s a bit of a effort to go through the git repo to track down when.  
I suspect it was when we were running out of buffer for the HTTP server, and we might have adusted it then.

Running without the bootloader, having this at 64000 caused no problems.  It all was ok.  With the bootloader it does'tn work.  TCPIP_STACK_Intialize wont' complete.       Returning it to the 39250 made it work. 

Can any one offer an explanation as to why this would be a problem?
post edited by mrpackethead - 2017/11/15 18:50:47
#23
NKurzman
A Guy on the Net
  • Total Posts : 15358
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: online
Re: Harmony 2.04 Bootloader - Wont' work for real application. 2017/11/15 19:20:36 (permalink)
0
the Bootloader and the application have their own heap sizes. They are independent.
They use the same RAM. they do not share it.  
If the Stack is too small it could run in to the heap area. but I am guessing.
#24
mrpackethead
packet mangler
  • Total Posts : 913
  • Reward points : 0
  • Joined: 2007/04/01 23:33:39
  • Location: 0
  • Status: offline
Re: Harmony 2.04 Bootloader - Wont' work for real application. 2017/11/15 19:36:26 (permalink)
0
The good thing is that the bootloader in 2.04 with a 2.04 app, actually works pretty well, without any drama.   They have fixed the issues with the interupts. 
 
 
#25
egcasira
Junior Member
  • Total Posts : 42
  • Reward points : 0
  • Joined: 2016/07/29 06:17:36
  • Location: 0
  • Status: offline
Re: Harmony 2.04 Bootloader - Wont' work for real application. 2017/11/17 06:18:57 (permalink)
0
I've different experience with 2.04 bootloader. The SD Card bootloader works in the sense that program the flash with the provided file but, when it comes to launch the application , crashes.
#26
NKurzman
A Guy on the Net
  • Total Posts : 15358
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: online
Re: Harmony 2.04 Bootloader - Wont' work for real application. 2017/11/17 15:30:09 (permalink)
0
Check for the same issues.  The Bootloader pulls in different code for difference configurations.
#27
mrpackethead
packet mangler
  • Total Posts : 913
  • Reward points : 0
  • Joined: 2007/04/01 23:33:39
  • Location: 0
  • Status: offline
Re: Harmony 2.04 Bootloader - Wont' work for real application. 2017/11/17 15:40:41 (permalink)
5 (1)
egcasira
I've different experience with 2.04 bootloader. The SD Card bootloader works in the sense that program the flash with the provided file but, when it comes to launching the application, crashes.


Does the application start  to run? Its well worth combining the bootloader and the debugger into a single project ( add the application as a loadable ).   In my case it took a little bit of time, but i was evnetually able to establish where it was crashing. 
 



#28
muellernick
Super Member
  • Total Posts : 350
  • Reward points : 0
  • Joined: 2015/01/06 23:58:23
  • Location: Germany
  • Status: offline
Re: Harmony 2.04 Bootloader - Wont' work for real application. 2017/11/22 09:39:33 (permalink)
0
I allocate the RAM for TCP, I do NOT assign it in HMC.
At a very early stage of startup, I do allocate about 40 k of RAM for TCP. As soon as I see that the configuration does use TCP, I pass that memory to TCP. If I'm not using TCP, I just free that block.
By allocating the memory at an early stage, I avoid having it sit in the middle of the whole memory and cluttering it. It actually is the very first block.
 
So you also could allocate memory in different sizes depending on what you need. And realloc always works (as long as you shrink Smile: Smile ).
 
Yes, there are people that think alloc is a four letter word. They can't count! mr green: mr green
I'm making zillions of allocs, reallocs and frees without any problem.
 
Nick
#29
Page: < 12 Showing page 2 of 2
Jump to:
© 2018 APG vNext Commercial Version 4.5