
22 changed files with 157 additions and 7 deletions
@ -0,0 +1,11 @@
@@ -0,0 +1,11 @@
|
||||
# chibios-projects |
||||
|
||||
Several examples for ChibiOS 3.0.x (some very close to original ChibiOS demos), to be used with arm-none-eabi GCC toolchain, Makefiles and plain text editing. (So no fancy eclipse projects, etc...) |
||||
|
||||
The structure is made so that it is easy to upgrade ChibiOS to a newer one (no changes to the distribution tree are required), just replace the `chibios` symlink. |
||||
|
||||
The `Makefile`s are adjusted so that it is easy to add new board definitions (`boards`) and linker scripts (`ld`). These take precedence over ChibiOS provided ones if needed. |
||||
|
||||
The actual examples are to be found in the `projects` directory. |
||||
|
||||
Several flashing methods are set up in `common.mk` (e.g. `make dfu` works). |
@ -0,0 +1,13 @@
@@ -0,0 +1,13 @@
|
||||
# Extra board definitions for ChibiOS |
||||
|
||||
## ST_NUCLEO_F072RB |
||||
|
||||
For the [NUCLEO_F072RB](http://www.st.com/web/en/catalog/tools/PF260003) board. |
||||
|
||||
## STM32F030_BREAKOUT |
||||
|
||||
For [this](https://oshpark.com/shared_projects/4C05TXl3) STM32F030FxP6 breakout. |
||||
|
||||
## STM32F042_BREAKOUT |
||||
|
||||
For [this](https://oshpark.com/shared_projects/2ESB57Jk) STM32F042FxP6 breakout. |
@ -0,0 +1,3 @@
@@ -0,0 +1,3 @@
|
||||
# Serial echo example |
||||
|
||||
Supposed to run on a STM32F030x4 breakout board, assumes the serial connection on USART1, pins PA9 (TX) and PA10 (RX). |
@ -0,0 +1,3 @@
@@ -0,0 +1,3 @@
|
||||
# An example with a LED and a button |
||||
|
||||
Supposed to run on STM32F042FxP6 breakout board. A button press toggles the LED on/off. |
@ -0,0 +1,5 @@
@@ -0,0 +1,5 @@
|
||||
# USB-CDC example for STM32F042 |
||||
|
||||
Supposed to run on STM32F042FxP6 breakout board. Should enumerate as a serial device over USB. A button press should produce a "Hello, world" message over the the serial/USB pipe. |
||||
|
||||
The USB connection is on PA11/PA12 pins, which share the physical pins with PA9/PA10 on the TSSOP-20 STM32F042FxP6 chips. |
@ -0,0 +1,17 @@
@@ -0,0 +1,17 @@
|
||||
# A Teensy-style "debug" channel over USB raw HID |
||||
|
||||
## A simple version |
||||
|
||||
This example implements a raw HID device, which is able to send "debug" messages, akin to the original [Teensy] [usb_debug_only] example. |
||||
|
||||
This version does *not* implement the hid debug channel as a class, it simply provides a couple of functions to write to it, Teensy-style. |
||||
|
||||
The version does not implement the flush timer, the output needs to be flushed manually by calling `usb_debug_flush_output()`. |
||||
|
||||
It is compatible with the original PJRC's [hid_listen] program, but a simple python reimplementation is provided (requires the [hidapi] module, i.e. `pip install hidapi`). |
||||
|
||||
|
||||
[Teensy]: https://www.pjrc.com/teensy/index.html |
||||
[usb_debug_only]: https://www.pjrc.com/teensy/usb_debug_only.html |
||||
[hid_listen]: https://www.pjrc.com/teensy/hid_listen.html |
||||
[hidapi]: https://github.com/trezor/cython-hidapi |
@ -0,0 +1,17 @@
@@ -0,0 +1,17 @@
|
||||
# A Teensy-style "debug" channel over USB raw HID |
||||
|
||||
## A BaseAsynchronousChannel version |
||||
|
||||
This example implements a raw HID device, which is able to send "debug" messages, akin to the original [Teensy] [usb_debug_only] example. |
||||
|
||||
This version implements the debug-out as an instance of ChibiOS's BaseAsynchronousChannel, so one can use ChibiOS's BaseChannel functions to write to it. |
||||
|
||||
The output is automatically flushed after 50ms (see `usb_hid_debug.h`), or immediately by calling `usb_debug_flush_output()`. |
||||
|
||||
It is compatible with the original PJRC's [hid_listen] program, but a simple python reimplementation is provided (requires the [hidapi] module, i.e. `pip install hidapi`). |
||||
|
||||
|
||||
[Teensy]: https://www.pjrc.com/teensy/index.html |
||||
[usb_debug_only]: https://www.pjrc.com/teensy/usb_debug_only.html |
||||
[hid_listen]: https://www.pjrc.com/teensy/hid_listen.html |
||||
[hidapi]: https://github.com/trezor/cython-hidapi |
@ -0,0 +1,5 @@
@@ -0,0 +1,5 @@
|
||||
# An example for ST F072-NUCLEO board |
||||
|
||||
It is basically just an adaptation of ChibiOS's `demos/STM32/RT-STM32F072-DISCOVERY` to the F072-NUCLEO board, for testing the board definition for this NUCLEO board. |
||||
|
||||
This NUCLEO board has USART2 routed to its ST-LINK, which enumerates (among other things) as a serial port. On the USER button press, the board runs tests and prints the output over this serial port. |
Loading…
Reference in new issue