FlexC with Visual Studio

RaymanRayman Posts: 11,247
edited 2020-09-05 - 19:07:43 in Propeller 2
I dug up my old trick for using GCC with Visual studio:
http://www.rayslogic.com/PropGCC/VS_PropGCC.htm

I've adapted it for FlexC using fastspin and the FlexGui samples.

Seems to work fine. "Build" and "Run" work as expected.

Note: You will most likely need to change the "Project" properties to run on your machine as the folders where things are probably have different paths...

Comments

  • Thanks for posting this Ray!
  • RaymanRayman Posts: 11,247
    edited 2020-08-18 - 20:20:33
    I just added the mandelbrot example project to the solution in the top post.
    That's a nice one for me as shows how to use a spin2 object in FlexC.
  • Will this work with VS Code?
  • RaymanRayman Posts: 11,247
    edited 2020-08-18 - 23:03:15
    No idea... That's a completely different animal...

    But, somebody got Spin2 working with VS Code, so C should be easier..

    I think Visual Studio has a free version now though.
  • I already posted this somewhere, but VS Code doesn't really integrate with your build system, so in theory it supports any compiler and language. On the other hand, the C/C++ extension has it's own parser and stuff, so that will yell at you if you try to do any fastspin-isms. And I think it might not know about fastspin's builtins. It somehow knows about gcc builtins, I think it just has a list somewhere.
  • Yes, you can download Visual Studio Community edition and use it free, even for commercial stuff. You just have to buy a license if your commercial work makes over some threshold amount (I think something like $100k).
  • Roy Eltham wrote: »
    Yes, you can download Visual Studio Community edition and use it free, even for commercial stuff. You just have to buy a license if your commercial work makes over some threshold amount (I think something like $100k).

    Thanks for that Roy! That is welcome news.
  • I've added the two new FlexC FatFs uSD interface codes as projects in the attachment in the top post.
    These are "simple_cat" and "simple_ls".

    They are rigged to look at uSD card. But, supposedly you can make work with your host file system by changing a define in the code and also adding "-9" to the loadp2 command line setting, as show below.
    786 x 544 - 23K
  • I'm wondering if it would be good to have environment variables that point to the fastspin build and load folders...

    These directories are currently hard coded into the project properties and the build.bat file.
    That works, but makes it difficult when you switch to another machine...
  • Here's an example that shows an embedded 16bpp bmp over VGA and then loads another one up from uSD card and shows it.
    Configured for Eval Board with A/V expansion board on P0..P7 and the image Bmp16bpp.bmp loaded onto uSD card.
Sign In or Register to comment.