Using Visual Studio with Flex C (AKA
- Visual Studio is my favorite C++ editor and
this page will show you how to use it with Flex C for programming the
Propeller 2 (or Propeller 1) in C.
- The trick I'm using is to create a
"makefile" project, even though we're not really using a makefile.
- Here's a screenshot of what it looks like:
Click thumbnail image to enlarge...
- You can get Visual Studio for free (Community
- Download and unzip the latest version of
Flex C compiler
- Unzip to some place like C:\FlexSpin
- You will also need loadp2.exe. You
can get that here or by downloading the
FlexProp gui. Install this file in same location as FlexSpin
- The easiest way to get started might be to
just download and open this example solution that
includes several projects.
- The project here are set with the path
C:\FlexSpin for the FlexC compiler. You will have to change
project makefile properties and build.bat if you use a different folder.
- What Works
- Push the green triangle "Local Windows
Debugger" button will compile and run the "startup project", you should
then see a terminal window appear (or error messages in the output
window if something went wrong)
- Select the "startup project" by
right-clicking on that project in solution window and pick "Set As
- You can build the project without running it
with the menu via "Build->Build ..." or ctrl-B
- Context highlighting and intellisense mostly
work although some FlexSpin specific things might get flagged as wrong
when they are not
- Find in Files can be used on current file, open
files, project, solution, etc. and you can jump to anything found by
clicking on it
- What Doesn't Work
- There is no actual debugging in P2 yet.
For now, use serial output to the terminal (although there is a special
debug version of serial output).
- When there is a build error,
double-clicking in output window takes you to the file with error, but
not line number with the error.
- To create a makefile project from scratch, you can
try using an old guide