[Ovmsdev] Problem building the project

Mark Webb-Johnson mark at webb-johnson.net
Fri Dec 28 21:23:54 HKT 2012


Michael,

Do you work under windows with MPLAB-X and MCC18?

I had a look at Nikolay's machine, and it all seemed ok. Now trying to install on my laptop. Slow slow slow...

Mark.

On 28 Dec, 2012, at 6:06 PM, Michael Balzer <dexter at expeedo.de> wrote:

> Hi Nikolay, welcome :-)
> 
> did you check the Google results for platform config specific hints on this? Seems to be a quite common MPLAB problem.
> 
> Also, you cannot use the IDE configurations right off from the repository, you need to edit them at least once, as MPLAB then adjusts some internal paths +x. Some adjustment will be done automatically on building to find a working compiler, but I wouldn't rely on that to be complete. Also restarting MPLAB after that first config change might be necessary, I had to do that a few times (but on other errors).
> 
> Mark, I had to do this in commit 9eaa71c1e6ccae21cf9dcfe8fd8a4e22666830ba:
>     - can_capapilities changed to rom pointer
> ...because it wouldn't work otherwise, so I think the rom keyword just declares the pointer type to be a rom address and is correct & necessary.
> 
> Regards,
> Michael
> 
> 
> Am 28.12.2012 01:28, schrieb Mark Webb-Johnson:
>> 
>> Interesting. Michael Jochum had a similar error a few months back, but he was using an older MPLAB. He switched to mplab-x on his mac, and the problem went away, so we never tried upgrading his mplab on his PC.
>> 
>> Can you double-check the project build settings for mcc18, and ensure all optimisations are enabled, and you are not doing a debug build?
>> 
>> Unless anyone else has any ideas, I think I'll have to try to install mplab-x on my windows laptop and see if I can recreate the problem.
>> 
>> Regards, Mark.
>> 
>> P.S. The other day, I did notice that the "rom BOOL" function definitions in vehicle.c are incorrect. ROM constants obviously can't be modified, but these needs to be. But, it seems that the mcc18 compiler can't handle rom based pointers to code anyway, so auto-changes them to ram based variables for us (which is why we never noticed the problem before). I don't think this is your problem, but perhaps you could try to change the "rom BOOL (*vehicle_fn_*" definitions in vehicle.h and vehicle.c to just "BOOL ..." (ie; without the ROM prefix) and see if that fixes anything.
>> 
>> On 28 Dec, 2012, at 6:53 AM, Nikolay Shishkov wrote:
>> 
>>> Yes, I am running mplab x ide 1.60, and the mcc18, I have selected V2_Experimental  (followed the instructions in Firmware-Development.odt)... 
>>> Below is the full output, hope it provides more info:
>>> CLEAN SUCCESSFUL (total time: 1s)
>>> make -f nbproject/Makefile-V2_Experimental.mk SUBPROJECTS= .build-conf
>>> make[1]: Entering directory `C:/Documents_and_Settings/Niko/MPLABXProjects/OVMS.X'
>>> make  -f nbproject/Makefile-V2_Experimental.mk dist/V2_Experimental/production/OVMS.X.production.hex
>>> make[2]: Entering directory `C:/Documents_and_Settings/Niko/MPLABXProjects/OVMS.X'
>>> "C:\Program Files\Microchip\mplabc18\v3.40\bin\mcc18.exe"  -p18F2685 -k -DOVMS_SPEEDO_EXPERIMENT -DOVMS_CAR_NONE -DOVMS_CAR_TESLAROADSTER -DOVMS_CAR_VOLTAMPERA -DOVMS_CAR_RENAULTTWIZY -DOVMS_CAR_OBDII -DOVMS_HW_V2 -DOVMS_DIAGMODULE -DOVMS_INTERNALGPS -ml -oa-  -I "C:\Program Files\Microchip\mplabc18\v3.40\bin"\\..\\h  -fo build/V2_Experimental/production/UARTIntC.o   UARTIntC.c 
>>> "C:\Program Files\Microchip\mplabc18\v3.40\bin\mcc18.exe"  -p18F2685 -k -DOVMS_SPEEDO_EXPERIMENT -DOVMS_CAR_NONE -DOVMS_CAR_TESLAROADSTER -DOVMS_CAR_VOLTAMPERA -DOVMS_CAR_RENAULTTWIZY -DOVMS_CAR_OBDII -DOVMS_HW_V2 -DOVMS_DIAGMODULE -DOVMS_INTERNALGPS -ml -oa-  -I "C:\Program Files\Microchip\mplabc18\v3.40\bin"\\..\\h  -fo build/V2_Experimental/production/crypt_base64.o   crypt_base64.c 
>>> "C:\Program Files\Microchip\mplabc18\v3.40\bin\mcc18.exe"  -p18F2685 -k -DOVMS_SPEEDO_EXPERIMENT -DOVMS_CAR_NONE -DOVMS_CAR_TESLAROADSTER -DOVMS_CAR_VOLTAMPERA -DOVMS_CAR_RENAULTTWIZY -DOVMS_CAR_OBDII -DOVMS_HW_V2 -DOVMS_DIAGMODULE -DOVMS_INTERNALGPS -ml -oa-  -I "C:\Program Files\Microchip\mplabc18\v3.40\bin"\\..\\h  -fo build/V2_Experimental/production/crypt_hmac.o   crypt_hmac.c 
>>> "C:\Program Files\Microchip\mplabc18\v3.40\bin\mcc18.exe"  -p18F2685 -k -DOVMS_SPEEDO_EXPERIMENT -DOVMS_CAR_NONE -DOVMS_CAR_TESLAROADSTER -DOVMS_CAR_VOLTAMPERA -DOVMS_CAR_RENAULTTWIZY -DOVMS_CAR_OBDII -DOVMS_HW_V2 -DOVMS_DIAGMODULE -DOVMS_INTERNALGPS -ml -oa-  -I "C:\Program Files\Microchip\mplabc18\v3.40\bin"\\..\\h  -fo build/V2_Experimental/production/crypt_md5.o   crypt_md5.c 
>>> "C:\Program Files\Microchip\mplabc18\v3.40\bin\mcc18.exe"  -p18F2685 -k -DOVMS_SPEEDO_EXPERIMENT -DOVMS_CAR_NONE -DOVMS_CAR_TESLAROADSTER -DOVMS_CAR_VOLTAMPERA -DOVMS_CAR_RENAULTTWIZY -DOVMS_CAR_OBDII -DOVMS_HW_V2 -DOVMS_DIAGMODULE -DOVMS_INTERNALGPS -ml -oa-  -I "C:\Program Files\Microchip\mplabc18\v3.40\bin"\\..\\h  -fo build/V2_Experimental/production/crypt_rc4.o   crypt_rc4.c 
>>> "C:\Program Files\Microchip\mplabc18\v3.40\bin\mcc18.exe"  -p18F2685 -k -DOVMS_SPEEDO_EXPERIMENT -DOVMS_CAR_NONE -DOVMS_CAR_TESLAROADSTER -DOVMS_CAR_VOLTAMPERA -DOVMS_CAR_RENAULTTWIZY -DOVMS_CAR_OBDII -DOVMS_HW_V2 -DOVMS_DIAGMODULE -DOVMS_INTERNALGPS -ml -oa-  -I "C:\Program Files\Microchip\mplabc18\v3.40\bin"\\..\\h  -fo build/V2_Experimental/production/led.o   led.c 
>>> "C:\Program Files\Microchip\mplabc18\v3.40\bin\mcc18.exe"  -p18F2685 -k -DOVMS_SPEEDO_EXPERIMENT -DOVMS_CAR_NONE -DOVMS_CAR_TESLAROADSTER -DOVMS_CAR_VOLTAMPERA -DOVMS_CAR_RENAULTTWIZY -DOVMS_CAR_OBDII -DOVMS_HW_V2 -DOVMS_DIAGMODULE -DOVMS_INTERNALGPS -ml -oa-  -I "C:\Program Files\Microchip\mplabc18\v3.40\bin"\\..\\h  -fo build/V2_Experimental/production/net.o   net.c 
>>> "C:\Program Files\Microchip\mplabc18\v3.40\bin\mcc18.exe"  -p18F2685 -k -DOVMS_SPEEDO_EXPERIMENT -DOVMS_CAR_NONE -DOVMS_CAR_TESLAROADSTER -DOVMS_CAR_VOLTAMPERA -DOVMS_CAR_RENAULTTWIZY -DOVMS_CAR_OBDII -DOVMS_HW_V2 -DOVMS_DIAGMODULE -DOVMS_INTERNALGPS -ml -oa-  -I "C:\Program Files\Microchip\mplabc18\v3.40\bin"\\..\\h  -fo build/V2_Experimental/production/net_msg.o   net_msg.c 
>>> "C:\Program Files\Microchip\mplabc18\v3.40\bin\mcc18.exe"  -p18F2685 -k -DOVMS_SPEEDO_EXPERIMENT -DOVMS_CAR_NONE -DOVMS_CAR_TESLAROADSTER -DOVMS_CAR_VOLTAMPERA -DOVMS_CAR_RENAULTTWIZY -DOVMS_CAR_OBDII -DOVMS_HW_V2 -DOVMS_DIAGMODULE -DOVMS_INTERNALGPS -ml -oa-  -I "C:\Program Files\Microchip\mplabc18\v3.40\bin"\\..\\h  -fo build/V2_Experimental/production/net_sms.o   net_sms.c 
>>> "C:\Program Files\Microchip\mplabc18\v3.40\bin\mcc18.exe"  -p18F2685 -k -DOVMS_SPEEDO_EXPERIMENT -DOVMS_CAR_NONE -DOVMS_CAR_TESLAROADSTER -DOVMS_CAR_VOLTAMPERA -DOVMS_CAR_RENAULTTWIZY -DOVMS_CAR_OBDII -DOVMS_HW_V2 -DOVMS_DIAGMODULE -DOVMS_INTERNALGPS -ml -oa-  -I "C:\Program Files\Microchip\mplabc18\v3.40\bin"\\..\\h  -fo build/V2_Experimental/production/ovms.o   ovms.c 
>>> "C:\Program Files\Microchip\mplabc18\v3.40\bin\mcc18.exe"  -p18F2685 -k -DOVMS_SPEEDO_EXPERIMENT -DOVMS_CAR_NONE -DOVMS_CAR_TESLAROADSTER -DOVMS_CAR_VOLTAMPERA -DOVMS_CAR_RENAULTTWIZY -DOVMS_CAR_OBDII -DOVMS_HW_V2 -DOVMS_DIAGMODULE -DOVMS_INTERNALGPS -ml -oa-  -I "C:\Program Files\Microchip\mplabc18\v3.40\bin"\\..\\h  -fo build/V2_Experimental/production/params.o   params.c 
>>> "C:\Program Files\Microchip\mplabc18\v3.40\bin\mcc18.exe"  -p18F2685 -k -DOVMS_SPEEDO_EXPERIMENT -DOVMS_CAR_NONE -DOVMS_CAR_TESLAROADSTER -DOVMS_CAR_VOLTAMPERA -DOVMS_CAR_RENAULTTWIZY -DOVMS_CAR_OBDII -DOVMS_HW_V2 -DOVMS_DIAGMODULE -DOVMS_INTERNALGPS -ml -oa-  -I "C:\Program Files\Microchip\mplabc18\v3.40\bin"\\..\\h  -fo build/V2_Experimental/production/utils.o   utils.c 
>>> "C:\Program Files\Microchip\mplabc18\v3.40\bin\mcc18.exe"  -p18F2685 -k -DOVMS_SPEEDO_EXPERIMENT -DOVMS_CAR_NONE -DOVMS_CAR_TESLAROADSTER -DOVMS_CAR_VOLTAMPERA -DOVMS_CAR_RENAULTTWIZY -DOVMS_CAR_OBDII -DOVMS_HW_V2 -DOVMS_DIAGMODULE -DOVMS_INTERNALGPS -ml -oa-  -I "C:\Program Files\Microchip\mplabc18\v3.40\bin"\\..\\h  -fo build/V2_Experimental/production/inputs.o   inputs.c 
>>> "C:\Program Files\Microchip\mplabc18\v3.40\bin\mcc18.exe"  -p18F2685 -k -DOVMS_SPEEDO_EXPERIMENT -DOVMS_CAR_NONE -DOVMS_CAR_TESLAROADSTER -DOVMS_CAR_VOLTAMPERA -DOVMS_CAR_RENAULTTWIZY -DOVMS_CAR_OBDII -DOVMS_HW_V2 -DOVMS_DIAGMODULE -DOVMS_INTERNALGPS -ml -oa-  -I "C:\Program Files\Microchip\mplabc18\v3.40\bin"\\..\\h  -fo build/V2_Experimental/production/diag.o   diag.c 
>>> "C:\Program Files\Microchip\mplabc18\v3.40\bin\mcc18.exe"  -p18F2685 -k -DOVMS_SPEEDO_EXPERIMENT -DOVMS_CAR_NONE -DOVMS_CAR_TESLAROADSTER -DOVMS_CAR_VOLTAMPERA -DOVMS_CAR_RENAULTTWIZY -DOVMS_CAR_OBDII -DOVMS_HW_V2 -DOVMS_DIAGMODULE -DOVMS_INTERNALGPS -ml -oa-  -I "C:\Program Files\Microchip\mplabc18\v3.40\bin"\\..\\h  -fo build/V2_Experimental/production/vehicle_teslaroadster.o   vehicle_teslaroadster.c 
>>> "C:\Program Files\Microchip\mplabc18\v3.40\bin\mcc18.exe"  -p18F2685 -k -DOVMS_SPEEDO_EXPERIMENT -DOVMS_CAR_NONE -DOVMS_CAR_TESLAROADSTER -DOVMS_CAR_VOLTAMPERA -DOVMS_CAR_RENAULTTWIZY -DOVMS_CAR_OBDII -DOVMS_HW_V2 -DOVMS_DIAGMODULE -DOVMS_INTERNALGPS -ml -oa-  -I "C:\Program Files\Microchip\mplabc18\v3.40\bin"\\..\\h  -fo build/V2_Experimental/production/vehicle_twizy.o   vehicle_twizy.c 
>>> "C:\Program Files\Microchip\mplabc18\v3.40\bin\mcc18.exe"  -p18F2685 -k -DOVMS_SPEEDO_EXPERIMENT -DOVMS_CAR_NONE -DOVMS_CAR_TESLAROADSTER -DOVMS_CAR_VOLTAMPERA -DOVMS_CAR_RENAULTTWIZY -DOVMS_CAR_OBDII -DOVMS_HW_V2 -DOVMS_DIAGMODULE -DOVMS_INTERNALGPS -ml -oa-  -I "C:\Program Files\Microchip\mplabc18\v3.40\bin"\\..\\h  -fo build/V2_Experimental/production/vehicle_voltampera.o   vehicle_voltampera.c 
>>> "C:\Program Files\Microchip\mplabc18\v3.40\bin\mcc18.exe"  -p18F2685 -k -DOVMS_SPEEDO_EXPERIMENT -DOVMS_CAR_NONE -DOVMS_CAR_TESLAROADSTER -DOVMS_CAR_VOLTAMPERA -DOVMS_CAR_RENAULTTWIZY -DOVMS_CAR_OBDII -DOVMS_HW_V2 -DOVMS_DIAGMODULE -DOVMS_INTERNALGPS -ml -oa-  -I "C:\Program Files\Microchip\mplabc18\v3.40\bin"\\..\\h  -fo build/V2_Experimental/production/vehicle.o   vehicle.c 
>>> "C:\Program Files\Microchip\mplabc18\v3.40\bin\mcc18.exe"  -p18F2685 -k -DOVMS_SPEEDO_EXPERIMENT -DOVMS_CAR_NONE -DOVMS_CAR_TESLAROADSTER -DOVMS_CAR_VOLTAMPERA -DOVMS_CAR_RENAULTTWIZY -DOVMS_CAR_OBDII -DOVMS_HW_V2 -DOVMS_DIAGMODULE -DOVMS_INTERNALGPS -ml -oa-  -I "C:\Program Files\Microchip\mplabc18\v3.40\bin"\\..\\h  -fo build/V2_Experimental/production/vehicle_none.o   vehicle_none.c 
>>> "C:\Program Files\Microchip\mplabc18\v3.40\bin\mcc18.exe"  -p18F2685 -k -DOVMS_SPEEDO_EXPERIMENT -DOVMS_CAR_NONE -DOVMS_CAR_TESLAROADSTER -DOVMS_CAR_VOLTAMPERA -DOVMS_CAR_RENAULTTWIZY -DOVMS_CAR_OBDII -DOVMS_HW_V2 -DOVMS_DIAGMODULE -DOVMS_INTERNALGPS -ml -oa-  -I "C:\Program Files\Microchip\mplabc18\v3.40\bin"\\..\\h  -fo build/V2_Experimental/production/vehicle_obdii.o   vehicle_obdii.c 
>>> "C:\Program Files\Microchip\mplabc18\v3.40\bin\mplink.exe"    -p18f2685  -w  -m"build/memorymap"  -z__MPLAB_BUILD=1  -u_CRUNTIME -l "C:\Program Files\Microchip\mplabc18\v3.40\bin"\\..\\lib  -o dist/V2_Experimental/production/OVMS.X.production.cof  build/V2_Experimental/production/UARTIntC.o build/V2_Experimental/production/crypt_base64.o build/V2_Experimental/production/crypt_hmac.o build/V2_Experimental/production/crypt_md5.o build/V2_Experimental/production/crypt_rc4.o build/V2_Experimental/production/led.o build/V2_Experimental/production/net.o build/V2_Experimental/production/net_msg.o build/V2_Experimental/production/net_sms.o build/V2_Experimental/production/ovms.o build/V2_Experimental/production/params.o build/V2_Experimental/production/utils.o build/V2_Experimental/production/inputs.o build/V2_Experimental/production/diag.o build/V2_Experimental/production/vehicle_teslaroadster.o build/V2_Experimental/production/vehicle_twizy.o build/V2_Experimental/production/vehicle_voltampera.o build/V2_Experimental/production/vehicle.o build/V2_Experimental/production/vehicle_none.o build/V2_Experimental/production/vehicle_obdii.o   
>>> MPLINK 4.40, Linker
>>> Device Database Version 1.3
>>> Copyright (c) 1998-2011 Microchip Technology Inc.
>>> Error - section '.code_vehicle.o' can not fit the section. Section '.code_vehicle.o' length=0x000004f4
>>> Errors    : 1
>>> 
>>> make[2]: Leaving directory `C:/Documents_and_Settings/Niko/MPLABXProjects/OVMS.X'
>>> make[1]: Leaving directory `C:/Documents_and_Settings/Niko/MPLABXProjects/OVMS.X'
>>> make[2]: *** [dist/V2_Experimental/production/OVMS.X.production.hex] Error 1
>>> make[1]: *** [.build-conf] Error 2
>>> make: *** [.build-impl] Error 2
>>> 
>>> BUILD FAILED (exit value 2, total time: 1m 7s)
>>> 
>>> 
>>> 
>>> From: Mark Webb-Johnson <mark at webb-johnson.net>
>>> To: OVMS Developers <ovmsdev at lists.teslaclub.hk> 
>>> Sent: Thursday, December 27, 2012 11:26 PM
>>> Subject: Re: [Ovmsdev] Problem building the project
>>> 
>>> Did you download mplab-x (the Java environment), and mcc18 (the microchip c compiler)?
>>> 
>>> Regards, Mark
>>> 
>>> On 28 Dec, 2012, at 5:45 AM, Nikolay Shishkov <nshishkov at yahoo.com> wrote:
>>> 
>>>> Hello, 
>>>> 
>>>> This is my first message, I am trying to get the module talking to Think City EV.
>>>> 
>>>> I installed the iDE and compiler, downloaded the repository, opened
>>>> the project and did "Clean and Build Project" and got this error.
>>>> 
>>>> Error - section '.code_vehicle.o' can not fit the section. Section
>>>> '.code_vehicle.o' length=0x000004f4
>>>> 
>>>> I searched the list, and the forum and did not find any reference to
>>>> this error. Any idea?
>>>> Could it be that I have not connected the pic3 and the board?
>>>> 
>>>> Thanks in advance,
>>>> Nikolay
>>>> _______________________________________________
>>>> OvmsDev mailing list
>>>> OvmsDev at lists.teslaclub.hk
>>>> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
>>> 
>>> _______________________________________________
>>> OvmsDev mailing list
>>> OvmsDev at lists.teslaclub.hk
>>> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
>>> 
>>> 
>>> _______________________________________________
>>> OvmsDev mailing list
>>> OvmsDev at lists.teslaclub.hk
>>> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
>> 
>> 
>> 
>> _______________________________________________
>> OvmsDev mailing list
>> OvmsDev at lists.teslaclub.hk
>> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
> 
> -- 
> Michael Balzer * Paradestr. 8 * D-42107 Wuppertal
> Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
> <dexter.vcf>_______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.teslaclub.hk
> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20121228/92c549c1/attachment.htm>


More information about the OvmsDev mailing list