Welcome to the Embedded Sharepoint Documentation
Welcome to the Embedded Sharepoint! Embedded-Sharepoint contains the shared embedded files to build and develop for our custom STM32 PCBs.
Getting Started
Installation
Follow the installation instructions for your specific platform, found here
Command Usage
The Makefile in the top level directory compiles all needed files for the STM32, it is not meant to be called directly, instead you must call it from a different Makefile
Running tests
In the test/ directory there is a Makefile meant for just running test files. Every test file should end with _test To run a test do:
make TEST=[name of test file without _test_ and the .c extension] PROJECT_TARGET=[name of the STM32 you want to compile for]
# For example:
make TEST=blinky PROJECT_TARGET=stm32f413rht
# This compiles the blinky_test.c test for the STM32F413RHT
For all PROJECT_TARGET options, see the STM32_Ports page
Flashing code
Once your code is compiled, use the makefile in the test/ directory to flash your built code to the microcontroller. If you are running WSL there are some extra steps to connect the STM32 to your computer, which can be found here.
Run the following command to flash:
make flash
Adding Embedded Sharepoint to your project
Follow these instructions on how to add Embedded Sharepoint to your project
Contributing
See our Issues to see what you can work on!
Once you're ready for a review please open a pull request to merge into main. Pull Requests explained
Porting
A valid port of an STM requires three things:
- A directory under stm/stm32f4xx, stm/stm32l4xx, or stm/stm32g4xx must be generated with the generic name of the microcontroller. This is typically stm32 followed by four characters specifying the series and line (stm32f413, stm32l431, etc.)
- A linker script under the aforementioned directory. This can be autogenerated by STM32CubeMX or grabbed from the internet. The name should take the form of STM32*_FLASH.ld, and should include the full name of the processor (STM32F413RHTx_FLASH.ld, STM32L431CBTx_FLASH.ld, etc.)
- A startup assembly file including the vector table and some basic handlers (most important being Reset_Handler). This can be autogenerated by STM32CubeMX or grabbed from the internet. The name should take the form of startup_stm32 followed by the four characters specifying the series and line and then xx (startup_stm32f413xx.s, startup_stm32l431xx.s)
- A configuration file with the exact MCU name (e.g. stm32l432kcu.cfg) specifying which BSP modules to disable in a space separated list like so:
BSP_DISABLE=CAN UART ADCPlease check which peripherals actually exist on your MCU, or be prepared for strange build errors.
The Makefile will expect this exact naming structure, so please ensure you've set it up properly. If everything goes to plan, you should be able to build with PROJECT_TARGET set to the full name of the port.