Segger Embedded Studio project for building & debugging Flipper Zero firmware.

Overview

Segger Embedded Studio project for Flipper Zero firmware

Установка

  1. Добавить данный репозиторий в качестве сабмодуля в корень локальной копии репозитория flipperzero-firmware
git submodule add https://github.com/hedger/flipperzero-sesproject.git sesproject
git submodule update --init --recursive

Зависимости

  1. Установить Segger Embedded Studio for ARM
  2. Установить gcc-arm-eabi-none
  3. Скачать OpenOCD и добавить в PATH
  4. Python 2+ для скрипта автоматического обновления версии сборки

Начальная конфигурация SES

  1. Tools > Options > Building:

    1. Toolchain Root Directory установить в путь распакованного тулчейна + /bin (например, E:/tools/GNU Arm Embedded Toolchain/10 2021.10/bin)
    2. Parallel Building Threads = число ядер процессора
  2. Tools > Options > Environment > User Interface:

    1. Application Main Font + Application Monospace Font поправить на удобные значения
    2. Theme = Dark / Operating System Default
  3. Tools > Options > Languages:

    Для всех языков установить Indent Size и Tab Size в 4

  4. Tools > Options > Text Editor:

    1. Formatting > Use .clang-format file = Yes (ВАЖНО! Позволяет форматировать код по кодстайлу нажанием ctrl+k ctrl+f)

    2. Formatting > Formatting Indent Size = 4

    3. Visual Appearance > Font = по вкусу

    4. Visual Appearance > Line Numbers = All lines

Настройки сборки

SES использует концепцию "конфигураций" для формирования окончательных настроек солюшена. Конфигурации бывают публичные и приватные:

  • Приватные содержат фрагмент настроек - опции компилятора, отладчика и т.д.;
  • Публичные наследуют одну или несколько приватных конфигураций и собирают воедино настройки из них.

Также в солюшене практически все его части - сам солюшен, отдельные проекты, отдельные папки и файлы в проекте - могут оверрайдить настройки под конкретную конфигурацию, публичную или приватную.

Данный солюшен поставляется с несколькими приватными конфигрурациями:

  • Конфиги под аппаратную ревизию Флиппера - F6 или F7
  • Конфиги релизной и отладочной сборки
  • Конфиги отладки через JLink и gdb/OpenOCD

...и двумя публичными, Release и Debug, в которых изначально выбран F7 и OpenOCD.

Настроить публичные конфигурации можно в меню Projects > Build Configurations, изменив чекбоксы у приватных конфигураций.

Отладка и прошивка из SES

  • Для сборки и загрузки прошивки в Флиппер под отладкой: F5 (Debug > Go).

  • Для подключения к Флипперу с уже работающей прошивкой: Ctrl+T, H (Target > Attach Debugger)

  • Для отключения отладки: Ctrl+T, D (Target > Disconnect)

NB: В случае использования подключения через OpenOCD, при остановке отладки SES преждевременно убивает сервер gdb, из-за чего Флиппер остаётся приостановленным. Для обхода этой проблемы можно запускать OpenOCD с помошью scripts/start_gdb_openocd.cmd - SES при запуске отладки подключится к нему, а не будет запускать свой инстанс сервера. При отключении отладки этот инстанс OpenOCD не убивается SES, поэтому продолжение работы устройства корректно срабатывает. Подобной проблемы при подключении через JLink нет.

Скрипты

Для прошивки firmware и bootloader без использования SES подготовлены скрипты в папке scripts. Для записи используется сборка под таргет f7. Запись выполняется через OpenOCD, необходимо его наличие в PATH.

Прочее

  • Солюшен автоматически загружает все необходимые файлы с кодом при загрузке. Однако, если создать файл в файловой системе во время работы IDE, необходимо синхронизировать дерево солюшена: Project > Reload Flipper.

  • Файл проекта flipperzero.emSession - простой XML, многие опции проще править руками прямо в нём, чем разбираться с выбором конфигурации в интерфейсе SES.

  • Дефайны для firmware с флагами и выбором приложений редактируются либо прямо в файле проекта, либо через SES:

    • выбрать проект в дереве солюшена, открыть свойства;
    • выбрать конфигурацию "Common";
    • отредактировать Code > Preprocessor > Preprocessor Definitions.
A LiteX project which builds a SoC with DRAM / HDIM output via the GPDI SYZYGY addon.

ButterStick GPDI LiteX demo A LiteX project which builds a SoC with DRAM / HDIM output via the GPDI SYZYGY addon. Getting started Connect GPDI board t

4 Nov 21, 2021
Cascade Drone Swarm Physical Demonstration Project

Cascade Drone Swarm Physical Demonstration Project Table of Contents About The Project Built With Getting Started Prerequisites Installation About The

