You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2020/04/06 23:46:57 UTC

[GitHub] [mynewt-core] nkaje opened a new pull request #2262: do not merge: da1469x otp and serial script enhancements

nkaje opened a new pull request #2262: do not merge: da1469x otp and serial script enhancements
URL: https://github.com/apache/mynewt-core/pull/2262
 
 
   This PR provides script enhancements to 
   
   1. da146x_serial.py: Makes the reset script optional. Use manual reset method or script to enter serial load mode.
   2. otp_tool.py: Provide a common function that flushes serial port when initially opened.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [mynewt-core] nkaje edited a comment on issue #2262: da1469x: otp and serial script enhancements

Posted by GitBox <gi...@apache.org>.
nkaje edited a comment on issue #2262: da1469x: otp and serial script enhancements
URL: https://github.com/apache/mynewt-core/pull/2262#issuecomment-611059047
 
 
   - Test logs
   
   Manual reset:
   ```
   ./repos/apache-mynewt-core/hw/bsp/dialog_da1469x-dk-pro/da1469x_serial.py load -u /dev/ttyUSB1 ./bin/targets/ram_executable/ram_executable.elf.bin 
   Please reset board to enter ROM uart recovery
   b'\x02'
   Detected serial boot protocol
   Loading application to RAM
   Successfully loaded RAM, board will now boot executable
   ```
   Communicate with the target:
   ```
   $ ./repos/apache-mynewt-core/hw/bsp/dialog_da1469x-dk-pro/otp_tool.py test-alive-target -u /dev/ttyUSB0
   Successfully communicated with target
   ```
   and performed other one time programmable routines.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [mynewt-core] apache-mynewt-bot removed a comment on issue #2262: da1469x: otp and serial script enhancements

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot removed a comment on issue #2262: da1469x: otp and serial script enhancements
URL: https://github.com/apache/mynewt-core/pull/2262#issuecomment-610149019
 
 
   
   <!-- style-bot -->
   
   ## Style check summary
   
   #### No suggestions at this time!
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [mynewt-core] nkaje edited a comment on issue #2262: da1469x: otp and serial script enhancements

Posted by GitBox <gi...@apache.org>.
nkaje edited a comment on issue #2262: da1469x: otp and serial script enhancements
URL: https://github.com/apache/mynewt-core/pull/2262#issuecomment-611059047
 
 
   - Test logs
   
   Manual reset:
   ```
   ./repos/apache-mynewt-core/hw/bsp/dialog_da1469x-dk-pro/da1469x_serial.py load -u /dev/ttyUSB1 ./bin/targets/ram_executable/ram_executable.elf.bin 
   Please reset board to enter ROM uart recovery
   b'\x02'
   Detected serial boot protocol
   Loading application to RAM
   Successfully loaded RAM, board will now boot executable
   ```
   
   - Use reset script
   
   ```
   $ ./repos/apache-mynewt-core/hw/bsp/dialog_da1469x-dk-pro/da1469x_serial.py load -r repos/apache-mynewt-core/hw/bsp/dialog_da1469x-dk-pro/reset.sh -u /dev/ttyUSB1 ./bin/targets/ram_executable/ram_executable.elf.bin 
   Triggering SWD reset...
   b'\x02'
   Detected serial boot protocol
   Loading application to RAM
   Successfully loaded RAM, board will now boot executable
   ```
   - Communicate with the target:
   ```
   $ ./repos/apache-mynewt-core/hw/bsp/dialog_da1469x-dk-pro/otp_tool.py test-alive-target -u /dev/ttyUSB0
   Successfully communicated with target
   ```
   and performed other one time programmable routines.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [mynewt-core] agross-korg commented on a change in pull request #2262: da1469x: otp and serial script enhancements

Posted by GitBox <gi...@apache.org>.
agross-korg commented on a change in pull request #2262: da1469x: otp and serial script enhancements
URL: https://github.com/apache/mynewt-core/pull/2262#discussion_r404872299
 
 

 ##########
 File path: hw/bsp/dialog_da1469x-dk-pro/da1469x_serial.py
 ##########
 @@ -35,6 +35,15 @@ def load(infile, uart, reset_script):
     except serial.SerialException:
         raise SystemExit("Failed to open serial port")
 
