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.
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
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
Smart Tech Automation Remote via Kinematics Gesture control for IoT devices

STARK Smart Tech Automation Remote via Kinematics Gesture control for IoT devices View Demo · Report Bug · Request Feature Table of Contents About The

Juseong (Joe) Kim 1 Jan 29, 2022
A DUCO (Duino-Coin) miner for GigaDevice ARM boards.

GD32 Duino-Coin Miner Description Contains the firmware and miner software for mining DUCO (Duino-Coin) on GigaDevice GD32 chips. Supported boards GD3

Maximilian Gerhardt 2 Feb 20, 2022
Open source home automation that puts local control and privacy first.

Home Assistant Open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiast

Home Assistant 57k Jan 01, 2023
A Python program that makes it easy to manage modules on a CircuitPython device!

CircuitPython-Bundle-Manager-v2 A Python program that makes it easy to manage modules on a CircuitPython device! The CircuitPython Bundle Manager v2 i

Ckyiu 1 Dec 18, 2021
Baseline model for Augmented Home Assistant

Dataset Preparation Step 1. Rename the Virtual-Home output directory to 'vh.[name]', for example: 'vh.door' Make sure the directory contains 100+ fram

Stanford HCI 1 Aug 24, 2022
Micropython automatic watering

micropython-automatic-watering micropython automatic watering his code was developed to be used with nodemcu esp8266, but can be modified to work with

1 Nov 24, 2021
A python module for interacting with rolimon's, a roblox value site.

rpi - rolimon's python interaction rpi is an open source python-based rolimon's api wrapper. It provides an end-to-end pipeline in which each componen

Acier 11 Nov 08, 2022
PlatformIO development platform for GSM modules

PlatformIO development platform for GSM modules Supported Modules Quectel M66 OpenCPU Arduino - TODO other - in progress... Supported Boards Comet M66

Georgi Angelov 5 Aug 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
Skykettle ha - Redmond SkyKettle integration for Home Assistant

Redmond SkyKettle integration for Home Assistant This integration allows to cont

Alexey 'Cluster' Avdyukhin 48 Jan 06, 2023
Workshop for student hackathons focused on IoT dev

Scenario: The Mutt Matcher (IoT version) According to the World Health Organization there are more than 200 million stray dogs worldwide. The American

Microsoft 15 Aug 10, 2022
Used python functional programming to make this Ai assistant

Python-based-AI-Assistant I have used python functional programming to make this Ai assistant. Inspiration of project : we have seen in our daily life

Durgesh Kumar 2 Dec 26, 2021
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
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
GUI wrapper designed for convenient service work with TI CC1352/CC2538/CC2652 based Zigbee sticks or gateways. Packed into single executable file

ZigStar GW Multi tool is GUI wrapper firtsly designed for convenient service work with Zig Star LAN GW, but now supports any TI CC1352/CC2538/CC2652 b

133 Jan 01, 2023
Play music on Raspberry Pi Pico Without CPU involvement

MicroPython_PIO_Music_DMA Play music on Raspberry Pi Pico Without CPU involvement This is based on PIOBeep (https://github.com/benevpi/pico_pio_buzz)

3 Nov 27, 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
A python script to poll RPi GPIO pins and subscribe and publish their state via MQTT

MQTT-GPIO A python script to poll RPi GPIO pins and subscribe and publish their state via MQTT using TLS. This script is short and meant to be edited

23 Oct 12, 2021