Skip to content

Conversation

cmetz
Copy link

@cmetz cmetz commented Feb 16, 2018

I tried my very best, but please test it, i hate bash scripting!

added a new way to check whether a new firmware needs to be programmed into the sam3

  • sam3s_rpi_sysfs_check.cfg does a 'flash verify_bank' against ch.bin
  • sam3-program.bash matches the result of the verify against:
    -- 'contents differ' = new firmware
    -- 'sam3-gpnvm1: 0' == wrong boot mode, it should be 1
  • reduced the retry counter from 30 to 5, if the program fails
  • added a short sleep of 1s at the end of try_program to be sure everything is fine (not sure if it's needed)

…into the sam3

- sam3s_rpi_sysfs_check.cfg does a flash verify_bank against ch.bin
- sam3-program.bash greps the result of the verify after 'contents differ'
- reduced the retry counter from 30 to 5, if the program fails
- added a short sleep of 1 sec at the end of try_program to be sure everything is fine (not sure if it's needed)
…while running the firmware check of the sam3
@kdpatino
Copy link
Contributor

Hello @cmetz .
Thank You! I will test it 👍 If you want to know more about the Software inside the sam3s https://github.com/matrix-io/matrix-creator-mcu

@cmetz
Copy link
Author

cmetz commented Feb 16, 2018

Hi @kdpatino,

Yeah, i read and compiled it, but first i want to check, if there is way to run and debug firmware without flashing it. Maybe there is a way with the integrated SAM-BA, but i'm a hardware noob.

This pullrequest can be enhanced further, e.g. fixing the boot option without flashing the firmware and vice versa, but i didn't want to make the script even more complex.

I'm still uncertain if its realy bad to flash the exact same firmeware everytime, because there is no explicit erase. (same for the gpnvm bits). i tried googleing it, but did not find any information about it. i'll ask a colleague next week.

i also wrote you a private message in the community. maybe we can discuss there if you have more time, after releasing the kernel drivers... 🥇

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