Shop OBEX P1 Docs P2 Docs Learn Events
FlexC with Visual Studio (updated!) — Parallax Forums

FlexC with Visual Studio (updated!)

RaymanRayman Posts: 14,662
edited 2020-11-11 19:22 in Propeller 2
Update:

I've made a new guide for this here: http://www.rayslogic.com/Propeller2/VisualStudio_P2.htm

Also, I've updated the attached solution.
1241 x 1167 - 223K

Comments

  • Thanks for posting this Ray!
  • RaymanRayman Posts: 14,662
    edited 2020-08-18 20:20
    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: 14,662
    edited 2020-08-18 23:03
    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.
  • RaymanRayman Posts: 14,662
    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
  • RaymanRayman Posts: 14,662
    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...
  • RaymanRayman Posts: 14,662
    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.
  • RaymanRayman Posts: 14,662
    I've made a page on my website to better describe how to do this.
    See link in top post.
Sign In or Register to comment.