Skip to content

Conversation

laurensvalk
Copy link
Member

This is an independent spin-off from other Bluetooth progress. This has not yet been tested.


When inspecting the map.elf, the init_task was well over 4K. Since much of it is repetition with different parameters, we can vastly reduce the number of different entry and yield points by looping over a list of parameters instead.

This reduces the firmware size by nearly 2K, which is helpful since we are running out of space on Technic Hub. 🎉

Almost everything is still set in the same order so should work the same if we didn't copy things incorrectly. Only the bond manager configuration is reordered slightly so we can use a single loop.

@coveralls
Copy link

coveralls commented Sep 16, 2025

Coverage Status

coverage: 59.255%. remained the same
when pulling 0f065bb on btrework
into f14f5ab on master.

@dlech
Copy link
Member

dlech commented Sep 16, 2025

This reduces the firmware size by nearly 2K, which is helpful since we are running out of space on Technic Hub.

Holy object code, Batman! Nice find!

When inspecting the map.elf, the init_task was well over 4K. Since much of it is repetition with different parameters, we can vastly reduce the number of different entry and yield points by looping over a list of parameters instead.

This reduces the firmware size by nearly 2K, which is helpful since we are running short on Technic Hub.

Almost everything is still set in the same order. Only the bond manager configuration is reordered slightly so we can use a single loop.
}

typedef struct {
const uint8_t *uuid128; // Null means uuid16 is used.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const uint8_t *uuid128; // Null means uuid16 is used.
const uint8_t *uuid128; // NULL means uuid16 is used.

@laurensvalk laurensvalk merged commit 0f065bb into master Sep 23, 2025
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants