IceCube
Tester - PRO for PSoC
 
Reged: Jun 27 2007
Posts: 86
Loc: The Netherlands
|
|
At startup, before reaching main, the LoadConfigInit routine overwrites the stack and program crashes on RET instruction.
See attached screenshot.
Regards, Rolf
|
IceCube
Tester - PRO for PSoC
 
Reged: Jun 27 2007
Posts: 86
Loc: The Netherlands
|
|
Processor: CY8C27443-24PXI HI-TECH build 2249
Project attached.
Rolf
|
IceCube
Tester - PRO for PSoC
 
Reged: Jun 27 2007
Posts: 86
Loc: The Netherlands
|
|
Adding --reentrant solves the problem, but this is, of course not the right solution.
Regards, Rolf
|
clyde
HI-TECH team member
   
Reged: Oct 16 2003
Posts: 633
|
|
Rolf, when I open this project in PD, it tells me that "The specified part is not loaded in the device library".
Is there some special SP I need for this?
|
IceCube
Tester - PRO for PSoC
 
Reged: Jun 27 2007
Posts: 86
Loc: The Netherlands
|
|
Hi Clyde,
I have no special servicepack, just V4.4 build 1884 + SP3. I tried it on another PC and it opens okay.
I have had this problem also, maybe try unpack on the local HD, and then start it from there.
Reinstalling PSoC designer may help also, or maybe try to open with V5.0 beta.
Regards, Rolf
|
IceCube
Tester - PRO for PSoC
 
Reged: Jun 27 2007
Posts: 86
Loc: The Netherlands
|
|
Hello Clyde,
Is there any progress on this, or can I do anything?
Regards, Rolf
|
rflores
Cypress FAE
Reged: Jul 10 2007
Posts: 52
|
|
This is fixed in PD50 (but that's not ready for prime-time yet). The problem occurs because <boot.tpl> blindly sets SP = 0x80 for HiTech before eventually calling LoadConfigInit() (which allocates a "shadow" register near 0x80 clobbering the return address on the stack). The PD44 <boot.tpl> should use the _Lstackps variable. PD44 needs fixing, but PD50 has been getting the attention for the last few months. You might try hacking <boot.tpl> per the following:
Code:
IF (TOOLCHAIN & HITECH) ;--------------------------- ; Set up the Temporary stack ;--------------------------- ; A temporary stack is set up for the SSC instructions. ; The real stack start will be assigned later. ; global _Lstackps ; notify compiler of external symbol mov A, _Lstackps ; Set top of stack to end of used RAM swap SP, A ; This is only temporary if going to LMM ELSE ;------------------ ; Set up the stack ;------------------ mov A, __ramareas_end ; Set top of stack to end of used RAM swap SP, A ; This is only temporary if going to LMM ENDIF
|
IceCube
Tester - PRO for PSoC
 
Reged: Jun 27 2007
Posts: 86
Loc: The Netherlands
|
|
Okay, thanks Rick!
|
saltisol
stranger
Reged: Jul 30 2008
Posts: 1
|
|
Hi,
I did probably run into the same problem which I have been tracing for the last two days. However, when I updated my PD 4.4 SP3 boot.tpl file, regenerated the code and re-compiled I got the following error from HI-TECH compiler:
!W ./adms.c(116):(690) interrupt function requires address (warning) : 0: (499) undefined symbol: (error) _Lstackps(./obj/boot.obj)
and here is the relevant part in boot.tpl:
IF (TOOLCHAIN & HITECH) ;--------------------------- ; Set up the Temporary stack ;--------------------------- ; A temporary stack is set up for the SSC instructions. ; The real stack start will be assigned later. ; ;;;CL;;; _stack_start: equ 80h ;;;CL;;; mov A, _stack_start ; Set top of stack to end of used RAM global _Lstackps ; notify compiler of external symbol mov A, _Lstackps ; Set top of stack to end of used RAM swap SP, A ; This is only temporary if going to LMM ELSE ;------------------ ; Set up the stack ;------------------ mov A, __ramareas_end ; Set top of stack to end of used RAM swap SP, A ; This is only temporary if going to LMM ENDIF
(the comments I did are marked with ;;;CL;;;)
|
clyde
HI-TECH team member
   
Reged: Oct 16 2003
Posts: 633
|
|
The symbol __Lstackps has two underscores at the beginning, not one.
|