mirror of
https://github.com/Ralim/IronOS.git
synced 2025-07-23 20:30:38 +02:00
Added guide for compiling under Windows (#2060)
* Update documentation to build IronOS in Windows using MSYS2 environment and fix compilation on case-sensitive file systems. --------- Co-authored-by: Ivan Zorin <ivan.a.zorin@gmail.com>
This commit is contained in:
@@ -14,6 +14,42 @@ You will need to update the build settings for include paths and point to the ne
|
||||
In the `source` folder there is a `Makefile` that can be used to build the repository using command line tools.
|
||||
When running the `make` command, specify which model of the device and the language(s) you would like to use.
|
||||
|
||||
### Windows (MSYS2 environment)
|
||||
|
||||
1. Download `msys2` install package from the [official website](https://msys2.org) and install it according to the instruction there;
|
||||
2. Install requried packages (here and for the future commands use **`mingw64.exe`** terminal):
|
||||
```
|
||||
$ pacman -S mingw-w64-x86_64-arm-none-eabi-gcc mingw-w64-x86_64-libwinpthread-git python3 python3-pip make unzip git
|
||||
```
|
||||
3. Download _3rd party RISC-V toolchain_ `xpack-riscv-none-elf-gcc-...-win32-x64.zip` from [this repository](https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases);
|
||||
4. Move downloaded `xpack-riscv-none-elf-gcc-...-win32-x64.zip` to `msys64` _Windows_ directory (e.g., `C:\msys64\`);
|
||||
5. Extract files from `xpack-riscv-none-elf-gcc-...-win32-x64.zip` and go back to _home_ directory:
|
||||
```
|
||||
$ cd /
|
||||
$ unzip xpack-riscv-none-elf-gcc-...-win32-x64.zip
|
||||
$ cd ~
|
||||
```
|
||||
6. Permanently set `PATH` environment variable, so all required toolchains could be available for `make` and for other build scripts:
|
||||
```
|
||||
$ echo 'export PATH=/xpack-riscv-none-elf-gcc-.../bin:${PATH}' >> ~/.bashrc
|
||||
$ source ~/.bashrc
|
||||
```
|
||||
7. Additionally, `OpenOCD` and/or `ST-Link` can be installed as well to help with flashing:
|
||||
```
|
||||
$ pacman -S mingw-w64-x86_64-openocd
|
||||
$ pacman -S mingw-w64-x86_64-stlink
|
||||
```
|
||||
8. Clone _IronOS_ repo:
|
||||
```
|
||||
$ git clone --recursive https://github.com/Ralim/IronOS.git
|
||||
$ cd IronOS
|
||||
```
|
||||
9. Follow steps _4-8_ from [macOS section](#macos);
|
||||
10. `pip` can be updated inside `venv` only:
|
||||
```
|
||||
$ python3 -m pip install --upgrade pip
|
||||
```
|
||||
|
||||
### macOS
|
||||
|
||||
Use the following steps to set up a build environment for IronOS on the command line (in Terminal).
|
||||
|
@@ -6,7 +6,7 @@
|
||||
#include "Pins.h"
|
||||
#include "Setup.h"
|
||||
#include "TipThermoModel.h"
|
||||
#include "Utils.h"
|
||||
#include "Utils.hpp"
|
||||
#include "WS2812.h"
|
||||
#include "configuration.h"
|
||||
#include "history.hpp"
|
||||
|
@@ -7,7 +7,7 @@
|
||||
#include "Setup.h"
|
||||
#include "TipThermoModel.h"
|
||||
#include "Types.h"
|
||||
#include "Utils.h"
|
||||
#include "Utils.hpp"
|
||||
#include "configuration.h"
|
||||
|
||||
extern uint16_t tipSenseResistancex10Ohms;
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* Author: Ralim
|
||||
*/
|
||||
#include "TipThermoModel.h"
|
||||
#include "Utils.h"
|
||||
#include "Utils.hpp"
|
||||
#include "configuration.h"
|
||||
|
||||
#ifdef TEMP_uV_LOOKUP_HAKKO
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* Author: Ralim
|
||||
*/
|
||||
#include "TipThermoModel.h"
|
||||
#include "Utils.h"
|
||||
#include "Utils.hpp"
|
||||
#include "configuration.h"
|
||||
|
||||
#ifdef TEMP_uV_LOOKUP_HAKKO
|
||||
|
@@ -9,7 +9,7 @@
|
||||
#include "Setup.h"
|
||||
#include "TipThermoModel.h"
|
||||
#include "USBPD.h"
|
||||
#include "Utils.h"
|
||||
#include "Utils.hpp"
|
||||
#include "bl702_adc.h"
|
||||
#include "configuration.h"
|
||||
#include "crc32.h"
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* Author: Ralim
|
||||
*/
|
||||
#include "TipThermoModel.h"
|
||||
#include "Utils.h"
|
||||
#include "Utils.hpp"
|
||||
#include "configuration.h"
|
||||
|
||||
#ifdef TEMP_uV_LOOKUP_HAKKO
|
||||
|
@@ -10,7 +10,7 @@
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include "types.h"
|
||||
#include <zephyr/types.h>
|
||||
#include "bl_port.h"
|
||||
|
||||
#define BT_UINT_MAX 0xffffffff
|
||||
|
@@ -10,7 +10,7 @@ NOTES
|
||||
#ifndef _BLE_TP_SVC_H_
|
||||
#define _BLE_TP_SVC_H_
|
||||
|
||||
#include "types.h"
|
||||
#include <zephyr/types.h>
|
||||
#include "ble_config.h"
|
||||
|
||||
// read value handle offset 2
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* Author: Ralim
|
||||
*/
|
||||
#include "TipThermoModel.h"
|
||||
#include "Utils.h"
|
||||
#include "Utils.hpp"
|
||||
#include "configuration.h"
|
||||
|
||||
#ifdef TEMP_uV_LOOKUP_PT1000
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#include "HUB238.hpp"
|
||||
#include "I2CBB2.hpp"
|
||||
#include "Utils.h"
|
||||
#include "Utils.hpp"
|
||||
#include "configuration.h"
|
||||
|
||||
#if POW_PD_EXT == 1
|
||||
|
@@ -9,7 +9,7 @@
|
||||
#include "BSP.h"
|
||||
#include "Settings.h"
|
||||
#include "Types.h"
|
||||
#include "Utils.h"
|
||||
#include "Utils.hpp"
|
||||
#include "configuration.h"
|
||||
#include "main.hpp"
|
||||
#include "power.hpp"
|
||||
|
@@ -8,7 +8,7 @@
|
||||
#include "BSP_Power.h"
|
||||
#include "Settings.h"
|
||||
#include "configuration.h"
|
||||
#include <Utils.h>
|
||||
#include <Utils.hpp>
|
||||
|
||||
int32_t Utils::InterpolateLookupTable(const int32_t *lookupTable, const int noItems, const int32_t value) {
|
||||
for (int i = 1; i < (noItems - 1); i++) {
|
||||
|
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Utils.h
|
||||
* Utils.hpp
|
||||
*
|
||||
* Created on: 28 Apr 2021
|
||||
* Author: Ralim
|
||||
*/
|
||||
|
||||
#ifndef CORE_DRIVERS_UTILS_H_
|
||||
#define CORE_DRIVERS_UTILS_H_
|
||||
#ifndef CORE_DRIVERS_UTILS_HPP_
|
||||
#define CORE_DRIVERS_UTILS_HPP_
|
||||
#include <stdint.h>
|
||||
class Utils {
|
||||
public:
|
||||
@@ -18,4 +18,4 @@ public:
|
||||
|
||||
};
|
||||
|
||||
#endif /* CORE_DRIVERS_UTILS_H_ */
|
||||
#endif /* CORE_DRIVERS_UTILS_HPP_ */
|
@@ -7,4 +7,4 @@
|
||||
|
||||
typedef int32_t TemperatureType_t;
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@@ -287,7 +287,7 @@ DEV_GLOBAL_DEFS=-DCFG_FREERTOS \
|
||||
# -DCONFIG_BT_SMP
|
||||
|
||||
# Required to be turned off due to their drivers tripping warnings
|
||||
DEV_CFLAGS=-Wno-error=enum-conversion -Wno-type-limits -Wno-implicit-fallthrough
|
||||
DEV_CFLAGS=-Wno-error=enum-conversion -Wno-type-limits -Wno-implicit-fallthrough -Wno-error=implicit-function-declaration -Wno-error=incompatible-pointer-types
|
||||
DEV_CXXFLAGS=$(DEV_CFLAGS)
|
||||
flash_size=128k
|
||||
bootldr_size=0x0
|
||||
|
Reference in New Issue
Block a user