Commit graph

5 commits

Author SHA1 Message Date
Jamie McCrae ec7044437e treewide: Disable automatic argparse argument shortening
Disables allowing the python argparse library from automatically
shortening command line arguments, this prevents issues whereby
a new command is added and code that wrongly uses the shortened
command of an existing argument which is the same as the new
command being added will silently change script behaviour.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-01-26 20:12:36 +09:00
Henrik Brix Andersen d151424a6d scripts: west: runners: canopen: add SDO block transfer support
Add SDO block transfer support for the CANopen program download west
runner. SDO block transfers are experimental in the underlying CANopen for
Python.

Reduce the program download chunk size to half the program download buffer
size to avoid blocking IO.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-01-11 09:39:57 +01:00
Henrik Brix Andersen 10fb5c203b runners: canopen: poll for flash ready
Poll the flash status instead of just reading the flash status once. Add
support for controlling the number of SDO retries and the SDO timeouts.

These changes allows for greater control of the CANopen program
download, which is especially useful on noisy or congested CAN networks
and on devices with slower flash access.

Fixes: #39409

Signed-off-by: Klaus H. Sorensen <khso@vestas.com>
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-10-14 10:44:21 +02:00
Martí Bolívar 09f55767b1 runners: tests: fix os.path.isfile patch
Copy a fix from test_nrfjprog.py to the other runner test suites. The
current code will enter an infinite recursion if you hit the path
where os.path.isfile is called, since it's been patched to
os_path_isfile_patch in the calling context. The fix is to cache the
'real' version in the parent scope and call it directly as a fallback.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-05-03 09:55:33 -05:00
Henrik Brix Andersen 3c2984d4a9 scripts: west: add CANopen flash runner
Add west flash runner for program download via CANopen.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-05-08 10:53:42 +02:00