Couldn't compile for PIC10F320/322, complaining about not enough RAM

Fully featured PIC compilers available on Windows, Linux, and macOS.
Post Reply
Author
Message
The_YongGrand
Posts: 37
Joined: 22 Feb 2011 11:36

Couldn't compile for PIC10F320/322, complaining about not enough RAM

#1 Post by The_YongGrand » 28 Apr 2020 15:29

Hello MikroE team,

I have an issue compiling for PIC10F320/322. It complains about this:

Code: Select all

hint : Available RAM: 2 [bytes], Available ROM: 512 [bytes]
All files Compiled in 0 ms?
error (,2): Not enough RAM '__DoICPAddr'
ninja: build stopped: subcommand failed.
Finished in: 427.448 ms.
I don't think there are 2 bytes of RAM and 512 bytes of ROM inside.

From the PIC10F320 page: (https://www.microchip.com/wwwproducts/en/PIC10F320), RAM is 64 bytes and ROM is 0.448kbytes.

If it's an error in the config files - also might as well as update for the PIC10F322.

User avatar
marko.ziv
mikroElektronika team
Posts: 531
Joined: 06 Dec 2007 10:11
Contact:

Re: Couldn't compile for PIC10F320/322, complaining about not enough RAM

#2 Post by marko.ziv » 29 Apr 2020 09:38

Hello,

there is a quick fix for this.
Go to:

Code: Select all

..necto install folder\NectoStudio\compilers\PIC\mikroC\Defs\
locate PIC10F320.json file or PIC10F322.json (depending on MCU you are using)
and edit data field under ram object as such

Code: Select all

    "ram": {
        "data": [
            {
                "max_addr": "0x007F",
                "min_addr": "0x0040"
            }
        ]
    },
After running memake again and building project, you should see correct RAM/ROM values.
Thank you for reporting this, we will include this in update by the end of the week.

Regards

The_YongGrand
Posts: 37
Joined: 22 Feb 2011 11:36

Re: Couldn't compile for PIC10F320/322, complaining about not enough RAM

#3 Post by The_YongGrand » 29 Apr 2020 12:20

Hi Marko Ziv,

I have checked on these JSONs and found out that the fixes you mentioned are already included:

Code: Select all

"mcu": "PIC10F320",
    "prog_options": {
        "codegrip": {
            "debugging": "False",
            "prog_type": {
                "value1": "Vpp first entry mode",
                "value2": "Vdd first entry mode",
                "value3": "Low voltage"
            },
            "programming": "True"
        },
        "mikroprog": {
            "debugging": "False",
            "programming": "False"
        }
    },
    "mappedmemory": [
        {
            "map": [
                {
                    "max_addr": "0x3f",
                    "min_addr": "0x00"
                },            
            ]
        }
     ],    
    "ram": {
        "data": {
            "max_addr": "0x007F",
            "min_addr": "0x0040"
        }
    },
Unfortunately, I still couldn't get it to build.

User avatar
marko.ziv
mikroElektronika team
Posts: 531
Joined: 06 Dec 2007 10:11
Contact:

Re: Couldn't compile for PIC10F320/322, complaining about not enough RAM

#4 Post by marko.ziv » 29 Apr 2020 12:39

Hello,

json format you attached is not changed as instructed, I have attached complete json file here
PIC10F320.rar
(1.31 KiB) Downloaded 120 times
All you need to do is to copy it over existing file.

Regards

The_YongGrand
Posts: 37
Joined: 22 Feb 2011 11:36

Re: Couldn't compile for PIC10F320/322, complaining about not enough RAM

#5 Post by The_YongGrand » 01 May 2020 06:21

Thanks for the support - it's compiling now. :)

Post Reply

Return to “PIC AI compilers”