• AVR Freaks

PICDEM.net2 PIC18F97J60 XC8 ROM definition invalid

New Member
  • Total Posts : 1
  • Reward points : 0
  • Joined: 2019/01/25 03:51:51
  • Location: 0
  • Status: offline
2020/07/07 13:26:05 (permalink)

PICDEM.net2 PIC18F97J60 XC8 ROM definition invalid

I have a PICDEM.net 2 Development Board. CPU PIC18F97J60; I would like to make use of it.
The project is based on "C18-PIC18DN2_ENC28.mcp.
XC8 compiler version 2.05
I am using an old version of MPLABX V3.15. -I thought it more appropriate!
It's compiled with numerous warnings and faults; example warnings are 
(1) no support for 64 bit integers.
(2) Redefining pre-processor macros.
The errors are mainly #include errors eg can't find file.
But there is one error that I can't clear.
It's definition is in compiler.h: #define ROM        rom
Big ROM causes all sorts of mayhem as shown in the following example prototype.
void ICMPSendPingToHostROM( ROM BYTE * szRemoteHost);
The errors associated with this definition are:
(1) can’t mix prototyped and non-prototyped arguments.
(2) "," expected
(3) function body expected
I can't find any information on little "rom".
I don't know what to redefine big ROM as.
Commenting out big "ROM" in a function header removes
errors, but that can't be right.

1 Reply Related Threads

    Super Member
    • Total Posts : 27929
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: PICDEM.net2 PIC18F97J60 XC8 ROM definition invalid 2020/07/08 13:35:54 (permalink)
    The project is based on "C18-PIC18DN2_ENC28.mcp.

    That looks like something intended for the C18 compiler, not XC8.
    C18 had a "rom" qualifier to force variables into ROM (FLASH memory). XC8 works totally differently.
    It will be a fair bit of work to port it across to XC8.

    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!
    Jump to:
    © 2020 APG vNext Commercial Version 4.5