[ABANDONED] BUILDING a project in emStudio

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [ABANDONED] BUILDING a project in emStudio

    Hello all,

    I have tried to build a simple project with my dev board, however, I am not sure how to check, if I am doing it the right way?

    The basic idea was , if I install the dev board, namely the chip support package would be automatically set, etc. I guess this is not the case?

    For example, if I ad the headers to the code they are not recognised ? Indeed, I also cannot see the header files in the project explorer..

    Any ideas, what am I doing wrong or where to read more about it?

    BEST.
  • Hello,

    Thank you for your inquiry.
    Generally the projects you create the with the Embedded Studio project generator will run out of the box on Cortex-M targets, which you also confirmed in one of your other threads.
    Now adding new files, headers etc. to an IDE works always the same way and is user responsibility to do correctly. So please understand that we can't provide in depth help here as this is basic knowledge on how to operate an IDE, no matter if for embedded targets or not. Our recommendation is to check some beginner guides for C programming. They should give detailed instructions on how to set up C projects.

    In general you need to take care of 3 things.
    1. Add your C/C++ and/or asm source files to your projects (in ES you can do that with drag and drop from your filesystem)
    2. Add header files to user include directories, so the IDE knows where header files are (in ES project option Preprocessor->User include directories )
    3. Last but not least make sure that your C/C++ source files include the correct header files.

    This should be the basic steps to get >99% of projects up and running.
    If you still get build or linker errors after that then something is not compatible with the sources or additional settings must be set in the IDE. But for this the error messages are usually verbose enough to figure out yourself what needs to be done.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Dear Nino

    Thank you for the reply. Please see below.

    SEGGER - Nino wrote:

    1. Add your C/C++ and/or asm source files to your projects (in ES you can do that with drag and drop from your filesystem)

    2. Add header files to user include directories, so the IDE knows where header files are (in ES project option Preprocessor->User include directories )
    3. Last but not least make sure that your C/C++ source files include the correct header files.

    Re. 1.: I have tried as you have suggested, but I cannot drag and drop the files in the OSX, actually I can, but I get gibberish... Have a look at the attached pic. eg, in this case I have drag and drop the .c file ..



    Re. 2.: OK, I have tried that as well, but I am not sure, if I am putting in the right directory path, for example, can I just put the "root" of the SDK and the compiler will find the file and indexed it , or do I have to find it explicitly?

    Re. 3.: I can easily add the type the correct header files, manually, but it does not work :(



    I have installed the package successfully... however, whenever I try to use the package .h or .c files , no matter, if I put them manually into the source folder within a project I get the error "No such file or directory" , please have a look the attached picture above, 3rd line from bottom up.
    Any ideas are more than welcome!

    BEST.

    The post was edited 1 time, last by MUETA ().

  • I have managed to put the "preprocessor" together, but manually, which is a bit cumbersome, therefore, I am wondering, if there is a way to put one line , namely the directory of the SDK, so that its subdirectories are automatically included?