msp430_bsl 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/upload_hex +5 -2
- data/lib/msp430_bsl/uart/connection.rb +4 -3
- data/lib/msp430_bsl/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35aba075d912b2875eecabcebfc4325f54af1cd3085d23249e9e54949797fe89
|
4
|
+
data.tar.gz: 18e8e770e7259aac7c1585f38f94adaeba67689589363ba12f8a143b5fd1b66b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95a9fd34842399eb965857bb83284d82d4f3a8b72f8912459c92f3dd57402c2d4599f9671b95c7bb91ad82595bc1326151f8bcdda0787aab069eb1bbaf58051f
|
7
|
+
data.tar.gz: c24a4ba28dffbda9f6404c7bcbdfc2155cfe3a17c6f2c49d39a33c1c8fcdeb5e625c18f254d376e74e425b23d3c092c09bc912ffaecb4ff5ed16316371c599db
|
data/bin/upload_hex
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
require 'bundler/setup'
|
4
|
-
Bundler.require
|
5
3
|
require 'slop'
|
6
4
|
require_relative '../lib/msp430_bsl'
|
7
5
|
|
@@ -37,6 +35,11 @@ end
|
|
37
35
|
|
38
36
|
logger = build_logger_from @opts
|
39
37
|
|
38
|
+
unless Msp430Bsl::Configs::BAUD_RATES.include? @opts[:baud]
|
39
|
+
logger.error "BAUD rate #{@opts[:baud]} not supported. Available BAUD rates: #{ Msp430Bsl::Configs::BAUD_RATES.join ', ' }"
|
40
|
+
exit
|
41
|
+
end
|
42
|
+
|
40
43
|
# Build UART Connection
|
41
44
|
@board = Msp430Bsl::Uart::Connection.new @opts[:device], logger: logger
|
42
45
|
|
@@ -8,12 +8,12 @@ module Msp430Bsl
|
|
8
8
|
|
9
9
|
UART_CONFIGS = { data_bits: 8, stop_bits: 1, parity: SerialPort::EVEN }.transform_keys(&:to_s).freeze
|
10
10
|
|
11
|
-
WAIT_FOR_ACK_MAX =
|
12
|
-
WAIT_FOR_RESPONSE_MAX =
|
11
|
+
WAIT_FOR_ACK_MAX = 1000.millis
|
12
|
+
WAIT_FOR_RESPONSE_MAX = 1000.millis
|
13
13
|
|
14
14
|
MEM_START_MAIN_FLASH = 0x8000
|
15
15
|
|
16
|
-
CORE_COMMANDS_BUFFER_SIZE
|
16
|
+
CORE_COMMANDS_BUFFER_SIZE = 260
|
17
17
|
|
18
18
|
attr_reader :serial_port, :device_path, :logger, :cmd_buff_size
|
19
19
|
|
@@ -23,6 +23,7 @@ module Msp430Bsl
|
|
23
23
|
@cmd_buff_size = opts.fetch :cmd_buf_size, CORE_COMMANDS_BUFFER_SIZE
|
24
24
|
|
25
25
|
@serial_port = SerialPort.new @device_path
|
26
|
+
@serial_port.flow_control = SerialPort::NONE
|
26
27
|
end
|
27
28
|
|
28
29
|
def close_connection
|
data/lib/msp430_bsl/version.rb
CHANGED