[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:
@@ -92,4 +92,20 @@ size_t memmgr_pool_get_free(void) {
|
||||
|
||||
size_t memmgr_pool_get_max_block(void) {
|
||||
return furi_hal_memory_max_pool_block();
|
||||
}
|
||||
|
||||
void* aligned_malloc(size_t size, size_t alignment) {
|
||||
void* p1; // original block
|
||||
void** p2; // aligned block
|
||||
int offset = alignment - 1 + sizeof(void*);
|
||||
if((p1 = (void*)malloc(size + offset)) == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
p2 = (void**)(((size_t)(p1) + offset) & ~(alignment - 1));
|
||||
p2[-1] = p1;
|
||||
return p2;
|
||||
}
|
||||
|
||||
void aligned_free(void* p) {
|
||||
free(((void**)p)[-1]);
|
||||
}
|
||||
Reference in New Issue
Block a user