Shop OBEX P1 Docs P2 Docs Learn Events
Trouble building FemtoBasic for the C3 — Parallax Forums

Trouble building FemtoBasic for the C3

David BetzDavid Betz Posts: 14,516
edited 2013-09-18 17:10 in Propeller 1
I downloaded the "Winbond Flash and Microchip SRAM Driver" project from OBEX and tried building the version of FemtoBasic that it contains for the C3 but got a syntax error from BST. All I did was move the file Winbond_Driver_C3.spin from the "C3 Files" folder to the parent folder so it is at the same level as FemtoBasic.spin. I then changed the line in massStorage.spin to refer to the Winbond_Driver_C3.spin driver instead of the generic Winbond_Driver.spin that is the default. This resulted in the following error from BST:
massStorage - Error at (49,42) Expected End of Line, Unary operator or Math Operator
Any idea what I'm doing wrong?

This is the line I changed in massStorage.spin:
   win    : "Winbond_Driver_C3"   ' Driver for files stored on Winbond Flash

Comments

  • David BetzDavid Betz Posts: 14,516
    edited 2013-09-17 18:05
    Ugh. Never mind. I'm sure it's because I failed to change the initialization call to match the C3 version of the start function. I would have deleted my message but the forums don't seem to allow deletion anymore. Sorry!
  • David BetzDavid Betz Posts: 14,516
    edited 2013-09-17 18:22
    Hmmm... I guess the version of FemtoBasic in this OBEX entry uses VGA for output. Is there a version of FemtoBasic for the C3 around somewhere that supports serial I/O and can read/write the flash?
  • Mike GreenMike Green Posts: 23,101
    edited 2013-09-17 20:59
    Give me a day to take the C3 FemtoBasic, strip out the keyboard driver and VGA driver and substitute FullDuplexSerial. It's pretty straightforward.
  • David BetzDavid Betz Posts: 14,516
    edited 2013-09-18 04:10
    Mike Green wrote: »
    Give me a day to take the C3 FemtoBasic, strip out the keyboard driver and VGA driver and substitute FullDuplexSerial. It's pretty straightforward.
    Thanks Mike!
  • David BetzDavid Betz Posts: 14,516
    edited 2013-09-18 06:52
    Mike Green wrote: »
    Give me a day to take the C3 FemtoBasic, strip out the keyboard driver and VGA driver and substitute FullDuplexSerial. It's pretty straightforward.
    Mike,

    On second thought, I don't want you to go through all of the trouble making a serial C3 version of FemtoBasic. I can hook up a VGA monitor and keyboard to my C3 and use the version you've already posted. Can you tell me if anything needs to be changed to use the C3-specific version of the Winbond driver other than including Winbond_Driver_C3 instead of Winbond_Driver and changing the call to winStart to match the parameters of the C3 version of the driver?

    Thanks,
    David
  • Mike GreenMike Green Posts: 23,101
    edited 2013-09-18 07:40
    Here's a C3 version, both VGA and TV, all ready to go. This is the one I was going to modify for you to use FullDuplexSerial. It already has the modified Winbond_Driver (for the C3).
  • David BetzDavid Betz Posts: 14,516
    edited 2013-09-18 07:47
    Mike Green wrote: »
    Here's a C3 version, both VGA and TV, all ready to go. This is the one I was going to modify for you to use FullDuplexSerial. It already has the modified Winbond_Driver (for the C3).
    Thanks! That's perfect!
  • David BetzDavid Betz Posts: 14,516
    edited 2013-09-18 08:30
    Mike Green wrote: »
    Here's a C3 version, both VGA and TV, all ready to go. This is the one I was going to modify for you to use FullDuplexSerial. It already has the modified Winbond_Driver (for the C3).
    FYI, the tv.spin file is missing from the zip file. This isn't a problem for me because I'll just use the VGA version but others who might want to download this file and use the TV version might need it.
  • Mike GreenMike Green Posts: 23,101
    edited 2013-09-18 08:35
    The TV.spin file is the same one distributed with the Propeller Tool and is normally found automatically by that. I'll add it to the .zip file though.
  • David BetzDavid Betz Posts: 14,516
    edited 2013-09-18 08:42
    Mike Green wrote: »
    The TV.spin file is the same one distributed with the Propeller Tool and is normally found automatically by that. I'll add it to the .zip file though.
    Sorry, I didn't realize that. I'm on a Mac using BST.
  • Mike GreenMike Green Posts: 23,101
    edited 2013-09-18 09:09
    Here's the serial version. Baud is 115200, but you can change that. Compiled with SimpleIDE which uses BSTC internally.

    Edit: Changed serial I/O to the new improved fullDuplexSerial4port with less jitter and bigger buffers.
  • David BetzDavid Betz Posts: 14,516
    edited 2013-09-18 09:59
    Mike Green wrote: »
    Here's the serial version. Baud is 115200, but you can change that. Compiled with SimpleIDE which uses BSTC internally.

    Edit: Changed serial I/O to the new improved fullDuplexSerial4port with less jitter and bigger buffers.
    Wow! Thanks! Now I have lots of choices. :-)
  • David BetzDavid Betz Posts: 14,516
    edited 2013-09-18 17:10
    Mike Green wrote: »
    Here's the serial version. Baud is 115200, but you can change that. Compiled with SimpleIDE which uses BSTC internally.

    Edit: Changed serial I/O to the new improved fullDuplexSerial4port with less jitter and bigger buffers.
    I just tried the serial version of FemtoBasic for the C3 and it worked fine. Thanks very much!
Sign In or Register to comment.