Mtouch with MLA have an error - Page 1
Forum section: electronics / general

author: viethung_tdh
author_rank: Newbie
timestamp: July 16, 2014, 08:21:41 am
content: Dear alli want to use MLA (Mtouch library application ) to code mtouch for pic12f615my code :Code:/** File: LEDBLINK.c* Author: VIETHUNG** Created on July 16, 2014, 10:35 AM*/#include <stdio.h>#include <stdlib.h>#include "mTouch.h"// PIC12F615 Configuration Bit Settings#include <xc.h>// CONFIG#pragma config FOSC = INTOSCIO // Oscillator Selection bits (INTOSCIO oscillator: I/O function on GP4/OSC2/CLKOUT pin, I/O function on GP5/OSC1/CLKIN)#pragma config WDTE = OFF // Watchdog Timer Enable bit (WDT disabled and can be enabled by SWDTEN bit of the WDTCON register)#pragma config PWRTE = OFF // Power-up Timer Enable bit (PWRT disabled)#pragma config MCLRE = ON // MCLR Pin Function Select bit (MCLR pin function is MCLR)#pragma config CP = OFF // Code Protection bit (Program memory code protection is disabled)#pragma config IOSCFS = 4MHZ // Internal Oscillator Frequency Select (4 MHz)#pragma config BOREN = OFF // Brown-out Reset Selection bits (BOR disabled)#define __XTAL_FREQ 4000000/*===========================================================================*/#define LED_TRIS TRISIObits.TRISIO5#define LED GPIObits.GPIO5#define BUTTON_TRIS TRISIObits.TRISIO1#define BUTTON GPIObits.GPIO1/*================================Chuong trinh chinh=========================*/#define LED_TRIS TRISIObits.TRISIO5#define LED GPIObits.GPIO5#define BUTTON_TRIS TRISIObits.TRISIO1#define BUTTON GPIObits.GPIO1void main() {mTouch_Init();while(1){if(mTouch_isDataReady()){mTouch_Service();}if(mTouch_GetButtonState(0) < MTOUCH_PRESSED){LED = 1;}else{LED =0;}}}but it have an error :Code:make -f nbproject/Makefile-default.mk dist/default/production/mTouch.X.production.hexmake: Entering directory `D:/Work/MPLAPX/mTouch_pic12f615/mTouch.X'"C:\Program Files (x86)\Microchip\xc8\v1.32\bin\xc8.exe" --pass1 --chip=12F615 -Q -G --asmlist --double=24 --float=24 --opt=default,+asm,-asmfile,+speed,-space,-debug,9 --addrqual=ignore -P -N255 --warn=0 --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,+osccal,-resetbits,-download,-stackcall,+clib "--errformat=%%f:%%l: error: %%s" "--warnformat=%%f:%%l: warning: %%s" "--msgformat=%%f:%%l: advisory: %%s" -obuild/default/production/LEDBLINK.p1 LEDBLINK.c"C:\Program Files (x86)\Microchip\xc8\v1.32\bin\xc8.exe" --chip=12F615 -G --asmlist -mdist/default/production/mTouch.X.production.map --double=24 --float=24 --opt=default,+asm,-asmfile,+speed,-space,-debug,9 --addrqual=ignore -P -N255 --warn=0 --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,+osccal,-resetbits,-download,-stackcall,+clib "--errformat=%%f:%%l: error: %%s" "--warnformat=%%f:%%l: warning: %%s" "--msgformat=%%f:%%l: advisory: %%s" -odist/default/production/mTouch.X.production.cof build/default/production/LEDBLINK.p1Microchip MPLAB XC8 C Compiler (Free Mode) V1.32Part Support Version: 1.32 (A)Copyright (C) 2014 Microchip Technology Inc.License type: Node Configuration:: warning: Omniscient Code Generation not available in Free mode:0: error: undefined symbols:_mTouch_state(dist/default/production\mTouch.X.production.obj) _mTouch_Init(dist/default/production\mTouch.X.production.obj) _mTouch_stateVars(dist/default/production\mTouch.X.production.obj) _mTouch_Decode(dist/default/production\mTouch.X.production.obj)(908) exit status = 1make: *** [dist/default/production/mTouch.X.production.hex] Error 1make: *** [.build-conf] Error 2make: *** [.build-impl] Error 2make: Leaving directory `D:/Work/MPLAPX/mTouch_pic12f615/mTouch.X'make: Leaving directory `D:/Work/MPLAPX/mTouch_pic12f615/mTouch.X'BUILD FAILED (exit value 2, total time: 1s)I can not identified it.please help me!

author: miguelvp
author_rank: Super Contributor
timestamp: July 18, 2014, 01:02:05 am
content: Seems you need to include either the source code for the mtouch library to your project or the precompiled library.

author: viethung_tdh
author_rank: Newbie
timestamp: July 18, 2014, 10:58:49 am
content: Quote from: miguelvp on July 18, 2014, 01:02:05 amThank you!i included source code for the mtouch library and build ok.but when programer for real hardware with pickit2.It not run.This is my project. Please check code help me!http://www.mediafire.com/download/kukaaf65rnilu8x/mTouch_pic12F615.rar