+ Post New Thread
Results 1 to 4 of 4
  1. #1
    Newbie level 1
    Points: 15, Level: 1

    Join Date
    Apr 2017
    Posts
    1
    Helped
    0 / 0
    Points
    15
    Level
    1

    help with error message running code to recognise hand gestures

    I am new at this and a noob so speak to me like i am a 5 year old.
    Ok so i was making this project to recognise hand gesture controls using an accelerometer.
    I got this code off of the internet which i modified a bit but it keeps giving the same error message C129.
    I will post the screenshots along with the post for you guys
    please help
    Click image for larger version. 

Name:	1.jpg 
Views:	7 
Size:	177.2 KB 
ID:	138097Click image for larger version. 

Name:	2.jpg 
Views:	5 
Size:	178.9 KB 
ID:	138098Click image for larger version. 

Name:	3.jpg 
Views:	3 
Size:	168.3 KB 
ID:	138099

    •   Alt21st April 2017, 17:34

      advertising

        
       

  2. #2
    Super Moderator
    Points: 227,483, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    39,208
    Helped
    11975 / 11975
    Points
    227,483
    Level
    100

    Re: I need urgent help with a project

    You are including assembler code as C include files, that's not possible.



    •   Alt21st April 2017, 17:44

      advertising

        
       

  3. #3
    Advanced Member level 4
    Points: 5,170, Level: 17

    Join Date
    Jun 2016
    Posts
    1,112
    Helped
    118 / 118
    Points
    5,170
    Level
    17

    Re: I need urgent help with a project

    You have to use inline assembly coding.



    •   Alt21st April 2017, 20:12

      advertising

        
       

  4. #4
    Member level 1
    Points: 778, Level: 6
    Altaero's Avatar
    Join Date
    Dec 2013
    Location
    St-Petersburg, Russia
    Posts
    32
    Helped
    9 / 9
    Points
    778
    Level
    6

    Re: help with error message running code to recognise hand gestures

    Keil has a guide for inline asm:
    http://www.keil.com/support/man/docs...9124245889.htm

    As far as I know it also allows including pure asm files (.s) into the project and compile it along with c-files. But I've never done that.

    #include directive just places the content of selected file into it's position during preprocessing, so your compiler sees asm commands in you main.c file. That's why he shows errors.
    I'd recommend you to read about multi file projects. Putting source code into the header file (.h) is a bad practise, although C allows it. Putting pure ASM code to .h or .c file is meaningless and will lead to confuses.



--[[ ]]--