I have that pdf open
not succeded yet.
----------------------------------------------------------------------
Debug build of project `D:\Tekniska H
#pragma config OSC = INTIO67, FCMEN = OFF, IESO = OFF, PWRT = OFF, BOREN = SBORDIS, BORV = 3, WDT = OFF
#pragma config WDTPS = 32768, MODE = MC, ADDRBW = ADDR20BIT, DATABW = DATA16BIT, WAIT = OFF, CCP2MX = PORTC
#pragma config ECCPMX = PORTE, LPT1OSC = OFF, MCLRE = ON, STVREN = ON, LVP = OFF, BBSIZ = BB2K, XINST = OFF
#include <salvo.h>
#include "mem.c"
#undef OSC
#include <p18f8722.h>
#include <stdio.h>
void main( void )
{
OSInit();
}
Daani4all wrote:-DMAKE_WITH_FREE_LIB -DSYSE appears automatically when I add "MAKE_WITH_FREE_LIB" in project options
If I understood the book right I should copy the mem.c from my salvo folder into my project folder and include it right?
then I #include it in the main file togheter with salvo.h. I also have my salvocgf.h added.
Then I add the library search path: salvo\lib\mcc18 and MCC18\lib
Linker Script Search path: MCC18\bin\LKR and include search path salvo\inc
at last I create a main.c and this is what it looks like:
- Code: Select all
#pragma config OSC = INTIO67, FCMEN = OFF, IESO = OFF, PWRT = OFF, BOREN = SBORDIS, BORV = 3, WDT = OFF
#pragma config WDTPS = 32768, MODE = MC, ADDRBW = ADDR20BIT, DATABW = DATA16BIT, WAIT = OFF, CCP2MX = PORTC
#pragma config ECCPMX = PORTE, LPT1OSC = OFF, MCLRE = ON, STVREN = ON, LVP = OFF, BBSIZ = BB2K, XINST = OFF
#include <salvo.h>
#include "mem.c" //aek ABSOLUTELY NOT!
#undef OSC
#include <p18f8722.h>
#include <stdio.h>
void main( void )
{
OSInit();
}
not much? so I cant see why Im having so much trouble. I have reinstalled it several times and always ends up here?
#include <salvo.h>
#include <p18f8722.h>
#include <stdio.h>
#include "portmap.h"
#include "Init.h"
#include "lcd.h"
#undef OSC
_OSLabel(Count_Task1)
_OSLabel(Display_Task1)
unsigned char counter = 0;
unsigned char finalval = 0;
void Count_Task( void )
{
for(;;)
{
counter++;
OS_Yield(Count_Task1);
}
}
void Display_Task( void )
{
for(;;)
{
finalval = counter<<5;
OS_Yield(Display_Task1);
}
}
void main( void )
{
OSInit();
OSCreateTask(Count_Task, OSTCBP(1), 10);
OSCreateTask(Display_Task, OSTCBP(2), 10);
for(;;)
OSSched();
}
#define OSUSE_LIBRARY TRUE
#define OSLIBRARY_TYPE OSF
#define OSLIBRARY_GLOBALS OSF
#define OSLIBRARY_CONFIG OSA
#define OSEVENTS 2
#define OSEVENT_FLAGS 0
#define OSMESSAGE_QUEUES 0
#define OSTASKS 2#pragma config OSC = INTIO67, FCMEN = OFF, IESO = OFF, PWRT = OFF, BOREN = SBORDIS, BORV = 3, WDT = OFF
#pragma config WDTPS = 32768, MODE = MC, ADDRBW = ADDR20BIT, DATABW = DATA16BIT, WAIT = OFF, CCP2MX = PORTC
#pragma config ECCPMX = PORTE, LPT1OSC = OFF, MCLRE = ON, STVREN = ON, LVP = OFF, BBSIZ = BB2K, XINST = OFF
#include <salvo.h>
#include <p18f8722.h>
#include <stdio.h>
#include "portmap.h"
#include "Init.h"
#include "lcd.h"
#undef OSC
void Count_Task(void);
void Display_Task(void);
_OSLabel(Count_Task1)
_OSLabel(Display_Task1)
unsigned int counter = 0;
unsigned int finalval = 0;
void Count_Task( void )
{
for(;;)
{
counter = counter + 1;
OS_Yield(Count_Task1);
}
}
void Display_Task( void )
{
for(;;)
{
finalval = counter;
OS_Yield(Display_Task1);
}
}
void main( void )
{
OSInit();
OSCreateTask(Count_Task, OSTCBP(1), 9);
OSCreateTask(Display_Task, OSTCBP(2), 10);
while(1)
{
OSSched();
}
}
Users browsing this forum: No registered users and 1 guest