|
|
### **1. Install the required plugins**
|
|
|
## **1. Install the required plugins**
|
|
|
* **GNU MCU Ecplise**
|
|
|
Open Eclipse, go to **Help->Eclipse Marketplace**.
|
|
|
In _Find_ search for `GNU MCU Eclipse` and click install.
|
... | ... | @@ -7,10 +7,22 @@ In the feature list make sure you checked **`GNU MCU C/C++ ARM Cross Compiler`** |
|
|
* **CppStyle**
|
|
|
This extensions lets you run clang-format every time you save a file. Follow the same steps as the point above to install it.
|
|
|
|
|
|
### **2. Importing skyward-boardcore**
|
|
|
### CppStyle setup
|
|
|
* Windows only
|
|
|
Download and install the LLVM package (which includes clang-format) from [https://llvm.org/builds/](https://llvm.org/builds/).
|
|
|
|
|
|
* Both Windows and Linux
|
|
|
In Eclipse, open _**Window->Preferences->C/C++->CppStye**_ and insert the clang-format path:
|
|
|
* Windows: `C:\Program Files (x86)\LLVM\bin\clang-format.exe`
|
|
|
* Linux: `/usr/bin/clang-format`
|
|
|
|
|
|
Then check _**Run clang-format on file save**_ and apply.
|
|
|
Now go to _**Project->Properties->C/C++ General->Formatter**_. Check `Enable project specific settings` and set `CppStyle (clang-format)` as _Code formatter_.
|
|
|
|
|
|
## **2. Importing skyward-boardcore**
|
|
|
After you cloned the skyward-boardcore repo on your system, in Eclipse go to **File->New->Makefile project with existing code**. Select the root directory of the skyward-boardcore repo, and choose **`ARM Cross GCC`** as the `Toolchain for Indexer Settings`
|
|
|
|
|
|
### **3. Setting up the Indexer**
|
|
|
## **3. Setting up the Indexer**
|
|
|
We now need to setup the Indexer for code completion / error detection to work correctly.
|
|
|
Go to **Project->Properties** and follow the instructions for each of the following sections, make sure you apply the settings after each section:
|
|
|
* **C/C++ Build:**
|
... | ... | @@ -31,7 +43,7 @@ Uncheck |
|
|
Finally, check `Use active build configuration`.
|
|
|
There appears to be a bug in eclipse that will switch back to `Use a fixed build configuration` after you close the program. If you prefer, you can select your build configuration here and leave the check on `Use a fixed build configuration`.
|
|
|
|
|
|
### **4. Adding board specific build configurations**
|
|
|
## **4. Adding board specific build configurations**
|
|
|
_(Currently supported boards are stm32f429zi_stm32f4discovery and stm32f429zi_skyward_homeone)_
|
|
|
First, download the file for your desired board and OS from [HERE](https://drive.google.com/open?id=1Jq4VUUA5OcZfbJRDmoJTISem0f8qh30k)
|
|
|
In the project properties, click on the **C/C++ Build** section and then on **Manage Configurations...**.
|
... | ... | @@ -49,8 +61,33 @@ You now have to select every folder under `libs/miosix-kernel/miosix/arch/` and |
|
|
|
|
|
After that, rebuild the index using **Project->C/C++ index->Rebuild** and you should be good to go!
|
|
|
|
|
|
### **5. Building with SBS on Eclipse**
|
|
|
For this step, I assume you are already familiar with the _Skyward Build System (SBS)_. If not, please have a look at the following page on this wiki: [Boardcore Quick Start](../wiki/Boardcore-Quick-Start)
|
|
|
|
|
|
We already set up the build command, so invoking a build command should already call the SBS and build every entrypoint specified in sbs.conf.
|
|
|
|
|
|
### **Creating settings for a new board**
|
|
|
(WIP)
|
|
|
### Building a specific entrypoint
|
|
|
To speed up build times and build only the entrypoint you're working on, you have first to create a `Build target`.
|
|
|
Click on `Window->Show view->Build Targets`. In the Built Targets panel then select skyward-boardcore and click on the `New build target` icon. In the following window, choose a `Target name` that you like, and the uncheck `Same as the target name` under `Build target`.
|
|
|
In the Build Target field write `-b your-entrypoint-name`, just like what you do when you call `./sbs -b your-entrypoint-name` to build your entrypoint.
|
|
|
When you want to build this target, just double click on the corresponding entry in the _**Build Targets**_ panel.
|
|
|
|
|
|
### Setting CLang-format and cppheck |
|
|
\ No newline at end of file |
|
|
### **6. Programming your board**
|
|
|
Click on `Run->External tools->External Tools Configuration`
|
|
|
Create a new _Launch Configuration_ under _Program_ in the left panel. As the name, put the name of the entrypoint you want to flash.
|
|
|
In the _Main_ tab, in _**Location**_, write the path of the executable you use to program your board:
|
|
|
* Windows: `C:\Program Files (x86)\STMicroelectronics\STM32 ST-LINK Utility\ST-LINK Utility\ST-LINK_CLI.exe`
|
|
|
* Linux: Work in Progress
|
|
|
|
|
|
In _**Working directory**_ add the directory where your binary file is located:
|
|
|
For example: `${workspace_loc:/skyward-boardcore/bin/your-entrypoint}` (Change `your-entrypoint` with the name of your entrypoint in sbs.conf)
|
|
|
Finally, in _**Arguments**_, write:
|
|
|
* Windows: `-P your-entrypoint.bin 0x08000000`
|
|
|
* Linux: Work in Progress
|
|
|
|
|
|
Change the memory address (0x08000000 in this example) with the correct one for the board you are using.
|
|
|
Click _Apply_ and the _Run_, and Eclipse should start programming your board automatically.
|
|
|
Remember you have to repeat these steps for every different binary you want to flash.
|
|
|
|
|
|
## **Creating settings for a new board**
|
|
|
(WIP) |
|
|
\ No newline at end of file |