+    # drain serial port buffer
+    try:
+        while True:
+            data = ser.read(1)
+            if len(data) == 0:
+                break
+    except serial.SerialException:
+        raise SystemExit("Failed to open serial port")
+
 
 Review comment:
   nit.  you're mixing two sets of changes here.  One to drain the port and the other to make the reset optional.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [mynewt-core] nkaje edited a comment on issue #2262: da1469x: otp and serial script enhancements

Posted by GitBox <gi...@apache.org>.
nkaje edited a comment on issue #2262: da1469x: otp and serial script enhancements
URL: https://github.com/apache/mynewt-core/pull/2262#issuecomment-611059047
 
 
   - Test logs
   
   Manual reset:
   ```
   ./repos/apache-mynewt-core/hw/bsp/dialog_da1469x-dk-pro/da1469x_serial.py load -u /dev/ttyUSB1 ./bin/targets/ram_executable/ram_executable.elf.bin 
   Please reset board to enter ROM uart recovery
   b'\x02'
   Detected serial boot protocol
   Loading application to RAM
   Successfully loaded RAM, board will now boot executable
   ```
   
   - Use reset script
   
   ```
   $ ./repos/apache-mynewt-core/hw/bsp/dialog_da1469x-dk-pro/da1469x_serial.py load -r repos/apache-mynewt-core/hw/bsp/dialog_da1469x-dk-pro/reset.sh -u /dev/ttyUSB1 ./bin/targets ./bin/targets/ram_executable/ram_executable.elf.bin 
   Triggering SWD reset...
   b'\x02'
   Detected serial boot protocol
   Loading application to RAM
   Successfully loaded RAM, board will now boot executable
   ```
   Communicate with the target:
   ```
   $ ./repos/apache-mynewt-core/hw/bsp/dialog_da1469x-dk-pro/otp_tool.py test-alive-target -u /dev/ttyUSB0
   Successfully communicated with target
   ```
   and performed other one time programmable routines.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [mynewt-core] nkaje commented on a change in pull request #2262: da1469x: otp and serial script enhancements

Posted by GitBox <gi...@apache.org>.
nkaje commented on a change in pull request #2262: da1469x: otp and serial script enhancements
URL: https://github.com/apache/mynewt-core/pull/2262#discussion_r404936376
 
 

 ##########
 File path: hw/bsp/dialog_da1469x-dk-pro/da1469x_serial.py
 ##########
 @@ -35,6 +35,15 @@ def load(infile, uart, reset_script):
     except serial.SerialException:
         raise SystemExit("Failed to open serial port")
 
+    # drain serial port buffer
+    try:
+        while True:
+            data = ser.read(1)
+            if len(data) == 0:
+                break
+    except serial.SerialException:
+        raise SystemExit("Failed to open serial port")
+
 
 Review comment:
   done.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [mynewt-core] wes3 merged pull request #2262: da1469x: otp and serial script enhancements

Posted by GitBox <gi...@apache.org>.
wes3 merged pull request #2262: da1469x: otp and serial script enhancements
URL: https://github.com/apache/mynewt-core/pull/2262
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [mynewt-core] nkaje commented on issue #2262: da1469x: otp and serial script enhancements

Posted by GitBox <gi...@apache.org>.
nkaje commented on issue #2262: da1469x: otp and serial script enhancements
URL: https://github.com/apache/mynewt-core/pull/2262#issuecomment-611059047
 
 
   Test logs
   Manual reset:
   ```
   ./repos/apache-mynewt-core/hw/bsp/dialog_da1469x-dk-pro/da1469x_serial.py load -u /dev/ttyUSB1 ./bin/targets/ram_executable/ram_executable.elf.bin 
   Please reset board to enter ROM uart recovery
   b'\x02'
   Detected serial boot protocol
   Loading application to RAM
   Successfully loaded RAM, board will now boot executable
   ```
   Communicate with the target:
   ```
   $ ./repos/apache-mynewt-core/hw/bsp/dialog_da1469x-dk-pro/otp_tool.py test-alive-target -u /dev/ttyUSB0
   Successfully communicated with target
   ```
   and performed other one time programmable routines.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [mynewt-core] nkaje commented on issue #2262: da1469x: otp and serial script enhancements

Posted by GitBox <gi...@apache.org>.
nkaje commented on issue #2262: da1469x: otp and serial script enhancements
URL: https://github.com/apache/mynewt-core/pull/2262#issuecomment-610398354
 
 
   @agross-korg @benmccrea Please review.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [mynewt-core] nkaje edited a comment on issue #2262: da1469x: otp and serial script enhancements

