Jump to content
babos

Trouble Compiler

Recommended Posts

What about this ?!? Please.

 

 

Executing: "C:\Program Files\SourceBoost\boostc++_pic18.exe" mrtos.c -O1 -W1 -t 18F8722

BoostC++ Optimizing C++ Compiler Version 6.96 (for PIC18 architecture)

http://www.sourceboost.com

Copyright© 2004-2009 Pavel Baranov

Copyright© 2004-2009 David Hobday

Licensed to Massimo Romano under Single user Pro License for 1 node(s)

Limitations: PIC18 max code size:Unlimited, max RAM banks:Unlimited

mrtos.c

<C:\Program Files\SourceBoost\include\icd2.h> @ 20: MESSAGE: "Including ICD2 declarations (icd2.h)"

<C:\Program Files\SourceBoost\include\icd2.h> @ 1100: MESSAGE: "Warning: ICD2 Reserved ROM address range:0x1FD80-0x1FFFF (use linker -rt option)"

succes

sExecuting: "C:\Program Files\SourceBoost\boostc++_pic18.exe" pid.c -O1 -W1 -t 18F8722

BoostC++ Optimizing C++ Compiler Version 6.96 (for PIC18 architecture)

http://www.sourceboost.com

Copyright© 2004-2009 Pavel Baranov

Copyright© 2004-2009 David Hobday

Licensed to Massimo Romano under Single user Pro License for 1 node(s)

Limitations: PIC18 max code size:Unlimited, max RAM banks:Unlimited

pid.c

success

Executing: "C:\Program Files\SourceBoost\boostlink_pic.exe" "E:\G26CPP\G26RTOS\MainBoard\mrtos.obj" "E:\G26CPP\G26RTOS\MainBoard\pid.obj" "E:\G26CPP\G26RTOS\MainBoard\auxiliary26lib.lib" "E:\G26CPP\G26RTOS\MainBoard\eat26lib.lib" "E:\G26CPP\G26RTOS\MainBoard\fans26lib.lib" "E:\G26CPP\G26RTOS\MainBoard\io26lib.lib" "E:\G26CPP\G26RTOS\MainBoard\kernel26lib.lib" "E:\G26CPP\G26RTOS\MainBoard\owg26lib.lib" "E:\G26CPP\G26RTOS\MainBoard\pumps26lib.lib" "E:\G26CPP\G26RTOS\MainBoard\spi_motor26lib.lib" "E:\G26CPP\G26RTOS\MainBoard\valves26lib.lib" "C:\Program Files\SourceBoost\Lib\eeprom.pic18.lib" "C:\Program Files\SourceBoost\novo\novo_pic18t6e4ts2.lib" -O1 -p "MRTOS" -t 18F8722 -swcs -icd2 -rt 0x1F000

BoostLink Optimizing Linker Version 6.96

http://www.sourceboost.com

Copyright© 2004-2009 Pavel Baranov

Copyright© 2004-2009 David Hobday

Optimisation level:1

Caution: argument of 'delay_us' calls must have a value of 1 or more

Caution: Delay inaccurrate: 'delay_us', Delay overhead:0ms, Unit delay:0.00112ms, Delay resolution:1 units

Caution: Delay inaccurrate: 'delay_10us', Delay overhead:0ms, Unit delay:0.01008ms, Delay resolution:1 units

Warning unreferenced functions removed:

pid_init in: E:\G26CPP\G26RTOS\MainBoard\pid.c

pid_calc_float in: E:\G26CPP\G26RTOS\MainBoard\pid.c

oven_pid_calc in: E:\G26CPP\G26RTOS\MainBoard\pid.c

 

B) Error: Can't fit Avoid code boundary code in function:Sys_Yield

failure :blink:

BUILD SUCCEEDED: Fri Oct 02 18:07:14 2009

Share this post


Link to post
Share on other sites

babos,

 

Error: Can't fit Avoid code boundary code in function:Sys_Yield

failure

The message generated by SysYield function means that your code has too many Sys_Yield function calls in it. Sys_Yield is also added into the code when any Novo RTOS functions that are preceded with Sys_ are called.

 

And here is a quote from the Novo RTOS manual, giving a hint about this error:

Quantity of yielding functions

Each yielding function call generates a new return point. Each return point is added

to a table, consuming more ROM. This table is limited to 255 instructions in length

(including any code page switching that maybe required) and is not allowed to

cross a page boundary. If the table becomes full no more yielding points can be

added. If the table overflows a boundary crossing error will be reported.

So it is recommended that you use a minimum number of yielding function calls.

 

I hope that helps.

 

Regards

Dave

Share this post


Link to post
Share on other sites
babos,

 

Error: Can't fit Avoid code boundary code in function:Sys_Yield

failure

The message generated by SysYield function means that your code has too many Sys_Yield function calls in it. Sys_Yield is also added into the code when any Novo RTOS functions that are preceded with Sys_ are called.

 

And here is a quote from the Novo RTOS manual, giving a hint about this error:

Quantity of yielding functions

Each yielding function call generates a new return point. Each return point is added

to a table, consuming more ROM. This table is limited to 255 instructions in length

(including any code page switching that maybe required) and is not allowed to

cross a page boundary. If the table becomes full no more yielding points can be

added. If the table overflows a boundary crossing error will be reported.

So it is recommended that you use a minimum number of yielding function calls.

 

I hope that helps.

 

Regards

Dave

 

Effectively there are many Sys_Yield or Sys_Sleep in a program because

any task must be wait certain amount of time to proceed in many part of program

and must be switching the control to other task in this time.

maybe I must use semaphore but I don't understand the concept unfortunally also for the event manager.

The examples in the manual aren't very clarifiers, like other explanations for any novo function....

or maybe I just can not understand , sorry.

 

Is there alternative?

Thank's

Babos

Edited by babos

Share this post


Link to post
Share on other sites

Hi Babos,

 

Semaphore are very useful for passing a message to another task that something has happened and go do something.

 

A message system passing a char or int would be useful so that one could pass a code to another task and trasfer a little bit more info than just a semaphore. Maybe something for a future rease of Novo.

 

Here is a simple bit of code which demonstrates (maybe) a use for semaphores. I have a small project that can accept/validate either a bank note or coin then dispenses a blank token from a hopper.

 

void TaskNoteAcceptor()
{
static unsigned char	naState = NA_IDLE;

while (1)	// Task loop.
{
	if (SysTrySemaphore(hHopperEmpty))		// check if hopper empty.
	{
		naState = NA_DISABLE;				// yes, disable note acceptor.
	}
.
.
.
	SysSignalSemaphore(hNoteAccept);		// tell hopper we have a good note.
.
.
.

	Sys_Sleep(1);
} // end loop.
}

void TaskCoinHopper()
{
static unsigned char	chState = CH_IDLE;

while (1)	// Task loop.
{
	switch (chState) {
	case CH_IDLE:
		if (bNoteCoin)						// Note or Coin device ?
		{
			Sys_WaitSemaphore( hNoteAccept, EVENT_NO_TIMEOUT ); // Note.
		}
		else
		{
			Sys_WaitSemaphore( hCoinAccept, EVENT_NO_TIMEOUT ); // Coin.
		}
.
.
.
		break;

	case CH_DISPENCE:
.
.
.
		SysSignalSemaphore(hHopperEmpty)	// tell note acceptor coin hopper is empty.
.
.
.
		break;
.
.
.
	} // end switch.
	Sys_Sleep(1);
} // end while.
}

 

Cheers

 

Reynard

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...