Recent

Author Topic: STM32, startup and enable USB as Virtual COM port  (Read 1080 times)

avra

  • Hero Member
  • *****
  • Posts: 1600
    • Additional info
Re: STM32, startup and enable USB as Virtual COM port
« Reply #15 on: July 20, 2019, 02:14:14 am »
I have just bumped into a very interesting and portable minimal USB stack having CDC implementation:
https://github.com/kevinmehall/usb

At quick look it is very clearly written and shouldn't be too hard for conversion to Pascal. For example it looks much more human friendly then LUFA USB stack for AVRs. Although you would probably need an intermediate step to make it work with your MCU first.
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

avra

  • Hero Member
  • *****
  • Posts: 1600
    • Additional info
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

Laksen

  • Hero Member
  • *****
  • Posts: 616
    • J-Software
Re: STM32, startup and enable USB as Virtual COM port
« Reply #17 on: July 23, 2019, 04:57:38 pm »
I just wrote a device stack over the last few days: https://github.com/Laksen/fp-usb
Probably a few bugs still left in there, but I think it's relatively easy to understand... However easy USB can get :)

Paul Breneman

  • Sr. Member
  • ****
  • Posts: 278
    • Control Pascal
Re: STM32, startup and enable USB as Virtual COM port
« Reply #18 on: July 23, 2019, 06:04:48 pm »
In short: I want to make it easy to use a microcontroller. I want something like Borland Pascal or Free Pascal running on the microcontroller itself.

In general, except for Arduino, getting an IDE and toolchain up and running is something that often takes weeks. If you know what you're doing. I want to be able to turn it on, connect with Putty or something like that, have it show the device status, and start programming.

I hope to read more about this (from you) in the future.  I've wanted a Free Pascal for Arduino, but maybe I'll get Ultibo working on a simple self-hosted development system soon?
https://wiki.freepascal.org/self-hosted
https://ultibo.org/forum/viewtopic.php?f=13&t=1280&p=9306&sid=ec501a406761a9221e50a8ef55cb89ae#p9306
Regards,
Paul Breneman
www.ControlPascal.com

avra

  • Hero Member
  • *****
  • Posts: 1600
    • Additional info
Re: STM32, startup and enable USB as Virtual COM port
« Reply #19 on: July 24, 2019, 01:30:12 am »
I just wrote a device stack over the last few days: https://github.com/Laksen/fp-usb
Probably a few bugs still left in there, but I think it's relatively easy to understand... However easy USB can get :)
Congratulations! Coincidentally a week ago I have ordered STM32F103 for one Arduino project. Will be glad to test FPC and Mikroelektronika Pascal on it  ;)
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib