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

Increase reliability #147

Merged
merged 4 commits into from
Aug 10, 2019
Merged

Increase reliability #147

merged 4 commits into from
Aug 10, 2019

Conversation

davids5
Copy link
Member

@davids5 davids5 commented Aug 10, 2019

Added state protection and sanity checking to reduce the probability of random data

  1. committing a bad image (BOOT '0 ')
  2. hard faulting

N.B. The PX4IO code space was too small to do all the state checking

davids5 added 3 commits August 7, 2019 02:47
  The bootloader must be sequnced to allow erasure and
  commiting the first word and reboot.
   Limited code space on the PX4IO requires that
   we only can chec one state.
@davids5
Copy link
Member Author

davids5 commented Aug 10, 2019

@dagar -

PX4IO is out of code space with gcc 4.8. lto is not an option, as it causes hard faults

I have been building and testing with

arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 7-2017-q4-major) 7.2.1 20170904 (release) [ARM/embedded-7-branch revision 255204]

please update tools to 7.2.1

bl.c Outdated
@@ -489,7 +518,7 @@ void
bootloader(unsigned timeout)
{
bl_type = NONE; // The type of the bootloader, whether loading from USB or USART, will be determined by on what port the bootloader recevies its first valid command.

volatile uint32_t bl_state = 0; // Must see correct command sequence to erse and reboot (commit first word)

Choose a reason for hiding this comment

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

@davids5 typo "erase"

@LorenzMeier
Copy link
Member

@davids5 I've updated the tools - please rebase and update.

Copy link

@RomanBapst RomanBapst left a comment

Choose a reason for hiding this comment

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

Just a small typo, otherwise looks good.

@LorenzMeier LorenzMeier merged commit 3c43ab7 into master Aug 10, 2019
@LorenzMeier LorenzMeier deleted the master_reliability branch August 10, 2019 20:21
dinomani pushed a commit to dinomani/Bootloader that referenced this pull request Oct 1, 2019
* Add State protection

  The bootloader must be sequnced to allow erasure and
  commiting the first word and reboot.

* Add minimum protection for PX4IO that will fit

   Limited code space on the PX4IO requires that we only can check one state.

* bl:Allow only Valid SN indexes and fix for typo
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