Posted by GitBox <gi...@apache.org>.
nkaje edited a comment on issue #2262: da1469x: otp and serial script enhancements
URL: https://github.com/apache/mynewt-core/pull/2262#issuecomment-611059047
 
 
   **Test logs**
   
   - Manual reset
   
   ```
   $./repos/apache-mynewt-core/hw/bsp/dialog_da1469x-dk-pro/da1469x_serial.py load -u /dev/ttyUSB1 ./bin/targets/ram_executable/ram_executable.elf.bin 
   Please reset board to enter ROM uart recovery
   b'\x02'
   Detected serial boot protocol
   Loading application to RAM
   Successfully loaded RAM, board will now boot executable
   ```
   
   - Use reset script
   
   ```
   $ ./repos/apache-mynewt-core/hw/bsp/dialog_da1469x-dk-pro/da1469x_serial.py load -r repos/apache-mynewt-core/hw/bsp/dialog_da1469x-dk-pro/reset.sh -u /dev/ttyUSB1 ./bin/targets/ram_executable/ram_executable.elf.bin 
   Triggering SWD reset...
   b'\x02'
   Detected serial boot protocol
   Loading application to RAM
   Successfully loaded RAM, board will now boot executable
   ```
   - Communicate with the target:
   ```
   $ ./repos/apache-mynewt-core/hw/bsp/dialog_da1469x-dk-pro/otp_tool.py test-alive-target -u /dev/ttyUSB0
   Successfully communicated with target
   ```
   and performed other one time programmable routines.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [mynewt-core] nkaje edited a comment on issue #2262: da1469x: otp and serial script enhancements

Posted by GitBox <gi...@apache.org>.
nkaje edited a comment on issue #2262: da1469x: otp and serial script enhancements
URL: https://github.com/apache/mynewt-core/pull/2262#issuecomment-611059047
 
 
   **Test logs**
   
   - Manual reset
   
   ```
   ./repos/apache-mynewt-core/hw/bsp/dialog_da1469x-dk-pro/da1469x_serial.py load -u /dev/ttyUSB1 ./bin/targets/ram_executable/ram_executable.elf.bin 
   Please reset board to enter ROM uart recovery
   b'\x02'
   Detected serial boot protocol
   Loading application to RAM
   Successfully loaded RAM, board will now boot executable
   ```
   
   - Use reset script
   
   ```
   $ ./repos/apache-mynewt-core/hw/bsp/dialog_da1469x-dk-pro/da1469x_serial.py load -r repos/apache-mynewt-core/hw/bsp/dialog_da1469x-dk-pro/reset.sh -u /dev/ttyUSB1 ./bin/targets/ram_executable/ram_executable.elf.bin 
   Triggering SWD reset...
   b'\x02'
   Detected serial boot protocol
   Loading application to RAM
   Successfully loaded RAM, board will now boot executable
   ```
   - Communicate with the target:
   ```
   $ ./repos/apache-mynewt-core/hw/bsp/dialog_da1469x-dk-pro/otp_tool.py test-alive-target -u /dev/ttyUSB0
   Successfully communicated with target
   ```
   and performed other one time programmable routines.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [mynewt-core] apache-mynewt-bot commented on issue #2262: da1469x: otp and serial script enhancements

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot commented on issue #2262: da1469x: otp and serial script enhancements
URL: https://github.com/apache/mynewt-core/pull/2262#issuecomment-610149019
 
 
   
   <!-- style-bot -->
   
   ## Style check summary
   
   #### No suggestions at this time!
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [mynewt-core] nkaje edited a comment on issue #2262: da1469x: otp and serial script enhancements

