os_wait

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

I need a delay. I researched the documentation and found nothing other than the command os_wait. I obviously have missed something because I get the following:

   

LIBX51.exe TRANSFER 'C:\Users\AndyE\Desktop\play\play.cydsn\DP8051_Keil_816\Debug\CyBootAsmKeil.OBJ', 'C:\Users\AndyE\Desktop\play\play.cydsn\DP8051_Keil_816\Debug\CyDmac.OBJ', 'C:\Users\AndyE\Desktop\play\play.cydsn\DP8051_Keil_816\Debug\CyFlash.OBJ', 'C:\Users\AndyE\Desktop\play\play.cydsn\DP8051_Keil_816\Debug\CyLib.OBJ', 'C:\Users\AndyE\Desktop\play\play.cydsn\DP8051_Keil_816\Debug\cymem.OBJ', 'C:\Users\AndyE\Desktop\play\play.cydsn\DP8051_Keil_816\Debug\cyPm.OBJ', 'C:\Users\AndyE\Desktop\play\play.cydsn\DP8051_Keil_816\Debug\CySpc.OBJ', 'C:\Users\AndyE\Desktop\play\play.cydsn\DP8051_Keil_816\Debug\cyutils.OBJ', 'C:\Users\AndyE\Desktop\play\play.cydsn\DP8051_Keil_816\Debug\KeilStart.OBJ', 'C:\Users\AndyE\Desktop\play\play.cydsn\DP8051_Keil_816\Debug\DnCounter.OBJ', 'C:\Users\AndyE\Desktop\play\play.cydsn\DP8051_Keil_816\Debug\DnCounter_PM.OBJ', 'C:\Users\AndyE\Desktop\play\play.cydsn\DP8051_Keil_816\Debug\Feature_Clock.OBJ', 'C:\Users\AndyE\Desktop\play\play.cydsn\DP8051_Keil_816\Debug\FEATURE_COUNTER.OBJ', 'C:\Users\AndyE\Desktop\play\play.cydsn\DP8051_Keil_816\Debug\FEATURE_COUNTER_PM.OBJ', 'C:\Users\AndyE\Desktop\play\play.cydsn\DP8051_Keil_816\Debug\Prism_Clock.OBJ', 'C:\Users\AndyE\Desktop\play\play.cydsn\DP8051_Keil_816\Debug\PrISM12.OBJ', 'C:\Users\AndyE\Desktop\play\play.cydsn\DP8051_Keil_816\Debug\PrISM12_PM.OBJ', 'C:\Users\AndyE\Desktop\play\play.cydsn\DP8051_Keil_816\Debug\PrISM34.OBJ', 'C:\Users\AndyE\Desktop\play\play.cydsn\DP8051_Keil_816\Debug\PrISM34_PM.OBJ', 'C:\Users\AndyE\Desktop\play\play.cydsn\DP8051_Keil_816\Debug\PrISM56.OBJ', 'C:\Users\AndyE\Desktop\play\play.cydsn\DP8051_Keil_816\Debug\PrISM56_PM.OBJ', 'C:\Users\AndyE\Desktop\play\play.cydsn\DP8051_Keil_816\Debug\PrISM78.OBJ', 'C:\Users\AndyE\Desktop\play\play.cydsn\DP8051_Keil_816\Debug\PrISM78_PM.OBJ', 'C:\Users\AndyE\Desktop\play\play.cydsn\DP8051_Keil_816\Debug\RED1.OBJ', 'C:\Users\AndyE\Desktop\play\play.cydsn\DP8051_Keil_816\Debug\RED2.OBJ', 'C:\Users\AndyE\Desktop\play\play.cydsn\DP8051_Keil_816\Debug\RED3.OBJ', 'C:\Users\AndyE\Desktop\play\play.cydsn\DP8051_Keil_816\Debug\RED4.OBJ', 'C:\Users\AndyE\Desktop\play\play.cydsn\DP8051_Keil_816\Debug\RED5.OBJ', 'C:\Users\AndyE\Desktop\play\play.cydsn\DP8051_Keil_816\Debug\RED6.OBJ', 'C:\Users\AndyE\Desktop\play\play.cydsn\DP8051_Keil_816\Debug\RED7.OBJ', 'C:\Users\AndyE\Desktop\play\play.cydsn\DP8051_Keil_816\Debug\RED8.OBJ', 'C:\Users\AndyE\Desktop\play\play.cydsn\DP8051_Keil_816\Debug\State_Clock.OBJ', 'C:\Users\AndyE\Desktop\play\play.cydsn\DP8051_Keil_816\Debug\UpCounter.OBJ', 'C:\Users\AndyE\Desktop\play\play.cydsn\DP8051_Keil_816\Debug\UpCounter_PM.OBJ', 'C:\Users\AndyE\Desktop\play\play.cydsn\DP8051_Keil_816\Debug\cyfitter_cfg.OBJ' TO C:/Users/AndyE/Desktop/play/play.cydsn/DP8051_Keil_816/Debug/play.LIB
LX51.exe 'C:\Users\AndyE\Desktop\play\play.cydsn\DP8051_Keil_816\Debug\main.OBJ', './DP8051_Keil_816/Debug/play.LIB'  TO  "C:/Users/AndyE/Desktop/play/play.cydsn/DP8051_Keil_816/Debug/play.omf" PR(C:/Users/AndyE/Desktop/play/play.cydsn/DP8051_Keil_816/Debug/play.map) IX CODE DW(16) RU CL(XDATA(X:0x0000-X:0x1FFF)) CL(CODE(C:0x0000-C:0xFFFF)) CL(CONST(C:0x0000-C:0xFFFF))  CASE
*** ERROR L127: UNRESOLVED EXTERNAL SYMBOL
SYMBOL:  _os_wait
MODULE:  C:\Users\AndyE\Desktop\play\play.cydsn\DP8051_Keil_816\Debug\main.OBJ (MAIN)
*** ERROR L128: REFERENCE MADE TO UNRESOLVED EXTERNAL
SYMBOL:  _os_wait
MODULE:  C:\Users\AndyE\Desktop\play\play.cydsn\DP8051_Keil_816\Debug\main.OBJ (MAIN)
ADDRESS: 1000B52H
*** ERROR L128: REFERENCE MADE TO UNRESOLVED EXTERNAL
SYMBOL:  _os_wait
MODULE:  C:\Users\AndyE\Desktop\play\play.cydsn\DP8051_Keil_816\Debug\main.OBJ (MAIN)
ADDRESS: 1000B84H
Program Size: data=19.0 xdata=213 const=525 code=5027
The command 'LX51.exe' failed with exit code '2'.

   

 

   

This is the code. I left out the init() function because it does nothing but start commands for the prism and counter.

   

#include <device.h>
#include <rtx51tny.h>

void main() // Main Program
{
    int i;
   
    init();
    while(1)
    {
        i = Feature_Counter_ReadCounter();

   

        PrISM12_WritePulse0(i); // Channel1 Level set
        PrISM12_WritePulse1(i); // Channel2 Level set
        os_wait(K_IVL, 500, 0);
    }
}
/* [] END OF FILE */

0 Likes
1 Reply
Anonymous
Not applicable

 os_wait is part of the RTX51 Tiny run time library.

   

See the application note at http://www.cypress.com/?rID=47174 for details on how to integrate the run time library into a PSoC Creator project.

   

Of course, if all you want is some form of delay, then you might be better to 'roll your own' or find a solution which doesn't require linking in the run time library.

0 Likes