• AVR Freaks

Hot!Beaten into submission....

Author
JSteinhilper
Starting Member
  • Total Posts : 32
  • Reward points : 0
  • Joined: 2012/11/20 19:53:43
  • Location: 0
  • Status: offline
2020/04/14 13:52:02 (permalink)
0

Beaten into submission....

I am working with MPLAB8.92 on this project, and using Labcenters ISIS as the debugger.  (That's why 8.92, MPLABX doesn't do the version of ISIS simulator I have)
 
The code seems to be fine, if I put everything into one large file and compile it, it works, ISIS simulates and is reasonably happy.
The problem looks like I can't get ISIS to use TWO files in object file mode.  There's really no help there, I've tried every configuration I can think of and nothing works, I keep getting errors from MPASMWIN (1L) or something, basically I can't do what I'm doing, because that's for an object file, well, yeah!  Then it flags everything.
So one option is using a batch file to compile and sort of bypass the process in ISIS.  Not as seamless, but it would work, if I could get it work!  I've been hitting this for two days and still no closer than I was four days ago in ISIS.   Looks like there' very little subject matter on actually making things work.  Kinda like the documentation just assumes everything is going to work just fine, if it doesn't, yer on yer own buddy.
 
I have two files, LCDCode.asm and LCDLib.asm.   All I want to do is compile them into one object file (one is just a library of LCD stuff, so not in the main code, reused elsewhere hopefully) and into one .HEX file so ISIS can run the simulation.
I have exported the make file, and tries those as command lines, but nothing there but more errors.  Even one step at a time, brings no job, just "MPASMWIN /p16F628A LCDCode.asm" screams about "error in parameter 16F628A", then MPASMWIN pops up with some cryptic "unknown" error. (one reason it's hard to track down, I can't even find info on the actual errors)
 
If I do it all manually, outside of ISIS, and use the .HEX file, the simulation works.  But as I said, not as seamless.   So the code isn't the issue, it's getting MPASMWIN and MPLINK etc... to play nicely together.
I moved MPASMWIN/MPLINK and _MPLINK into the project directory, makes it easier to past the directory string limitations... 
 
Any help would sure be nice as I've been at this for days and can't think straight any more.   And if anybody has any tips on getting ISIS to compile two object files, that would be a huge bonus.   One file works fine, but two, it goes crazy.  From looking at it, it really doesn't seem like it's capable to accepting more than one file, but I'm sure it must be, it has the option for adding more than one, it just seems you can't tell it ..... Oh I don't know any more...
 
Supposedly a makfile will work too, I downloaded one of those but haven't the strength to check it out (plus my machine puzzles at the file type....)
 
Thanks ahead.
#1

