Page 1 of 1

Erika and STM32

Posted: Sat Jul 18, 2015 8:12 am
by beam
Hi All,

Please could any one help me

when I try to compile my project I get the following error

make all
Building file: ../code.c
Invoking: Cross GCC Compiler
gcc -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"code.d" -MT"code.d" -o "code.o" "../code.c"
../code.c:5:16: fatal error: ee.h: No such file or directory
compilation terminated.
make: *** [code.o] Error 1


here is the my oil and Code files:

Code: Select all


CPU mySystem {

    OS myOs {
 
        EE_OPT = "DEBUG";
        EE_OPT = "__OO_STARTOS_OLD__";
	EE_OPT = "__USE_CMSIS_ALL__";
        EE_OPT = "__USE_SPD_ALL__";
        EE_OPT = "__USE_SYSTICK__";
       
		CFLAGS = ""; //-std=c99
		
		}
            //CPU_CLOCK = 168.0; 
               CPU_DATA = CORTEX_MX {
	            MODEL = M4;
                APP_SRC = "code.c";
                //COMPILER_TYPE = KEIL;
                COMPILER_TYPE = GNU;

                MULTI_STACK = TRUE { 
                   IRQ_STACK = TRUE {
                   SYS_SIZE = 512;
                   };
             };
            };
        
        MCU_DATA = STM32 {
         MODEL = STM32F4xx;
        };
 
        
		STATUS = EXTENDED;
		STARTUPHOOK = FALSE;
		ERRORHOOK = FALSE;
		SHUTDOWNHOOK = FALSE;
		PRETASKHOOK = FALSE;
		POSTTASKHOOK = FALSE;
		USEGETSERVICEID = FALSE;
		USEPARAMETERACCESS = FALSE;
		USERESSCHEDULER = FALSE;
		
        KERNEL_TYPE = ECC2;
		
		EE_OPT = "__ADD_LIBS__";
		
        LIB = ENABLE {
           NAME = "ST_CMSIS";
         };
 
        LIB = ENABLE {
           NAME = "STM32F4XX_SPD";
               STM32F4XX_SPD = ENABLE {
               USETIM = TRUE; 
               USEI2C = TRUE;
               USEMISC = TRUE;
               USESPI = TRUE;
               USEUSART = TRUE;
			 };
        };
  
        LIB = ENABLE {
            NAME = "STM32F4_DISCOVERY";
        };
        
		
		EVENT recEvent {
              MASK = AUTO;
        };

        TASK setRecTask {
           PRIORITY = 0x01; /* high priority */
           AUTOSTART = FALSE;
           STACK = PRIVATE {
           SYS_SIZE = 512;
           };
           ACTIVATION = 1;  /* only one pending activation */
           SCHEDULE = FULL;
           EVENT = recEvent;
        };
		
   };
 
and for the code .c

Code: Select all


#include "ee.h"
#include "ee_api.h"
#include "kernel/oo/inc/ee_oo_api.h"
#include "stm32f4xx.h"
#include "stm32f4_discovery.h"



DeclareTask(setRecTask);
DeclareEvent(recEvent);

TASK(setRecTask) {
 EventMaskType current;
  while (1) {
    if(WaitEvent(recEvent) == E_OK){
    /* error handling */
  }
  getEvent(setRecTask, &current); /* save event */
  ClearEvent(recEvent);

  /* do some fancy task work */
  }
  TerminateTask(); // never reached
}


int main(void) {

/* Initialize Erika related stuff */
  EE_system_init();



  /*Initialize systick */
  	EE_systick_set_period(MILLISECONDS_TO_TICKS(1, SystemCoreClock));
  	EE_systick_enable_int();
  	EE_systick_start();


  while (1) {
    SetEvent(setRecTask, recEvent);
    Delay(MILLISECONDS_TO_TICKS(100, SystemCoreClock));
  }

}

Thanks in advance for your help,

Beam

Re: Erika and STM32

Posted: Sun Jul 19, 2015 3:53 pm
by paolo.gai
Dear beam,

Are you using the virtual machine we distribute on http://www.erika-enterprise.com ?

This should not happen with that one.

ee.h is one of the main include files of ERIKA... if it is missing it means that the makefile is pointing to a non-existing version of ERIKA... which is quite strange.

PJ

Re: Erika and STM32

Posted: Sun Jul 19, 2015 7:03 pm
by beam
Dear Paolo,

yes I am using the VM for STM32

Thanks
beam

Re: Erika and STM32

Posted: Mon Jul 20, 2015 7:53 am
by paolo.gai
I have just restarted the VM and tried to compile... and it worked without problems.

It probably depends on some kind of changes you may have done to the default installation we provide in the VM.

Ciao,

Paolo

Re: Erika and STM32

Posted: Tue Jul 21, 2015 1:46 am
by beam
Thanks Paolo, it works.

Ciao
Beam