From ac25e14f28792f4ac3a852cd7afe792f3e7258ec Mon Sep 17 00:00:00 2001 From: derGraph Date: Sun, 21 May 2023 22:27:38 +0200 Subject: [PATCH 1/2] Changed Chinese to English in app_main.c --- firmware/application/src/app_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firmware/application/src/app_main.c b/firmware/application/src/app_main.c index 8f0eb31..85c27b4 100644 --- a/firmware/application/src/app_main.c +++ b/firmware/application/src/app_main.c @@ -37,8 +37,8 @@ NRF_LOG_MODULE_REGISTER(); -// 定义软定时器 -APP_TIMER_DEF(m_button_check_timer); // 用于按钮防抖的定时器 +// Defining soft timers +APP_TIMER_DEF(m_button_check_timer); // Timer for button debounce static bool m_is_read_btn_press = false; static bool m_is_write_btn_press = false; From 444399e23fc88561807983a6dc98a4104229ac20 Mon Sep 17 00:00:00 2001 From: derGraph Date: Sun, 21 May 2023 22:28:34 +0200 Subject: [PATCH 2/2] Added Compiling instructions Added Instructions for: - editing - compiling - debugging (not finished) --- How_to_use_Firmware.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 How_to_use_Firmware.md diff --git a/How_to_use_Firmware.md b/How_to_use_Firmware.md new file mode 100644 index 0000000..97d3af0 --- /dev/null +++ b/How_to_use_Firmware.md @@ -0,0 +1,40 @@ +# How to use the Firmware +In this file you can look up how to [edit](#Editing-the-code), [compile](#Compiling-the-code) and [debug](#Debugging-the-code) the code! + +## Editing the code +We are using [Visual Studio Code](https://code.visualstudio.com/download) to edit this project! Simply download and install it! + - Install the [ARM-GCC](https://mynewt.apache.org/latest/get_started/native_install/cross_tools.html) version [9.3.1 Compiler](https://developer.arm.com/downloads/-/gnu-rm) and remember the path where you installed it. + - Install the [C++ Extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools) in VS-Code. + - Create a new IntelliSense Configuration: + - press F1 in VS-Code and enter `C/C++: Edit Configurations (UI)` + - Add a new Configuration and name it + - Specify your Compiler path (path of previously installed Compiler `bin` folder) + - Change IntelliSense mode to `gcc-arm (legacy)` + - Add include path `${workspaceFolder}/**` +## Compiling the code + - Install the compiler (for instructions have a look at [Editing the code](#Editing-the-code)) + - Edit Makefile.defs: + - Change `GNU_INSTALL_ROOT`(path of previously installed Compiler `bin` folder) + - Change `GNU_VERSION` (Version of the installed Compiler) + - Don't forget to remove the `#` in front of the changed lines +- Install make + - **Ubuntu:** + - Open a terminal. + - Run the following command to install Make: `sudo apt-get install build-essential` + - **Windows using Chocolatey:** + - Install Chocolatey: + - Open a PowerShell terminal with administrator privileges. + - Run the following command to install Chocolatey: + ``` Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) ``` + - Install Make: + - In the same PowerShell terminal, run the following command to install Make using Chocolatey: `choco install make` + - **macOS:** + - Open a terminal. + - Install Homebrew package manager by running the following command: `/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"` + - Once Homebrew is installed, run the following command to install Make: `brew install make` +- go into folder and run `make` + +## Debugging the code +- Install [openocd](https://mynewt.apache.org/latest/get_started/native_install/cross_tools.html) +- Install [Cortex-Debug](https://marketplace.visualstudio.com/items?itemName=marus25.cortex-debug) VS-Code Extension +- MORE INFO ADDED LATER \ No newline at end of file