This was ported from the mirf library in esp-idf-mirf, which is a port in itself. This only works with the STM8 peripherals library usinng Platformio's SDCC compatible version.
Documentation at https://nicogutz.github.io/NRF24_STM8_Library
- (Windows) Install STLink Drivers. Make a new account with ST before downloading, their confirmation Email from this site never reaches for some reason.
- Install PlatformIO
- Install the platformio extension on VSCode.
- (Linux) Add the udev rules here
- Clone this repo and open with VSCode.
$ git clone https://github.com/nicogutz/NRF24_STM8_Library
- Make sure [env:stm8sblack] is selected on the PlatformIO environments.
- Connect STLink and STM8, build and upload using the buttons at the bottom.
Please see MIRF for information, the equivalent ESP example used here is Ping-Pong.
Debugging is currently only possible using Linux, there is a core issue with SDCC. This might get fixed in the future. For debuging to work at version 6.11, follow the instructions at platformio/platform-ststm8#61
Please see the src/stm8s_conf.h
file for activating more SPL modules, if you wish to expand the functionality of this example. Only modules (like ADC, UART, etc.) that are activated in the configuration file are compiled in. In this example, only the GPIO module is active. Activating unused modules will result in a higher flash usage that will make even compilation even impossible for smaller chips, care must be taken.