Please replace all previous RC releases asap and test your programs.
PIC-AS
The compiler has been tested with PIC-AS 2.32
PIC-AS Support status
- PIC-AS works for Windows only - Linux needs to be added.
- PIC-AS works for 18F.
- PIC-AS works for 10F, 12F and 16F with the issue discussed below. None of these issues are in Great Cow BASIC compiler/toolchain.
- PIC-AS does not work for AVR or LGT. Someone, needs lead this part of the project.
This releases adds FCALL and LJMP support. Removal of adaption is .S processing section, now uses AddPageCommands(). CalcLineSize() now includes FCALL and LJMP for code size. Added BANKISEL support. BANKISEL is NOT supported by PIC-AS so this adds a macro to the .S to resolve.
Known issues. ALL caused by PIC-AS 2.32 NOT Great Cow BASIC compiler. These issues are slated to be resolved in PIC-AS 2.35. PIC-AS for 10f, 12f and 16f works for small chips but for larger chips Microchip are changing PIC-AS 2.35 resolve the following:
BANKSEL just does not operate correctly. Microchip have accepted this issue.
BTFSx instructions are not working as expected. The BTFSx instruction is a single word instruction but in some cases PIC-AS is expanding this into two instructions. This then causes (in some cases) the PROGMEM page to overflow - and, the resulting HEX is invalid. Microchip have a support ticket on this.
BANKISEL is not supported. Microchip have an open ticket on this to revert the BANKISEL. This version of the compiler has a script to workaround this.
DECFSZ instruction does not operated correctly under certain conditions. This causes havoc with the page fitting routines. Microchip have a support ticket on this.
FOR-NEXT handler
The FOR-NEXT handler is a major improvement (@RC43 from the original code. However, in some case this will lead to code size increase and use of more temp variables.
When the code can use the old method - it will.
The use cases tested are extensive but we can never test enough. :-(
Test case example table (show below) - this is just one set of test cases for the use of constants.
Loop Variable Type
Start Value
End Value
Step Value
Byte constant
A byte constant
A byte constant
None specified - implies a byte value of 1
Word constant
A byte constant
A byte constant
None specified - implies a byte value of 1
Long constant
A byte constant
A byte constant
None specified - implies a byte value of 1
Byte constant
A word constant
A byte constant
None specified - implies a byte value of 1
Word constant
A long constant
A byte constant
None specified - implies a byte value of 1
Long constant
A byte constant
A byte constant
None specified - implies a byte value of 1
Long constant
A word constant
A byte constant
None specified - implies a byte value of 1
Long constant
A long constant
A byte constant
None specified - implies a byte value of 1
Byte constant
A byte constant
A byte constant
Byte Constant = 1
Word constant
A byte constant
A byte constant
Byte Constant = 1
Long constant
A byte constant
A byte constant
Byte Constant = 1
Byte constant
A word constant
A byte constant
Byte Constant = 1
Word constant
A long constant
A byte constant
Byte Constant = 1
Long constant
A byte constant
A byte constant
Byte Constant = 1
Long constant
A word constant
A byte constant
Byte Constant = 1
Long constant
A long constant
A byte constant
Byte Constant = 1
Byte constant
A byte constant
A byte constant
Byte Constant > 1
Word constant
A byte constant
A byte constant
Byte Constant > 1
Long constant
A byte constant
A byte constant
Byte Constant > 1
Byte constant
A word constant
A byte constant
Byte Constant > 1
Word constant
A long constant
A byte constant
Byte Constant > 1
Long constant
A byte constant
A byte constant
Byte Constant > 1
Long constant
A word constant
A byte constant
Byte Constant > 1
Long constant
A long constant
A byte constant
Byte Constant > 1
Byte constant
A byte constant
A byte constant
Byte Constant > 1
Word constant
A byte constant
A byte constant
Byte Constant > 1
Long constant
A byte constant
A byte constant
Byte Constant > 1
Byte constant
A word constant
A byte constant
Byte Constant > 1
Word constant
A long constant
A byte constant
Byte Constant > 1
Long constant
A byte constant
A byte constant
Byte Constant > 1
Long constant
A word constant
A byte constant
Byte Constant > 1
Long constant
A long constant
A byte constant
Byte Constant > 1
There are many, many more test cases for loop variables for Start and End Values (where each of these variables can be Byte, Word, Integer and Long) and where the step value is as Byte, Word, Integer (positive and negative) and Long. And, of all these cases the Start Value > End Value or the Start Value < End Value. And, where the Step value is Zero (0).
I cannot test every case. This would require a mega test suite. So, you need to test.
Table Text#
The is new capability @RC 44 has been developed by ToniG. Thank you!
He has used the following program segment for testing - he will post more later but this program gives you an insight into the new Table Text capability.
I wanted to get this baseline release out prior to Microchip release PIC-AS V2.35 and I am away from home for up to two weeks.
For the record. All source for everything is in SorgeForge. Which means this release is a complete baseline with the issues shown above.
For folks wanting to play with alternative assemblers will need to install either MPASM or PIC-AS compilers. I will post URLs to help folks find these compilers soon.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Just test the new RC47 with my Amstrad CPC project, based on a PIC 18F47Q10.
Everything seems to work ok, in fact, compile time is reduced from ~19sec (with RC45) to 13sec!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I just installed RC47 and compile the project, so i guess it used GCASM.
I take a look at the whitepaper, and it seems to need quite a work to "migrate" asm code for PICAS compilation, especially for very large projects like mine (i use almost all 128kb of flash program memory!)
So, is there any benefit to use PICAS assembler instead?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Use GCASM for 99.9% of the time. And, as an end user selecting PIC-AS does not mean you have to change anything. The Great Cow BASIC compiler does the PIC-AS port for you.
For the great majority of users PIC-AS adds no value as GCASM will do the same.
However, from a user perspective there is one huge advantage of PIC-AS. You can load you project in to MPLAB-X and use the debugger to see what is happening. This is huge for some users.
Another advantage is that using PIC-AS will validate the source code produced by Great Cow BASIC. I will explain. Great Cow BASIC ignores some ASM that is does not recognise and you can have 'silent failures'. A silent failure is where you do not get an error message from the Great Cow BASIC compilation process. Using PIC-AS (I used to use MPASM.. but, I cannot with the new changes in MPLAB-X) ensure the source generated by Great Cow BASIC is valid.
Do not use PIC-AS yet for non 18f projects. PIC-AS has a few bugs (stated in the white paper) and we are waiting for Microchip to resolve. So, if you try to compile using PIC-AS and get these errors.. there is NOTHING I can do about them.
👍
1
Last edit: Anobium 2021-05-21
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
PIC-AS fix: Change to FixFunctions() to maintain the IsLabel as this routine is moving the label reference. GetMetaData(FindStart)->IsLabel = GetMetaData(CurrLine->Next)->IsLabel
I saw that in the link (https://sourceforge.net/projects/gcbasic/files/Release%20Candidates/Patches/) the .exe file is no longer present. Do I need to download the entire installation file?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes. These are highly likely to be the release code.
I put there whilst I am away (just in case) but I am thinking we have stability and the code is of high quality where we can release.
I am currently wading through the 500 plus lines in the release note trying to group the changes together so you can see the major changes. There are some huge changes in this release.
So, download the whole installer and enjoy.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This release candidate is NOT a normal few tweaks or changes.
This release has major changes:
Download Folder
https://sourceforge.net/projects/gcbasic/files/Release%20Candidates/
Please replace all previous RC releases asap and test your programs.
PIC-AS
The compiler has been tested with PIC-AS 2.32
PIC-AS Support status
- PIC-AS works for Windows only - Linux needs to be added.
- PIC-AS works for 18F.
- PIC-AS works for 10F, 12F and 16F with the issue discussed below. None of these issues are in Great Cow BASIC compiler/toolchain.
- PIC-AS does not work for AVR or LGT. Someone, needs lead this part of the project.
This releases adds FCALL and LJMP support. Removal of adaption is .S processing section, now uses AddPageCommands(). CalcLineSize() now includes FCALL and LJMP for code size. Added BANKISEL support. BANKISEL is NOT supported by PIC-AS so this adds a macro to the .S to resolve.
Known issues. ALL caused by PIC-AS 2.32 NOT Great Cow BASIC compiler. These issues are slated to be resolved in PIC-AS 2.35. PIC-AS for 10f, 12f and 16f works for small chips but for larger chips Microchip are changing PIC-AS 2.35 resolve the following:
FOR-NEXT handler
The FOR-NEXT handler is a major improvement (@RC43 from the original code. However, in some case this will lead to code size increase and use of more temp variables.
When the code can use the old method - it will.
The use cases tested are extensive but we can never test enough. :-(
Test case example table (show below) - this is just one set of test cases for the use of constants.
There are many, many more test cases for loop variables for Start and End Values (where each of these variables can be Byte, Word, Integer and Long) and where the step value is as Byte, Word, Integer (positive and negative) and Long. And, of all these cases the Start Value > End Value or the Start Value < End Value. And, where the Step value is Zero (0).
I cannot test every case. This would require a mega test suite. So, you need to test.
Table Text#
The is new capability @RC 44 has been developed by ToniG. Thank you!
He has used the following program segment for testing - he will post more later but this program gives you an insight into the new Table Text capability.
Last edit: Anobium 2021-05-07
Change log for RC46 - this is the correct list. This is not shown in the distribution,
Bumped to RC47
Major revision of the Preferences Editor to support selection of Assembler.
Other updates as follows:
Prefs tool overview as PDF
Very helpful. Thank you
Thanks.
I wanted to get this baseline release out prior to Microchip release PIC-AS V2.35 and I am away from home for up to two weeks.
For the record. All source for everything is in SorgeForge. Which means this release is a complete baseline with the issues shown above.
For folks wanting to play with alternative assemblers will need to install either MPASM or PIC-AS compilers. I will post URLs to help folks find these compilers soon.
To support Great Cow BASIC use of MPASM and PIC-AS assemblers you will need.
You will find installed for these installed packages in the https://sourceforge.net/projects/gcbasic/files/Support%20Files/MicrochipCompilers/ folder.
I have created an installer for MPASMx to save you having to install the whole of MPLAB-X v5.35. And, I have uploaded the PIC-AS driver v2.32.
Use the default folders when installing. If you use alternate directories ensure you use the Tool Variables in the Prefs Tool.
Last edit: Anobium 2021-05-09
Just test the new RC47 with my Amstrad CPC project, based on a PIC 18F47Q10.
Everything seems to work ok, in fact, compile time is reduced from ~19sec (with RC45) to 13sec!
Very good the hear!!
I assume GCASM as the assembler... tried PICAS as the assembler?
Updated MPASM to PIC-AS porting.
A white paper on what I have learnt so far.
I just installed RC47 and compile the project, so i guess it used GCASM.
I take a look at the whitepaper, and it seems to need quite a work to "migrate" asm code for PICAS compilation, especially for very large projects like mine (i use almost all 128kb of flash program memory!)
So, is there any benefit to use PICAS assembler instead?
Great questions.
Use GCASM for 99.9% of the time. And, as an end user selecting PIC-AS does not mean you have to change anything. The Great Cow BASIC compiler does the PIC-AS port for you.
For the great majority of users PIC-AS adds no value as GCASM will do the same.
However, from a user perspective there is one huge advantage of PIC-AS. You can load you project in to MPLAB-X and use the debugger to see what is happening. This is huge for some users.
Another advantage is that using PIC-AS will validate the source code produced by Great Cow BASIC. I will explain. Great Cow BASIC ignores some ASM that is does not recognise and you can have 'silent failures'. A silent failure is where you do not get an error message from the Great Cow BASIC compilation process. Using PIC-AS (I used to use MPASM.. but, I cannot with the new changes in MPLAB-X) ensure the source generated by Great Cow BASIC is valid.
Do not use PIC-AS yet for non 18f projects. PIC-AS has a few bugs (stated in the white paper) and we are waiting for Microchip to resolve. So, if you try to compile using PIC-AS and get these errors.. there is NOTHING I can do about them.
Last edit: Anobium 2021-05-21
Updated compiler to resolve missing label.
PIC-AS fix: Change to FixFunctions() to maintain the IsLabel as this routine is moving the label reference.
GetMetaData(FindStart)->IsLabel = GetMetaData(CurrLine->Next)->IsLabel
See https://sourceforge.net/projects/gcbasic/files/Release%20Candidates/Patches/ ONLY add this EXE compiler to a RC47 installation.
Bit of an update.
I have had extensive discussions with Microchip and all the PIC-AS issues are to be resolved in the 2.35 release. This is slated for August 2021.
The attached document is the current status.
I saw that in the link (https://sourceforge.net/projects/gcbasic/files/Release%20Candidates/Patches/) the .exe file is no longer present. Do I need to download the entire installation file?
Yes. These are highly likely to be the release code.
I put there whilst I am away (just in case) but I am thinking we have stability and the code is of high quality where we can release.
I am currently wading through the 500 plus lines in the release note trying to group the changes together so you can see the major changes. There are some huge changes in this release.
So, download the whole installer and enjoy.
Thanks
Latest build of Great Cow BASIC v.0.98.07
I have updated the release with some small updated to the PIC18 datafiles. No other functional changes to the toolchain.
See https://sourceforge.net/projects/gcbasic/files/Release%20Candidates/Releases/
I will move to the default release by next week - so, if you have spotted an issue this is time to let me know.
:-)
Final release documentation is attached.
Zoom in to read! or see https://1drv.ms/x/s!Ase-PX_n_4cvhJAyurIqkF4cAD9PVw
Last edit: Anobium 2021-06-04