There is no automated procedure for importing an existing project from a standard IDE into embedXcode.
However, the manual procedure is very easy to follow.


Procedure

To import an existing project,

  • Create a new project with Xcode as described in the procedure Create a New Project.
  • Call the menu Product > Build or press ⌘B cmd-B or click on the Run icon to perform the preparation of the project as described in the procedure Prepare the Project.
  • Ensure Xcode shows the Project Navigator.

  • If necessary, select the Project Navigator.

  • Open the folder with the existing project from a standard IDE.

  • Select all the files except the .ino main sketch, drag-and-drop them on the left pane on top of the .ino main sketch.

  • Check Copy items if needed to make a copy and select the target Index to ensure code-sense.

  • Open the .ino main sketch with Arduino, select all the code and paste it on the main sketch on Xcode, in this example embed.ino.

  • Make sure to keep the pre-processing statements #include, as they are required by embedXcode. 

For more information, please refer to Include Core Library on Main Sketch on the User Manual.


Optional Steps

Depending on the project, some additional steps might be required.

  • If functions are called before they are defined, you need to define prototypes. 

For more information on prototypes, please refer to Declare Prototypes on Main Sketch on the User Manual.

  • Finally, if the sketch calls libraries, you need to declare them in the main makefile. 

For more information on libraries, please refer to List all the Used Libraries in Main makefile on the User Manual.


More Information

A special section is dedicated to compatibility between standard IDEs and embedXcode. For more information, please refer to section Manage Compatibility with Standard IDEs on the User Manual.