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 library for using WS2812b leds (aka neopixels) with Raspberry Pi Pico

pico_ws2812b a library for using WS2812b leds (aka neopixels) with Raspberry Pi Pico You'll first need to save the ws2812b.py file to your device (for

76 Nov 25, 2022
2021 Real Robot Challenge Phase2 attemp

Real_Robot_Challenge_Phase2_AE_attemp We(team name:thriftysnipe) are the first place winner of Phase1 in 2021 Real Robot Challenge. Please see this pa

Qiang Wang 2 Nov 15, 2021
Jarvis: a personal assistant which can help you to manage your system

Jarvis Jarvis is personal AI based assistant which can help you to manage stuff in your computer. This is demo but I decided to make it more better so

2 Jun 02, 2022
Create a low powered, renewable generation forecast display with a Raspberry Pi Zero & Inky wHAT.

GB Renewable Forecast Display This Raspberry Pi powered eInk display aims to give you a quick way to time your home energy usage to help balance the g

Andy Brace 32 Jul 02, 2022
Christmasvillage-rpi - Raspberry Pi relay controller for ChristmasVillage.io

ChristmasVillage.io Relay Controller Links ChristmasVillage.io - Live Stream & Controls Youtube Instagram About This repository controls the light rel

Grant Windes 2 Feb 15, 2022
Raspberry Pi Spectrometer

PySpectrometer 2021-03-05 Raspberry Pi Spectrometer The PySpectrometer is a Python (OpenCV and Tkinter) implementation of an optical spectrometer. The

Les Wright 538 Jan 05, 2023
A script and GUI for controlling stepper motors from an arduino

A script and GUI for controlling stepper motors from an arduino (nema 23 in my case but should work for others in general)

Pip 2 Aug 01, 2022
A refreshed Python toolbox for building complex digital hardware

A refreshed Python toolbox for building complex digital hardware

nMigen 1k Jan 05, 2023
Rasberry Pie GPIO memory game. Press the corresponding key to the lit LED.

RPie-keyboard-game Rasberry Pie GPIO memory game. Press the corresponding key to the lit LED. Randem LED (general output) is lit up on rasberrypi rand

Shawn Dowling 1 Oct 24, 2021
A modular sequencer based on Pi Pico & EuroPi

PicoSequencer A modular sequencer based on Pi Pico & EuroPi by Zeno Van Moerkerke / Keurslager Kurt For now it is 'only' a trigger sequencer, but I si

5 Oct 27, 2022
A Python class for controlling the Pimoroni RGB Keypad for Raspberry Pi Pico

rgbkeypad A Python class for controlling the Pimoroni RGB Keypad for the Raspberry Pi Pico. Compatible with MicroPython and CircuitPython. keypad = RG

Martin O'Hanlon 43 Nov 11, 2022
Lenovo Legion 5 Pro 2021 Linux RGB Keyboard Light Controller

Lenovo Legion 5 Pro 2021 Linux RGB Keyboard Light Controller This util allows to drive RGB keyboard light on Lenovo Legion 5 Pro 2021 Laptop Requireme

36 Dec 16, 2022
A ESP32 project template with a web interface built in React

ESP AP Webserver demo.mp4 This is my experiment with "mobile app development" for the ESP32. The project consists of two parts, the ESP32 code and the

8 Dec 15, 2022
Nordpool_diff custom integration for Home Assistant

nordpool_diff custom integration for Home Assistant Requires https://github.com/custom-components/nordpool Applies non-causal FIR differentiator1 to N

Joonas Pulakka 45 Dec 23, 2022
OpenStickFirmware is open source software designed to handle any and all tasks required in a custom Fight Stick

OpenStickFirmware is open source software designed to handle any and all tasks required in a custom Fight Stick. It can handle being the brains of your entire stick, or just handling the bells and wh

Sleep Unit 23 Nov 24, 2022
🏡 My Home Assistant Configs. Be sure to 🌟 my repo to follow the updates!

Home Assistant Configuration Here's my Home Assistant configuration. I have installed HA on a Lenovo ThinkCentre M93P Tiny with an Intel Dual-Core i5-

iLyas Bakouch 25 Dec 30, 2022
emhass: Energy Management for Home Assistant

emhass EMHASS: Energy Management for Home Assistant Context This module was conceived as an energy management optimization tool for residential electr

David 70 Dec 24, 2022
E-Ink Magic Calendar that automatically syncs to Google Calendar and runs off a battery powered Raspberry Pi Zero

E-Ink Magic Calendar that automatically syncs to Google Calendar and runs off a battery powered Raspberry Pi Zero

2.8k Dec 30, 2022
A script for performing OTA update over BLE on ESP32

A script for performing OTA update over BLE on ESP32

Felix Biego 18 Dec 15, 2022
Controlling fireworks with micropython

Controlling-fireworks-with-micropython How the code works line 1-4 from machine

Montso Mokake 1 Jan 08, 2022