-
Notifications
You must be signed in to change notification settings - Fork 10
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
Atmel support and fixes #18
base: master
Are you sure you want to change the base?
Conversation
A few more unit tests added.
…m is not found from the system. Added linux support for Atmel flashing.
include binaries on setup
Prevented while 1 loop in flash multiple devices, would present it self if wrong platform given with all or prefix. Unit test added.
@@ -179,7 +177,9 @@ def flash(self, build, target_id=None, platform_name=None, device_mapping_table= | |||
|
|||
if target_id.lower() == 'all': | |||
return self.flash_multiple(build, platform_name, pyocd) | |||
elif len(target_id) < 48: | |||
elif len(target_id) < 48 and platform_name == 'K64F': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why there is K64F
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clarification added
K64F with daplink 241 target id length is 48 SAM4E target id length is 20
test this please |
elif len(target_id) < 48: | ||
elif len(target_id) < 48 and platform_name == 'K64F': # prefix flashing support, ID length is 48 for K64F | ||
return self.flash_multiple(build, platform_name, pyocd, target_id) | ||
elif len(target_id) < 20 and platform_name == 'SAM4E': # prefix flashing support, ID length is 20 for SAM4E |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why there is SAM4E hard coded here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
platform_name has to be given when flashing and for SAM4E target_id length is max 20. if we do not have the separation of K64F and SAM4E prefix support stops working. i.e. giving a prefix 02 that would flash all devices that start with 02 would go to either ATMEL flash or Mbed flash.
if platform.system() == 'Windows': | ||
cmd = [self.exe, "-bpv", "-t", "atmel_cm4", "-s", target['target_id'],"-f", source] | ||
else: | ||
cmd = ['sudo', self.exe, "-bpv", "-t", "atmel_cm4", "-s", target['target_id'],"-f", source] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This probably shouldn't execute using sudo inside the flasher
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least it did not work on my setup without sudo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree to @kuggenhoffen
There might not even be a sudo
on some systems (say vanilla Debian).
I believe this is once again a case for some udev rule writing rehearsal
…latform. Removed non valid unittest related to missing platform.
…rt_and_fixes erase and reset updated to support atmel boards.
Atmel support added and verified.
Atmel flashing with attached binaries supported with linux and windows, no need for Atmel studio.
Unit tests added.
@jupe @marhil01