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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6f8dd8c87262211f1ebb94d9399262f04b57d713d02e78c5b0409ef21d01fe55
4
- data.tar.gz: 58a14360aa3a75747cb57a1c74f73ce9ac2509169e1ccb661328632a720316be
3
+ metadata.gz: 35aba075d912b2875eecabcebfc4325f54af1cd3085d23249e9e54949797fe89
4
+ data.tar.gz: 18e8e770e7259aac7c1585f38f94adaeba67689589363ba12f8a143b5fd1b66b
5
5
  SHA512:
6
- metadata.gz: 634b16289e8c5ba1d14c207e0f57f4a51e057a87081d3a699e18e145c09d23432a09c55317e7e19d5eb26d97dcb51eb3f87d156aa6834e1d0b322e58ab244a75
7
- data.tar.gz: 42ee1e8a9b67ea7a316f429a4ba70784f58b1513548fb1e29ba0da476c3dd67d271701480da31e9177af6920ac72b291230665a01243ffe3a413d934fbb264ae
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 = 100.millis
12
- WAIT_FOR_RESPONSE_MAX = 100.millis
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 = 260
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
@@ -1,3 +1,3 @@
1
1
  module Msp430Bsl
2
- VERSION = '0.2.0'.freeze
2
+ VERSION = '0.3.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: msp430_bsl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alessandro Verlato