Anyone succesfully programming the FV-1 on a mac?

Software questions and issues with the FV-1

Moderator: frank

Post Reply
greenstomp
Posts: 7
Joined: Tue Feb 12, 2019 12:49 am

Anyone succesfully programming the FV-1 on a mac?

Post by greenstomp »

Hi everyone, long time learning from this forum and happy to participate in it as well.

I am running only on Mac OS these days for all my stuff related to coding, and the only think that I have not tried is to program the FV-1 100% from a Mac.

I have very powerful and new macs but everything that I have read here is not conclusive. So I'd like to know if anyone is actually doing this and happy with it, so I can just throw my old PC away for ever.

Thanks in advance for your help.
igorp
Posts: 65
Joined: Tue May 19, 2015 6:10 am
Location: RU

Re: Anyone succesfully programming the FV-1 on a mac?

Post by igorp »

I am working on Mac with VirtualBoxVM , with Windows XP running (1Gb of RAM with no swap).
On the forum was announce about alternate compilers, NDF wrote spin fv-1 compiler on python , but I never tryed it, because satisfied with spinasm, it hotkeys , etc. But for linux or mac, or alternative platform it may be a good way to write patches.
greenstomp
Posts: 7
Joined: Tue Feb 12, 2019 12:49 am

Re: Anyone succesfully programming the FV-1 on a mac?

Post by greenstomp »

Thank you Igor,

That's helpful. I'll try to install VirtualBox to my mac and see how it goes. Windows XP Professional SP3 x86 should be fine, correct?

Or which version of Windows XP are you using if not that one?

Do you just write code on spinASM for the Spin dsp? or do you use any other software in your mac? I am just looking for an overall workflow that works and your idea, if it works for you, should be a good approach.
igorp
Posts: 65
Joined: Tue May 19, 2015 6:10 am
Location: RU

Re: Anyone succesfully programming the FV-1 on a mac?

Post by igorp »

Not at all, greenstomp

XP2 or XP3 would be enough. And spinasm with free programs , knowledge base and this forum.
I mostly use FAR Manager as editor , it's more comfy to me, and spinasm for compile.

For MacOS , imho is good way to use your favourite text editor (edit) + python compiler (compile) + PICkit 2 tools for mac (flash)
(i use diy devboards, never had original one , pickit easily connecting to 24LC32 memory)
greenstomp
Posts: 7
Joined: Tue Feb 12, 2019 12:49 am

Re: Anyone succesfully programming the FV-1 on a mac?

Post by greenstomp »

Thanks again Igor. I feel I am going in the right direction. I don't want to mess up with the change, or start a workflow that can be improved in some way I didn't think about, and your suggestions are helpful.

I've already installed wondows xp2 succesfuly and I've been able to run spinasm without any problem, which is like traveling 20 years back in time honestly... it feels super weird and cool at the same time.

So correct me if I am wrong, but a very easy workflow would just be:

1. Use Edit text editor (in Mac) to write plain program spin code, in unformatted text. Save the programs with edit as individual text files with ".spn" extension so it's the same text in both OS.

2. Open these files in Spinasm IDE in Windows XP. Create a Project with all programs and normally build them into the EEProm.

Right here I should have everything I need to succesfully create and build new programs into the memory, right?

However, some doubts come to mind:

1. do you need special mac drivers or anything in order to recognize the fv-1 dev board from Virtualbox? or will it be plug and play once I plug the dev board into my mac?

