PC port cannot compiled!

nobody wrote on Tuesday, November 09, 2004:

cd D:\watcom\rtos\Demo\PC
wmake -f D:\watcom\rtos\Demo\PC\rtosdemo.mk -h -e -a D:\watcom\rtos\Demo\PC\port.obj
wcc …\…\source\portable\owatcom\16bitdos\pc\port.c -i=d:\watcom\h;…\common\include;…\…\source\include;…\…\source\portable\owatcom\16bitdos\common -w4 -e25 -za -s -dOPEN_WATCOM_INDUSTRIAL_PC_PORT -dUSE_STDIO -j -zq -otexan -fpc -zu -1 -bt=dos -ml
…\…\source\portable\owatcom\16bitdos\common\portasm.h(64): Error! E1156: Assembler error: ‘Syntax error’
Error(E42): Last command making (D:\watcom\rtos\Demo\PC\port.obj) returned a bad status
Error(E02): Make execution terminated
Execution complete

nobody wrote on Tuesday, November 09, 2004:

I just downloaded the latest built, opened the Open Watcom project, and built it with no errors or warnings.

Which version of FreeRTOS are you using?
Which version of Open Watcom are you using?

If you have previously built the demo with another compiler - try marking the project for a complete rebuild then trying again.

rtel wrote on Tuesday, November 09, 2004:

Also - which host operating system are you using.

Line 64 in portasm.h is:

"call    far vTaskSwitchContext"

vTaskSwitchContext is included as an extern at the top of the file - so I cannot see how this results in a syntax error.  Have you edited the files at all?

nobody wrote on Thursday, December 02, 2004:

I have the same problem as “nobody”.
PC Demo cannot compile:
…\…\source\portable\owatcom\16bitdos\common\portasm.h(64): Error! E1156: Assembler error: ‘Syntax error’
This is at line “call far vTaskSwitchContext” in portasm.h

FreeRTOS version is 2.5.4
Open Watcom version is 1.3
Host operating system Windows 2000.

Ryko

rtel wrote on Thursday, December 02, 2004:

I have not been able to reproduce this problem.  Could you zip up your entire FreeRTOS directory (open watcom project files, object filea and all) and send it to me?  Then maybe I can reproduce it with your files and find the solution.

See http://www.freertos.org/a00115.html for the email address to use.

Thanks.

rtel wrote on Thursday, December 02, 2004:

Just noticed your Open Watcom version is actually different - wait until I update my version and check it out.

rtel wrote on Thursday, December 02, 2004:

For Open Watcom V1.3 only:

Replace the two occurrences of the line:

"call     far vTaskSwitchContext"

with

"call     vTaskSwitchContext"

(ie. remove the ‘far’)

Then it will compile and execute fine.  I need to investigate what has changed between V1.2 and V1.3 of Open Watcom.

rtel wrote on Thursday, December 02, 2004:

Sorry, forgot the name of the file to alter:

FreeRTOS\Source\portable\oWatcom\16BitDOS\common\portasm.h

ryko wrote on Friday, December 03, 2004:

Thanks.
I also already did notice that it does compile it “far” is removed. But I wasn’t sure if correct code was generated (disassembly looks ok though) because the demo won’t run ok.
In a Win2K cmd-window:
Seem to crash when the scheduler starts. The print task (I assume) prints that several tasks are started. Then it is dead.
In a Win98 Dos-window or in DOS:
It runs, but report like “Math task 3/4 failed” and the “Com test” does not seem to go at all (with a loopback).

I compiled it with no changes to source-files or settings in Watcom.
Haven’t looked much more into it yet.

rtel wrote on Friday, December 03, 2004:

My only trial with OW V1.3 so far is running under FreeDOS where it seemed to work fine.  I will give it a go under Win2K also but this will not be for an hour or two I’m afaid.

nobody wrote on Friday, December 03, 2004:

The FreeRTOS site says that there may be problems if you step through the init code using the Watcom debugger as it enables interrupts between steps.  Have you tried just running a released code with no debugger?

rtel wrote on Friday, December 03, 2004:

Update for others following the thread.

I have mailed my .exe to the previous poster for a test on his/her machine. 

Everything is as expected when I execute under a Win2K DOS box with both a release and a debug build.

nobody wrote on Friday, December 03, 2004:

Remember you must have NO87 defined.

Type ‘set NO87=1’ in the DOS box before run the demo.  Otherwise it will not work.