I am not sure what you did not do. Remember, do two things when you create the project. 1. Select ASM 2. Change code to UPPERCASE. Even with these changes, with the current bugs, not every project will compile.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm not sure what I did (not) do yesterday either. I signed in this morning with that same project loaded and it compiled straight away. I can, at the moment, run it.
It is way beyond frustrating though. Infuriating is not even close. I tried to add a watch and I get a hint that no symbols were found, please make a debug build of the project. So... I select 'Clean and build for debugging'. But I still can't select any symbols to watch as I'm still told I need to create a debug build of the project. I try to monitor an I/O pin. From the list offered, I select GP0. I can't add any more I/O pins, that is it. Their Mode and Value items seem to be hidden or aren't present so it doesn't appear to do anything.
And now? It's crashed and won't allow me to stop the current simulation. Great.
Every time I have ever tried to use MPLab I find that it thwarts each attempt with ridiculously vague error messages and fails to work so in fury I end up uninstalling it after just a few hours. At least I haven't downloaded or installed this one...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I absolutely loath MPLab, with such a passion and intensity that I can't fully convey. I can never, ever get it to work. Not once. Not ever. No version has worked for me. And I've tried loads of them. I keep thinking I'm doing something wrong, so I follow the tutorials, I read the instructions. But still I can't get the wretched thing to work.
I tried to load a 'Blink_LED' example from MicroChip's own demonstration files into MPLab Xpress Cloud after my own file failed to work. Their own example failed to compile giving some indecipherable error message. At that point I gave up and tried to find another simulator.
Four program downloads later. None of the ones I tried worked even remotely 'properly', they either didn't have any support for modern chips at all, failed to run or the simulation was so basic I couldn't actually see if they were running or not. One showed a little promise but the support for a simulated LCD display was fixed to set pins, on set ports meaning all my code would need to be re-written to match the LCD pin mapping. Four simulators deleted.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
We are working with Microchip to document many of the Xpress issues. It is down them (Microchip) if they want to resolve the issues you have raised, plus many more we have identified.
They told us this week (week 23/2019) that the asm component of Xpress sofware was actually XC8 derived from the Hi-Tech C compiler. This was a total surprise to us. The XC8 supports its own asm assembler. In order to support the MPASM syntax the opcodes of MPASM were mapped to the opcodes of XC8 assembler using upper case opcodes - hence the many issues. If XC8 asm does not support the MPASM syntax then they have a fundemental issue of compatibility... so, do they have the passion, or need, to resolve the incompatibilties between XC8 asm and MPASM asm.
Regarding the modern chips. I need to know the explicit chip - I can feed that information back but to my knowledge.... the chip selection is based upon MCC support....so, this may be a constraint that needs to be removed if you want to Simulate using asm.
Regarding external devices like the LCD. I am no where near external devices in the discussions. This is more fundemental - does Microchip want the asm simulation is Xpress to work correctly - if yes then they need to invest resources to resolve the issues identified.
I am hopeful they will invest. I hopeful that they have the passion to resolve the issues. We are awaiting a response.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You won't find any simulators that support the latest devices, certainly not a free simulator and I am not aware of any commercial simulators that are up to date with Microchip's Device list.
That said, for 90% of GCBASIC Debugging you don't need to debug on a simulation of the actual target device as the GCBASIC code is portable.
My favorite of the Free simulators is PICSimLab - https://sourceforge.net/projects/picsim/
It has not got all the latest devices available but the supported microcontrollers (PIC16F84, PIC16F628, PIC16F648, PIC16F777, PIC16F877A, PIC18F452, PIC18F4520, PIC18F4550 and PIC18F4620) cover the majority of architecture and will be good for debugging most GCBASIC code.
Rather than use an LCD for debug output I prefer to use RS232 Serial. and PICSimLab works with Com2Com software serial Bridge to connect to a terminal emulation of your choice.
If you do need to test on actual hardware serial debugging only needs 2 Pins, and if SoftSerial is used then you can use any two pins that are available and you can Debug any board even if it has no LCD. To connect to a Terminal you can use a USB/Serial Bridge such as an FTDI or MCP2221 Device. If you have a PICkit 2 Programer then you can use the UART Toll as the terminal.
If you need to debug on your actual hardware then there is no alternative to MPLAB and an Expensive ICD (In Circuit Debugger).
I mentioned the Debugging Code I have been developing so I tried it on your device - 12f675 and whilst it successfully established communications with the PICKit UART Tool the device has insufficient memory to run most of the debug tool, but I will start a new thread for Debugging Tips and include the Communications Portion of my Debugging tool as an attachment.
Hopefully having an easy to set up, in this case literally Plug and Play with a PICKit 2 and a Low Pin Count or 28 Pin Demo board, will start a debate on techniques for Debugging with a Serial Port that may help everybody in the long run.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
We are working with Microchip to document many of the Xpress issues. It is down them (Microchip) if they want to resolve the issues you have raised, plus many more we have identified.
Please don't think I'm criticising GCB in my rant about MPLab. I fully understand that MicroChip are to blame for it and for it's shortcomings.
I genuinely have never got MPLab to work. The nearest I have ever got is an old copy (something like Version 4) which I use at work for programming some of the legacy OTP 16C57 that were used in designs before I started work there. It still supports the serial port programmer, PICStartPlus that is used to program them. I still can't use the IDE or anything else, but I've just about mastered loading a .hex file and programming this into a device.
I have long assumed that I am just far, far, far too stupid to use MPLab. I have tried repeatedly over the years since about 1995, but I just can't get it. COBOL for DOS? Yes. Turbo Pascal for DOS? Yes. Visual Basic? Yes. Borland Delphi? Yes. OPL for Psion? Yes. Epoc32 for Psion? Yes. CCS C for PIC? Yes. MBED for ARM? Yes. MPLab? No.
You won't find any simulators that support the latest devices, certainly not a free simulator and I am not aware of any commercial simulators that are up to date with Microchip's Device list.
I personally don't need support for ultra recent devices, I use mainly 16F1825/1829 and 12F675 though I'm replacing the 675 with the 12F1840 in newer designs.
I don't mind paying for a simulator, but I would like it to work. As a minimum show the pin I/O status (visually if possible) and the contents of RAM. Anything more would be a bonus. The nearest I got to finding one was PIC16Simulator by OshonSoft. I couldn't see where the RAM view was but I'm sure it was there. If the LCD module had been able to have it's pins mapped to individual pins on the simulated PIC rather than to designated ports, I would have bought it. The author did reply to my email very quickly asking about this and told me it was on his todo list. If he can sort that, I would probably buy it.
I fully realise that Revolution Education have an easier time of things with their PicAxe simulator as they only have a limited range of devices to cover, but their simulator is superb. It works. You can see the RAM, hook up LCD modules, click pins to set their status. It is ideal. I just wish I could find something similar for PICs.
Anyway, for now, I'll give up on the simulator(s) and go back to staring at my code for hours hoping the bugs in my code start to crawl so that I can spot them, then stamp on them.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Proteus is fabulous. I can't really fault it in any way. We had a one month trial at work last year and I loved the simulation capabilities. I thought it expensive at the time, £295+ VAT (£354) for a version of simulator only that covered the PICs we mostly use.
As we use Eagle for designing the PCBs, drawing a schematic in Proteus and then having to re-draw that in Eagle put me off at the time (that and the cost) but I did like it. And it did work! Possibly I should see if I can get the boss to stump up the cash?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
PIC16Simulator by OshonSoft looks cool but not every pic and not free.
I have had lots of fun using gcb but never used mplab.
When I used picaxe, their simulator was too much bother with to.
Do arduino users debug and is arduino software bettter?
I don't know, I've only programmed a uno with gcb.
Last edit: stan cartwright 2019-06-09
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Gcb has brought programmers from different origins together.
Ex picaxe users to non capable arduino users.
When programs don't work as planned it's usually human error...so imagine you're the program running.
A logic tracer should be easy to make if you don't have a scope This one is audio hi/lo/osc
See this project. https://mplabxpress.microchip.com/mplabcloud/ide/import/dd0d06a6-bd11-467d-ae55-f8e051474872?code=3f70e64c4d10f0a7c6d57261e1dbc203ae591955
Works for me.
I am not sure what you did not do. Remember, do two things when you create the project. 1. Select ASM 2. Change code to UPPERCASE. Even with these changes, with the current bugs, not every project will compile.
I'm not sure what I did (not) do yesterday either. I signed in this morning with that same project loaded and it compiled straight away. I can, at the moment, run it.
It is way beyond frustrating though. Infuriating is not even close. I tried to add a watch and I get a hint that no symbols were found, please make a debug build of the project. So... I select 'Clean and build for debugging'. But I still can't select any symbols to watch as I'm still told I need to create a debug build of the project. I try to monitor an I/O pin. From the list offered, I select GP0. I can't add any more I/O pins, that is it. Their Mode and Value items seem to be hidden or aren't present so it doesn't appear to do anything.
And now? It's crashed and won't allow me to stop the current simulation. Great.
Every time I have ever tried to use MPLab I find that it thwarts each attempt with ridiculously vague error messages and fails to work so in fury I end up uninstalling it after just a few hours. At least I haven't downloaded or installed this one...
I find mplab too difficult to use. Learning gcb ide and it's version of basic is pretty easy.
I thought that was the beauty of gcb.
I absolutely loath MPLab, with such a passion and intensity that I can't fully convey. I can never, ever get it to work. Not once. Not ever. No version has worked for me. And I've tried loads of them. I keep thinking I'm doing something wrong, so I follow the tutorials, I read the instructions. But still I can't get the wretched thing to work.
I tried to load a 'Blink_LED' example from MicroChip's own demonstration files into MPLab Xpress Cloud after my own file failed to work. Their own example failed to compile giving some indecipherable error message. At that point I gave up and tried to find another simulator.
Four program downloads later. None of the ones I tried worked even remotely 'properly', they either didn't have any support for modern chips at all, failed to run or the simulation was so basic I couldn't actually see if they were running or not. One showed a little promise but the support for a simulated LCD display was fixed to set pins, on set ports meaning all my code would need to be re-written to match the LCD pin mapping. Four simulators deleted.
We are working with Microchip to document many of the Xpress issues. It is down them (Microchip) if they want to resolve the issues you have raised, plus many more we have identified.
They told us this week (week 23/2019) that the asm component of Xpress sofware was actually XC8 derived from the Hi-Tech C compiler. This was a total surprise to us. The XC8 supports its own asm assembler. In order to support the MPASM syntax the opcodes of MPASM were mapped to the opcodes of XC8 assembler using upper case opcodes - hence the many issues. If XC8 asm does not support the MPASM syntax then they have a fundemental issue of compatibility... so, do they have the passion, or need, to resolve the incompatibilties between XC8 asm and MPASM asm.
Regarding the modern chips. I need to know the explicit chip - I can feed that information back but to my knowledge.... the chip selection is based upon MCC support....so, this may be a constraint that needs to be removed if you want to Simulate using asm.
Regarding external devices like the LCD. I am no where near external devices in the discussions. This is more fundemental - does Microchip want the asm simulation is Xpress to work correctly - if yes then they need to invest resources to resolve the issues identified.
I am hopeful they will invest. I hopeful that they have the passion to resolve the issues. We are awaiting a response.
You won't find any simulators that support the latest devices, certainly not a free simulator and I am not aware of any commercial simulators that are up to date with Microchip's Device list.
That said, for 90% of GCBASIC Debugging you don't need to debug on a simulation of the actual target device as the GCBASIC code is portable.
My favorite of the Free simulators is PICSimLab - https://sourceforge.net/projects/picsim/
It has not got all the latest devices available but the supported microcontrollers (PIC16F84, PIC16F628, PIC16F648, PIC16F777, PIC16F877A, PIC18F452, PIC18F4520, PIC18F4550 and PIC18F4620) cover the majority of architecture and will be good for debugging most GCBASIC code.
Rather than use an LCD for debug output I prefer to use RS232 Serial. and PICSimLab works with Com2Com software serial Bridge to connect to a terminal emulation of your choice.
If you do need to test on actual hardware serial debugging only needs 2 Pins, and if SoftSerial is used then you can use any two pins that are available and you can Debug any board even if it has no LCD. To connect to a Terminal you can use a USB/Serial Bridge such as an FTDI or MCP2221 Device. If you have a PICkit 2 Programer then you can use the UART Toll as the terminal.
If you need to debug on your actual hardware then there is no alternative to MPLAB and an Expensive ICD (In Circuit Debugger).
I mentioned the Debugging Code I have been developing so I tried it on your device - 12f675 and whilst it successfully established communications with the PICKit UART Tool the device has insufficient memory to run most of the debug tool, but I will start a new thread for Debugging Tips and include the Communications Portion of my Debugging tool as an attachment.
Hopefully having an easy to set up, in this case literally Plug and Play with a PICKit 2 and a Low Pin Count or 28 Pin Demo board, will start a debate on techniques for Debugging with a Serial Port that may help everybody in the long run.
Please don't think I'm criticising GCB in my rant about MPLab. I fully understand that MicroChip are to blame for it and for it's shortcomings.
I genuinely have never got MPLab to work. The nearest I have ever got is an old copy (something like Version 4) which I use at work for programming some of the legacy OTP 16C57 that were used in designs before I started work there. It still supports the serial port programmer, PICStartPlus that is used to program them. I still can't use the IDE or anything else, but I've just about mastered loading a .hex file and programming this into a device.
I have long assumed that I am just far, far, far too stupid to use MPLab. I have tried repeatedly over the years since about 1995, but I just can't get it. COBOL for DOS? Yes. Turbo Pascal for DOS? Yes. Visual Basic? Yes. Borland Delphi? Yes. OPL for Psion? Yes. Epoc32 for Psion? Yes. CCS C for PIC? Yes. MBED for ARM? Yes. MPLab? No.
I personally don't need support for ultra recent devices, I use mainly 16F1825/1829 and 12F675 though I'm replacing the 675 with the 12F1840 in newer designs.
I don't mind paying for a simulator, but I would like it to work. As a minimum show the pin I/O status (visually if possible) and the contents of RAM. Anything more would be a bonus. The nearest I got to finding one was PIC16Simulator by OshonSoft. I couldn't see where the RAM view was but I'm sure it was there. If the LCD module had been able to have it's pins mapped to individual pins on the simulated PIC rather than to designated ports, I would have bought it. The author did reply to my email very quickly asking about this and told me it was on his todo list. If he can sort that, I would probably buy it.
I fully realise that Revolution Education have an easier time of things with their PicAxe simulator as they only have a limited range of devices to cover, but their simulator is superb. It works. You can see the RAM, hook up LCD modules, click pins to set their status. It is ideal. I just wish I could find something similar for PICs.
Anyway, for now, I'll give up on the simulator(s) and go back to staring at my code for hours hoping the bugs in my code start to crawl so that I can spot them, then stamp on them.
Have you tried Proteus?
Proteus is fabulous. I can't really fault it in any way. We had a one month trial at work last year and I loved the simulation capabilities. I thought it expensive at the time, £295+ VAT (£354) for a version of simulator only that covered the PICs we mostly use.
As we use Eagle for designing the PCBs, drawing a schematic in Proteus and then having to re-draw that in Eagle put me off at the time (that and the cost) but I did like it. And it did work! Possibly I should see if I can get the boss to stump up the cash?
PIC16Simulator by OshonSoft looks cool but not every pic and not free.
I have had lots of fun using gcb but never used mplab.
When I used picaxe, their simulator was too much bother with to.
Do arduino users debug and is arduino software bettter?
I don't know, I've only programmed a uno with gcb.
Last edit: stan cartwright 2019-06-09
This is a really good thread.
We have identified debugging tools, options and lots of gotchas.
;-)
Gcb has brought programmers from different origins together.
Ex picaxe users to non capable arduino users.
When programs don't work as planned it's usually human error...so imagine you're the program running.
A logic tracer should be easy to make if you don't have a scope This one is audio hi/lo/osc
Last edit: stan cartwright 2019-06-09