[FL-2627] Flipper applications: SDK, build and debug system (#1387)
* Added support for running applications from SD card (FAPs - Flipper Application Packages) * Added plugin_dist target for fbt to build FAPs * All apps of type FlipperAppType.EXTERNAL and FlipperAppType.PLUGIN are built as FAPs by default * Updated VSCode configuration for new fbt features - re-deploy stock configuration to use them * Added debugging support for FAPs with fbt debug & VSCode * Added public firmware API with automated versioning Co-authored-by: hedger <hedger@users.noreply.github.com> Co-authored-by: SG <who.just.the.doctor@gmail.com> Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
2870
firmware/targets/f7/api_symbols.csv
Normal file
2870
firmware/targets/f7/api_symbols.csv
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,9 +1,17 @@
|
||||
FORCE_COMMON_ALLOCATION
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.text 0x00000000 :
|
||||
.text 0x00000000 : ALIGN(4)
|
||||
{
|
||||
*(.text)
|
||||
*(.stub)
|
||||
*(.text*)
|
||||
*(.text.*)
|
||||
*(.text._*)
|
||||
|
||||
KEEP (*(.init))
|
||||
KEEP (*(.fini))
|
||||
}
|
||||
|
||||
.rodata :
|
||||
@@ -20,15 +28,22 @@ SECTIONS
|
||||
*(.data.*)
|
||||
}
|
||||
|
||||
|
||||
.bss :
|
||||
{
|
||||
*(.bss)
|
||||
*(.bss.*)
|
||||
*(.bss*)
|
||||
*(.sbss)
|
||||
*(.sbss.*)
|
||||
*(.sbss*)
|
||||
*(COMMON)
|
||||
}
|
||||
|
||||
.ARM.attributes :
|
||||
{
|
||||
*(.ARM.attributes)
|
||||
*(.ARM.attributes.*)
|
||||
}
|
||||
|
||||
/DISCARD/ :
|
||||
{
|
||||
*(.comment)
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** Early initialization */
|
||||
void furi_hal_clock_init_early();
|
||||
|
||||
@@ -20,3 +24,7 @@ void furi_hal_clock_suspend_tick();
|
||||
|
||||
/** Continue SysTick counter operation */
|
||||
void furi_hal_clock_resume_tick();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -4,6 +4,10 @@
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define FURI_HAL_FLASH_OB_RAW_SIZE_BYTES 0x80
|
||||
#define FURI_HAL_FLASH_OB_SIZE_WORDS (FURI_HAL_FLASH_OB_RAW_SIZE_BYTES / sizeof(uint32_t))
|
||||
#define FURI_HAL_FLASH_OB_TOTAL_VALUES (FURI_HAL_FLASH_OB_SIZE_WORDS / 2)
|
||||
@@ -142,3 +146,7 @@ void furi_hal_flash_ob_apply();
|
||||
* @return pointer to read-only data of OB (raw + complementary values)
|
||||
*/
|
||||
const FuriHalFlashRawOptionByteData* furi_hal_flash_ob_get_raw_ptr();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -124,9 +124,9 @@ bool furi_hal_nfc_detect(FuriHalNfcDevData* nfc_data, uint32_t timeout) {
|
||||
}
|
||||
nfc_data->cuid = (cuid_start[0] << 24) | (cuid_start[1] << 16) | (cuid_start[2] << 8) |
|
||||
(cuid_start[3]);
|
||||
} else if(dev_list[0].type == RFAL_NFC_LISTEN_TYPE_NFCB ||
|
||||
dev_list[0].type == RFAL_NFC_LISTEN_TYPE_ST25TB)
|
||||
{
|
||||
} else if(
|
||||
dev_list[0].type == RFAL_NFC_LISTEN_TYPE_NFCB ||
|
||||
dev_list[0].type == RFAL_NFC_LISTEN_TYPE_ST25TB) {
|
||||
nfc_data->type = FuriHalNfcTypeB;
|
||||
} else if(dev_list[0].type == RFAL_NFC_LISTEN_TYPE_NFCF) {
|
||||
nfc_data->type = FuriHalNfcTypeF;
|
||||
@@ -738,3 +738,46 @@ void furi_hal_nfc_sleep() {
|
||||
rfalNfcDeactivate(false);
|
||||
rfalLowPowerModeStart();
|
||||
}
|
||||
|
||||
FuriHalNfcReturn furi_hal_nfc_ll_set_mode(FuriHalNfcMode mode, FuriHalNfcBitrate txBR, FuriHalNfcBitrate rxBR) {
|
||||
return rfalSetMode((rfalMode)mode, (rfalBitRate)txBR, (rfalBitRate)rxBR);
|
||||
}
|
||||
|
||||
void furi_hal_nfc_ll_set_error_handling(FuriHalNfcErrorHandling eHandling) {
|
||||
rfalSetErrorHandling((rfalEHandling)eHandling);
|
||||
}
|
||||
|
||||
void furi_hal_nfc_ll_set_guard_time(uint32_t cycles) {
|
||||
rfalSetGT(cycles);
|
||||
}
|
||||
|
||||
void furi_hal_nfc_ll_set_fdt_listen(uint32_t cycles) {
|
||||
rfalSetFDTListen(cycles);
|
||||
}
|
||||
|
||||
void furi_hal_nfc_ll_set_fdt_poll(uint32_t FDTPoll) {
|
||||
rfalSetFDTPoll(FDTPoll);
|
||||
}
|
||||
|
||||
void furi_hal_nfc_ll_txrx_on() {
|
||||
st25r3916TxRxOn();
|
||||
}
|
||||
|
||||
void furi_hal_nfc_ll_txrx_off() {
|
||||
st25r3916TxRxOff();
|
||||
}
|
||||
|
||||
FuriHalNfcReturn furi_hal_nfc_ll_txrx(
|
||||
uint8_t* txBuf,
|
||||
uint16_t txBufLen,
|
||||
uint8_t* rxBuf,
|
||||
uint16_t rxBufLen,
|
||||
uint16_t* actLen,
|
||||
uint32_t flags,
|
||||
uint32_t fwt) {
|
||||
return rfalTransceiveBlockingTxRx(txBuf, txBufLen, rxBuf, rxBufLen, actLen, flags, fwt);
|
||||
}
|
||||
|
||||
void furi_hal_nfc_ll_poll() {
|
||||
rfalWorker();
|
||||
}
|
||||
@@ -17,7 +17,6 @@
|
||||
|
||||
#define TAG "FuriHalSubGhz"
|
||||
|
||||
|
||||
/*
|
||||
* Uncomment define to enable duplication of
|
||||
* IO GO0 CC1101 to an external comb.
|
||||
@@ -33,7 +32,7 @@
|
||||
* Attention this setting switches pin to output.
|
||||
* Make sure it is not connected directly to power or ground
|
||||
*/
|
||||
|
||||
|
||||
//#define SUBGHZ_DEBUG_CC1101_PIN gpio_ext_pa7
|
||||
#ifdef SUBGHZ_DEBUG_CC1101_PIN
|
||||
uint32_t subghz_debug_gpio_buff[2];
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "furi_hal_version.h"
|
||||
#include "furi_hal_usb_i.h"
|
||||
#include "furi_hal_usb.h"
|
||||
#include "furi_hal_usb_cdc_i.h"
|
||||
#include "furi_hal_usb_cdc.h"
|
||||
#include <furi.h>
|
||||
|
||||
#include "usb.h"
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
|
||||
#define CDC_DATA_SZ 64
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
void (*tx_ep_callback)(void* context);
|
||||
void (*rx_ep_callback)(void* context);
|
||||
@@ -22,3 +26,7 @@ uint8_t furi_hal_cdc_get_ctrl_line_state(uint8_t if_num);
|
||||
void furi_hal_cdc_send(uint8_t if_num, uint8_t* buf, uint16_t len);
|
||||
|
||||
int32_t furi_hal_cdc_receive(uint8_t if_num, uint8_t* buf, uint16_t max_len);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
11
firmware/targets/f7/platform_specific/intrinsic_export.h
Normal file
11
firmware/targets/f7/platform_specific/intrinsic_export.h
Normal file
@@ -0,0 +1,11 @@
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void __clear_cache(void*, void*);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -131,7 +131,7 @@ SECTIONS
|
||||
_sidata = LOADADDR(.data);
|
||||
|
||||
/* Initialized data sections goes into RAM, load LMA copy after code */
|
||||
.data :
|
||||
.data :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
_sdata = .; /* create a global symbol at data start */
|
||||
@@ -143,7 +143,6 @@ SECTIONS
|
||||
_edata = .; /* define a global symbol at data end */
|
||||
} >RAM1 AT> FLASH
|
||||
|
||||
|
||||
/* Uninitialized data section */
|
||||
. = ALIGN(4);
|
||||
.bss :
|
||||
@@ -161,7 +160,8 @@ SECTIONS
|
||||
} >RAM1
|
||||
|
||||
/* User_heap_stack section, used to check that there is enough RAM left */
|
||||
._user_heap_stack(NOLOAD):
|
||||
/* DSECT: https://software-dl.ti.com/ccs/esd/documents/sdto_cgt_linker_special_section_types.html */
|
||||
._user_heap_stack(DSECT):
|
||||
{
|
||||
. = ALIGN(8);
|
||||
__heap_start__ = .;
|
||||
@@ -172,11 +172,11 @@ SECTIONS
|
||||
} >RAM1
|
||||
|
||||
/* Free Flash space, that can be used for internal storage */
|
||||
.free_flash(NOLOAD):
|
||||
.free_flash(DSECT):
|
||||
{
|
||||
__free_flash_start__ = .;
|
||||
. = ORIGIN(FLASH) + LENGTH(FLASH);
|
||||
} >FLASH
|
||||
} >FLASH
|
||||
|
||||
/* Remove information from the standard libraries */
|
||||
/DISCARD/ :
|
||||
|
||||
@@ -159,7 +159,7 @@ SECTIONS
|
||||
} >RAM1
|
||||
|
||||
/* User_heap_stack section, used to check that there is enough RAM left */
|
||||
._user_heap_stack :
|
||||
._user_heap_stack(DSECT) :
|
||||
{
|
||||
. = ALIGN(8);
|
||||
__heap_start__ = .;
|
||||
@@ -170,7 +170,7 @@ SECTIONS
|
||||
} >RAM1
|
||||
|
||||
/* Free Flash space, that can be used for internal storage */
|
||||
/*.free_flash(NOLOAD):
|
||||
/*.free_flash(DSECT):
|
||||
{
|
||||
__free_flash_start__ = .;
|
||||
. = ORIGIN(FLASH) + LENGTH(FLASH);
|
||||
|
||||
Reference in New Issue
Block a user