Usb Serial

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

Moderator: Benj

Post Reply
ZARCOV
Posts: 5
Joined: Tue Dec 18, 2007 2:28 am
Contact:

Usb Serial

Post by ZARCOV »

Hi:

For unknown reasons my usb-serial arduino project executes normally on the simulator but I could not get it compiled, issuing the error messages:

Licence key: KFK24B
C:\Program Files (x86)\Flowcode 6\compilers\avr\batchfiles\avra.bat atmega328 "C:\Users\MARCUS~1\DOCUME~1\PUC\SIMULA~1\flowcode\servo\rem_servo.elf" "C:\Users\MARCUS~1\DOCUME~1\PUC\SIMULA~1\flowcode\servo\rem_servo.c" "C:\Users\MARCUS~1\DOCUME~1\PUC\SIMULA~1\flowcode\servo\rem_servo.lst"
C:\Users\MARCUS~1\DOCUME~1\PUC\SIMULA~1\flowcode\servo>"C:\PROGRA~2\FLOWCO~1\COMPIL~1\avr\BATCHF~1\..\bin\avr-gcc.exe" -mmcu=atmega328 -Os -funsigned-char -o "C:\Users\MARCUS~1\DOCUME~1\PUC\SIMULA~1\flowcode\servo\rem_servo.elf" "C:\Users\MARCUS~1\DOCUME~1\PUC\SIMULA~1\flowcode\servo\rem_servo.c" -lm

C:\Users\MARCUS~1\DOCUME~1\PUC\SIMULA~1\flowcode\servo\rem_servo.c: In function 'FCD_056e1_USB_Serial1__Initialise':
C:\Users\MARCUS~1\DOCUME~1\PUC\SIMULA~1\flowcode\servo\rem_servo.c:812: error: 'USB_BUS_SENSE' undeclared (first use in this function)


C:\Users\MARCUS~1\DOCUME~1\PUC\SIMULA~1\flowcode\servo\rem_servo.c:812: error: (Each undeclared identifier is reported only once
C:\Users\MARCUS~1\DOCUME~1\PUC\SIMULA~1\flowcode\servo\rem_servo.c:812: error: for each function it appears in.)


C:\Users\MARCUS~1\DOCUME~1\PUC\SIMULA~1\flowcode\servo\rem_servo.c:812: error: 'DETACHED_STATE' undeclared (first use in this function)
C:\Users\MARCUS~1\DOCUME~1\PUC\SIMULA~1\flowcode\servo\rem_servo.c:824: error: 'USBDeviceState' undeclared (first use in this function)
C:\Users\MARCUS~1\DOCUME~1\PUC\SIMULA~1\flowcode\servo\rem_servo.c:824: error: 'CONFIGURED_STATE' undeclared (first use in this function)

Error returned from [avr-gcc.exe]
Completed compilation, return = 1

I have another doubt regarding time over parameter. I was said at the function reference (regarding the rs232-serial) that a parameter = 255 would 'wait forever'. In the usb-serial I would like to know if there is some alternative to get the port waiting until a byte is available to read.

Regards

M. Brunetta
Attachments
rem_servo.fcfx
(8.46 KiB) Downloaded 166 times
Last edited by ZARCOV on Mon May 11, 2015 7:02 pm, edited 1 time in total.

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

Re: Usb Serial

Post by Benj »

Hello Zarcov,

The USB Serial component will currently only work with the PIC and dsPIC range of devices with USB peripherals.

Depending on your Arduino you can use the RS232 component to transfer data using the FTDI USB connection.

We have looked at adding the USB components for targets such as the Arduino Leonardo which uses a USB enabled AVR rather than a FTDI chip, however it proved to be fairly difficult technically to do in the same way as the PIC versions and so we have left it on the list but parked it for now.

Post Reply