Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an entry point when signing Arm images #163

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Conversation

will-v-pi
Copy link

Reads the entry point and stack pointer from the vector table, and adds them to the image_def as a new entry_point item. This is only done for signing Arm executable images.

This assumes that the vector table is at 0x10000000 unless a vector_table metadata item is present, which the SDK adds for no_flash binaries, so it should work with all SDK binaries.

Reads the entry point and stack pointer from the vector table

Assumes vector table is at 0x10000000 unless a vector_table metadata item is present
@will-v-pi will-v-pi added this to the 2.0.1 milestone Nov 1, 2024
std::shared_ptr<entry_point_item> entry_point = new_block.get_item<entry_point_item>();
if (entry_point == nullptr) {
std::shared_ptr<vector_table_item> vtor = new_block.get_item<vector_table_item>();
uint32_t vtor_loc = 0x10000000;
Copy link
Contributor

Choose a reason for hiding this comment

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

should come from wherever the start of the image is; which in flash binaries is affected by roll; and would be in RAM for RAM binaries (where i guess it must be at 0x20000000 in these cases)

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.

2 participants