Olimex Support Forum

Microcontrollers => PIC => Topic started by: ffomich on June 18, 2018, 01:43:49 pm

Title: PIC-P67J60 demo. Build from sources.
Post by: ffomich on June 18, 2018, 01:43:49 pm
1. I try to build original demo project with MPLAB X IDE 4.20 & XC8-v1.45 compiler.

Build process exits with error:"../Configs/HWP OLIMEX_P67J60.h:1662: error: (103) #error: "HI TECH not supported."

in file HWP OLIMEX_P67J60.h pragma #error fires
#elif defined(OLIMEX_P67J60) && defined(HI_TECH_C)
#error "HI TECH not supported."

What does mean HI_TECH_C?

2. Next I try to build the same project with MPLAB X IDE 4.20 & C18-v3.47-lite compiler.

Build output
PIC-P67J60_demo\Source\src\TCPIP\Demo App\UARTConfig.c:246:Error [1300] stack frame too large

Fix: Change #define XMODEM_BLOCK_LEN 64u//128u

Build output
Device Database Version 1.17
Copyright (c) 1998-2013 Microchip Technology Inc.
Error - section '.code_SPIEEPROM.o' can not fit the section. Section '.code_SPIEEPROM.o' length=0x000005f4
Errors    : 1

Fix: comment features in file TCPIP_OLIMEX_P67J60.h
//#define STACK_USE_DNS

Build output

Write hex file into the board via PIC-KIT3. Reboot.
There is no COM port output, TCPIP Discoverer App can't find device...

Does anybody have experience of porting demo project to MPLAB X & CX8 compiler?

Title: Re: PIC-P67J60 demo. Build from sources.
Post by: LubOlimex on June 18, 2018, 04:56:48 pm
Newer MPLABX would probably be fine. However, forget about the XC18 compiler! Our demo would not compile with XC18 without heavy modifications to the code. Using XC18 would probably require re-writing a lot of things.

First try the compiler described in the README.txt - C18 v3.43. If you still have problems try older MPLAB X v1.41.

You can find the compiler here: http://ww1.microchip.com/downloads/en/DeviceDoc/mplabc18-v3.47-windows-lite-installer.exe - free version is enough.

If you wish to use newer compiler consider referring to the migration guide C18 to XC18 (from my experience this will not help): http://ww1.microchip.com/downloads/en/DeviceDoc/50002184B.pdf
Title: Re: PIC-P67J60 demo. Build from sources.
Post by: ffomich on June 19, 2018, 01:34:42 pm
Thank you.
I have built project with MPLAB X IDE 1.41 + C18 v3.47.