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.
Event-based hardware simulation framework

An event-based multi-device simulation framework providing configuration and orchestration of complex multi-device simulations.

Diamond Light Source Controls Group 3 Feb 01, 2022
A Simple Python KeyLogger App

✨ Kurulum Uygulamayı bilgisayarınızda kullana bilmek için bazı işlemler yapmanız gerekiyor. Aşağıdaki yönlendirmeleri takip ederek bunu yapabilirsiniz

VorteX 7 Jun 11, 2022
Ha-rpi gpio - Home Assistant Raspberry Pi GPIO Integration

Home Assistant Raspberry Pi GPIO custom integration This is a spin-off from the

Shay Levy 98 Dec 24, 2022
A blender 2.9x addon for managing camera settings

TMG-Camera-Tools A blender 2.9x addon for managing camera settings Tutorial showcasing current features

Mainman002 12 Apr 16, 2022
The main aim of this project is to avoid the accidents in shredding ( Waste Recycling Industry )

shredder-Machine-Hand-Safety The main aim of this project is to avoid the accidents in shredding ( Waste Recycling Industry ) . The Basic function of

Shubham Chaudhari 1 Nov 15, 2021
Python script: Enphase Envoy mqtt json for Home Assistant

A Python script that takes a real time stream from Enphase Envoy and publishes to a mqtt broker. This can then be used within Home Assistant or for other applications. The data updates at least once

29 Dec 27, 2022
Home Assistant custom components MPK-Lodz

MPK Łódź sensor This sensor uses unofficial API provided by MPK Łódź. Configuration options Key Type Required Default Description name string False MP

Piotr Machowski 3 Nov 01, 2022
Simple python3 implementation of microKanren with lots of type annotations for clarity

MicroKanren-py This is (yet another) python implementation of microKanren. It's a reasonably 1:1 translation of the code provided in the paper, but ev

Erik Derohanian 3 Dec 10, 2022
A simple Python script for toggling Philips Hue Lights by clapping

LightsClap A simple Python script for toggling Philips Hue Lights by clapping Usage pip3 install -r requirements.txt python3 main.py and press the Ent

Flux Industries 2 Nov 16, 2021
Like htop (CPU and memory usage), but for your case LEDs. 😄

Like htop (CPU and memory usage), but for your case LEDs. 😄

Derek Anderson 3 Dec 08, 2021
Raspberry Pi Pico Escape Room game.

Pico Escape Room Raspberry Pi Pico Escape Room game. Parts Raspberry Pi Pico Set of 2 x 20-pin Headers for Raspberry Pi Pico 4PCS Breadboards Kit Incl

Kevin Thomas 5 Feb 02, 2022
What if home automation was homoiconic? Just transformations of data? No more YAML!

radiale what if home-automation was also homoiconic? The upper or proximal row contains three bones, to which Gegenbaur has applied the terms radiale,

Felix Barbalet 21 Mar 26, 2022
Designed a system that can efficiently sort recyclables and transfer them to corresponding bins using Python, a Raspberry Pi, and Quanser Labs.

System for Sorting and Recycling Containers - Project 3 Table of contents Overview The challenge Screenshot My process Built with Code snippets What I

Mit Patel 2 Dec 02, 2022
This repo uses a stereo camera and gray-code-based structured light to realize dense 3D reconstruction.

Structured-light-stereo This repo uses a stereo camera and gray-code-based structured light to realize dense 3D reconstruction. . How to use: STEP 1:

FEI 20 Dec 31, 2022
A simple small scale electric car was build which can be driven by remote control and features a fully autonomous parking procedure.

personal-autonomous-parking-car-raspberry A simple electric car model was build using Raspbery pi. The car has remote control and autonomous operation

Kostas Ziovas 2 Jan 26, 2022
Pi-hole with Inky pHAT ePaper display

Pi-hole with Inky pHAT ePaper display This is my Pi-hole with an ePaper display.

11 Sep 13, 2022
Unofficial Playdate reverse-engineering notes/tools - covers file formats, server API and USB commands

Unofficial Playdate reverse-engineering notes/tools - covers file formats, server API and USB commands ⚠️ This documentation is unofficial and is not

James 106 Dec 31, 2022
LedFx is a network based LED effect controller with support for advanced real-time audio effects

Welcome to LedFx ✨ -Making music come alive! LedFx website: https://ledfx.app/ What is LedFx? What LedFx offers is the ability to take audio input, an

786 Jan 02, 2023
Code for the paper "Planning with Diffusion for Flexible Behavior Synthesis"

Planning with Diffusion Training and visualizing of diffusion models from Planning with Diffusion for Flexible Behavior Synthesis. Guided sampling cod

Michael Janner 310 Jan 07, 2023
Claussoft Personal Digital Assistant

Claussoft Personal Digital Assistant Install on Linux $ sudo apt update $ sudo apt install espeak ffmpeg libespeak1 portaudio19-dev $ pip install -r r

Christian Clauss 3 Dec 14, 2022