PDA

View Full Version : Assembler Error Msg?



rocket_troy
- 29th May 2013, 06:57
I've recently upgraded my PBP from 2.6 to 3 but I often receive error messages in the compile process that I didn't previously receive with the same code like:
[ASM ERROR] My_Program.ASM (48) : CONFIG Directive Error: (setting "DEBUG" not found for the processor 18F13K50)

Is this because I haven't updated something I should have during the process?

Thanks,

Troy

Demon
- 29th May 2013, 11:57
The CONFIG command is new. Search the PBP3 subforum for details and your manual.

Robert

rocket_troy
- 30th May 2013, 01:06
Robert,
Are you referring to the #CONFIG marker to specify an assembly language block as mentioned in the migration notes? I've read through the migration notes reasonably thoroughly and I can't recall it mentioning "config" being used for anything else? To me, the error doesn't appear to be pointing any fingers at "Config" directly, but more to an omission in one of the support files?

Regards,

Troy

Demon
- 30th May 2013, 03:24
I don't have 3.0 yet, I'm only going by the message you posted. Most of the migration problems come from changing the CONFIGs.

Your best bet is to post your code. Help those with the answers to help you.

Robert

rocket_troy
- 30th May 2013, 03:48
Demon,
Here's an example:


Define OSC 24

ANSEL = 0 'All ports digital
ANSELH = 0 'All ports digital

TRISC.3 = 0

pause 100


loop1:
DTMFout PortC.3,[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
Goto loop1


As you can see, very simple example with no calls to assembler or anything complex. The simple sample programs provided with PBP3 also produces the same error too.

Thanks,

Troy

rocket_troy
- 30th May 2013, 05:11
BTW: This is the screen grab I get when I click on the Error Message:

6998

Troy

AvionicsMaster1
- 30th May 2013, 06:10
Define must be in CAPS for it to work. i.e. #DEFINE OSC 24

rocket_troy
- 30th May 2013, 06:23
Define must be in CAPS for it to work. i.e. #DEFINE OSC 24

The editor that came with PBP3 -- Microcode Studio MCSX (the apparent successor to MCS) -- appears to automatically adjust/correct the "DEFINE" to lowercase. I'm assuming this is intentional??? Nevertheless, it's not the cause of the compiling error as the error still appears even if I remove that entire line from the code.

Regards,

Troy

Ioannis
- 30th May 2013, 08:56
Are you sure you have selected the correct chip on the MCSX drop down menu?

I suppose you have a new version of MPLAB and a new directory you installed PBP. Not over the old one?

Ioannis

Charlie
- 30th May 2013, 12:08
I'm not a 3.0 user either, but the 18F13K50 does not have onboard debug support, so the new compiler may give a warning when invoking DEBUG, even if the DEFINE is to turn it off. If you comment out that line, does the error go away?

rocket_troy
- 31st May 2013, 00:19
Ioannis,
"Yes" to all those questions except MPLAB. I can't recall installing a new version of MPLAB onto my machine unless it was part of the PBP3 installation process?

Regards,

Troy

rocket_troy
- 31st May 2013, 00:23
I'm not a 3.0 user either, but the 18F13K50 does not have onboard debug support, so the new compiler may give a warning when invoking DEBUG, even if the DEFINE is to turn it off. If you comment out that line, does the error go away?
I have considered this, but since it's one of the "system" files(?) ie. not my input, I thought I'd hold off before I received some feedback here 1st. I'll found out how to install a new version of MPLAB onto my machine 1st, then if that does nothing, I'll comment that line out.

Thanks,

Troy

Charlie
- 31st May 2013, 02:52
If you choose to upgrade MPLAB, don't delete your old version of MPLAB, but rather try a fresh install in a different directory. Many people that try MPLAB X go back in short order. YMMV.

As to my comment - I'm simply suggesting that perhaps Version 3 is less tolerant than 2.6 was of trying to define something that does not exist - certainly that's what the error says to me. Those defines are not sacred. You can add and remove them as you see fit. Don't worry about even editing "system files" - feel free to experiment. Just keep a pristine copy of the original files so you can go back if you mess up, and then experiment to your heart's content. I don't think it is possible to execute a "halt and catch fire" instruction on modern devices. ;) .

rocket_troy
- 31st May 2013, 03:11
Charlie,
I commented out that line and it appears to compile without issue - thanks for the great advice.

The really weird thing is this error would appear for virtually any simple program I tried compiling with that processor selected, but the largest & most complex program I've written (~1000 lines) compiled perfectly - go figure!

Regards,

Troy

Ioannis
- 31st May 2013, 07:56
It is important to have the latest MPLAB. Download from www.microchip.com/ide the latest as now 8.91 and I feel you will be OK.

Ioannis

Brassfly
- 31st May 2013, 21:17
The editor that came with PBP3 -- Microcode Studio MCSX (the apparent successor to MCS) -- appears to automatically adjust/correct the "DEFINE" to lowercase. I'm assuming this is intentional??? Nevertheless, it's not the cause of the compiling error as the error still appears even if I remove that entire line from the code.

Regards,

Troy

Troy,

Microcode Studio MCSX defaults to lower case for the reserve words, but you can change that. To do so, click on the 'View' menu, then select 'Editor Options'. Now select the 'Highlighter' tab and at the bottom of that tab is the 'Reserve Word Formatting' area. Just select the 'Uppercase all' option and your "DEFINE", as well as all reserve words, will be in caps.

rocket_troy
- 3rd June 2013, 00:45
Troy,

Microcode Studio MCSX defaults to lower case for the reserve words, but you can change that. To do so, click on the 'View' menu, then select 'Editor Options'. Now select the 'Highlighter' tab and at the bottom of that tab is the 'Reserve Word Formatting' area. Just select the 'Uppercase all' option and your "DEFINE", as well as all reserve words, will be in caps.

Thanks for the tip Brassfly.

Cheers,

Troy

rocket_troy
- 3rd June 2013, 00:50
It is important to have the latest MPLAB. Download from www.microchip.com/ide the latest as now 8.91 and I feel you will be OK.

Ioannis

Ioannis,
Ok. I've downloaded and (I assume) installed the latest version of MPLAB. The only thing I've notice differently (initially) is that the Error has come back(!); yup, the same error that I commented out previously has returned??? Are there any settings I need to adjust in MCSX to acknowledge this new MPLAB version on my machine?

Troy.

Ioannis
- 3rd June 2013, 08:42
As Microchip says, you have to un-install previous version before installing the latest.

It is in fact strange this problem...

Ioannis