Posted by GitBox <gi...@apache.org>.
nkaje edited a comment on issue #2262: da1469x: otp and serial script enhancements
URL: https://github.com/apache/mynewt-core/pull/2262#issuecomment-611059047
 
 
   **Test logs**
   
   -Manual reset:
   ```
   ./repos/apache-mynewt-core/hw/bsp/dialog_da1469x-dk-pro/da1469x_serial.py load -u /dev/ttyUSB1 ./bin/targets/ram_executable/ram_executable.elf.bin 
   Please reset board to enter ROM uart recovery
   b'\x02'
   Detected serial boot protocol
   Loading application to RAM
   Successfully loaded RAM, board will now boot executable
   ```
   
   - Use reset script
   
   ```
   $ ./repos/apache-mynewt-core/hw/bsp/dialog_da1469x-dk-pro/da1469x_serial.py load -r repos/apache-mynewt-core/hw/bsp/dialog_da1469x-dk-pro/reset.sh -u /dev/ttyUSB1 ./bin/targets/ram_executable/ram_executable.elf.bin 
   Triggering SWD reset...
   b'\x02'
   Detected serial boot protocol
   Loading application to RAM
   Successfully loaded RAM, board will now boot executable
   ```
   - Communicate with the target:
   ```
   $ ./repos/apache-mynewt-core/hw/bsp/dialog_da1469x-dk-pro/otp_tool.py test-alive-target -u /dev/ttyUSB0
   Successfully communicated with target
   ```
   and performed other one time programmable routines.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [mynewt-core] apache-mynewt-bot commented on issue #2262: da1469x: otp and serial script enhancements

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot commented on issue #2262: da1469x: otp and serial script enhancements
URL: https://github.com/apache/mynewt-core/pull/2262#issuecomment-610526992
 
 
   
   <!-- style-bot -->
   
   ## Style check summary
   
   #### No suggestions at this time!
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [mynewt-core] nkaje edited a comment on issue #2262: da1469x: otp and serial script enhancements

Posted by GitBox <gi...@apache.org>.
nkaje edited a comment on issue #2262: da1469x: otp and serial script enhancements
URL: https://github.com/apache/mynewt-core/pull/2262#issuecomment-611059047
 
 
   **Test logs**
   
   - Manual reset
   
   ```
   $./repos/apache-mynewt-core/hw/bsp/dialog_da1469x-dk-pro/da1469x_serial.py load -u /dev/ttyUSB1 ./bin/targets/ram_executable/ram_executable.elf.bin 
   Please reset board to enter ROM uart recovery
   b'\x02'
   Detected serial boot protocol
   Loading application to RAM
   Successfully loaded RAM, board will now boot executable
   ```
   
   - Use reset script
   
   ```
   $ ./repos/apache-mynewt-core/hw/bsp/dialog_da1469x-dk-pro/da1469x_serial.py load -r repos/apache-mynewt-core/hw/bsp/dialog_da1469x-dk-pro/reset.sh -u /dev/ttyUSB1 ./bin/targets/ram_executable/ram_executable.elf.bin 
   Triggering SWD reset...
   b'\x02'
   Detected serial boot protocol
   Loading application to RAM
   Successfully loaded RAM, board will now boot executable
   ```
   - Communicate with the target
   ```
   $ ./repos/apache-mynewt-core/hw/bsp/dialog_da1469x-dk-pro/otp_tool.py test-alive-target -u /dev/ttyUSB0
   Successfully communicated with target
   ```
   and performed other one time programmable routines.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [mynewt-core] nkaje edited a comment on issue #2262: da1469x: otp and serial script enhancements

Posted by GitBox <gi...@apache.org>.
nkaje edited a comment on issue #2262: da1469x: otp and serial script enhancements
URL: https://github.com/apache/mynewt-core/pull/2262#issuecomment-611059047
 
 
   - Test logs
   
   Manual reset:
   ```
   ./repos/apache-mynewt-core/hw/bsp/dialog_da1469x-dk-pro/da1469x_serial.py load -u /dev/ttyUSB1 ./bin/targets/ram_executable/ram_executable.elf.bin 
   Please reset board to enter ROM uart recovery
   b'\x02'
   Detected serial boot protocol
   Loading application to RAM
   Successfully loaded RAM, board will now boot executable
   ```
   
   - Use reset script
   
   ```
   $ ./repos/apache-mynewt-core/hw/bsp/dialog_da1469x-dk-pro/da1469x_serial.py load -r repos/apache-mynewt-core/hw/bsp/dialog_da1469x-dk-pro/reset.sh -u /dev/ttyUSB1 ./bin/targets ./bin/targets/ram_executable/ram_executable.elf.bin 
   Triggering SWD reset...
   b'\x02'
   Detected serial boot protocol
   Loading application to RAM
   Successfully loaded RAM, board will now boot executable
   ```
   - Communicate with the target:
   ```
   $ ./repos/apache-mynewt-core/hw/bsp/dialog_da1469x-dk-pro/otp_tool.py test-alive-target -u /dev/ttyUSB0
   Successfully communicated with target
   ```
   and performed other one time programmable routines.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services