The goal is simple. Generate a HEX file using the Microchip XC8 PIC-AS compiler using Great Cow BASIC as the source. The generation process should be self contained with Great Cow BASIC and transparent to the user (like using GC-ASM or MP-ASM today).
Background
I added the PIC-AS capability earlier this year. And, it works very well.
However, I cannot test the Linux solution. So, the ask is to adapt the compiler to make the compiler support Linux.
The work will include
Step 1
Installing Microchip XC8 PIC-AS compiler. Ensure the Microchip XC8 PIC-AS compiler works checking the version number...
pic-as --version
MPLAB XC8 PIC(R) Assembler V2.32
Build date: Feb 1 2021
Copyright (C) 2021 Microchip Technology Inc.
Step 2
Check Microchip XC8 PIC-AS compiler works. Using the attached source file compiles using PIC-AS. This will check out the Linux PIC-AS works.
Where %ChipModel% = pic18f27k40, %Fn_NoExt% = source filename
Step 3
We need to add (therefore , not present in use .ini ) a new information to use.ini for Linux use to support PIC-AS.
My assumption is that the we will need to add new Linux entries then sort the compiler to read these entries. There is NO Linux support for this at the moment.
command is the the command params is used by PIC-AS.
Also, in [toolvariables] the location of PIC-AS will be needed for Linux. Only the Windows software is defined at the moment.
The location of PIC-AS is very important. When using Great Cow BASIC to gen the PIC-AS source file (called a .S file) a series of PIC-AS specific files are read in and the .S source is validated using a lookup technique - so, we need to know where PIC-AS is installed.
Will see if i have some spare time the next days and see if i get this together. (At least Step 1 and 2).
For 3 and 4 for the .ini-files: most linux programs expect an individual .config file in the users home directory.
But if the pic-as reads it's configuration file from the same working directory as it is installed, that should be no problem, too.
The location would look then a bit different, e.g. - \opt\MicroChip\xc8\v2.32\pic-as\bin (\ instead of / as path delimiter).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
RasPi twisteros is nice on rpi400 but it's still linux and using the terminal to do stuff.
Linux is all terminal with a nice gui like twisteros that make everyday stuff simple but using the mysterious code to do stuff in the terminal is what makes it unusable for win users.
Like not many people use the win command prompt if they can help it.
Linux doesn't make old pc's faster just stuff not working. Driver problems.
I tried getting gcb on rpi but had to get freebasic working first. FB works but I gave up.
An old win pc is cheap enough to buy just for gcb.
I paid £10 for an optiplex with 4G ram and 1T hd and pentium 4 and hp 22" monitor and usb kb & mouse and win10 pro 64bit never used, needed the new user setup like just installed. Doesn't do modern games though and carp graphics no open gl probably.
Why use linux when old win pc's are given away.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dear Linux users,
The latest compiler now supports PIC-AS. This is need for some chips to be compiled.
The ask. Can one of you install MPLAB-X can fix the latest source to integrate PIC-AS for the rest of the Linus users.
We have full support for PIC-AS with Windows. Just needs a few line of code adding the compiler to get this working for Linux.
Post if you have the time to make this happen.
Cheers
Evan
Hi there,
if you can give me some pointers how to accomplish that, i will see if I can reach a helping hand...
:-)
The goal is simple. Generate a HEX file using the Microchip XC8 PIC-AS compiler using Great Cow BASIC as the source. The generation process should be self contained with Great Cow BASIC and transparent to the user (like using GC-ASM or MP-ASM today).
Background
I added the PIC-AS capability earlier this year. And, it works very well.
However, I cannot test the Linux solution. So, the ask is to adapt the compiler to make the compiler support Linux.
The work will include
Step 1
Installing Microchip XC8 PIC-AS compiler. Ensure the Microchip XC8 PIC-AS compiler works checking the version number...
pic-as --version
MPLAB XC8 PIC(R) Assembler V2.32
Build date: Feb 1 2021
Copyright (C) 2021 Microchip Technology Inc.
Step 2
Check Microchip XC8 PIC-AS compiler works. Using the attached source file compiles using PIC-AS. This will check out the Linux PIC-AS works.
pic-as -mcpu=%ChipModel% "%Fn_NoExt%.S" -msummary=-mem,+psect,-class,-hex,-file,-sha1,-sha256,-xml,-xmlfull -Wl -mcallgraph=std -mno-download-hex -o"%Fn_NoExt%.hex" -Wl,-Map="%Fn_NoExt%.map" -Wa,-a
Where %ChipModel% = pic18f27k40, %Fn_NoExt% = source filename
Step 3
We need to add (therefore , not present in use .ini ) a new information to use.ini for Linux use to support PIC-AS.
My assumption is that the we will need to add new Linux entries then sort the compiler to read these entries. There is NO Linux support for this at the moment.
command
is the the commandparams
is used by PIC-AS.Also, in
[toolvariables]
the location of PIC-AS will be needed for Linux. Only the Windows software is defined at the moment.The location of PIC-AS is very important. When using Great Cow BASIC to gen the PIC-AS source file (called a .S file) a series of PIC-AS specific files are read in and the .S source is validated using a lookup technique - so, we need to know where PIC-AS is installed.
[toolvariables]
picaslocation = C:\Program Files\Microchip\xc8\v2.32\pic-as\bin
Linux_picaslocation = ??/???/??????/
Then, the Great Cow BASIC compiler source will need to be updated to use this new information.
Step 4
Test and enjoy.
Hi Evan,
that sounds a good task for a rainy, ugly day :)
Will see if i have some spare time the next days and see if i get this together. (At least Step 1 and 2).
For 3 and 4 for the .ini-files: most linux programs expect an individual .config file in the users home directory.
But if the pic-as reads it's configuration file from the same working directory as it is installed, that should be no problem, too.
The location would look then a bit different, e.g. - \opt\MicroChip\xc8\v2.32\pic-as\bin (\ instead of / as path delimiter).
Thanks.
We will NEED to use the same technique and users will have to learn to use. :-)
Location of the ini is not important as this is passed as a parameter to the compiler.
I will have a look then. I tune in as soon as I got my hands on it.
RasPi twisteros is nice on rpi400 but it's still linux and using the terminal to do stuff.
Linux is all terminal with a nice gui like twisteros that make everyday stuff simple but using the mysterious code to do stuff in the terminal is what makes it unusable for win users.
Like not many people use the win command prompt if they can help it.
Linux doesn't make old pc's faster just stuff not working. Driver problems.
I tried getting gcb on rpi but had to get freebasic working first. FB works but I gave up.
An old win pc is cheap enough to buy just for gcb.
I paid £10 for an optiplex with 4G ram and 1T hd and pentium 4 and hp 22" monitor and usb kb & mouse and win10 pro 64bit never used, needed the new user setup like just installed. Doesn't do modern games though and carp graphics no open gl probably.
Why use linux when old win pc's are given away.