USB not working in flowcode v3

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

desertfication
Posts: 2
Joined: Wed Feb 06, 2013 9:51 am
Contact:

USB not working in flowcode v3

Postby desertfication » Wed Feb 06, 2013 9:58 am

Hi,

i am using flowcode version 3.6.11.53

When using the component 'USB serial' (just adding the component), I get the follwoing error during compilation :

C:\Documents and Settings\user\Mijn documenten\Flowcode2.c(87:2): error: unknown identifier 'usb_handle_isr'
C:\Documents and Settings\user\Mijn documenten\Flowcode2.c(87:2): error: failed to generate expression

(Nothing else has been addes to the program yet)

Kind regards

User avatar
Benj
Matrix Staff
Posts: 14219
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4360 times
Been thanked: 4096 times
Contact:

Re: USB not working in flowcode v3

Postby Benj » Thu Feb 07, 2013 11:55 am

Hello,

Flowcode v3 is no longer supported but does qualify you for a discounted price on version 5.

Saying this could you post up your FCF Flowcode file and the generated C file from your project and I will have a quick look into it for you.

desertfication
Posts: 2
Joined: Wed Feb 06, 2013 9:51 am
Contact:

Re: USB not working in flowcode v3

Postby desertfication » Thu Feb 07, 2013 4:21 pm

Hi,

Thanks for the answer.

The problem occurs when I add the USB component.
Even when there is nothing in the flowchart.
I also use a pic 18F2550 but its the same error for other µcontrollers.

Here are the files you wanted:
Flowcode2.fcf
fcf file
(4 KiB) Downloaded 409 times

Flowcode2.c
c file
(1.66 KiB) Downloaded 399 times


Code: Select all

//************************************************************************************
//** 
//**  File name:     C:\Documents and Settings\cauwelier.thomas.281\Mijn documenten\Flowcode2.c
//**  Generated by:  Flowcode v3.6.11.53
//**  Date:          Thursday, February 07, 2013 16:18:59
//**  Licence:       50 User
//**  Registered to: VTI Izegem
//** 
//** 
//**     NIET VOOR COMMERCIELE TOEPASSINGEN
//** 
//**  http://www.matrixmultimedia.com
//************************************************************************************


#define MX_PIC

//Defines voor de microcontroller
#define P18F2550
#define MX_EE
#define MX_EE_TYPE3
#define MX_EE_SIZE 256
#define MX_SPI
#define MX_SPI_BCB
#define MX_SPI_SDI 0
#define MX_SPI_SDO 7
#define MX_SPI_SCK 1
#define MX_UART
#define MX_UART_C
#define MX_UART_TX 6
#define MX_UART_RX 7
#define MX_I2C
#define MX_MI2C
#define MX_I2C_B
#define MX_I2C_SDA 0
#define MX_I2C_SCL 1
#define MX_PWM
#define MX_PWM_CNT 2
#define MX_PWM_TRIS1 trisc
#define MX_PWM_1 2
#define MX_PWM_TRIS2 trisc
#define MX_PWM_2 1
#define MX_PWM_TRIS2a trisb
#define MX_PWM_2a 3

//Functies
#include <system.h>
#pragma CLOCK_FREQ 19660800

//Configuratiegegevens

//Interne functies
#include "C:\Program Files\Matrix Multimedia\Flowcode V3\FCD\internals.h"

//Macro functie declaraties


//Variable declaraties



//Toegevoegde definities


//Macro implementaties

//Toegevoegde implementaties


void main()
{
   
   //Initialisatie
   adcon1 = 0x0F;
   ucfg = 0x08;


   //Interrupt initialisatie code
   


   mainendloop: goto mainendloop;
}

void interrupt(void)
{
      usb_handle_isr();

}





Thanks in advance

kersing
Valued Contributor
Valued Contributor
Posts: 1873
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 530 times
Been thanked: 1040 times
Contact:

Re: USB not working in flowcode v3

Postby kersing » Thu Feb 07, 2013 11:34 pm

You need to include a call to the component macro "Initialise_Serial" in your flow to make sure Flowcode includes all required code fragments. Once you add this the error will disappear.
(Calling any of the component macros will probably work, however you will need to initialize the component anyway so using that macro seems the obvious choice)
These users thanked the author kersing for the post (total 2):
DavidA (Fri Feb 08, 2013 10:10 am) • Benj (Fri Feb 08, 2013 10:27 am)
Rating: 10.53%
 
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis