K22 ASM errors

Coding and general discussion relating to the compiler

Moderators: David Barker, Jerry Messina

Post Reply
Francis
Registered User
Registered User
Posts: 314
Joined: Sun Mar 25, 2007 9:40 am
Location: Devon

K22 ASM errors

Post by Francis » Sat Mar 26, 2011 2:57 pm

Hello.

Can someone tell me where to check when these ASM errors occur please?

I have used the SystemConvert to generate .bas and .inc for 18F25K22.
I have the latest MPLAB.

The files were generated OK in the New... folders.

I copied the 18F25K22.bas and P18F25K22.inc files to the Iclude folder.
Yew, they are definitely there..

My test code is enormous.

Code: Select all


Device = 18F25K22
Clock = 20

that's it.
The code explorer window confirms the file is there.

If I compile, I get:
Image

I tried redoing the K22 .inc and .bas and tried copying example listings from Forum.
Same results. I have the latest SF.

Compiling with , for example, an 18F25K20 is fine.
It seems to work for everyone else , I'm getting paranoid now :?

What should I check ?

PS. I see a differnece between the .inc posted by sencharim and the one I generated today.
TMR5 EQU 0x0F4F

Have I messed up using the latest MPLAB?

ciseco
Posts: 15
Joined: Mon Mar 21, 2011 6:31 pm
Location: UK

Post by ciseco » Sat Mar 26, 2011 5:39 pm

Hiya,

So you have started the port.... cool

Miles
Ciseco plc - www.ciseco.co.uk

Low cost development hardware and software for building embeded prototypes and wireless sensor networks.

Jerry Messina
Swordfish Developer
Posts: 1473
Joined: Fri Jan 30, 2009 6:27 pm
Location: US

Post by Jerry Messina » Sat Mar 26, 2011 6:26 pm

I have the latest MPLAB.
What version of MPASM are you using? If you just run mpasmwin.exe, it should say.

Francis
Registered User
Registered User
Posts: 314
Joined: Sun Mar 25, 2007 9:40 am
Location: Devon

Post by Francis » Sat Mar 26, 2011 6:33 pm

Yeah, straight after lunch.

Indigestion all round :lol:


Hi Jerry. MPLAB v8.50

Jerry Messina
Swordfish Developer
Posts: 1473
Joined: Fri Jan 30, 2009 6:27 pm
Location: US

Post by Jerry Messina » Sat Mar 26, 2011 9:18 pm

Francis,

MPASM, not MPLAB. I can't remember which versions of MPASM come with what verions of MPLAB.

I've run across that error before, but at the moment I can't recall what it was. "Processor type undefined" is usually an MPASM version mismatch.

Jerry Messina
Swordfish Developer
Posts: 1473
Joined: Fri Jan 30, 2009 6:27 pm
Location: US

Post by Jerry Messina » Sun Mar 27, 2011 8:58 am

I get that set of errors using MPASM V5.22, which is very old. To support the K22, you'll need a more recent version... at least MPASM V5.34, but a later version would be better, like 5.37.

MPLAB is up to V8.66, which includes MPASM V5.40.

Francis
Registered User
Registered User
Posts: 314
Joined: Sun Mar 25, 2007 9:40 am
Location: Devon

Post by Francis » Sun Mar 27, 2011 9:56 am

Jerry, many thanks for advice and suggestions.

Oh dear , my eyesight has gone as well.

I have just (20 minutes ago) downloaded and installed MPLAB 8.66 from Microchip.
The release notes say that it is bundled with MPASM V5.38.

All installed and rebooted. Sadly, same errors.
What should be my next step?

Jerry Messina
Swordfish Developer
Posts: 1473
Joined: Fri Jan 30, 2009 6:27 pm
Location: US

Post by Jerry Messina » Sun Mar 27, 2011 10:30 am

The release notes say that it is bundled with MPASM V5.38.
The release notes lie. It's not the first time... you can't trust them. MPLAB 8.66 includes MPASM V5.40. At least you've got the right stuff.

You have two choices:
- copy the required files from the Microchip/MPASM Suite directory into the Swordfish/bin directory, or
- let SF use the Microchip installation (new to SF 2.2.0.6)

