mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-11-22 09:24:28 +03:00
New toolchain with gcc 12 (#3254)
* changes for xPack 12.3 * support for gcc 13.2 * Update tools name * Add new linux toolchain * Fixed copro submodule * Fix gdb-py * Fixes for c++ apps * Fix gdb-py3, add udev rules * Fixed udev rules location * Add MacOS arm, fix fbt toolchain download * Fixed downloading error file * fbt: fixed linker warnings; removed gcc 10 from list of supported toolchains * ufbt: fixed supported toolchain versions * nfc: replaced local malloc with calloc * restored code with Warray-bounds to older state * Update fbtenv.cmd * Suppressing warnings * Bump to 25 * Bump to 26 * lint: reformatted macros for new clang-format * Bump to 27 * Fix m type word * Bump to 28 * furi: added FURI_DEPRECATED macro * scripts: toolchain download on Windows: fixing partially extracted cases Co-authored-by: DrunkBatya <drunkbatya.js@gmail.com>
This commit is contained in:
parent
bcdb9cb13c
commit
14dabf523a
@ -2,6 +2,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
void test_furi_memmgr() {
|
||||
void* ptr;
|
||||
|
@ -10,7 +10,7 @@ enum SubmenuIndex {
|
||||
|
||||
static void nfc_scene_set_type_init_edit_data(Iso14443_3aData* data, size_t uid_len) {
|
||||
// Easiest way to create a zero'd buffer of given length
|
||||
uint8_t* uid = malloc(uid_len);
|
||||
uint8_t* uid = calloc(1, uid_len);
|
||||
iso14443_3a_set_uid(data, uid, uid_len);
|
||||
free(uid);
|
||||
}
|
||||
|
@ -40,6 +40,8 @@ ARRAY_DEF(SubGhzFrequencyAnalyzerLogItemArray, SubGhzFrequencyAnalyzerLogItem_t)
|
||||
ARRAY_OPLIST(SubGhzFrequencyAnalyzerLogItemArray, M_OPL_SubGhzFrequencyAnalyzerLogItem_t())
|
||||
ALGO_DEF(SubGhzFrequencyAnalyzerLogItemArray, SubGhzFrequencyAnalyzerLogItemArray_t)
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Warray-bounds"
|
||||
FUNC_OBJ_INS_DEF(
|
||||
SubGhzFrequencyAnalyzerLogItemArray_compare_by /* name of the instance */,
|
||||
SubGhzFrequencyAnalyzerLogItemArray_cmp_obj /* name of the interface */,
|
||||
@ -76,3 +78,4 @@ FUNC_OBJ_INS_DEF(
|
||||
(order_by, SubGhzFrequencyAnalyzerLogOrderBy))
|
||||
#define M_OPL_SubGhzFrequencyAnalyzerLogItemArray_compare_by_t() \
|
||||
FUNC_OBJ_INS_OPLIST(SubGhzFrequencyAnalyzerLogItemArray_compare_by, M_DEFAULT_OPLIST)
|
||||
#pragma GCC diagnostic pop
|
||||
|
@ -8,7 +8,7 @@
|
||||
#define DOLPHIN_LOCK_EVENT_FLAG (0x1)
|
||||
|
||||
#define TAG "Dolphin"
|
||||
#define HOURS_IN_TICKS(x) ((x)*60 * 60 * 1000)
|
||||
#define HOURS_IN_TICKS(x) ((x) * 60 * 60 * 1000)
|
||||
|
||||
static void dolphin_update_clear_limits_timer_period(Dolphin* dolphin);
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
#include "canvas_i.h"
|
||||
#include "icon_i.h"
|
||||
#include "icon_animation_i.h"
|
||||
|
||||
#include <furi.h>
|
||||
|
@ -122,7 +122,7 @@ void canvas_draw_u8g2_bitmap(
|
||||
uint8_t width,
|
||||
uint8_t height,
|
||||
const uint8_t* bitmap,
|
||||
uint8_t rotation);
|
||||
IconRotation rotation);
|
||||
|
||||
/** Add canvas commit callback.
|
||||
*
|
||||
@ -147,4 +147,4 @@ void canvas_remove_framebuffer_callback(
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
@ -395,9 +395,12 @@ static void rpc_system_storage_read_process(const PB_Main* request, void* contex
|
||||
|
||||
response->has_next = fs_operation_success && (size_left > 0);
|
||||
} else {
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Warray-bounds"
|
||||
response->content.storage_read_response.file.data =
|
||||
malloc(PB_BYTES_ARRAY_T_ALLOCSIZE(0));
|
||||
response->content.storage_read_response.file.data->size = 0;
|
||||
#pragma GCC diagnostic pop
|
||||
response->content.storage_read_response.has_file = true;
|
||||
response->has_next = false;
|
||||
fs_operation_success = true;
|
||||
|
@ -38,7 +38,8 @@ COPRO_STACK_ADDR = "0x0"
|
||||
COPRO_STACK_BIN_DIR = posixpath.join(COPRO_CUBE_DIR, "firmware")
|
||||
|
||||
# Supported toolchain versions
|
||||
FBT_TOOLCHAIN_VERSIONS = (" 10.3.",)
|
||||
# Also specify in scripts/ufbt/SConstruct
|
||||
FBT_TOOLCHAIN_VERSIONS = (" 12.3.", " 13.2.")
|
||||
|
||||
OPENOCD_OPTS = [
|
||||
"-f",
|
||||
|
@ -13,6 +13,10 @@ extern "C" {
|
||||
#define FURI_WARN_UNUSED __attribute__((warn_unused_result))
|
||||
#endif
|
||||
|
||||
#ifndef FURI_DEPRECATED
|
||||
#define FURI_DEPRECATED __attribute__((deprecated))
|
||||
#endif
|
||||
|
||||
#ifndef FURI_WEAK
|
||||
#define FURI_WEAK __attribute__((weak))
|
||||
#endif
|
||||
|
@ -84,9 +84,9 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef REVERSE_BYTES_U32
|
||||
#define REVERSE_BYTES_U32(x) \
|
||||
((((x)&0x000000FF) << 24) | (((x)&0x0000FF00) << 8) | (((x)&0x00FF0000) >> 8) | \
|
||||
(((x)&0xFF000000) >> 24))
|
||||
#define REVERSE_BYTES_U32(x) \
|
||||
((((x) & 0x000000FF) << 24) | (((x) & 0x0000FF00) << 8) | (((x) & 0x00FF0000) >> 8) | \
|
||||
(((x) & 0xFF000000) >> 24))
|
||||
#endif
|
||||
|
||||
#ifndef FURI_BIT
|
||||
|
@ -26,19 +26,20 @@
|
||||
*tmp_x = y; \
|
||||
*tmp_x; \
|
||||
})
|
||||
#define FURI_CONST_ASSIGN(x, y) \
|
||||
_Generic((x), signed char \
|
||||
: FURI_CONST_ASSIGN_(signed char, x, y), unsigned char \
|
||||
: FURI_CONST_ASSIGN_(unsigned char, x, y), short \
|
||||
: FURI_CONST_ASSIGN_(short, x, y), unsigned short \
|
||||
: FURI_CONST_ASSIGN_(unsigned short, x, y), int \
|
||||
: FURI_CONST_ASSIGN_(int, x, y), unsigned \
|
||||
: FURI_CONST_ASSIGN_(unsigned, x, y), long \
|
||||
: FURI_CONST_ASSIGN_(long, x, y), unsigned long \
|
||||
: FURI_CONST_ASSIGN_(unsigned long, x, y), long long \
|
||||
: FURI_CONST_ASSIGN_(long long, x, y), unsigned long long \
|
||||
: FURI_CONST_ASSIGN_(unsigned long long, x, y), float \
|
||||
: FURI_CONST_ASSIGN_(float, x, y), double \
|
||||
: FURI_CONST_ASSIGN_(double, x, y), long double \
|
||||
: FURI_CONST_ASSIGN_(long double, x, y))
|
||||
#define FURI_CONST_ASSIGN(x, y) \
|
||||
_Generic( \
|
||||
(x), \
|
||||
signed char: FURI_CONST_ASSIGN_(signed char, x, y), \
|
||||
unsigned char: FURI_CONST_ASSIGN_(unsigned char, x, y), \
|
||||
short: FURI_CONST_ASSIGN_(short, x, y), \
|
||||
unsigned short: FURI_CONST_ASSIGN_(unsigned short, x, y), \
|
||||
int: FURI_CONST_ASSIGN_(int, x, y), \
|
||||
unsigned: FURI_CONST_ASSIGN_(unsigned, x, y), \
|
||||
long: FURI_CONST_ASSIGN_(long, x, y), \
|
||||
unsigned long: FURI_CONST_ASSIGN_(unsigned long, x, y), \
|
||||
long long: FURI_CONST_ASSIGN_(long long, x, y), \
|
||||
unsigned long long: FURI_CONST_ASSIGN_(unsigned long long, x, y), \
|
||||
float: FURI_CONST_ASSIGN_(float, x, y), \
|
||||
double: FURI_CONST_ASSIGN_(double, x, y), \
|
||||
long double: FURI_CONST_ASSIGN_(long double, x, y))
|
||||
#endif
|
||||
|
@ -568,26 +568,30 @@ void furi_string_utf8_decode(char c, FuriStringUTF8State* state, FuriStringUnico
|
||||
/**
|
||||
* @brief Select for 1 argument
|
||||
*/
|
||||
#define FURI_STRING_SELECT1(func1, func2, a) \
|
||||
_Generic((a), char* : func2, const char* : func2, FuriString* : func1, const FuriString* : func1)(a)
|
||||
#define FURI_STRING_SELECT1(func1, func2, a) \
|
||||
_Generic((a), char*: func2, const char*: func2, FuriString*: func1, const FuriString*: func1)( \
|
||||
a)
|
||||
|
||||
/**
|
||||
* @brief Select for 2 arguments
|
||||
*/
|
||||
#define FURI_STRING_SELECT2(func1, func2, a, b) \
|
||||
_Generic((b), char* : func2, const char* : func2, FuriString* : func1, const FuriString* : func1)(a, b)
|
||||
#define FURI_STRING_SELECT2(func1, func2, a, b) \
|
||||
_Generic((b), char*: func2, const char*: func2, FuriString*: func1, const FuriString*: func1)( \
|
||||
a, b)
|
||||
|
||||
/**
|
||||
* @brief Select for 3 arguments
|
||||
*/
|
||||
#define FURI_STRING_SELECT3(func1, func2, a, b, c) \
|
||||
_Generic((b), char* : func2, const char* : func2, FuriString* : func1, const FuriString* : func1)(a, b, c)
|
||||
#define FURI_STRING_SELECT3(func1, func2, a, b, c) \
|
||||
_Generic((b), char*: func2, const char*: func2, FuriString*: func1, const FuriString*: func1)( \
|
||||
a, b, c)
|
||||
|
||||
/**
|
||||
* @brief Select for 4 arguments
|
||||
*/
|
||||
#define FURI_STRING_SELECT4(func1, func2, a, b, c, d) \
|
||||
_Generic((b), char* : func2, const char* : func2, FuriString* : func1, const FuriString* : func1)(a, b, c, d)
|
||||
#define FURI_STRING_SELECT4(func1, func2, a, b, c, d) \
|
||||
_Generic((b), char*: func2, const char*: func2, FuriString*: func1, const FuriString*: func1)( \
|
||||
a, b, c, d)
|
||||
|
||||
/**
|
||||
* @brief Allocate new FuriString and set it content to string (or C string).
|
||||
|
@ -26,9 +26,9 @@ extern "C" {
|
||||
// DigitalSignal uses 10 picosecond time units (1 tick = 10 ps).
|
||||
// Use the macros below to convert the time from other units.
|
||||
|
||||
#define DIGITAL_SIGNAL_MS(x) ((x)*100000000UL)
|
||||
#define DIGITAL_SIGNAL_US(x) ((x)*100000UL)
|
||||
#define DIGITAL_SIGNAL_NS(x) ((x)*100UL)
|
||||
#define DIGITAL_SIGNAL_MS(x) ((x) * 100000000UL)
|
||||
#define DIGITAL_SIGNAL_US(x) ((x) * 100000UL)
|
||||
#define DIGITAL_SIGNAL_NS(x) ((x) * 100UL)
|
||||
#define DIGITAL_SIGNAL_PS(x) ((x) / 10UL)
|
||||
|
||||
typedef struct DigitalSignal DigitalSignal;
|
||||
|
@ -11,7 +11,7 @@ extern "C" {
|
||||
#define ISO14443_3A_POLLER_MAX_BUFFER_SIZE (512U)
|
||||
|
||||
#define ISO14443_3A_POLLER_SEL_CMD(cascade_lvl) (0x93 + 2 * (cascade_lvl))
|
||||
#define ISO14443_3A_POLLER_SEL_PAR(bytes, bits) (((bytes) << 4 & 0xf0U) | ((bits)&0x0fU))
|
||||
#define ISO14443_3A_POLLER_SEL_PAR(bytes, bits) (((bytes) << 4 & 0xf0U) | ((bits) & 0x0fU))
|
||||
#define ISO14443_3A_POLLER_SDD_CL (0x88U)
|
||||
|
||||
typedef enum {
|
||||
|
@ -6,7 +6,7 @@
|
||||
// Algorithm from https://github.com/RfidResearchGroup/proxmark3.git
|
||||
|
||||
#define SWAPENDIAN(x) \
|
||||
((x) = ((x) >> 8 & 0xff00ff) | ((x)&0xff00ff) << 8, (x) = (x) >> 16 | (x) << 16)
|
||||
((x) = ((x) >> 8 & 0xff00ff) | ((x) & 0xff00ff) << 8, (x) = (x) >> 16 | (x) << 16)
|
||||
#define LF_POLY_ODD (0x29CE5C)
|
||||
#define LF_POLY_EVEN (0x870804)
|
||||
|
||||
|
@ -212,8 +212,8 @@ uint32_t pulse_reader_receive(PulseReader* signal, int timeout_us) {
|
||||
|
||||
/* probably larger values, so choose a wider data type */
|
||||
if(signal->unit_divider > 1) {
|
||||
delta_unit =
|
||||
(uint32_t)((uint64_t)delta * (uint64_t)signal->unit_multiplier / signal->unit_divider);
|
||||
delta_unit = (uint32_t)((uint64_t)delta * (uint64_t)signal->unit_multiplier /
|
||||
signal->unit_divider);
|
||||
} else {
|
||||
delta_unit = delta * signal->unit_multiplier;
|
||||
}
|
||||
|
@ -688,8 +688,8 @@ uint8_t u8x8_byte_sed1520(u8x8_t* u8x8, uint8_t msg, uint8_t arg_int, void* arg_
|
||||
|
||||
#define U8X8_MSG_GPIO(x) (64 + (x))
|
||||
#ifdef U8X8_USE_PINS
|
||||
#define u8x8_GetPinIndex(u8x8, msg) ((msg)&0x3f)
|
||||
#define u8x8_GetPinValue(u8x8, msg) ((u8x8)->pins[(msg)&0x3f])
|
||||
#define u8x8_GetPinIndex(u8x8, msg) ((msg) & 0x3f)
|
||||
#define u8x8_GetPinValue(u8x8, msg) ((u8x8)->pins[(msg) & 0x3f])
|
||||
#endif
|
||||
|
||||
#define U8X8_MSG_GPIO_D0 U8X8_MSG_GPIO(U8X8_PIN_D0)
|
||||
|
10
scripts/debug/41-udev.rules
Normal file
10
scripts/debug/41-udev.rules
Normal file
@ -0,0 +1,10 @@
|
||||
#Flipper Zero serial port
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5740", ATTRS{manufacturer}=="Flipper Devices Inc.", TAG+="uaccess", GROUP="dialout"
|
||||
#Flipper Zero DFU
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", ATTRS{manufacturer}=="STMicroelectronics", TAG+="uaccess", GROUP="dialout"
|
||||
#Flipper ESP32s2 BlackMagic
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="303a", ATTRS{idProduct}=="40??", ATTRS{manufacturer}=="Flipper Devices Inc.", TAG+="uaccess", GROUP="dialout"
|
||||
#Flipper U2F
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5741", ATTRS{manufacturer}=="Flipper Devices Inc.", ENV{ID_SECURITY_TOKEN}="1"
|
||||
#ST-Link-V3
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="37??", ATTRS{manufacturer}=="STMicroelectronics", TAG+="uaccess", GROUP="dialout"
|
@ -1,7 +1,7 @@
|
||||
def generate(env):
|
||||
env.SetDefault(
|
||||
GDB="gdb",
|
||||
GDBPY="gdb-py",
|
||||
GDBPY="gdb-py3",
|
||||
GDBCOM="$GDB $GDBOPTS $SOURCES", # no $TARGET
|
||||
GDBPYCOM="$GDBPY $GDBOPTS $GDBPYOPTS $SOURCES", # no $TARGET
|
||||
)
|
||||
|
@ -13,7 +13,7 @@ if not ["%FBT_NOENV%"] == [""] (
|
||||
exit /b 0
|
||||
)
|
||||
|
||||
set "FLIPPER_TOOLCHAIN_VERSION=23"
|
||||
set "FLIPPER_TOOLCHAIN_VERSION=28"
|
||||
|
||||
if ["%FBT_TOOLCHAIN_PATH%"] == [""] (
|
||||
set "FBT_TOOLCHAIN_PATH=%FBT_ROOT%"
|
||||
@ -46,7 +46,7 @@ set "HOME=%USERPROFILE%"
|
||||
set "PYTHONHOME=%FBT_TOOLCHAIN_ROOT%\python"
|
||||
set "PYTHONPATH="
|
||||
set "PYTHONNOUSERSITE=1"
|
||||
set "PATH=%FBT_TOOLCHAIN_ROOT%\python;%FBT_TOOLCHAIN_ROOT%\bin;%FBT_TOOLCHAIN_ROOT%\protoc\bin;%FBT_TOOLCHAIN_ROOT%\openocd\bin;%PATH%"
|
||||
set "PATH=%FBT_TOOLCHAIN_ROOT%\bin;%FBT_TOOLCHAIN_ROOT%\python;%PATH%"
|
||||
set "PROMPT=(fbt) %PROMPT%"
|
||||
|
||||
:already_set
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
# public variables
|
||||
DEFAULT_SCRIPT_PATH="$(pwd -P)";
|
||||
FBT_TOOLCHAIN_VERSION="${FBT_TOOLCHAIN_VERSION:-"23"}";
|
||||
FBT_TOOLCHAIN_VERSION="${FBT_TOOLCHAIN_VERSION:-"28"}";
|
||||
|
||||
if [ -z ${FBT_TOOLCHAIN_PATH+x} ] ; then
|
||||
FBT_TOOLCHAIN_PATH_WAS_SET=0;
|
||||
@ -27,7 +27,7 @@ fbtenv_show_usage()
|
||||
|
||||
fbtenv_curl()
|
||||
{
|
||||
curl --progress-bar -SLo "$1" "$2";
|
||||
curl --progress-bar -SLo "$1" "$2" -w "%{http_code}" | grep -q 200;
|
||||
}
|
||||
|
||||
fbtenv_wget()
|
||||
@ -38,11 +38,7 @@ fbtenv_wget()
|
||||
fbtenv_restore_env()
|
||||
{
|
||||
TOOLCHAIN_ARCH_DIR_SED="$(echo "$TOOLCHAIN_ARCH_DIR" | sed 's/\//\\\//g')"
|
||||
PATH="$(echo "$PATH" | sed "s/$TOOLCHAIN_ARCH_DIR_SED\/python\/bin://g")";
|
||||
PATH="$(echo "$PATH" | sed "s/$TOOLCHAIN_ARCH_DIR_SED\/bin://g")";
|
||||
PATH="$(echo "$PATH" | sed "s/$TOOLCHAIN_ARCH_DIR_SED\/protobuf\/bin://g")";
|
||||
PATH="$(echo "$PATH" | sed "s/$TOOLCHAIN_ARCH_DIR_SED\/openocd\/bin://g")";
|
||||
PATH="$(echo "$PATH" | sed "s/$TOOLCHAIN_ARCH_DIR_SED\/openssl\/bin://g")";
|
||||
if [ -n "${PS1:-""}" ]; then
|
||||
PS1="$(echo "$PS1" | sed 's/\[fbt\]//g')";
|
||||
elif [ -n "${PROMPT:-""}" ]; then
|
||||
@ -57,7 +53,7 @@ fbtenv_restore_env()
|
||||
unset REQUESTS_CA_BUNDLE;
|
||||
fi
|
||||
|
||||
if [ "$SYS_TYPE" = "Linux" ]; then
|
||||
if [ "$SYS_TYPE" = "linux" ]; then
|
||||
if [ -n "$SAVED_TERMINFO_DIRS" ]; then
|
||||
export TERMINFO_DIRS="$SAVED_TERMINFO_DIRS";
|
||||
else
|
||||
@ -135,38 +131,17 @@ fbtenv_check_env_vars()
|
||||
|
||||
fbtenv_get_kernel_type()
|
||||
{
|
||||
SYS_TYPE="$(uname -s)";
|
||||
SYS_TYPE="$(uname -s | tr '[:upper:]' '[:lower:]')";
|
||||
ARCH_TYPE="$(uname -m)";
|
||||
if [ "$ARCH_TYPE" != "x86_64" ] && [ "$SYS_TYPE" != "Darwin" ]; then
|
||||
echo "We only provide toolchain for x86_64 CPUs, sorry..";
|
||||
return 1;
|
||||
fi
|
||||
if [ "$SYS_TYPE" = "Darwin" ]; then
|
||||
fbtenv_check_rosetta || return 1;
|
||||
TOOLCHAIN_ARCH_DIR="$FBT_TOOLCHAIN_PATH/toolchain/x86_64-darwin";
|
||||
TOOLCHAIN_URL="https://update.flipperzero.one/builds/toolchain/gcc-arm-none-eabi-10.3-x86_64-darwin-flipper-$FBT_TOOLCHAIN_VERSION.tar.gz";
|
||||
elif [ "$SYS_TYPE" = "Linux" ]; then
|
||||
TOOLCHAIN_ARCH_DIR="$FBT_TOOLCHAIN_PATH/toolchain/x86_64-linux";
|
||||
TOOLCHAIN_URL="https://update.flipperzero.one/builds/toolchain/gcc-arm-none-eabi-10.3-x86_64-linux-flipper-$FBT_TOOLCHAIN_VERSION.tar.gz";
|
||||
elif echo "$SYS_TYPE" | grep -q "MINGW"; then
|
||||
if echo "$SYS_TYPE" | grep -q "MINGW"; then
|
||||
echo "In MinGW shell, use \"[u]fbt.cmd\" instead of \"[u]fbt\"";
|
||||
return 1;
|
||||
else
|
||||
elif [ $SYS_TYPE != "linux" ] && [ $SYS_TYPE != "darwin" ]; then
|
||||
echo "Your system configuration is not supported. Sorry.. Please report us your configuration.";
|
||||
return 1;
|
||||
fi
|
||||
return 0;
|
||||
}
|
||||
|
||||
fbtenv_check_rosetta()
|
||||
{
|
||||
if [ "$ARCH_TYPE" = "arm64" ]; then
|
||||
if ! pgrep -q oahd; then
|
||||
echo "Flipper Zero Toolchain needs Rosetta2 to run under Apple Silicon";
|
||||
echo "Please install it by typing 'softwareupdate --install-rosetta --agree-to-license'";
|
||||
return 1;
|
||||
fi
|
||||
fi
|
||||
TOOLCHAIN_ARCH_DIR="$FBT_TOOLCHAIN_PATH/toolchain/$ARCH_TYPE-$SYS_TYPE";
|
||||
TOOLCHAIN_URL="https://update.flipperzero.one/builds/toolchain/gcc-arm-none-eabi-12.3-$ARCH_TYPE-$SYS_TYPE-flipper-$FBT_TOOLCHAIN_VERSION.tar.gz";
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -196,7 +171,10 @@ fbtenv_download_toolchain_tar()
|
||||
{
|
||||
echo "Downloading toolchain:";
|
||||
mkdir -p "$FBT_TOOLCHAIN_PATH/toolchain" || return 1;
|
||||
"$FBT_DOWNLOADER" "$FBT_TOOLCHAIN_PATH/toolchain/$TOOLCHAIN_TAR.part" "$TOOLCHAIN_URL" || return 1;
|
||||
"$FBT_DOWNLOADER" "$FBT_TOOLCHAIN_PATH/toolchain/$TOOLCHAIN_TAR.part" "$TOOLCHAIN_URL" || {
|
||||
echo "Failed to download $TOOLCHAIN_URL";
|
||||
return 1;
|
||||
};
|
||||
# restoring oroginal filename if file downloaded successfully
|
||||
mv "$FBT_TOOLCHAIN_PATH/toolchain/$TOOLCHAIN_TAR.part" "$FBT_TOOLCHAIN_PATH/toolchain/$TOOLCHAIN_TAR"
|
||||
echo "done";
|
||||
@ -328,11 +306,7 @@ fbtenv_main()
|
||||
fbtenv_check_download_toolchain || return 1;
|
||||
fbtenv_set_shell_prompt;
|
||||
fbtenv_print_config;
|
||||
PATH="$TOOLCHAIN_ARCH_DIR/python/bin:$PATH";
|
||||
PATH="$TOOLCHAIN_ARCH_DIR/bin:$PATH";
|
||||
PATH="$TOOLCHAIN_ARCH_DIR/protobuf/bin:$PATH";
|
||||
PATH="$TOOLCHAIN_ARCH_DIR/openocd/bin:$PATH";
|
||||
PATH="$TOOLCHAIN_ARCH_DIR/openssl/bin:$PATH";
|
||||
export PATH;
|
||||
|
||||
export SAVED_SSL_CERT_FILE="${SSL_CERT_FILE:-""}";
|
||||
@ -341,15 +315,15 @@ fbtenv_main()
|
||||
export SAVED_PYTHONPATH="${PYTHONPATH:-""}";
|
||||
export SAVED_PYTHONHOME="${PYTHONHOME:-""}";
|
||||
|
||||
export SSL_CERT_FILE="$TOOLCHAIN_ARCH_DIR/python/lib/python3.11/site-packages/certifi/cacert.pem";
|
||||
export SSL_CERT_FILE="$TOOLCHAIN_ARCH_DIR/lib/python3.11/site-packages/certifi/cacert.pem";
|
||||
export REQUESTS_CA_BUNDLE="$SSL_CERT_FILE";
|
||||
export PYTHONNOUSERSITE=1;
|
||||
export PYTHONPATH=;
|
||||
export PYTHONHOME=;
|
||||
|
||||
if [ "$SYS_TYPE" = "Linux" ]; then
|
||||
if [ "$SYS_TYPE" = "linux" ]; then
|
||||
export SAVED_TERMINFO_DIRS="${TERMINFO_DIRS:-""}";
|
||||
export TERMINFO_DIRS="$TOOLCHAIN_ARCH_DIR/ncurses/share/terminfo";
|
||||
export TERMINFO_DIRS="$TOOLCHAIN_ARCH_DIR/share/terminfo";
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -6,8 +6,8 @@ $download_dir = (Get-Item "$PSScriptRoot\..\..").FullName
|
||||
$toolchain_version = $args[0]
|
||||
$toolchain_target_path = $args[1]
|
||||
|
||||
$toolchain_url = "https://update.flipperzero.one/builds/toolchain/gcc-arm-none-eabi-10.3-x86_64-windows-flipper-$toolchain_version.zip"
|
||||
$toolchain_dist_folder = "gcc-arm-none-eabi-10.3-x86_64-windows-flipper"
|
||||
$toolchain_url = "https://update.flipperzero.one/builds/toolchain/gcc-arm-none-eabi-12.3-x86_64-windows-flipper-$toolchain_version.zip"
|
||||
$toolchain_dist_folder = "gcc-arm-none-eabi-12.3-x86_64-windows-flipper"
|
||||
$toolchain_zip = "$toolchain_dist_folder-$toolchain_version.zip"
|
||||
|
||||
$toolchain_zip_temp_path = "$download_dir\$toolchain_zip"
|
||||
@ -29,6 +29,11 @@ if (!(Test-Path -LiteralPath "$toolchain_target_path\..")) {
|
||||
New-Item "$toolchain_target_path\.." -ItemType Directory -Force
|
||||
}
|
||||
|
||||
if (Test-Path -LiteralPath "$toolchain_dist_temp_path") {
|
||||
Write-Host "Cleaning up temp toolchain path.."
|
||||
Remove-Item -LiteralPath "$toolchain_dist_temp_path" -Force -Recurse
|
||||
}
|
||||
|
||||
Write-Host -NoNewline "Extracting Windows toolchain.."
|
||||
# This is faster than Expand-Archive
|
||||
Add-Type -Assembly "System.IO.Compression.Filesystem"
|
||||
|
@ -74,7 +74,7 @@ env = core_env.Clone(
|
||||
"crosscc",
|
||||
{
|
||||
"toolchain_prefix": "arm-none-eabi-",
|
||||
"versions": (" 10.3",),
|
||||
"versions": (" 12.3.", " 13.2."),
|
||||
},
|
||||
),
|
||||
"fwbin",
|
||||
@ -361,7 +361,7 @@ for template_file in project_template_dir.Dir(".vscode").glob("*"):
|
||||
dist_env.WhereIs("arm-none-eabi-gcc")
|
||||
),
|
||||
"@UFBT_TOOLCHAIN_GDB_PY@": _path_as_posix(
|
||||
dist_env.WhereIs("arm-none-eabi-gdb-py")
|
||||
dist_env.WhereIs("arm-none-eabi-gdb-py3")
|
||||
),
|
||||
"@UFBT_TOOLCHAIN_OPENOCD@": _path_as_posix(dist_env.WhereIs("openocd")),
|
||||
"@UFBT_APP_DIR@": _path_as_posix(original_app_dir.abspath),
|
||||
|
@ -23,6 +23,7 @@ ENV.AppendUnique(
|
||||
"-Wall",
|
||||
"-Wextra",
|
||||
"-Werror",
|
||||
"-Wno-error=deprecated-declarations",
|
||||
"-Wno-address-of-packed-member",
|
||||
"-Wredundant-decls",
|
||||
"-Wdouble-promotion",
|
||||
@ -44,5 +45,6 @@ ENV.AppendUnique(
|
||||
"-mfpu=fpv4-sp-d16",
|
||||
"-mlittle-endian",
|
||||
"-mthumb",
|
||||
"-Wl,--no-warn-rwx-segment",
|
||||
],
|
||||
)
|
||||
|
@ -41,7 +41,6 @@ appenv.AppendUnique(
|
||||
"-Xlinker",
|
||||
"-Map=${TARGET}.map",
|
||||
"-specs=nano.specs",
|
||||
"-specs=nosys.specs",
|
||||
],
|
||||
LIBS=[
|
||||
"m",
|
||||
|
@ -35,7 +35,6 @@ else:
|
||||
ENV.AppendUnique(
|
||||
LINKFLAGS=[
|
||||
"-specs=nano.specs",
|
||||
"-specs=nosys.specs",
|
||||
"-Wl,--gc-sections",
|
||||
"-Wl,--undefined=uxTopUsedPriority",
|
||||
"-Wl,--wrap,_malloc_r",
|
||||
|
@ -1,5 +1,5 @@
|
||||
entry,status,name,type,params
|
||||
Version,+,54.0,,
|
||||
Version,+,55.0,,
|
||||
Header,+,applications/services/bt/bt_service/bt.h,,
|
||||
Header,+,applications/services/cli/cli.h,,
|
||||
Header,+,applications/services/cli/cli_vcp.h,,
|
||||
@ -176,6 +176,7 @@ Header,+,targets/f7/furi_hal/furi_hal_serial_control.h,,
|
||||
Header,+,targets/f7/furi_hal/furi_hal_serial_types.h,,
|
||||
Header,+,targets/f7/furi_hal/furi_hal_spi_types.h,,
|
||||
Header,+,targets/f7/furi_hal/furi_hal_usb_cdc.h,,
|
||||
Header,+,targets/f7/platform_specific/cxx_virtual_stub.h,,
|
||||
Header,+,targets/f7/platform_specific/intrinsic_export.h,,
|
||||
Header,+,targets/f7/platform_specific/math_wrapper.h,,
|
||||
Header,+,targets/furi_hal_include/furi_hal.h,,
|
||||
@ -306,6 +307,7 @@ Function,+,__aeabi_uldivmod,void*,"uint64_t, uint64_t"
|
||||
Function,-,__assert,void,"const char*, int, const char*"
|
||||
Function,+,__assert_func,void,"const char*, int, const char*, const char*"
|
||||
Function,+,__clear_cache,void,"void*, void*"
|
||||
Function,+,__cxa_pure_virtual,void,
|
||||
Function,-,__eprintf,void,"const char*, const char*, unsigned int, const char*"
|
||||
Function,+,__errno,int*,
|
||||
Function,-,__fpclassifyd,int,double
|
||||
@ -393,6 +395,7 @@ Function,-,_fsetpos_r,int,"_reent*, FILE*, const fpos_t*"
|
||||
Function,-,_ftell_r,long,"_reent*, FILE*"
|
||||
Function,-,_ftello_r,_off_t,"_reent*, FILE*"
|
||||
Function,-,_funopen_r,FILE*,"_reent*, const void*, int (*)(void*, char*, int), int (*)(void*, const char*, int), fpos_t (*)(void*, fpos_t, int), int (*)(void*)"
|
||||
Function,-,_fwalk_sglue,int,"_reent*, int (*)(_reent*, __FILE*), _glue*"
|
||||
Function,-,_fwrite_r,size_t,"_reent*, const void*, size_t, size_t, FILE*"
|
||||
Function,-,_fwrite_unlocked_r,size_t,"_reent*, const void*, size_t, size_t, FILE*"
|
||||
Function,-,_getc_r,int,"_reent*, FILE*"
|
||||
@ -2062,7 +2065,6 @@ Function,+,protocol_dict_get_write_data,_Bool,"ProtocolDict*, size_t, void*"
|
||||
Function,+,protocol_dict_render_brief_data,void,"ProtocolDict*, FuriString*, size_t"
|
||||
Function,+,protocol_dict_render_data,void,"ProtocolDict*, FuriString*, size_t"
|
||||
Function,+,protocol_dict_set_data,void,"ProtocolDict*, size_t, const uint8_t*, size_t"
|
||||
Function,-,pselect,int,"int, fd_set*, fd_set*, fd_set*, const timespec*, const sigset_t*"
|
||||
Function,-,pulse_reader_alloc,PulseReader*,"const GpioPin*, uint32_t"
|
||||
Function,-,pulse_reader_free,void,PulseReader*
|
||||
Function,-,pulse_reader_receive,uint32_t,"PulseReader*, int"
|
||||
@ -2153,7 +2155,6 @@ Function,+,scene_manager_stop,void,SceneManager*
|
||||
Function,+,sd_api_get_fs_type_text,const char*,SDFsType
|
||||
Function,-,secure_getenv,char*,const char*
|
||||
Function,-,seed48,unsigned short*,unsigned short[3]
|
||||
Function,-,select,int,"int, fd_set*, fd_set*, fd_set*, timeval*"
|
||||
Function,-,serial_svc_is_started,_Bool,
|
||||
Function,-,serial_svc_notify_buffer_is_empty,void,
|
||||
Function,-,serial_svc_set_callbacks,void,"uint16_t, SerialServiceEventCallback, void*"
|
||||
@ -2563,8 +2564,13 @@ Variable,-,ITM_RxBuffer,volatile int32_t,
|
||||
Variable,-,MSIRangeTable,const uint32_t[16],
|
||||
Variable,-,SmpsPrescalerTable,const uint32_t[4][6],
|
||||
Variable,+,SystemCoreClock,uint32_t,
|
||||
Variable,-,__atexit,_atexit*,
|
||||
Variable,-,__atexit0,_atexit,
|
||||
Variable,-,__sf,__FILE[3],
|
||||
Variable,-,__sglue,_glue,
|
||||
Variable,-,__stdio_exit_handler,void (*)(),
|
||||
Variable,+,_ctype_,const char[],
|
||||
Variable,+,_global_impure_ptr,_reent*,
|
||||
Variable,+,_impure_data,_reent,
|
||||
Variable,+,_impure_ptr,_reent*,
|
||||
Variable,-,_sys_errlist,const char*[],
|
||||
Variable,-,_sys_nerr,int,
|
||||
|
|
@ -1,5 +1,5 @@
|
||||
entry,status,name,type,params
|
||||
Version,+,54.0,,
|
||||
Version,+,55.0,,
|
||||
Header,+,applications/drivers/subghz/cc1101_ext/cc1101_ext_interconnect.h,,
|
||||
Header,+,applications/services/bt/bt_service/bt.h,,
|
||||
Header,+,applications/services/cli/cli.h,,
|
||||
@ -243,6 +243,7 @@ Header,+,targets/f7/furi_hal/furi_hal_spi_types.h,,
|
||||
Header,+,targets/f7/furi_hal/furi_hal_subghz.h,,
|
||||
Header,+,targets/f7/furi_hal/furi_hal_target_hw.h,,
|
||||
Header,+,targets/f7/furi_hal/furi_hal_usb_cdc.h,,
|
||||
Header,+,targets/f7/platform_specific/cxx_virtual_stub.h,,
|
||||
Header,+,targets/f7/platform_specific/intrinsic_export.h,,
|
||||
Header,+,targets/f7/platform_specific/math_wrapper.h,,
|
||||
Header,+,targets/furi_hal_include/furi_hal.h,,
|
||||
@ -375,6 +376,7 @@ Function,+,__aeabi_uldivmod,void*,"uint64_t, uint64_t"
|
||||
Function,-,__assert,void,"const char*, int, const char*"
|
||||
Function,+,__assert_func,void,"const char*, int, const char*, const char*"
|
||||
Function,+,__clear_cache,void,"void*, void*"
|
||||
Function,+,__cxa_pure_virtual,void,
|
||||
Function,-,__eprintf,void,"const char*, const char*, unsigned int, const char*"
|
||||
Function,+,__errno,int*,
|
||||
Function,-,__fpclassifyd,int,double
|
||||
@ -462,6 +464,7 @@ Function,-,_fsetpos_r,int,"_reent*, FILE*, const fpos_t*"
|
||||
Function,-,_ftell_r,long,"_reent*, FILE*"
|
||||
Function,-,_ftello_r,_off_t,"_reent*, FILE*"
|
||||
Function,-,_funopen_r,FILE*,"_reent*, const void*, int (*)(void*, char*, int), int (*)(void*, const char*, int), fpos_t (*)(void*, fpos_t, int), int (*)(void*)"
|
||||
Function,-,_fwalk_sglue,int,"_reent*, int (*)(_reent*, __FILE*), _glue*"
|
||||
Function,-,_fwrite_r,size_t,"_reent*, const void*, size_t, size_t, FILE*"
|
||||
Function,-,_fwrite_unlocked_r,size_t,"_reent*, const void*, size_t, size_t, FILE*"
|
||||
Function,-,_getc_r,int,"_reent*, FILE*"
|
||||
@ -2646,7 +2649,6 @@ Function,+,protocol_dict_get_write_data,_Bool,"ProtocolDict*, size_t, void*"
|
||||
Function,+,protocol_dict_render_brief_data,void,"ProtocolDict*, FuriString*, size_t"
|
||||
Function,+,protocol_dict_render_data,void,"ProtocolDict*, FuriString*, size_t"
|
||||
Function,+,protocol_dict_set_data,void,"ProtocolDict*, size_t, const uint8_t*, size_t"
|
||||
Function,-,pselect,int,"int, fd_set*, fd_set*, fd_set*, const timespec*, const sigset_t*"
|
||||
Function,-,pulse_reader_alloc,PulseReader*,"const GpioPin*, uint32_t"
|
||||
Function,-,pulse_reader_free,void,PulseReader*
|
||||
Function,-,pulse_reader_receive,uint32_t,"PulseReader*, int"
|
||||
@ -2737,7 +2739,6 @@ Function,+,scene_manager_stop,void,SceneManager*
|
||||
Function,+,sd_api_get_fs_type_text,const char*,SDFsType
|
||||
Function,-,secure_getenv,char*,const char*
|
||||
Function,-,seed48,unsigned short*,unsigned short[3]
|
||||
Function,-,select,int,"int, fd_set*, fd_set*, fd_set*, timeval*"
|
||||
Function,-,serial_svc_is_started,_Bool,
|
||||
Function,-,serial_svc_notify_buffer_is_empty,void,
|
||||
Function,-,serial_svc_set_callbacks,void,"uint16_t, SerialServiceEventCallback, void*"
|
||||
@ -3347,8 +3348,13 @@ Variable,-,ITM_RxBuffer,volatile int32_t,
|
||||
Variable,-,MSIRangeTable,const uint32_t[16],
|
||||
Variable,-,SmpsPrescalerTable,const uint32_t[4][6],
|
||||
Variable,+,SystemCoreClock,uint32_t,
|
||||
Variable,-,__atexit,_atexit*,
|
||||
Variable,-,__atexit0,_atexit,
|
||||
Variable,-,__sf,__FILE[3],
|
||||
Variable,-,__sglue,_glue,
|
||||
Variable,-,__stdio_exit_handler,void (*)(),
|
||||
Variable,+,_ctype_,const char[],
|
||||
Variable,+,_global_impure_ptr,_reent*,
|
||||
Variable,+,_impure_data,_reent,
|
||||
Variable,+,_impure_ptr,_reent*,
|
||||
Variable,-,_sys_errlist,const char*[],
|
||||
Variable,-,_sys_nerr,int,
|
||||
|
|
@ -11,7 +11,7 @@
|
||||
#define FAST_ADV_TIMEOUT 30000
|
||||
#define INITIAL_ADV_TIMEOUT 60000
|
||||
|
||||
#define GAP_INTERVAL_TO_MS(x) (uint16_t)((x)*1.25)
|
||||
#define GAP_INTERVAL_TO_MS(x) (uint16_t)((x) * 1.25)
|
||||
|
||||
typedef struct {
|
||||
uint16_t gap_svc_handle;
|
||||
|
@ -43,7 +43,7 @@
|
||||
*/
|
||||
#define FURI_HAL_FLASH_C2_LOCK_TIMEOUT_MS (3000U) /* 3 seconds */
|
||||
|
||||
#define IS_ADDR_ALIGNED_64BITS(__VALUE__) (((__VALUE__)&0x7U) == (0x00UL))
|
||||
#define IS_ADDR_ALIGNED_64BITS(__VALUE__) (((__VALUE__) & 0x7U) == (0x00UL))
|
||||
#define IS_FLASH_PROGRAM_ADDRESS(__VALUE__) \
|
||||
(((__VALUE__) >= FLASH_BASE) && ((__VALUE__) <= (FLASH_BASE + FLASH_SIZE - 8UL)) && \
|
||||
(((__VALUE__) % 8UL) == 0UL))
|
||||
|
@ -46,8 +46,8 @@ void furi_hal_memory_init() {
|
||||
}
|
||||
|
||||
uint32_t sram2a_busy_size = (uint32_t)&__sram2a_free__ - (uint32_t)&__sram2a_start__;
|
||||
uint32_t sram2a_unprotected_size = (sbrsa)*1024;
|
||||
uint32_t sram2b_unprotected_size = (snbrsa)*1024;
|
||||
uint32_t sram2a_unprotected_size = (sbrsa) * 1024;
|
||||
uint32_t sram2b_unprotected_size = (snbrsa) * 1024;
|
||||
|
||||
memory->region[SRAM_A].start = (uint8_t*)&__sram2a_free__;
|
||||
memory->region[SRAM_B].start = (uint8_t*)&__sram2b_start__;
|
||||
|
@ -17,8 +17,8 @@
|
||||
#define FURI_HAL_IDLE_TIMER_CLK_HZ 32768
|
||||
#define FURI_HAL_OS_TICK_HZ configTICK_RATE_HZ
|
||||
|
||||
#define FURI_HAL_OS_IDLE_CNT_TO_TICKS(x) (((x)*FURI_HAL_OS_TICK_HZ) / FURI_HAL_IDLE_TIMER_CLK_HZ)
|
||||
#define FURI_HAL_OS_TICKS_TO_IDLE_CNT(x) (((x)*FURI_HAL_IDLE_TIMER_CLK_HZ) / FURI_HAL_OS_TICK_HZ)
|
||||
#define FURI_HAL_OS_IDLE_CNT_TO_TICKS(x) (((x) * FURI_HAL_OS_TICK_HZ) / FURI_HAL_IDLE_TIMER_CLK_HZ)
|
||||
#define FURI_HAL_OS_TICKS_TO_IDLE_CNT(x) (((x) * FURI_HAL_IDLE_TIMER_CLK_HZ) / FURI_HAL_OS_TICK_HZ)
|
||||
|
||||
#define FURI_HAL_IDLE_TIMER_TICK_PER_EPOCH (FURI_HAL_OS_IDLE_CNT_TO_TICKS(FURI_HAL_IDLE_TIMER_MAX))
|
||||
#define FURI_HAL_OS_MAX_SLEEP (FURI_HAL_IDLE_TIMER_TICK_PER_EPOCH - 1)
|
||||
|
6
targets/f7/platform_specific/cxx_virtual_stub.c
Normal file
6
targets/f7/platform_specific/cxx_virtual_stub.c
Normal file
@ -0,0 +1,6 @@
|
||||
#include "cxx_virtual_stub.h"
|
||||
#include <furi.h>
|
||||
|
||||
void __cxa_pure_virtual() {
|
||||
furi_crash("C++ pure virtual call");
|
||||
}
|
13
targets/f7/platform_specific/cxx_virtual_stub.h
Normal file
13
targets/f7/platform_specific/cxx_virtual_stub.h
Normal file
@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
#include <errno.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void __cxa_pure_virtual();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user