Monday, 16 February 2015

Coocox IDE, STM32F103C8T6, USBSerial

For USB CDC serial communication I used the stm32f103 oscilloscope source from Miniscope. As I do not want to implement ADC, DMA, buzzer I have to delete these lines, header and source files from the code. The Author used the Coocox IDE, which is an Eclipse based IDE and it is easy to use, but I had to use version 1.7.8, because the very fresh 2.0 version was not working for me. The following code sends some text and waits commands from the PC. The commands are very simple, the onboard led is lighted when '1' character is received and the led is turned off when '0' character is received. Please note that the original ST library based CDC_Send_DATA function is called, which is copied back to the hw_config.c The Coocox builds the binary file, which can be flashed directly with the serial adapter and stm32flash utility. My linux kernel sends some error message so after some search I found the solution: Could not grab port (tty/ttyACM0)” To communicate via the USB serial interface I use screen: The whole project can be downloaded from here

2 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. hi bro..
    i have generic stm32f103c8t6 board from lc-tech.
    i also use the same 1.7.8 version but in windows.
    i'm using coocox ide to compile my program and i manually flash the bin file to my board using stm flash loader using pl2303hx USB-Serial adapter and to start my program execution i need to remove jumper pins from BOOT1 BOOT0 on board and power my board again. Is there anyother alternative to flash directly from coocoxIDE to my board using pl2303hx USB-Serial adapter and start my program execution automatically. I also used arduinoIDE for stm32 which can do this but some modules are not implemented in it so settled on coocoxIDE.
    thanks.

    ReplyDelete