Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@bradjc
Copy link
Contributor

@bradjc bradjc commented Jun 12, 2020

If an app is compiled for a fixed address, then we do not need to custom make an LST file based on where it actually executed. The make lst command will work just fine. This updates the message that is printed on a panic for apps which are compiled with fixed addresses.

Testing Strategy

This pull request was tested by verifying the correct message is printed on hail.

TODO or Help Wanted

n/a

Documentation Updated

  • Updated the relevant files in /docs, or no updates are required.

Our example panic printout is still valid since the PIC app version did not change.

Formatting

  • Ran make prepush.

@bradjc bradjc added the kernel label Jun 12, 2020
brghena
brghena previously approved these changes Jun 12, 2020
/// Return Ok(Flash Address, RAM address) if this app has
/// fixed_addresses, Err(()) otherwise.
fn check_for_fixed_address(flash: &'static [u8]) -> Result<(u32, u32), ()> {
// Need to re-parse the TBF header to find if this app has fixed
Copy link
Member

Choose a reason for hiding this comment

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

This feels like a lot of work and non-trivial duplicated logic. Wouldn't it be easier to just store whether the app is PIC in the struct ProcessDebug ?

Copy link
Contributor Author

@bradjc bradjc Jun 14, 2020

Choose a reason for hiding this comment

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

What would happen if #1830 (or something similar) was merged?

Copy link
Member

Choose a reason for hiding this comment

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

Oy.. preaching to the choir, but oh what a nightmare cfgs are.

By the same token though, if we're in the space-optimized side of the cfg, this whole detail-laden panic handler is gone anyway, right?

If an app is compiled for a fixed address, then we do not need to custom
make an LST file based on where it actually executed. The `make lst`
command will work just fine.
@bradjc bradjc force-pushed the kernel-process-make-debug branch from 21c3695 to 6565551 Compare July 8, 2020 14:45
@bradjc
Copy link
Contributor Author

bradjc commented Jul 8, 2020

Ok changed it to save the fixed addresses rather than re-parse them. I don't really know which is better.

@bradjc bradjc force-pushed the kernel-process-make-debug branch from 6565551 to f832848 Compare July 8, 2020 14:48
Copy link
Member

@ppannuto ppannuto left a comment

Choose a reason for hiding this comment

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

bors r+

@bors
Copy link
Contributor

bors bot commented Jul 10, 2020

@bors bors bot merged commit 1c3fc23 into master Jul 10, 2020
@bors bors bot deleted the kernel-process-make-debug branch July 10, 2020 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants