Update work area size from 3064 to 3264 #2073

Merged
will-v-pi merged 1 commit from fix-workarea-size into develop 2024-11-20 16:41:48 -06:00
will-v-pi commented 2024-11-20 05:46:39 -06:00 (Migrated from github.com)

Currently the descriptions for rom_load_partition_table, rom_pick_ab_partition, rom_get_uf2_target_partition and rom_chain_image document the minimum workarea size as 3064, with 3K recommended. This is too small, as the actual size required is 3264, so 3.25K should be recommended instead.

The minimum size was obtained with the following for loop in a binary:

for (int i=0xc00; i <= 0x1000; i++) {
    uint8_t* workarea = malloc(i);
    int ret = rom_load_partition_table(workarea, i, true);
    free(workarea);
    if (ret != -13) {
        printf("PT Load Ret %d, size %d\n", ret, i);
        break;
    }
}
Currently the descriptions for `rom_load_partition_table`, `rom_pick_ab_partition`, `rom_get_uf2_target_partition` and `rom_chain_image` document the minimum workarea size as 3064, with 3K recommended. This is too small, as the actual size required is 3264, so 3.25K should be recommended instead. The minimum size was obtained with the following for loop in a binary: ``` for (int i=0xc00; i <= 0x1000; i++) { uint8_t* workarea = malloc(i); int ret = rom_load_partition_table(workarea, i, true); free(workarea); if (ret != -13) { printf("PT Load Ret %d, size %d\n", ret, i); break; } } ```
kilograham (Migrated from github.com) approved these changes 2024-11-20 10:43:58 -06:00
lurch commented 2024-11-20 17:55:30 -06:00 (Migrated from github.com)

Currently the descriptions for rom_load_partition_table, rom_pick_ab_partition, rom_get_uf2_target_partition and rom_chain_image document the minimum workarea size

I forgot to ask earlier - do each of these four functions definitely have the same minimum workarea size?

> Currently the descriptions for `rom_load_partition_table`, `rom_pick_ab_partition`, `rom_get_uf2_target_partition` and `rom_chain_image` document the minimum workarea size I forgot to ask earlier - do each of these four functions definitely have the _same_ minimum workarea size?
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-raspberrypi/pico-sdk!2073
No description provided.