Thanks Anobium, I'm trying,...
The version I have was downloaded only a couple of weeks ago, on this new win10 machine ( and I'm still having trouble getting it to connect directly to pickit2+, like the old GCB did)
I haven't found the easy "update GCB" command within the menus - and googling gets me this result (picture attached) - it suggests I already have the latest version.
Should I perhaps be using GC studio rather than GC Basic?
- I have looked at GC studio, looks great, but a lot to learn - especially when GCB works fine. Is there an explanation/introduction to the new features? I've it the help, but it's all about visual studio, which looks to be the tool that created GC studio. - much like GCB help often brings up SynWrite help.
Install GC Studio and select Legacy mode ( this is automatically selected when using Win7). Then, you get the latest compiler which you MUST be on for these new chips.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
FWIW, I've been trying to get the basic GLCD test program to work on the 18F05Q40, but many problems - it won't compile with the high memory option, the low mem option doesn't drive the HW I2C lines, and the 1Hz blink LED drops to 1/10 Hz. I'll spare the details until I retest with the latest 1.00.00 build you mention. I did spot that the I/O are not being set-up as the new I2C peripheral requests.
(here's my notes so far - though may well be invalidated in the newer compiler)
;18F05 datasheet:
;The SDA and SCL pins must be configured as open-drain outputs.
;Open-drain configuration is accomplished by setting the appropriate
;bits in the Open-Drain Control (ODCONx) registers, while output
;direction configuration is handled by clearing the appropriate bits
;in the Tri-State Control (TRISx) registers
;(c.f..I2C pins need to be input for uChip SSP module on other PICs)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you :-)
The information above is not obvious - how would other users of GCB discover that it is now 'deprecated' - i.e. stuck at 2022 version - and you have to move to GC studio, with legacy mode...?
The UI is vastly more complex - with options like debug, a reqt possibly for projects rather than single *.gcb files..
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Cool, don't suppose it's raining there is it?
the existing DAT file said this:
'This constant is exposed as ChipMaxAddress
MaxAddress=2303
I changed it to 3327, hit "make hex" - but same error.
I'll restart GC studio
surprise ! - it's gone back into GCB regular colours and layout. I had selected "legacy mode" on the GC studio start screen, then hit GCB Basic (launch) - looks like it needs a restart, to get into "proper" legacy mode, with the familiar fuctionality and appearance.
Anyway, program loads, compiles, did make an attempt to flash the part, bu tdidn't end with a working PIC.
Winding back a little, it compiles, and assembles, giving this output;
15:46:06 G+Stool started with parameter 'hex' -> processing C:\GCstudio\G+Stools\makeHEX.bat
Source-File = C:\Users\44780\Documents\pic\pic projects\OLED\18F05_no_mem_SS1306_32#50.gcb
Target-File = C:\Users\44780\Documents\pic\pic projects\OLED\18F05_no_mem_SS1306_32#50.hex
note However that no hex file is generated - I've run it a few more times, same result, no file generated. I also get a confirmation that flashing was OK, but it wasn't. see below.
15:55:36 G+Stool started with parameter 'useini' -> processing C:\GCstudio\G+Stools\useINI.bat
Source-File = C:\Users\44780\Documents\pic\pic projects\OLED\18F05_no_mem_SS1306_32#50.gcb
Target-File = C:\Users\44780\Documents\pic\pic projects\OLED\18F05_no_mem_SS1306_32#50.hex
I checked the DAT file - and I'd put it under the old GCB syn directory. now I've replaced the PIC18F05Q40.dat file in C:\ GCstudio\GreatCowBASIC\chipdata
same results - a long compile, a sudden lot of data on the wait screen, which vanishes, and leaves a shorter comment:.
My error. I said edit the 04Q40, should have been th 05Q40 for you program.
Edit to the same value.
But, the report shows the compilation completing.
and, the list shows above that the programming is working. Downloading / Flashing o.k.
Using Synwrite we dont get see the errors. In GCCode we would.
So, do this. Go to the command line. Change to the the directory C:\ GCstudio\GreatCowBASIC. Then, execute the compiler with gcbasic /s:use.ini YOURNFILENAME.GCB /P:
Now what is displayed?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The only way that that I can think of where there is no HEX is when the entry in use.ini for the Assembler is missing. So, using Edit Programmer Preferences selec the Compiler and select GCASM as the Assembler, select OK to save and then OK to exit. Retry.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
So, it's looking like mainly a GC studio set-up issue...
the setting of programmer preferences, GCASM compiler, fixes the "no ASM file" issue - and this carries over to the GCB pushbuttons. i.e. the "make HEX (F6)" does indeed make a hex file - just like the command-line instruction shown earlier.
The similar "Flash (F8)" button reports that it has re-flashed the device, but it's fibbing, the existing program continues to run, powered by the Pickit2, without interruption. I did "clone pickit2+" within GCstudio, and it reported success, but I don't see it in programmer preferences.
I have to manually erase the device and import the new hex file into PK2+, this is new, it used to erase and reprogram, now it just programs on top of what was there and obvs fails to verify.
Finally, the program does run, but the graphics are garbled, independent of whatever text I print. The attached GCB program sends short 6-character strings, but the OLED shows the same full-width garble. (see photo)
It is a minimum-function test using character mode only, I will recompile into the other 2 available GLCD modes and test, now I'm getting hex output from GCstudio/GCB.
This not a GC Studio issue. GC Studio, SynWrite and GC Code do not change the configuration. There is only one place to change the 'use.ini' file and that is the Edit Preferences Editor. All applications apart from Prefs Editor are readonly.
So, the only to remove the Assembler would be an accidental change by a user.
The post is very hard to follow - here goes.
So, it's looking like mainly a GC studio set-up issue...
I do not think so. See above.
the setting of programmer preferences, GCASM compiler, fixes the "no ASM file" issue - and this carries over to the GCB pushbuttons. i.e. the "make HEX (F6)" does indeed make a hex file - just like the command-line instruction shown earlier.
So, this is good.
The similar "Flash (F8)" button reports that it has re-flashed the device, but it's fibbing, the existing program continues to run, powered by the Pickit2, without interruption.
This sounds odd. But, this would need investigate to see why is happening. This is from SynWrite IDE? So, look at the command switches for this <f8> option. Are they correct ?</f8>
I did "clone pickit2+" within GCstudio, and it reported success, but I don't see it in programmer preferences.
I assume this was when you installed the GCStudio suite. So, this operation clone an existing PK+ install. The settings for PK+ are already included with Prefs Editor along with many other programmers.
If you are missing PK+ programmer options, and along with the missing assembler entry, you may have a corrupt use.ini. You can find a master use.ini in the folder called 'use_in_master'.
I have to manually erase the device and import the new hex file into PK2+, this is new, it used to erase and reprogram, now it just programs on top of what was there and obvs fails to verify.
See previous comment.
Finally, the program does run, but the graphics are garbled, independent of whatever text I print. The attached GCB program sends short 6-character strings, but the OLED shows the same full-width garble. (see photo) It is a minimum-function test using character mode only, I will recompile into the other 2 available GLCD modes and test, now I'm getting hex output from GCstudio/GCB.
OK
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OK, sorry for the difficult post, thanks for staying with it.
My use.ini file is very short:
'Preferences file for Great Cow BASIC
'Location: GCB install (or custom) dir
[GCBASIC]
Verbose = n
nosummary = n
Preserve = a
MuteBanners = n
WarningsAsErrors = n
FlashOnly = n
PauseAfterCompile = n
assembler = GCASM
hexappendGCBmessage = y
Programmer =
[toolvariables]
.................. that's it ....... clearly no definition of programmer .
The backup copy you mention is 400 lines. Something's clearly gone wrong.
I will nuke GCstudio and re-install, taking care to specify legacy mode if and when prompted.
What I had done was a full default install, and then running GCstudio (it gives a splash screen "getting started" with various options) - and choosing the legacy mode there.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OK, hopefully I'm back in regular territory. The installer gives the option for legacy mode at the very beginning. It installed fine and pulled in a big update. It also cloned PK2+ successfully - and now the "flash" function works perfectly. Wonderfully even.
The program still shows garbled text, but I can try the other GLCD options - and also the MaxAddress change from 2303 to 3327 as you mention above, in the 18F04Q40.DAT file .
I have checked the OLED, it works on the earlier PIC12LF1552 board, well it did yesterday - I'll re-check.
I'm concerned because the programmer is using the "maintain 5V" regime, and the OLED is max Vdd 3.6V. I'm being careful to unplug the OLED whilst programming, for now.
I haven't run-up the pickit2+ stand-alone program, in case it clashes with the GCB auto-flash - previously I have modified the programming regime to 3V3 in this. - I will dig into GCB programmer preferences and see if I can modify it there.
Not sure it's needed, but the compiler window output is copied below.. I like very much that it shows a full list of includes, and their paths - I've been trying to get this out of Arduino for some time, with no luck.
..................................................
Finding source files:
C:\Users\44780\Documents\pic\pic projects\OLED\18F05_no_mem_SS1306_32#52.gcb: found
C:\GCstudio\GreatCowBasic\include\glcd.h: found
C:\GCstudio\GreatCowBasic\include\glcd_st7789.h: found
C:\GCstudio\GreatCowBasic\include\glcd_ks0108.h: found
C:\GCstudio\GreatCowBasic\include\glcd_nt7108c.h: found
C:\GCstudio\GreatCowBasic\include\glcd_ssd1306.h: found
C:\GCstudio\GreatCowBasic\include\glcd_uc1601.h: found
C:\GCstudio\GreatCowBasic\include\glcd_ssd1306_twin.h: found
C:\GCstudio\GreatCowBasic\include\glcd_ili9341.h: found
C:\GCstudio\GreatCowBasic\include\glcd_ili9340.h: found
C:\GCstudio\GreatCowBasic\include\glcd_ssd1289.h: found
C:\GCstudio\GreatCowBasic\include\glcd_st7735.h: found
C:\GCstudio\GreatCowBasic\include\glcd_st7735r.h: found
C:\GCstudio\GreatCowBasic\include\glcd_st7920.h: found
C:\GCstudio\GreatCowBasic\include\glcd_pcd8544.h: found
C:\GCstudio\GreatCowBasic\include\glcd_sh1106.h: found
C:\GCstudio\GreatCowBasic\include\glcd_ili9326.h: found
C:\GCstudio\GreatCowBasic\include\glcd_ssd1351.h: found
C:\GCstudio\GreatCowBasic\include\glcd_ili9486l.h: found
C:\GCstudio\GreatCowBasic\include\glcd_ili9488.h: found
C:\GCstudio\GreatCowBasic\include\glcd_ili9481.h: found
C:\GCstudio\GreatCowBasic\include\glcd_hx8347.h: found
C:\GCstudio\GreatCowBasic\include\glcd_ssd1331.h: found
C:\GCstudio\GreatCowBasic\include\glcd_nextion.h: found
C:\GCstudio\GreatCowBasic\include\glcd_t6963.h: found
C:\GCstudio\GreatCowBasic\include\glcd_uc8230.h: found
C:\GCstudio\GreatCowBasic\include\epd_epd2in13d.h: found
C:\GCstudio\GreatCowBasic\include\epd_epd7in5.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\picas.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\a-d.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\pwm.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\rs232.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\eeprom.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\sound.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\stdbasic.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\7segment.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\lcd.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\ps2.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\timer.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\system.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\hwspi.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\keypad.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\random.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\string.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\usart.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\i2c.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\hwi2c.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\hwi2c2.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\pwm16.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\saf.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\hef.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\spisram.h: found
Loading source files ...
Reading compiler directives ...
Reading chip data ...
C:\GCstudio\GreatCowBasic\chipdata\18F05Q40.dat
Choosing programmer ...
Arduino UNO @115200 skipped
PICKit+ Cmd5v0 [Maintain Power @ 5v0] selected
Search for an existing hexFile, compile if not found, then program
Downloading program ...PICKit+ Cmd5v0 [Maintain Power @ 5v0]
Calling : C:\GCstudio\GreatCowBasic..\PICKitPlus\PICKitCommandline.exe
Parameters : -w -pPIC18F05Q40 -f"C:\Users\44780\Documents\pic\pic projects\OLED\18F05_no_mem_SS1306_32#52.hex" -mpec -zv -a5
PICkitCommandline v5.10.25140.7734
Product licensed to Kevin Stevens.
Using data file "PKPlusDeviceFile.dat" which is a version 2.63.221 file.
Connected to PICkit 2
Status is: Ready
Found PIC18F05Q40 (family 22)
Setting VDD=5V, VPP=8.5V
Target is not self-powered
Target VDD is 4.79V
Turbo mode engaged!
Skipping write of EEPROM memory because there is no data to write
Erasing target...
Writing to target...
Writing program memory
......
Verifying minimal program memory
.......
Verifying configwords
done
Setting VDD to 5.0v.
Completed in 0 minutes and 5 seconds
(Download time: 9.5 seconds)
Good progress, the GLCD "high memory" option produces legible output on the OLED. I will continue on the original thread.
This sub-thread is just a painful warning to avoid going off-piste in the install process.
If you want GCB function (for it's simplicity), but with the latest compiler, you have to install GCstudio AND select legacy mode at the outset. A full install, then selecting legacy mode (from the GCstudio splash screen) does not appear to produce the same result.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Further news - looks like a bug...
I renamed the gcb file, only, just adding "works" to the filename - as is my habit. Hitting "ASM" or "HEX" did not produce the relevant files (see screenshot) - it appears that the use.ini file might have got corrupted, as the console window no longer declares a chip type...
It works now I've removed a space in the source directory path.
The hash is not a problem.
No_spaces_in_full_file_source_path is quite important then !
many thanks for that, I will proceed easily from here I expect.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks Anobium, I'm trying,...
The version I have was downloaded only a couple of weeks ago, on this new win10 machine ( and I'm still having trouble getting it to connect directly to pickit2+, like the old GCB did)
I haven't found the easy "update GCB" command within the menus - and googling gets me this result (picture attached) - it suggests I already have the latest version.
Should I perhaps be using GC studio rather than GC Basic?
- I have looked at GC studio, looks great, but a lot to learn - especially when GCB works fine. Is there an explanation/introduction to the new features? I've it the help, but it's all about visual studio, which looks to be the tool that created GC studio. - much like GCB help often brings up SynWrite help.
Install GC Studio and select Legacy mode ( this is automatically selected when using Win7). Then, you get the latest compiler which you MUST be on for these new chips.
FWIW, I've been trying to get the basic GLCD test program to work on the 18F05Q40, but many problems - it won't compile with the high memory option, the low mem option doesn't drive the HW I2C lines, and the 1Hz blink LED drops to 1/10 Hz. I'll spare the details until I retest with the latest 1.00.00 build you mention. I did spot that the I/O are not being set-up as the new I2C peripheral requests.
(here's my notes so far - though may well be invalidated in the newer compiler)
;18F05 datasheet:
;The SDA and SCL pins must be configured as open-drain outputs.
;Open-drain configuration is accomplished by setting the appropriate
;bits in the Open-Drain Control (ODCONx) registers, while output
;direction configuration is handled by clearing the appropriate bits
;in the Tri-State Control (TRISx) registers
;(c.f..I2C pins need to be input for uChip SSP module on other PICs)
Agree. The demos have these settings. If the Demos neEd updating please hack away and update. :-)
Thank you :-)
The information above is not obvious - how would other users of GCB discover that it is now 'deprecated' - i.e. stuck at 2022 version - and you have to move to GC studio, with legacy mode...?
The UI is vastly more complex - with options like debug, a reqt possibly for projects rather than single *.gcb files..
So, I've done what you said, the program compiles, but will not produce a hex file.
here's what it says:
Great Cow BASIC (1.00.00 2023-04-13 (Windows 64 bit) : Build 1237)
Compiling c:\Users\44780\Documents\pic\pic projects\OLED\18F05_no_mem_SS1306_32#41workz.gcb
Program compiled successfully (Compile time: 4.5 seconds)
Summary:
Compiled:
Program lines: 30171
Subroutines: User: 1 ; System: 23 of 912 ; Total: 24
Chip resource usage:
Program Memory: 1607/16384 words (9.81%)
RAM: 78/2048 bytes (3.81%)
OSC: HFINTOSC_1MHZ, 32Mhz (Internal oscillator)
That's great, then asking for a hex file gives me this:
The terminal process "C:\Windows\SysNative\WindowsPowerShell\v1.0\powershell.exe -Command C:\GCstudio\GreatCowBasic\GCBASIC.EXE 'c:\Users\44780\Documents\pic\pic projects\OLED\18F05_no_mem_SS1306_32#41workz.gcb' /NP /S:use.ini /F:N /P:" terminated with exit code: 1.
I get same error. Looks like an issue. Working on it.
Bless you, devotion beyond measure - it's a bank holiday, but no let-up in the support.
I am actually on a board just off Caligaria. :-)
Find the file 18F04Q40.DAT for your chip. it is the
chipdata
folderthen edit, find the line
MaxAddress=
change to
MaxAddress=3327
Cool, don't suppose it's raining there is it?
the existing DAT file said this:
'This constant is exposed as ChipMaxAddress
MaxAddress=2303
I changed it to 3327, hit "make hex" - but same error.
I'll restart GC studio
surprise ! - it's gone back into GCB regular colours and layout. I had selected "legacy mode" on the GC studio start screen, then hit GCB Basic (launch) - looks like it needs a restart, to get into "proper" legacy mode, with the familiar fuctionality and appearance.
Anyway, program loads, compiles, did make an attempt to flash the part, bu tdidn't end with a working PIC.
Winding back a little, it compiles, and assembles, giving this output;
15:46:06 G+Stool started with parameter 'hex' -> processing C:\GCstudio\G+Stools\makeHEX.bat
Source-File = C:\Users\44780\Documents\pic\pic projects\OLED\18F05_no_mem_SS1306_32#50.gcb
Target-File = C:\Users\44780\Documents\pic\pic projects\OLED\18F05_no_mem_SS1306_32#50.hex
Compiler Version: 1.00.00 2023-04-13 (Windows 64 bit) : Build 1237 Program Memory: 1607/16384 words (9.81%) RAM: 78/2048 bytes (3.81%) OSC: HFINTOSC_1MHZ, 32Mhz (Internal oscillator) Chip: 18F05Q40
Duration: 5.6 Seconds.
note However that no hex file is generated - I've run it a few more times, same result, no file generated. I also get a confirmation that flashing was OK, but it wasn't. see below.
15:55:36 G+Stool started with parameter 'useini' -> processing C:\GCstudio\G+Stools\useINI.bat
Source-File = C:\Users\44780\Documents\pic\pic projects\OLED\18F05_no_mem_SS1306_32#50.gcb
Target-File = C:\Users\44780\Documents\pic\pic projects\OLED\18F05_no_mem_SS1306_32#50.hex
Enjoying Great Cow BASIC ? Please goto to https://sourceforge.net/projects/gcbasic/reviews/new?stars=5 and provide feedback to share your experience.
Compiler Version: 1.00.00 2023-04-13 (Windows 64 bit) : Build 1237 Program Memory: 1607/16384 words (9.81%) RAM: 78/2048 bytes (3.81%) OSC: HFINTOSC_1MHZ, 32Mhz (Internal oscillator) Chip: 18F05Q40
Downloading / Flashing o.k.
Duration: 5.3 Seconds.
Does not make sense to me. The programming has happened, so, the hex must have existed.
Looks like it is working.
But, check that dat file please.
I checked the DAT file - and I'd put it under the old GCB syn directory. now I've replaced the PIC18F05Q40.dat file in C:\ GCstudio\GreatCowBASIC\chipdata
same results - a long compile, a sudden lot of data on the wait screen, which vanishes, and leaves a shorter comment:.
16:18:29 G+Stool started with parameter 'useini' -> processing C:\GCstudio\G+Stools\useINI.bat
Source-File = C:\Users\44780\Documents\pic\pic projects\OLED\18F05_no_mem_SS1306_32#51.gcb
Target-File = C:\Users\44780\Documents\pic\pic projects\OLED\18F05_no_mem_SS1306_32#51.hex
Compiler Version: 1.00.00 2023-04-13 (Windows 64 bit) : Build 1237 Program Memory: 1607/16384 words (9.81%) RAM: 78/2048 bytes (3.81%) OSC: HFINTOSC_1MHZ, 32Mhz (Internal oscillator) Chip: 18F05Q40
Downloading / Flashing o.k.
Duration: 4.2 Seconds.
The PicKit2 didn't flash any LEDs, and there's no hex file... :-(
My error. I said edit the 04Q40, should have been th 05Q40 for you program.
Edit to the same value.
But, the report shows the compilation completing.
and, the list shows above that the programming is working. Downloading / Flashing o.k.
Using Synwrite we dont get see the errors. In GCCode we would.
So, do this. Go to the command line. Change to the the directory C:\ GCstudio\GreatCowBASIC. Then, execute the compiler with gcbasic /s:use.ini YOURNFILENAME.GCB /P:
Now what is displayed?
Seems to work OK :
PS C:\GCstudio\GreatCowBASIC> .\gcbasic /s:use.ini 18F05_no_mem_SS1306_32#51.GCB /P:
Compiling 18F05_no_mem_SS1306_32#51.GCB
Program compiled successfully (Compile time: 4 seconds)
Summary:
Compiled:
Program lines: 30171
Subroutines: User: 1 ; System: 23 of 912 ; Total: 24
Chip resource usage:
Program Memory: 1607/16384 words (9.81%)
RAM: 78/2048 bytes (3.81%)
OSC: HFINTOSC_1MHZ, 32Mhz (Internal oscillator)
Done
PS C:\GCstudio\GreatCowBASIC>
there's an asm file but no hex file.
note windows powershell needs the ".\gcbasic, apparently, so as to trust the local executable.
When using PowerShell you should enter CMD first.
The only way that that I can think of where there is no HEX is when the entry in use.ini for the Assembler is missing. So, using Edit Programmer Preferences selec the Compiler and select GCASM as the Assembler, select OK to save and then OK to exit. Retry.
Brilliant - those new preferences result in a hex file !! - I'll see what it does.
the printout is below, and the last 3 lines are new - showing that the program assembled correctly:
C:\GCstudio\GreatCowBASIC>gcbasic /s:use.ini 18F05_no_mem_SS1306_32#51.GCB /P:
Great Cow BASIC (1.00.00 2023-04-13 (Windows 64 bit) : Build 1237)
Compiling 18F05_no_mem_SS1306_32#51.GCB
Program compiled successfully (Compile time: 4 seconds)
Summary:
Compiled:
Program lines: 30171
Subroutines: User: 1 ; System: 23 of 912 ; Total: 24
Chip resource usage:
Program Memory: 1607/16384 words (9.81%)
RAM: 78/2048 bytes (3.81%)
OSC: HFINTOSC_1MHZ, 32Mhz (Internal oscillator)
Assembling program using GCASM
Program assembled successfully (Assembly time: 0.5 seconds)
Done
C:\GCstudio\GreatCowBASIC>
So, it's looking like mainly a GC studio set-up issue...
the setting of programmer preferences, GCASM compiler, fixes the "no ASM file" issue - and this carries over to the GCB pushbuttons. i.e. the "make HEX (F6)" does indeed make a hex file - just like the command-line instruction shown earlier.
The similar "Flash (F8)" button reports that it has re-flashed the device, but it's fibbing, the existing program continues to run, powered by the Pickit2, without interruption. I did "clone pickit2+" within GCstudio, and it reported success, but I don't see it in programmer preferences.
I have to manually erase the device and import the new hex file into PK2+, this is new, it used to erase and reprogram, now it just programs on top of what was there and obvs fails to verify.
Finally, the program does run, but the graphics are garbled, independent of whatever text I print. The attached GCB program sends short 6-character strings, but the OLED shows the same full-width garble. (see photo)
It is a minimum-function test using character mode only, I will recompile into the other 2 available GLCD modes and test, now I'm getting hex output from GCstudio/GCB.
and now with the first attachment, the gcb file, which dropped off.
This not a GC Studio issue. GC Studio, SynWrite and GC Code do not change the configuration. There is only one place to change the 'use.ini' file and that is the Edit Preferences Editor. All applications apart from Prefs Editor are readonly.
So, the only to remove the Assembler would be an accidental change by a user.
The post is very hard to follow - here goes.
I do not think so. See above.
So, this is good.
This sounds odd. But, this would need investigate to see why is happening. This is from SynWrite IDE? So, look at the command switches for this <f8> option. Are they correct ?</f8>
I assume this was when you installed the GCStudio suite. So, this operation clone an existing PK+ install. The settings for PK+ are already included with Prefs Editor along with many other programmers.
If you are missing PK+ programmer options, and along with the missing assembler entry, you may have a corrupt use.ini. You can find a master use.ini in the folder called 'use_in_master'.
See previous comment.
OK
OK, sorry for the difficult post, thanks for staying with it.
My use.ini file is very short:
'Preferences file for Great Cow BASIC
'Location: GCB install (or custom) dir
[GCBASIC]
Verbose = n
nosummary = n
Preserve = a
MuteBanners = n
WarningsAsErrors = n
FlashOnly = n
PauseAfterCompile = n
assembler = GCASM
hexappendGCBmessage = y
Programmer =
[toolvariables]
.................. that's it ....... clearly no definition of programmer .
The backup copy you mention is 400 lines. Something's clearly gone wrong.
I will nuke GCstudio and re-install, taking care to specify legacy mode if and when prompted.
What I had done was a full default install, and then running GCstudio (it gives a splash screen "getting started" with various options) - and choosing the legacy mode there.
OK, hopefully I'm back in regular territory. The installer gives the option for legacy mode at the very beginning. It installed fine and pulled in a big update. It also cloned PK2+ successfully - and now the "flash" function works perfectly. Wonderfully even.
The program still shows garbled text, but I can try the other GLCD options - and also the MaxAddress change from 2303 to 3327 as you mention above, in the 18F04Q40.DAT file .
I have checked the OLED, it works on the earlier PIC12LF1552 board, well it did yesterday - I'll re-check.
I'm concerned because the programmer is using the "maintain 5V" regime, and the OLED is max Vdd 3.6V. I'm being careful to unplug the OLED whilst programming, for now.
I haven't run-up the pickit2+ stand-alone program, in case it clashes with the GCB auto-flash - previously I have modified the programming regime to 3V3 in this. - I will dig into GCB programmer preferences and see if I can modify it there.
Not sure it's needed, but the compiler window output is copied below.. I like very much that it shows a full list of includes, and their paths - I've been trying to get this out of Arduino for some time, with no luck.
..................................................
G+Stool V20220127 www.FrankSteinberg.de >>fst'22<<
foINI
Search for existing hexFile, compile if hexFile is not found, then program.
Great Cow BASIC (1.00.00 2023-04-13 (Windows 64 bit) : Build 1237)
Compiling C:\Users\44780\Documents\pic\pic projects\OLED\18F05_no_mem_SS1306_32#52.gcb
Finding source files:
C:\Users\44780\Documents\pic\pic projects\OLED\18F05_no_mem_SS1306_32#52.gcb: found
C:\GCstudio\GreatCowBasic\include\glcd.h: found
C:\GCstudio\GreatCowBasic\include\glcd_st7789.h: found
C:\GCstudio\GreatCowBasic\include\glcd_ks0108.h: found
C:\GCstudio\GreatCowBasic\include\glcd_nt7108c.h: found
C:\GCstudio\GreatCowBasic\include\glcd_ssd1306.h: found
C:\GCstudio\GreatCowBasic\include\glcd_uc1601.h: found
C:\GCstudio\GreatCowBasic\include\glcd_ssd1306_twin.h: found
C:\GCstudio\GreatCowBasic\include\glcd_ili9341.h: found
C:\GCstudio\GreatCowBasic\include\glcd_ili9340.h: found
C:\GCstudio\GreatCowBasic\include\glcd_ssd1289.h: found
C:\GCstudio\GreatCowBasic\include\glcd_st7735.h: found
C:\GCstudio\GreatCowBasic\include\glcd_st7735r.h: found
C:\GCstudio\GreatCowBasic\include\glcd_st7920.h: found
C:\GCstudio\GreatCowBasic\include\glcd_pcd8544.h: found
C:\GCstudio\GreatCowBasic\include\glcd_sh1106.h: found
C:\GCstudio\GreatCowBasic\include\glcd_ili9326.h: found
C:\GCstudio\GreatCowBasic\include\glcd_ssd1351.h: found
C:\GCstudio\GreatCowBasic\include\glcd_ili9486l.h: found
C:\GCstudio\GreatCowBasic\include\glcd_ili9488.h: found
C:\GCstudio\GreatCowBasic\include\glcd_ili9481.h: found
C:\GCstudio\GreatCowBasic\include\glcd_hx8347.h: found
C:\GCstudio\GreatCowBasic\include\glcd_ssd1331.h: found
C:\GCstudio\GreatCowBasic\include\glcd_nextion.h: found
C:\GCstudio\GreatCowBasic\include\glcd_t6963.h: found
C:\GCstudio\GreatCowBasic\include\glcd_uc8230.h: found
C:\GCstudio\GreatCowBasic\include\epd_epd2in13d.h: found
C:\GCstudio\GreatCowBasic\include\epd_epd7in5.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\picas.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\a-d.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\pwm.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\rs232.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\eeprom.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\sound.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\stdbasic.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\7segment.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\lcd.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\ps2.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\timer.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\system.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\hwspi.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\keypad.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\random.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\string.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\usart.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\i2c.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\hwi2c.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\hwi2c2.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\pwm16.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\saf.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\hef.h: found
C:\GCstudio\GreatCowBasic\INCLUDE\LOWLEVEL\spisram.h: found
Loading source files ...
Reading compiler directives ...
Reading chip data ...
C:\GCstudio\GreatCowBasic\chipdata\18F05Q40.dat
Choosing programmer ...
Arduino UNO @115200 skipped
PICKit+ Cmd5v0 [Maintain Power @ 5v0] selected
Search for an existing hexFile, compile if not found, then program
Downloading program ...PICKit+ Cmd5v0 [Maintain Power @ 5v0]
Calling : C:\GCstudio\GreatCowBasic..\PICKitPlus\PICKitCommandline.exe
Parameters : -w -pPIC18F05Q40 -f"C:\Users\44780\Documents\pic\pic projects\OLED\18F05_no_mem_SS1306_32#52.hex" -mpec -zv -a5
PICkitCommandline v5.10.25140.7734
Product licensed to Kevin Stevens.
Using data file "PKPlusDeviceFile.dat" which is a version 2.63.221 file.
Connected to PICkit 2
Status is: Ready
Found PIC18F05Q40 (family 22)
Setting VDD=5V, VPP=8.5V
Target is not self-powered
Target VDD is 4.79V
Turbo mode engaged!
Skipping write of EEPROM memory because there is no data to write
Erasing target...
Writing to target...
Writing program memory
......
Verifying minimal program memory
.......
Verifying configwords
done
Setting VDD to 5.0v.
Completed in 0 minutes and 5 seconds
(Download time: 9.5 seconds)
Enjoying Great Cow BASIC ?
Please goto to https://sourceforge.net/projects/gcbasic/reviews/new?stars=5 and provide feedback to share your experience.
(Total time: 12.5 seconds)
Done
Good progress, the GLCD "high memory" option produces legible output on the OLED. I will continue on the original thread.
This sub-thread is just a painful warning to avoid going off-piste in the install process.
If you want GCB function (for it's simplicity), but with the latest compiler, you have to install GCstudio AND select legacy mode at the outset. A full install, then selecting legacy mode (from the GCstudio splash screen) does not appear to produce the same result.
Further news - looks like a bug...
I renamed the gcb file, only, just adding "works" to the filename - as is my habit. Hitting "ASM" or "HEX" did not produce the relevant files (see screenshot) - it appears that the use.ini file might have got corrupted, as the console window no longer declares a chip type...
15:04:06 G+Stool started with parameter 'hex' -> processing C:\GCstudio\G+Stools\makeHEX.bat
Source-File = C:\Users\44780\Documents\pic\pic projects\OLED\18F05_hi_mem_#51_short.gcb
Target-File = C:\Users\44780\Documents\pic\pic projects\OLED\18F05_hi_mem_#51_short.hex
Chip:
Duration: 10.5 Seconds.
Synwrite as the IDE uses a load of batch files to complete the tasks. Is this a failure in those batch files?
Is there a space in the full filename specification? that may cause the batch files to fail.
Does the hash cause the batch files to fail?
It works now I've removed a space in the source directory path.
The hash is not a problem.
No_spaces_in_full_file_source_path is quite important then !
many thanks for that, I will proceed easily from here I expect.