• AVR Freaks

AnsweredHot!MPASM Support for PIC18FxxQ41: Corrected Chip family

Author
Anobium
Super Member
  • Total Posts : 176
  • Reward points : 0
  • Joined: 2013/07/15 00:47:49
  • Location: 0
  • Status: offline
2021/01/01 09:00:52 (permalink)
0

MPASM Support for PIC18FxxQ41: Corrected Chip family

I have added support for the following PICs to the MPASMx v5.86.
 
PIC18F04Q41 7540h
PIC18F05Q41 7500h
PIC18F06Q41 7580h
PIC18F14Q41 7520h
PIC18F15Q41 74E0h
PIC18F16Q41 7560h
 
I had a need to produce the inc files for these chips and when I tested in MPASMX - they worked. 
 
So, you can still create ASM source for the Q41's and you can still load the HEX into MPLABx for debugging.  :-)
 
If anyone has a need for Q41 using MPASMX.exe then I have the solution.  Attached is the LST file from a very large project.
 
Also, it should be relatively easy to create other INC files for other 18Fs.

Enjoy.
post edited by Anobium - 2021/01/02 05:41:01
#1
Jerry Messina
Super Member
  • Total Posts : 668
  • Reward points : 0
  • Joined: 2003/11/07 12:35:12
  • Status: offline
Re: MPASM Support for PIC18FxxQ10 2021/01/02 05:28:14 (permalink)
4 (1)
Anobium
If anyone has a need for Q10s using MPASMX.exe then I have the solution

So how do we get the solution?
 
#2
Anobium
Super Member
  • Total Posts : 176
  • Reward points : 0
  • Joined: 2013/07/15 00:47:49
  • Location: 0
  • Status: offline
Re: MPASM Support for PIC18FxxQ10 2021/01/02 05:44:12 (permalink)
0
Jerry Messina
So how do we get the solution?
 


Will GitHub work?  I can post INC files there and we can use the Issue tools to improve the INCs.
 
I clarified the chip.  These are for the 18fxxQ41s.
 
#3
1and0
Access is Denied
  • Total Posts : 12108
  • Reward points : 0
  • Joined: 2007/05/06 12:03:20
  • Location: Harry's Gray Matter
  • Status: offline
Re: MPASM Support for PIC18FxxQ10 2021/01/02 07:16:37 (permalink) ☼ Best Answerby Anobium 2021/01/02 07:35:38
0
Anobium
Will GitHub work?  I can post INC files there and we can use the Issue tools to improve the INCs.
 
I clarified the chip.  These are for the 18fxxQ41s.

Creating new device specific include .INC files is not an issue. The question is will MPASMX and the MPLABX fully recognize and support the new devices?!!
 
#4
1and0
Access is Denied
  • Total Posts : 12108
  • Reward points : 0
  • Joined: 2007/05/06 12:03:20
  • Location: Harry's Gray Matter
  • Status: offline
Re: MPASM Support for PIC18FxxQ10 2021/01/02 07:37:49 (permalink)
0
I see you're using Great Cow BASIC and MPLABX v5.40.

                      00001 ;Program compiled by Great Cow BASIC (0.98.<<>> 2020-12-01 (Windows 64 bit))
                      00002 ;Need help? See the GCBASIC forums at http://sourceforge.net/projects/gcbasic/forums,
                      00003 ;check the documentation or email w_cholmondeley at users dot sourceforge dot net.
                      00004
                      00005 ;********************************************************************************
                      00006
                      00007 ;Set up the assembler options (Chip type, clock source, other bits and pieces)
Warning[215]: Processor superseded by command line.  Verify processor symbol.
                      00008  LIST P=18F16Q41, R=DEC
                      00009 #INCLUDE <P18F16Q41.INC>
                      00001         LIST
                      00002 ;==========================================================================
                      00003 ;
                      00004 ;  Built by Great Cow BASIC convertor
                      00005 ;  MPASM processor include for the chip shown below
                      00006 ;
                      00007 ; C:\Program Files (x86)\Microchip\MPLABX\v5.40\packs\index.idx
                      00008 ; C:\Program Files (x86)\Microchip\MPLABX\v5.40\packs\Microchip\PIC18F-Q_DFP\1.5.124\xc8\pic\dat\ini\18F
                            16Q41.ini
                      00009 ; C:\Program Files (x86)\Microchip\MPLABX\v5.40\packs\Microchip\PIC18F-Q_DFP\1.5.124\edc\18F16Q41.PIC
                      00010 ; C:\Program Files (x86)\Microchip\MPLABX\v5.40\packs\Microchip\PIC18F-Q_DFP\1.5.124\xc8\pic\dat\cfgdata
                            \18F16Q41.cfgdata

... but in my MPLABX v5.40 the assembler MPASMX does not appear in the list of Toolchain. So how were you able to get MPASMX to work under MPLABX v5.40?
#5
Anobium
Super Member
  • Total Posts : 176
  • Reward points : 0
  • Joined: 2013/07/15 00:47:49
  • Location: 0
  • Status: offline
Re: MPASM Support for PIC18FxxQ10 2021/01/02 07:42:24 (permalink)
0

