Internal Error in CallTask()

Discussion of issues related specifically to writing code for native mode devices. This includes ZBasic code as well as assembly language code and C code, both inline and standalone.
Post Reply
pjc30943
Posts: 220
Joined: 01 December 2005, 18:45 PM

Internal Error in CallTask()

Post by pjc30943 »

Perhaps I missed this in the native mode section of the documentation.
For code being written over from a 1281ae to a 1280n dev board, tasks which are called with parameters gives the following:

"Internal error: statement.cpp(1750), Rev.1109: unexpected parameter type for CallTask ..."

Any thoughts on why this occurs?
Paul
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Re: Internal Error in CallTask()

Post by dkinzer »

pjc30943 wrote:Any thoughts on why this occurs?
Except for a few specific issues, any program that compiles for a VM mode device should compile for a native mode device. In any event, an "Internal Error" is an indication of a problem in the compiler itself, not an error in your program.

Please post some of the code related to the issue. If you can, pare the program down to a test case that contains the smallest amount of code that still exhibits the problem. That helps us zero in on the problem quickly.

Thanks.
- Don Kinzer
pjc30943
Posts: 220
Joined: 01 December 2005, 18:45 PM

Re: Internal Error in CallTask()

Post by pjc30943 »

dkinzer wrote: Please post some of the code related to the issue. If you can, pare the program down to a test case that contains the smallest amount of code that still exhibits the problem. That helps us zero in on the problem quickly.

Thanks.

Here's the example:

Code: Select all


Option TargetCPU 1280n

public const taskStackSize as integer = 700
public taskStack (1 to taskStackSize) as byte

sub Main()

  callTask task(false), taskStack

end sub

sub task(byval TF as boolean)

end sub
This returns the error stated above.
Paul
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Post by dkinzer »

Thanks for the test case. We found the cause of the problem which had a very simple solution. You can download an experimental version of the compiler with that correction (along with some other organizational changes) using the link below.

http://www.zbasic.net/download/ZBasic/2 ... _2-4-5.zip
- Don Kinzer
pjc30943
Posts: 220
Joined: 01 December 2005, 18:45 PM

Post by pjc30943 »

Thanks Don; that seems to have resolved the issue.
Paul
Post Reply