• AVR Freaks

Hot!SDCC on MPLAB X v5.40

Author
pajuhesh80
Super Member
  • Total Posts : 88
  • Reward points : 0
  • Joined: 2019/12/08 11:23:37
  • Location: Nowshahr, Mazandaran, Iran
  • Status: offline
2020/07/04 22:21:08 (permalink)
0

SDCC on MPLAB X v5.40

I want to try SDCC to compare it with XC8 free.
I installed both SDCC and GPUTILS and added them to PATH. Then went to Options> Embedded> Build tools and pressed "Scan for Build Tools". It didn't find SDCC. Also tried to add it using "Add..."; when I selected bin folder of SDCC, it said there is no toolchain there!
After some searching, I installed "SDCC Toolchain" plugin and ten MPLAB X found SDCC. But now I have some strange problems:
  1. When I hold Ctrl and click on codes (eg. <pic18fregs.h>, TRISA, ...), MPLAB doesn't open their sources.
  2. When I compile a simple code (an empty loop in main and nothing else), dashboard shows "Data Used: 390" and "Program Used: 368" and I think this is true because there are many lines in generated hex file. There are many "ustat_pic18f14k50_XY" lines under "Section Info" in map file.
  3. When I press "Debug Project" (tool: simulator), it always says "The program file could not be loaded: 4" or "The program file could not be loaded: null".
  4. PIC components are in "non-free" folder. Is it illegal to use them?

Slow and Steady!
#1

3 Replies Related Threads

    ric
    Super Member
    • Total Posts : 28009
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: SDCC on MPLAB X v5.40 2020/07/04 22:31:51 (permalink)
    0
    You're brave.
    According to the SDCC website, support for PIC devices is still "under development".
    You might be better asking these questions on the SDCC message forum. Hardly anyone here is going to have any idea what you're talking about...
     
    Also, v5.40 is the very latest version of MPLABX, and has a number of changes from previous versions.
    This "SDCC plugin" you found is probably intended for an older MPLABX.
     
    post edited by ric - 2020/07/04 22:34:14

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #2
    pajuhesh80
    Super Member
    • Total Posts : 88
    • Reward points : 0
    • Joined: 2019/12/08 11:23:37
    • Location: Nowshahr, Mazandaran, Iran
    • Status: offline
    Re: SDCC on MPLAB X v5.40 2020/07/04 23:44:19 (permalink)
    0
    ric
    You're brave.

    Special thanks to bugs and limits of XC8 free!

    Slow and Steady!
    #3
    ric
    Super Member
    • Total Posts : 28009
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: SDCC on MPLAB X v5.40 2020/07/05 00:54:30 (permalink)
    +1 (1)
    All your recent posts have been about the pic-as assembler.
    What limits in the C compiler are you hitting? I doubt a brand new compiler is going to be anywhere near as optimised as XC8 is even in free mode.
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #4
    Jump to:
    © 2020 APG vNext Commercial Version 4.5