Creating new device specific include .INC files is not an issue. The question is will MPASMX and the MPLABX fully recognize and support the new devices?!!

 
@1and0
 
They work here.  But, I am sharing to get the quality improved.  And, I would put in GithUb so they can be improved.  I have tested here and they work.  My use case is complex but they worked.
 
There is an improvement to automatically insert the new INCs in the 8bit_device.info file.  I added manually here, but, going forward it would be best to automatically insert new INCs into the 8bit_device.info file.
 
But, no point in doing this if folks are not interested.  I had a requirement and I the conversion does the job.  I just created 30 complex demo programming using the Q41s.
#6
Anobium
Super Member
  • Total Posts : 176
  • Reward points : 0
  • Joined: 2013/07/15 00:47:49
  • Location: 0
  • Status: offline
Re: MPASM Support for PIC18FxxQ10 2021/01/02 07:52:32 (permalink)
0
1and0
I see you're using Great Cow BASIC and MPLABX v5.40.

                     00001 ;Program compiled by Great Cow BASIC (0.98.<<>> 2020-12-01 (Windows 64 bit))
                     00002 ;Need help? See the GCBASIC forums at http://sourceforge.net/projects/gcbasic/forums,
                     00003 ;check the documentation or email w_cholmondeley at users dot sourceforge dot net.
                     00004
                     00005 ;********************************************************************************
                     00006
                     00007 ;Set up the assembler options (Chip type, clock source, other bits and pieces)
Warning[215]: Processor superseded by command line.  Verify processor symbol.
                     00008  LIST P=18F16Q41, R=DEC
                     00009 #INCLUDE <P18F16Q41.INC>
                     00001         LIST
                     00002 ;==========================================================================
                     00003 ;
                     00004 ;  Built by Great Cow BASIC convertor
                     00005 ;  MPASM processor include for the chip shown below
                     00006 ;
                     00007 ; C:\Program Files (x86)\Microchip\MPLABX\v5.40\packs\index.idx
                     00008 ; C:\Program Files (x86)\Microchip\MPLABX\v5.40\packs\Microchip\PIC18F-Q_DFP\1.5.124\xc8\pic\dat\ini\18F
                           16Q41.ini
                     00009 ; C:\Program Files (x86)\Microchip\MPLABX\v5.40\packs\Microchip\PIC18F-Q_DFP\1.5.124\edc\18F16Q41.PIC
                     00010 ; C:\Program Files (x86)\Microchip\MPLABX\v5.40\packs\Microchip\PIC18F-Q_DFP\1.5.124\xc8\pic\dat\cfgdata
                           \18F16Q41.cfgdata

... but in my MPLABX v5.40 the assembler MPASMX does not appear in the list of Toolchain. So how were you able to get MPASMX to work under MPLABX v5.40?




I am using MPASMx v5.86 as the command prompt (well not really... but, it is integrated into my IDE).  I  moved the MPASMx v5.86 folders from a MPLAB-X installation.  I believe there is one more version of MPASMx.exe out there. I will move to that shortly.
 
I develop Great Cow BASIC and we have GCASM (within Great Cow BASIC) to produce the HEX, but, I use MPASMx to validate the HEX produced by Great Cow BASIC as part of the quality control.  
 
I know of no method, yet, to make MPLAB-X enabled for MPASM for these chips.  But, there are plenty of toolchains where they have not yet migrated to PIC-AS yet.  The new INC may help these tool chains support these chips.
 
Re PIC-AS.  In the pipeline for Great Cow BASIC is the ability to create native ASM (as today) and PIC-AS.  Which means the creation of both sources which can be used in MPLABx (dependent on version of MPLABx) to debug programs.
 
#7
Jerry Messina
Super Member
  • Total Posts : 668
  • Reward points : 0
  • Joined: 2003/11/07 12:35:12
  • Status: offline
Re: MPASM Support for PIC18FxxQ10 2021/01/02 08:22:21 (permalink)
0
There is an improvement to automatically insert the new INCs in the 8bit_device.info file

Ahh, that was the missing part.
 
I've modified the 8bit_device.info file to add support for the 18FxxQ40,Q41,Q83, and Q84 families too (the Swordfish BASIC compiler has support for these devices).
 
It works ok when using mpasmx standalone or as part of another toolchain, but I haven't found a way to get it integrated directly into mplabx yet either. I suppose it requires developing a plugin to add it to the IDE as a toolchain.
 
The Q83/Q84 are a bit quirky when used with mpasmx... you have to restrict the number of config registers used to a max of 16 or mpasmx bombs out if used in absolute mode.
 
MPLABX v5.35 included the last official version of mpasmx (v5.87)
 
post edited by Jerry Messina - 2021/01/02 08:24:38
#8
Anobium
Super Member
  • Total Posts : 176
  • Reward points : 0
  • Joined: 2013/07/15 00:47:49
  • Location: 0
  • Status: offline
Re: MPASM Support for PIC18FxxQ10 2021/01/02 08:54:20 (permalink)
0
 
 

 Ahh, that was the missing part.


@Jerry
 
It is not hard to insert a new chip, but, I do not want to manage this manually.  I use a continuous integration tool and that manages the testing and release process.  
 