11 Replies Related Threads

    du00000001
    Just Some Member
    • Total Posts : 3842
    • Reward points : 0
    • Joined: 2016/05/03 13:52:42
    • Location: Germany
    • Status: offline
    Re: Beaten into submission.... 2020/04/14 14:04:43 (permalink)
    0
    ISIS as in Proteus-VSM ?
    This is a simulator, not a debugger. Why don't you use MPLAB (X)'s debugger?
    OK - you're working with an antique PIC (otherwise you were forced to update anyway) . . .
     
    I have no experience with Proteus, so I'm somewhat surprised that the simulator is capable to process assembly at all. If it supports including files, you could use a "project super file" to gather your individual files without actually creating a huge single file. Might work out.
    Otherwise, assembling and linking individual files prior loading the resulting .hex into some simulator is the "usual approach". Why trying do do it differently?
     

    PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
    #2
    JSteinhilper
    Starting Member
    • Total Posts : 32
    • Reward points : 0
    • Joined: 2012/11/20 19:53:43
    • Location: 0
    • Status: offline
    Re: Beaten into submission.... 2020/04/14 16:49:50 (permalink)
    0
    Yes, this is Proteus.  I like the graphic type simulation, this would be a bit better at this time for this project.  I do use (or TRY to.....) MPLABX, but I am pushing the years, and the VERY tiny font gets VERY hard to see, even with 3.5 reading glasses.  (I can adjust the screen and get it a bit more readable, but just like ISIS, I have to keep fiddling with something to get it to work, so.....)
     
    The processor in the ISIS simulation will run on just the .HEX file.   But, I have to create it.  I can do so it MPLAB8, but it's basically using two separate programs, and I can't really debug in ISIS that way.   As one single file, I can run it, step, debug etc.... all right there in MPLAB8, with the ISIS simulation running in a window within.
     
    The manual says it'll work with a make file, if you have a make program I guess.  Or batch files.  But I can't get MPASMWIN (or MPASM) to assemble from the command line, much less get the linker going.
     
    Like I said, I tried using the command lines in the makefile export (in MPLAB8), and all it did was fuss.  But, come to think of it, that was MPASMWIN, and not MPASM.  I personally don't care what I use as long as I get the right results.
     
    With a file like that, I can still run ISIS within MPLAB8 seamlessly.  The "build all" command just runs whatever you tell it.  Normally, this would be to build an object file, but it cries when I try to do that, and have zero idea why.  So I'm trying to bypass that and use a batch file.  (just about forgot how to use DOS.....)
    #3
    du00000001
    Just Some Member
    • Total Posts : 3842
    • Reward points : 0
    • Joined: 2016/05/03 13:52:42
    • Location: Germany
    • Status: offline
    Re: Beaten into submission.... 2020/04/15 10:58:21 (permalink)
    0
    I'm about your age - but my eyes are better than yours. A larger Monitor should help.
    (No sure whether/where to select a larger font - might be another option.)
     
    The output window echos all commands issued, so creating a batch file is just copying everything from the output window and deleting everything that isn't a command. Might be necessary to add some lines for commands that are not realized via the command line (e.g. changing directories, deleting files from previous runs etc.), but the output from a "clean & build" run should be easily convertible to a batch file.

    PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
    #4
    JSteinhilper
    Starting Member
    • Total Posts : 32
    • Reward points : 0
    • Joined: 2012/11/20 19:53:43
    • Location: 0
    • Status: offline
    Re: Beaten into submission.... 2020/04/15 12:59:19 (permalink)
    0
    I'll take a look at capturing the output.  I'm making a little progress.
     
    This is about the 5th time I've tried to "get into" PIC's.   Every time I have tried in the past, something (which shall not be mentioned) pops up.  I've worked in electronics just about all my life, and cut my teeth on the Z80 years ago.  I have several add ons, like the ICD2 and some programmer, all obsolete before I even got to use them.  
    The plan is (now I seem to have time) to jump back on the PIC, hit the Atmel circuit, brush up on "C" (again...) and then back to the Zilog family.  (just because I can).
     
    (If we do the RV thing full time, this will be what i keep busy with when I'm not fixing or upgrading the RV, or hauling, but the stock market crash put a hold on that, so.....)
     
    The MPLABX window thing....  I wish I could just pop a larger monitor on there, or another one and use two.  But can't at the moment.
     
    I can enlarge parts of the screen, like the text window the code shows up in, I think "ctl-+" works.  But the window where the projects show up, no joy there.
     
    I know there's an issue (or was and nobody told me about a fix) in something Microchip uses to display the window.  They say they'll fix it when the company that writes that bit of software, updates their code.
     
    But It has to do with the screen resolution/scaling factor (I know, sounds like that didn't need to be said, but...).  If I start off in a high resolution, but with a scaling factor (150%) that makes other things on the screen like icons, it has no effect on MPLABX (very tiny).   I can change the scaling, and it'll affect the MPLABX screen, but not enough (larger text, smaller window).  But changing it back, does.  It's almost usable then (larger text, bigger window).  So, MPLABX gets "stuck" on startup, and you can futz with it some through the scaling setting, but not quite enough.  I can work with it, mostly everything is in MPLAB8 right now. (much simpler....)
    #5
    Mark Yampolsky
    Super Member
    • Total Posts : 122
    • Reward points : 0
    • Joined: 2009/04/03 18:50:36
    • Location: Russia Fryazino Moskow reg
    • Status: offline
    Re: Beaten into submission.... 2020/04/16 09:53:15 (permalink)
    0
    JSteinhilper
    I can enlarge parts of the screen, like the text window the code shows up in, I think "ctl-+" works.  But the window where the projects show up, no joy there.

     
    Editor window : ALT+mouse wheel
    https://ibb.co/vHfvVP2
    #6
    RISC
    Super Member
    • Total Posts : 5775
    • Reward points : 0
    • Status: offline
    Re: Beaten into submission.... 2020/04/16 10:17:07 (permalink)
    0
    Hi,
    Proteus VSM works with MPLAB X. There is a plugin for it.
    I used it last week with MPLAB X v5.30 and XC8 v2.10
    I have a few examples running on the PICDEM2PLUS template for Proteus. In my case it uses PIC16F1937.
    It is possible to use an existing board template to write SW if you use a old free demo version of Proteus.
    I used the free version v8.2 SP0 with a template which must have the pdsprj extension (not dsn).
    Of course with the free version you cannot create new templates but you can use existing ones.
    Proteus simulator will be launched automatically if selected as debugger in the project.
    To have this working you need to change the project properties.
    Regards
    #7
    JSteinhilper
    Starting Member
    • Total Posts : 32
    • Reward points : 0
    • Joined: 2012/11/20 19:53:43
    • Location: 0
    • Status: offline
    Re: Beaten into submission.... 2020/04/16 11:47:08 (permalink)
    0
    No joy.....  It enlarges the code window, but not the side window where the projects are.  (but that's much easier than the way I was doing it, thanks!)
    The projects window, has like a 6 or 8 point font, I mean it's really small.  Actually, looking at it just now, it's maybe 5 or 6.
    #8
    JSteinhilper
    Starting Member
    • Total Posts : 32
    • Reward points : 0
    • Joined: 2012/11/20 19:53:43
    • Location: 0
    • Status: offline
    Re: Beaten into submission.... 2020/04/16 11:49:40 (permalink)
    0
    I'll have to take a look at that.  
     
    Right now, my PICDEM 2 isn't working, suspect it's either MPLABX or the PICKit.
     
    I didn't know they had a free version, this is the demo?
     
    #9
    du00000001
    Just Some Member
    • Total Posts : 3842
    • Reward points : 0
    • Joined: 2016/05/03 13:52:42
    • Location: Germany
    • Status: offline
    Re: Beaten into submission.... 2020/04/16 13:04:25 (permalink)
    0
    Doesn't the PICDEM have an on-board debugger ?
    Anyway: check (in the project properties) which/whether the appropriate debugger is selected!

    PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
    #10
    JSteinhilper
    Starting Member
    • Total Posts : 32
    • Reward points : 0
    • Joined: 2012/11/20 19:53:43
    • Location: 0
    • Status: offline
    Re: Beaten into submission.... 2020/04/16 14:55:36 (permalink)
    0
    No, just the on chip debugger.
    #11
    du00000001
    Just Some Member
    • Total Posts : 3842
    • Reward points : 0
    • Joined: 2016/05/03 13:52:42
    • Location: Germany
    • Status: offline
    Re: Beaten into submission.... 2020/04/16 18:25:56 (permalink)
    0
    I didn't check - leaving this up to you:

    PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
    #12
    Jump to:
    © 2020 APG vNext Commercial Version 4.5