Menu

#11 Broken Or Starter Point?

open
nobody
None
5
2018-01-29
2018-01-26
vinr
No

Version: 0.29.0
I've never used gpsim before and it doesn't seem to work for me, not the cli nor the gui.
The cli doesn't seem to select the processor.
The gui breadboard doesn't show the processor.

If it was just the gui that wasn't functioning right because I'm at the bleeding-edge with arch linux, then fine. But when the cli isn't working for me either, I'm leaning more towards that I'm just plain dumb.

I've attached a screenshot showing the terminal where I tested the cli as well as the gui:

$ gpsim -i
**gpsim> proc pic18f2620
**gpsim> proc
Processor List
(empty)
**gpsim> q
Exiting gpsim
$ gpsim -i -ppic18f2620
not using gui
**gpsim> Gtk-Message: (for origin information, set GTK_DEBUG): failed to retrieve property `gtk-primary-button-warps-slider' of type `gboolean' from rc file value "((GString*) 0x1ebda40)" of type `gboolean'

** (gpsim:12901): WARNING **: Invalid borders specified for theme pixmap:
        /usr/share/themes/Breeze-Dark/gtk-2.0/../assets/line-h.png,
borders don't fit within the image
Exiting gpsim

If it's me, is there a simple starting point (link) that I can be pointed to?

1 Attachments

Discussion

  • Roy Rankin

    Roy Rankin - 2018-01-27

    To get maximum functionality from gpsim you want to be loading .cod files and then it is not required to specify the processor because it is defined in the file. You just run "gpsim file.cod". I mostly run .cod file generated by gputils from assembler or use sdcc (small device c compiler) for c code. You should be able to run .hex code by using "gpsim -p processor_name file.hex" .

    I note that your distribution is using the 0.29.0 version of gpsim which was released almost 2.5 years ago. The current release is 0.30.0 which is 6 months old, but the very latest code can be downloaded from the svn files on sourceforge.

    Please ask if you have further questions.

    Roy Rankin

     
  • vinr

    vinr - 2018-01-28

    Oh yeah, thank you for that info.

    I downloaded http://ww1.microchip.com/downloads/en/DeviceDoc/bttn.zip
    Then ran $ gpasm bttn.asm
    Then $ gpsim bttn.cod and that worked.
    So did $ gpsim -p p18c452 bttn.hex

    I also found https://quozl.linux.org.au//pic16f84-sdcc-blink/ which may be helpful for other noobs.

    I also flagged the gpsim package as out-of-date.

    EDIT0:
    Not seeing an option to close out this ticket. Hopefully it would still be visible/searchable for others.

     

    Last edit: vinr 2018-01-29
  • vinr

    vinr - 2018-01-29

    For anyone interested (maybe it should be a different ticket), for my PIC18F26J50 I couldn't $ gpsim <my proc="">.cod

    p18f26j50 is not a valid processor.
    

    Trying $ gpsim -ppic18f2620 <my proc="">.hex worked. I figure that was the nearest proc.
    Found https://github.com/diegoherranz/sdcc-examples/tree/master/pic16/1.blink_led but sdcc didn't like pragmas FOSC, WDT, and LVP.
    I also needed to change the gpsim simulation mode to 1000 cycles (matching delay1ktcy I think) so the effect was visible.

     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.