3 Aug 24, 2022
Modi2-firmware-updater - MODI+ Firmware Updater With Python

MODI+ Firmware Updater 실행 준비 python3(파이썬3.9 혹은 그 이상의 버전)를 컴퓨터에 설치 python3 -m pip

LUXROBO 1 Feb 04, 2022
Switch predictor for Home Assistant with AppDeamon

Home Assistant AppDeamon - Event predictor WORK IN PROGRESS - CURRENTLY NOT COMPLETE AND NOT WORK This is an idea under development (when I have free

37 Dec 17, 2022
A IC scan test interface for Arduino

ICSCAN_ARDUINO Prerequisites Python 3.6 or higher arduino uno or nano what is this It is a bitstream tranceiver to test IC chip It sends bitstream to

Nifty Chips Laboratory 0 Sep 15, 2022
KIRI - Keyboard Interception, Remapping, and Injection using Raspberry Pi as an HID Proxy.

KIRI - Keyboard Interception, Remapping and Injection using Raspberry Pi as a HID Proxy. Near limitless abilities for a keyboard warrior. Features Sim

Viggo Falster 10 Dec 23, 2022
A simple Picobot project implemented in Python

Python-Picobot A simple Picobot project implemented in Python About Explanation This is my first programming project. Picobot use rules.txt file which

Shayan Shiravani 0 Apr 03, 2022
🌱 - WebhookHard◞ Fines Educativos ◟

v1.0.0 WebhookHardware ¿Que es WebhookHardware? WebhookHardware se trata de un proyecto tratado para sacar informacion sobre el hardware de tus victim

3 Jun 14, 2021
This Home Assistant custom component adding support for controlling Midea dehumidifiers on local network.

This custom component for Home Assistant adds support for Midea air conditioner and dehumidifier appliances via the local area network. homeassistant-

Nenad Bogojevic 92 Dec 31, 2022
Micropython-wifimanager-esp8266 - Simple Wifi Manager for ESP8266 using MicroPython

micropython-wifimanager-esp8266 Simple Wifi Manager for ESP8266 using MicroPytho

Abhinuv Nitin Pitale 1 Jan 04, 2022
A battery pack simulation tool that uses the PyBaMM framework

Overview of liionpack liionpack takes a 1D PyBaMM model and makes it into a pack. You can either specify the configuration e.g. 16 cells in parallel a

PyBaMM Team 40 Jan 05, 2023
Create (templateable) cameras that display qr codes in homeassistant

QRCam This custom component creates cameras displaying qrcodes. The QRCodes can be static or generated from templates. If you use a template as conten

Jannes Müller 5 Oct 06, 2022
Ansible tools for operating and managing fleets of Blinksticks in harmony using the Blinkstick Python library.

Ansible tools for operating and managing fleets of Blinksticks in harmony using the Blinkstick Python library.

Greg Robinson 3 Aug 10, 2022
FERM: A Framework for Efficient Robotic Manipulation

Framework for Efficient Robotic Manipulation FERM is a framework that enables robots to learn tasks within an hour of real time training.

Ruihan (Philip) Zhao 111 Dec 31, 2022
Home assiatant Custom component: Camera Archiver

Camera archiver Archive your ftp camera meadia files on other ftp with files renaming and event creation. Event can be used for send information to el

1 Jan 06, 2022
Raspberry Pi Pico as a Rubber Ducky

Raspberry-Pi-Pico-as-a-Rubber-Ducky Kurulum Raspberry Pi Pico cihazınız için CircuitPython'u indirin. Boot düğmesine basılı tutarken cihazı bir USB ba

Furkan Enes POLATOĞLU 6 Dec 13, 2022
CO2Ampel - This RaspberryPi project uses weather data to estimate the share of renewable energy in the power grid

CO2Ampel This RaspberryPi project uses weather data to estimate the share of ren

Felix 4 Jan 19, 2022
ESP32 recording button presses, and serving webpage that graphs the numbers over time.

ESP32-IoT-button-graph-test ESP32 recording button presses, and serving webpage via webSockets in order to graph the responses. The objective was to t

f-caro 1 Nov 30, 2021
A custom mechanical keyboard inspired by the CFTKB Mysterium

Env-KB A custom mechanical keyboard inspired by the CFTKB Mysterium Build Guide and Parts List What is to do? Right now for the first 5 PCBs I have, i

EnviousData 203 Jan 04, 2023
Robo Arm :: Rigging is a rigging addon for Blender that helps animating industrial robotic arms.

Robo Arm :: Rigging Robo Arm :: Rigging is a rigging addon for Blender that helps animating industrial robotic arms. It construct serial links(a kind

2 Nov 18, 2021