Menu

errors while compiling femtoOS hello world

Help
rehab.s
2012-10-28
2015-10-13
  • rehab.s

    rehab.s - 2012-10-28

    I'm trying to test the hello world example included in femtoOS 9.22

    I'm using AVR studio and winAVR

    i've read the readme text file and followed the part entitled  "WINDOWS WITH WINAVR AND AVR STUDIO"
    installed the script, opened a new project in AVRstudio and added femtoOS_headers folder ,femtoOS_source folder  and from femtoOS_devices,added ATmega8.asm

    then added the 2 files (hellow world.c  and config_application.h) generated in the IDE folder after running the script

    when I build the project, the following error is generated:

    Error 1 #elif with no expression E:\CBBS\GccApplication1\GccApplication1\femtoos_check.h 104 6 GccApplication1

    I solved it as mentioned here:
    https://sourceforge.net/projects/femtoos/forums/forum/789278/topic/4786412

    by replacing line 104 in check.h to "#elif (1==1)"

    but after that the following errors are generated:

    Error 3 variable 'pxTCBlist' must be const in order to be put into read-only section by means of '__attribute__((progmem))' E:\CBBS\GccApplication1\GccApplication1\femtoos_shared.c 495 16 GccApplication1

    Error 4 variable 'pxTDBlist' must be const in order to be put into read-only section by means of '__attribute__((progmem))' E:\CBBS\GccApplication1\GccApplication1\femtoos_shared.c 531 32 GccApplication1

    how can I solve it?

    thanks

     
  • De Vlaam

    De Vlaam - 2012-10-28

    I'm using AVR studio and winAVR

    Please tell me the version you are using. I assume you are on avrStudio under windows?

    by replacing line 104 in check.h to "#elif (1==1)"

    This is unneeded in version 9.22 for it has been corrected. The 'patch' was for version 9.20.

     
  • rehab.s

    rehab.s - 2012-10-29

    It's Atmel studio 6, I think it's version 4.6.1

    yes i use it under windows

    anyway, It's solved

    I assume there was a problem with installing winavr with avrstudio as after re-installing them and adding the proper files to the project it compiles successfully (when excluding femtoos_app.c)

    thank you for your quick response

     
  • Bharath N

    Bharath N - 2015-09-01

    hi myself bharath just know started to work on femto os and i'm getting an error in the example program shown iin the start page the program i have written is

    include "femtoos_code.h"

    static Tuint08 speed=0;
    const Tchar HelloWorldStr[]="hello World";

    if (preTaskDefined(Display))

    void appLoop_Display(void)
    { speed = 64;
    while (true)
    { Tuint08 uiCharCount;
    Tchar cChar;
    for (uiCharCount = 0; uiCharCount<12; uiCharCount++)
    { cChar = portFlashReadByte(Tchar, HelloWorldStr[uiCharCount]);
    devLedPORT = ~cChar;
    taskDelayFromNow( ((Tuint16)speed)*4 + 64 );
    devLedPORT = 0xFF;
    taskDelayFromNow(64); }
    taskDelayFromNow(2000); } }

    endif

    and the error i'm getting

    c:/winavr-20100110/bin/../lib/gcc/avr/4.3.3/../../../../avr/lib/avr4/crtm8.o:(.init9+0x0): undefined reference to main' helloworld.o: In functionappLoop_Display':
    D:\femtoos092im-894bd6659e91\FemtoOS_0.92\IDE\studioprojects\helloworld\default/../helloworld.c:17: undefined reference to taskDelayFromNow' D:\femtoos092im-894bd6659e91\FemtoOS_0.92\IDE\studioprojects\helloworld\default/../helloworld.c:19: undefined reference totaskDelayFromNow'
    D:\femtoos092im-894bd6659e91\FemtoOS_0.92\IDE\studioprojects\helloworld\default/../helloworld.c:20: undefined reference to `taskDelayFromNow'
    make: *** [helloworld.elf] Error 1
    Build failed with 4 errors and 0 warnings...

    anyone will please help on this
    sorry if anything wrong

     
  • De Vlaam

    De Vlaam - 2015-10-13

    Sorry i noticed this so late, better start a new thread next time. From the errors it seems that the compiler cannot find the sources. Is the question still valid or did you already solve it?

     

Log in to post a comment.