Skip to content

Commit

Permalink
heap: increased size (#3924)
Browse files Browse the repository at this point in the history
* reduced reserved memory size for system stack; added temporary markup to monitor usage
* fbt: relink elf file on linker script change; removed debug memory fill
* Make PVS Happy
* Make doxygen happy

Co-authored-by: Aleksandr Kutuzov <[email protected]>
  • Loading branch information
hedger and skotopes authored Oct 14, 2024
1 parent 0902fd4 commit 57c438d
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 15 deletions.
15 changes: 7 additions & 8 deletions applications/services/gui/canvas.h
Original file line number Diff line number Diff line change
Expand Up @@ -289,15 +289,14 @@ void canvas_draw_xbm(

/** Draw rotated XBM bitmap
*
* @param canvas Canvas instance
* @param x x coordinate
* @param y y coordinate
* @param[in] width bitmap width
* @param[in] height bitmap height
* @param[in] rotation bitmap rotation
* @param bitmap pointer to XBM bitmap data
* @param canvas Canvas instance
* @param x x coordinate
* @param y y coordinate
* @param[in] width bitmap width
* @param[in] height bitmap height
* @param[in] rotation bitmap rotation
* @param bitmap_data pointer to XBM bitmap data
*/

void canvas_draw_xbm_ex(
Canvas* canvas,
int32_t x,
Expand Down
1 change: 1 addition & 0 deletions firmware.scons
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ fwelf = fwenv["FW_ELF"] = fwenv.Program(
sources,
LIBS=fwenv["TARGET_CFG"].linker_dependencies,
)
Depends(fwelf, fwenv["LINKER_SCRIPT_PATH"])

# Firmware depends on everything child builders returned
# Depends(fwelf, lib_targets)
Expand Down
2 changes: 1 addition & 1 deletion lib/nfc/helpers/iso14443_4_layer.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#define ISO14443_4_BLOCK_PCB_S_CID_MASK (1U << ISO14443_4_BLOCK_PCB_R_CID_OFFSET)
#define ISO14443_4_BLOCK_PCB_S_WTX_DESELECT_MASK (3U << ISO14443_4_BLOCK_PCB_S_WTX_DESELECT_OFFSET)

#define ISO14443_4_BLOCK_PCB_BITS_ACTIVE(pcb, mask) (((pcb) & mask) == mask)
#define ISO14443_4_BLOCK_PCB_BITS_ACTIVE(pcb, mask) (((pcb) & (mask)) == (mask))

#define ISO14443_4_BLOCK_PCB_IS_R_BLOCK(pcb) \
ISO14443_4_BLOCK_PCB_BITS_ACTIVE(pcb, ISO14443_4_BLOCK_PCB_R_MASK)
Expand Down
5 changes: 1 addition & 4 deletions lib/nfc/protocols/iso14443_4a/iso14443_4a_listener.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,8 @@ static NfcCommand iso14443_4a_listener_run(NfcGenericEvent event, void* context)
if(instance->state == Iso14443_4aListenerStateIdle) {
if(bit_buffer_get_size_bytes(rx_buffer) == 2 &&
bit_buffer_get_byte(rx_buffer, 0) == ISO14443_4A_CMD_READ_ATS) {
if(iso14443_4a_listener_send_ats(instance, &instance->data->ats_data) !=
if(iso14443_4a_listener_send_ats(instance, &instance->data->ats_data) ==
Iso14443_4aErrorNone) {
command = NfcCommandContinue;
} else {
instance->state = Iso14443_4aListenerStateActive;
}
}
Expand All @@ -93,7 +91,6 @@ static NfcCommand iso14443_4a_listener_run(NfcGenericEvent event, void* context)
if(instance->callback) {
command = instance->callback(instance->generic_event, instance->context);
}
command = NfcCommandContinue;
}

return command;
Expand Down
2 changes: 1 addition & 1 deletion targets/f7/stm32wb55xx_flash.ld
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ENTRY(Reset_Handler)
/* Highest address of the user mode stack */
_stack_end = 0x20030000; /* end of RAM */
/* Generate a link error if heap and stack don't fit into RAM */
_stack_size = 0x1000; /* required amount of stack */
_stack_size = 0x200; /* required amount of stack */

MEMORY {
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K
Expand Down
2 changes: 1 addition & 1 deletion targets/f7/stm32wb55xx_ram_fw.ld
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ENTRY(Reset_Handler)
/* Highest address of the user mode stack */
_stack_end = 0x20030000; /* end of RAM */
/* Generate a link error if heap and stack don't fit into RAM */
_stack_size = 0x1000; /* required amount of stack */
_stack_size = 0x200; /* required amount of stack */

MEMORY {
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K
Expand Down

0 comments on commit 57c438d

Please sign in to comment.