I prefer the first, since that way I always know what version of MPASM SF is using, even if I change MPLAB.
To do this, copy the following files from the 'Microchip/MPASM Suite' dir to 'Swordfish/bin' -
MPASMWIN.exe
8bit_device.dll
8bit_device.info

If you prefer to let SF use the MPLAB version, just rename the existing copy of MPASMWIN.exe that's currently in 'Swordfish/bin' to something else so that SF can't find it. According to the 2.2.0.6 release notes "If no version of MPASMWin.exe can be found in the default Swordfish BIN folder, the compiler attempts to locate the latest MPASMWin.exe version installed under MPLAB". I've not tried this myself.

Francis
Registered User
Registered User
Posts: 314
Joined: Sun Mar 25, 2007 9:40 am
Location: Devon

Post by Francis » Sun Mar 27, 2011 12:29 pm

Jerry,
Thank you. Excellent.

It compiles but sadly my PICKIT2 can't programme the 25K22 ... oops. So I can't do a rigorous check until I've got that sorted.

Anyway, I reckon you've shoved me over the first hurdle.

Suggestion to David; add a check/tick option in the IDE to ignore SF's bundled MPASM file or hunt for a newer one - like it does now by default , BUT making it obvious and easy for the user.
And a line or two in 'Help'...


Well done Jerry. I have this feeling I'll be washing your car for months :)

Jon Chandler
Registered User
Registered User
Posts: 185
Joined: Mon Mar 10, 2008 8:20 am
Location: Seattle, WA USA
Contact:

Post by Jon Chandler » Sun Mar 27, 2011 3:30 pm

Francis wrote:
It compiles but sadly my PICKIT2 can't programme the 25K22 ... oops. So I can't do a rigorous check until I've got that sorted.
You need to download the updated device file for the PICkit 2 from Microchip. I believe it's been mentioned here before with a link.
Jon

Check out the TAP-28 PIC Application board at http://www.clever4hire.com/throwawaypic/

Francis
Registered User
Registered User
Posts: 314
Joined: Sun Mar 25, 2007 9:40 am
Location: Devon

Post by Francis » Sun Mar 27, 2011 4:22 pm

Thanks Jon.
I've been hunting for that on M'chip's site since my last post (minus a coffee break) :) .
The M'chip web info is contradictory too.
One page says it supports 25/26K22 and another says it don't.

If you're certain there is a newer device file I'll carry on searching (the PICKIT2 App hasn't changed since 2009).
Appreciated.

Jon Chandler
Registered User
Registered User
Posts: 185
Joined: Mon Mar 10, 2008 8:20 am
Location: Seattle, WA USA
Contact:

Post by Jon Chandler » Sun Mar 27, 2011 5:17 pm

The file is available on the PICkit 2 page, accessible from the GUI help screen.
Jon

Check out the TAP-28 PIC Application board at http://www.clever4hire.com/throwawaypic/

Francis
Registered User
Registered User
Posts: 314
Joined: Sun Mar 25, 2007 9:40 am
Location: Devon

Post by Francis » Sun Mar 27, 2011 7:38 pm

Thanks Jon.

I tried the Download Device File 1.62.9.
Still no sign of the 26K22 or 25K22.

I ran up MPLAB and I noticed they are in there and when you select a 25K22 it says PICKIT2 can't do it but will "download" the info to PICKIT2 - but PICKIT2 doesn't seem to take any notice.

I've raised a ticket with Microchip support.
I know my eyesight is bad but if it's hidden 10 layers deep I simply cannot see it.
I've searched in PICKIT2 GUI and can't find anything.


Postscript.
I hadn't renamed the PK2DeviceFile properly and PICKIT2 regenerated an old one. I renamed properly and it's nearly working - I have some PICKIT2 errors but it's nearly there. Thanks for pointers and advice.

Francis
Registered User
Registered User
Posts: 314
Joined: Sun Mar 25, 2007 9:40 am
Location: Devon

Thanks

Post by Francis » Sun Mar 27, 2011 8:26 pm

Thanks Jerry and Jon.

Code downloads 100% now.
(Doesn't work but at least it gets to PIC :lol: )

Post Reply