defining BOARD_USE_VIRTUALCOM causes compile error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

defining BOARD_USE_VIRTUALCOM causes compile error

Jump to solution
843 Views
inorman
Contributor III

Hi, I've been trying to follow the blog post https://centaurian.co.uk/2015/12/23/ksdk-usb-cdc-printf/

to set up the USB interface on our K64 board as a CDC device, but hit a problem when defining the symbol “BOARD_USE_VIRTUALCOM” under the properties of the project “C/C++ Build >> Settings >> Cross ARM C Compiler >> Preprocessor”

149195_149195.jpgproperpties.jpg

 

Setting this gives me a compile error I can't work out,

<command-line>:0:1: error: macro names must be identifiers

Static_Code/System/subdir.mk:21: recipe for target 'Static_Code/System/PE_low_level_init.o' failed

make: *** [Static_Code/System/PE_low_level_init.o] Error 1

 

Removing the symbol stops the compile error but the usb device isn't detected by windows correctly, showing up in device manager as

Unknown USB Device (Device Descriptor Request Failed)

 

Any ideas where I might be going wrong?

 

Kind regards

 

Ian

Labels (1)
1 Solution
598 Views
inorman
Contributor III

In the end I had to uninstall the Design suite and reinstall as I had several version of the sdk and KDS installed which must of been confusing things. Starting from scratch everything worked fine.

Thanks

View solution in original post

4 Replies
599 Views
inorman
Contributor III

In the end I had to uninstall the Design suite and reinstall as I had several version of the sdk and KDS installed which must of been confusing things. Starting from scratch everything worked fine.

Thanks

598 Views
ivadorazinova
NXP Employee
NXP Employee

Hi Ian,

I tested the procedure on my side and it works without problems.

Please, do you work with KSDK 1.3 or older KSDK 1.2 ? Do you have correctly installed KSDK into KDS? KDS User Guide page 63

Please, do you have included all files to your project?

After setting PE, did you generate the code?

Do you have added line “DbgConsole_Init(BOARD_DEBUG_UART_INSTANCE, DEBUG_UART_BAUD, kDebugConsoleUSBCDC);” to your source code? (main.c)

Did you set cdc_config.board_init_callback.callback on NULL ?

If you will attach your project here, I could check it.

Best Regards,

Iva

0 Kudos
598 Views
inorman
Contributor III

Hi Iva, thanks for the suggestions.

It's with KSDK 1.3 and KDS version 3.2.0 with sdk eclipse_update installed.

After configuring each PE component I did generate the code.

And I've set the cdc_config.board_init_callback.callback to NULL

I've attached the project. Thank you for taking a look.

Best regards

Ian

0 Kudos
598 Views
therealfreegeek
Contributor IV

You could also try to download the example project and see if that compiles ok on your setup.

0 Kudos