Here is a small example to get you started building alternative firmware for the STM8S005K6 chip inside the JXD393 drones. More details can be found at the CCC wiki.
This includes the STM8S standard peripheral driver in the source tree, as well as an nRF24l01 driver by LonelyWolf.
Working/tested features:
- LEDs
- SPI
- I2C via bitbanging over PORTA pin 2/3
To do:
- MPU6050 driver
- PWM for motors (using stdlib)
- PID controller to stabilize
- BK2421 driver
- Radio control