2. I have been thinking for some time about getting a pickit 2 programmer set (for example: https://www.amazon.co.uk/DollaTek-PICKI ... B07L2TMYB7 -I hope it's fine to post this link for reference purposes, otherwise I will delete it right away) to easily write and read the EEprom, as you suggest. But I've never done this so let me ask you some basic questions so I just get the necessary software:

2.a. How do I connect the 24lc32 to the pickit 2? (the one in the link above)
2.b. What software do I need to write and read from/to both the mac and the pickit 2 / EEprom?
2.c. When you send data to the pickit 2 / EEprom, you directly send HEX files to it?
2.e. If I chose this second option (the pickit 2 route), spinASM IDE would only be needed to create the hex files from the spinASM code, but everything else would be done outside of the Windows environment, correct?

3. Finally, you mention Python compiler, but I am afraid that the code won't stay 100% accurate when assembling it. Maybe my worries are not justified at all.

I think that I didn't miss anything. that's all I can think of that is relevant to have the full workflow sorted out. I'll be waiting for your reply!

Thanks.
Green
Digital Larry
Posts: 338
Joined: Mon Nov 12, 2012 1:12 pm
Contact:

Re: Anyone succesfully programming the FV-1 on a mac?

Post by Digital Larry »

FYI you can use SpinCAD Designer on a Mac and it generates HEX files so you don't need to use the Spin IDE or another assembler, as long as you have a programmer that handles HEX files. Some people find it's a handy way to get started.

See: http://holycityaudio.com/spincad-designer-2/
greenstomp
Posts: 7
Joined: Tue Feb 12, 2019 12:49 am

Re: Anyone succesfully programming the FV-1 on a mac?

Post by greenstomp »

Digital Larry wrote: Wed Feb 20, 2019 1:44 pm FYI you can use SpinCAD Designer on a Mac and it generates HEX files so you don't need to use the Spin IDE or another assembler, as long as you have a programmer that handles HEX files. Some people find it's a handy way to get started.

See: http://holycityaudio.com/spincad-designer-2/
Thank you Larry, Yes, I will try that as well. I usually prefer to work with plain code, and even more when I have such tight limits in the number of lines as in the FV-1, just to avoid unnecessary code, but I can see many applications where it could be much faster to just use spincad for some block that I am not confident with, at least as a starting point.

I can't find a general manual on how to use it though, is there any?

This software you've created is really awesome, by the way. I appreciate the effort very much and I am sure it does good to so many people.
igorp
Posts: 65
Joined: Tue May 19, 2015 6:10 am
Location: RU

Re: Anyone succesfully programming the FV-1 on a mac?

Post by igorp »

1. You right. Shared folder between OS and VM is just for it.
2. You can use USB port pass-through in virtual box and pass it to VM directly to upload project to devboard.

1. I never had original devboard. USB port pass worked OK, my ST-Link (I use MCU memory as EEPROM) and USB-UART modules worked fine.
2. I got cheap PICkit2 from aliexpress, it worked fine (I got PICkit3 from digikey, but it not working with serial EEPROM. I was disappointed and bought cheap replica of PICkit2).
2a. You can find connection schemes in this forum, or at diystompboxes, or use my old: http://gtwiki.2102.su/images/5/53/Insys1.JPG
2b. Software could be downloaded from microchip servers. You will get GUI, select chip (24LC32 or 24LC64) and source .hex file
For saving time, you can use CLI (bat file), such as

Code: Select all

:start
pk2cmd -p24LC32A -f"myfile_name.hex" -mp
pause 0
goto start
2c. see above, it's a hex file

2e. Afaik, pickit software is available on mac os too, but I never tried it, because working on STM32 based devboard.

3. I did't tested it yet , but spin assembler is genius and easy, about 23 commands with simple branching. But if you not sure, best way is use Spin ASM software. One click - compile, and press binded hotkey - to download hex to memory via st-link/pickit/usart.
greenstomp wrote: Wed Feb 20, 2019 5:01 am Thanks again Igor. I feel I am going in the right direction. I don't want to mess up with the change, or start a workflow that can be improved in some way I didn't think about, and your suggestions are helpful.

I've already installed wondows xp2 succesfuly and I've been able to run spinasm without any problem, which is like traveling 20 years back in time honestly... it feels super weird and cool at the same time.

So correct me if I am wrong, but a very easy workflow would just be:

1. Use Edit text editor (in Mac) to write plain program spin code, in unformatted text. Save the programs with edit as individual text files with ".spn" extension so it's the same text in both OS.

2. Open these files in Spinasm IDE in Windows XP. Create a Project with all programs and normally build them into the EEProm.

Right here I should have everything I need to succesfully create and build new programs into the memory, right?

However, some doubts come to mind:

1. do you need special mac drivers or anything in order to recognize the fv-1 dev board from Virtualbox? or will it be plug and play once I plug the dev board into my mac?

2. I have been thinking for some time about getting a pickit 2 programmer set (for example: https://www.amazon.co.uk/DollaTek-PICKI ... B07L2TMYB7 -I hope it's fine to post this link for reference purposes, otherwise I will delete it right away) to easily write and read the EEprom, as you suggest. But I've never done this so let me ask you some basic questions so I just get the necessary software:

2.a. How do I connect the 24lc32 to the pickit 2? (the one in the link above)
2.b. What software do I need to write and read from/to both the mac and the pickit 2 / EEprom?
2.c. When you send data to the pickit 2 / EEprom, you directly send HEX files to it?
2.e. If I chose this second option (the pickit 2 route), spinASM IDE would only be needed to create the hex files from the spinASM code, but everything else would be done outside of the Windows environment, correct?

3. Finally, you mention Python compiler, but I am afraid that the code won't stay 100% accurate when assembling it. Maybe my worries are not justified at all.

I think that I didn't miss anything. that's all I can think of that is relevant to have the full workflow sorted out. I'll be waiting for your reply!

Thanks.
Green
greenstomp
Posts: 7
Joined: Tue Feb 12, 2019 12:49 am

Re: Anyone succesfully programming the FV-1 on a mac?

Post by greenstomp »

Thanks again Igor, you've been super helpful. I will try all this stuff in the following weeks and settle with one of the options. It all looks good enough.
G.
Digital Larry
Posts: 338
Joined: Mon Nov 12, 2012 1:12 pm
Contact:

Re: Anyone succesfully programming the FV-1 on a mac?

Post by Digital Larry »

greenstomp wrote: Thu Feb 21, 2019 2:19 am Thank you Larry, Yes, I will try that as well. I usually prefer to work with plain code, and even more when I have such tight limits in the number of lines as in the FV-1, just to avoid unnecessary code, but I can see many applications where it could be much faster to just use spincad for some block that I am not confident with, at least as a starting point.

I can't find a general manual on how to use it though, is there any?
Thanks for your kind remarks.

Regarding working in code and SpinCAD Designer's register inefficiency -

SpinCAD Designer adds registers and instructions at the edges of each block which allow connections with the other blocks to managed in a more abstract fashion, which is the whole purpose.

For example:

...
rdax effectvalue, 1.0
wrax outputreg,0
===== end of previous block
rdax outputreg, 1.0
...

can be shortened to:

...
rdax effectvalue, 1.0
===== end of previous block
...

in the case where the value of "outputreg" is only needed inline with the next block. This cannot always be accomplished, but if it can, you save 1 register and 2 instructions per block interconnect. Beyond that, the functional blocks are as efficient as you can make them in Spin ASM. It is a fairly straightforward exercise to manually optimize SpinCAD Designer generated code to the level of handwritten code (for the supported functions, anyway).
Aaron
Posts: 54
Joined: Wed Mar 04, 2015 8:10 pm
Location: Oklahoma

Re: Anyone succesfully programming the FV-1 on a mac?

Post by Aaron »

igorp wrote: Fri Feb 22, 2019 3:27 am ...
2. I got cheap PICkit2 from aliexpress, it worked fine (I got PICkit3 from digikey, but it not working with serial EEPROM. I was disappointed and bought cheap replica of PICkit2).
...

I have been able to get the PICkit3 to work with the 24lc32 with the help of this site.
http://www.itsonlyaudio.com/uncategoriz ... h-pickit3/
It takes a little bit of modification to the kit but works perfectly.
igorp
Posts: 65
Joined: Tue May 19, 2015 6:10 am
Location: RU

Re: Anyone succesfully programming the FV-1 on a mac?

Post by igorp »

Oh, that's good, thanks!
Post Reply