Do you have any details on the 8bit_device insertion process?
 
I though. The Q43 should work ok as there are Q43's in the 8bit_device.info file.  Not tested the Q84 yet, but, again there are a few listed in the 8bit_device.info file.  Are the other Q43 and Q84 chips that different ?  Any insights would be good.
 
#9
Jerry Messina
Super Member
  • Total Posts : 668
  • Reward points : 0
  • Joined: 2003/11/07 12:35:12
  • Status: offline
Re: MPASM Support for PIC18FxxQ10 2021/01/02 09:22:46 (permalink)
0
Anobium
Do you have any details on the 8bit_device insertion process?

@Evan
Right now I'm at about the same point you are... it's still a semi-manual process until I get all the details wrung out to process the mplabx xml files, so it's still a work in progress.
 
The Q43 family worked ok. I don't recall much different with those. The Q83/Q84 take some massaging. They have a large number of config settings and mpasmx doesn't handle that very well. It looks like it was written to support a max of 16 config bytes, since past that it starts to fail to assemble (I think it might be overwriting some internal data structures).
 
See https://www.microchip.com/forums/m1158074.aspx
 
PS - you do a great job with GC basic (no pun intended), esp the pickit mods you've done. 
post edited by Jerry Messina - 2021/01/02 09:27:50
#10
Anobium
Super Member
  • Total Posts : 176
  • Reward points : 0
  • Joined: 2013/07/15 00:47:49
  • Location: 0
  • Status: offline
Re: MPASM Support for PIC18FxxQ10 2021/01/02 10:32:44 (permalink)
0
Jerry Messina
Anobium
Do you have any details on the 8bit_device insertion process?

@Evan
Right now I'm at about the same point you are... it's still a semi-manual process until I get all the details wrung out to process the mplabx xml files, so it's still a work in progress.
 
The Q43 family worked ok. I don't recall much different with those. The Q83/Q84 take some massaging. They have a large number of config settings and mpasmx doesn't handle that very well. It looks like it was written to support a max of 16 config bytes, since past that it starts to fail to assemble (I think it might be overwriting some internal data structures).
 
See https://www.microchip.com/forums/m1158074.aspx
 
PS - you do a great job with GC basic (no pun intended), esp the pickit mods you've done. 




I believe I have the XML sorted. I just tried this.
1. Using my new tool converted the MPLABx file into an INC file.
2. Converted the INC into the Great Cow BASIC format.
3. Create a simple program that created the ASM and HEX. All in Great Cow BASIC.
4. Load the HEX file into MPLABx IDE, as a prebuilt hex, walked the code.  All looks good. Exactly code I expected - set up the oscillator, ports etc.
5. Loaded the ASM, from Great Cow BASIC  into MPASMx. Fail. Unknown error.  Ummm....
 
So, Great Cow BASIC can gen a hex that looks correct in MPLABx.  MPASMx cannot.
I can send you a test hex if you have an LED attached to a 28Q84. I would interested to see what happens! :-)
 
----
 
Re PICKitPlus.  We have done a good job.  I am very proud of it.  Thank you for your comments.
 
We are about to release PICKitPlus for Pi on Monday.  PICKitPlus for Mac is entering Alpha Test also. We then have all the main OSs covered.
 
We have not yet touched the PICkit Programmer hardware OS or changed the PICkit parts database structure.  Which was one on the design intents.   
 
:-)
 
 
 
 
#11
Jerry Messina
Super Member
  • Total Posts : 668
  • Reward points : 0
  • Joined: 2003/11/07 12:35:12
  • Status: offline
Re: MPASM Support for PIC18FxxQ10 2021/01/02 10:52:45 (permalink)
0
Loaded the ASM, from Great Cow BASIC  into MPASMx. Fail. Unknown error.  Ummm....

With the Q84, mplabx works, the programmers/debuggers appear to work, and even mpasmx works IF you exclude the config settings from the source file.
In absolute mode, as soon as mpasmx sees a CONFIG statement in the asm file it blows up UNLESS you change the .info file settings for the Q84 and restrict it to <= 16 bytes of config data.
 
I'm sure what you have using the GCB toolchain works!
 
 
#12
Anobium
Super Member
  • Total Posts : 176
  • Reward points : 0
  • Joined: 2013/07/15 00:47:49
  • Location: 0
  • Status: offline
Re: MPASM Support for PIC18FxxQ10 2021/01/02 11:09:09 (permalink)
0
Jerry Messina
Loaded the ASM, from Great Cow BASIC  into MPASMx. Fail. Unknown error.  Ummm....

With the Q84, mplabx works, the programmers/debuggers appear to work, and even mpasmx works IF you exclude the config settings from the source file.
In absolute mode, as soon as mpasmx sees a CONFIG statement in the asm file it blows up UNLESS you change the .info file settings for the Q84 and restrict it to <= 16 bytes of config data.
 
I'm sure what you have using the GCB toolchain works!
 
 



Thanks, I will give this change the .info file.  I will sort an application to edit .info in coming days.
#13
Jump to:
© 2021 APG vNext Commercial Version 4.5