[GitHub] [mynewt-core] apache-mynewt-bot commented on issue #2211: NRF52, Re-added TASKS_RESUME in hal_i2c_master_write

2020-02-25 Thread GitBox
apache-mynewt-bot commented on issue #2211: NRF52, Re-added TASKS_RESUME in 
hal_i2c_master_write
URL: https://github.com/apache/mynewt-core/pull/2211#issuecomment-591260755
 
 
   
   
   
   ## 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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] ncasaril opened a new pull request #2211: NRF52, Re-added TASKS_RESUME in hal_i2c_master_write

2020-02-25 Thread GitBox
ncasaril opened a new pull request #2211: NRF52, Re-added TASKS_RESUME in 
hal_i2c_master_write
URL: https://github.com/apache/mynewt-core/pull/2211
 
 
   In mynewt_1_5 setting regs->TASKS_STARTTX was followed by setting 
regs->TASKS_RESUME in hal_i2c_master_write. This was removed in mynewt_1_6 
resulting in rare but persistent hangs in the i2c master. I.e. once the hang 
was triggered no future i2c transactions could be performed. Not even disabling 
and reenabling the driver helped.
   
   This change adds setting regs->TASKS_RESUME back. No hangs have been 
observed after this change.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] apache-mynewt-bot removed a comment on issue #2184: crypto/mbedtls: add hardware entropy config hooks

2020-02-25 Thread GitBox
apache-mynewt-bot removed a comment on issue #2184: crypto/mbedtls: add 
hardware entropy config hooks
URL: https://github.com/apache/mynewt-core/pull/2184#issuecomment-591105074
 
 
   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    hw/drivers/trng/src/mbed_entropy_alt.c
   
   
   ```diff
   @@ -30,7 +30,7 @@
if (trng == NULL) {
return -1;
}
   -*olen  = trng_read(trng, output, len);
   +*olen = trng_read(trng, output, len);
return 0;
}
#endif
   ```
   
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] apache-mynewt-bot commented on issue #2184: crypto/mbedtls: add hardware entropy config hooks

2020-02-25 Thread GitBox
apache-mynewt-bot commented on issue #2184: crypto/mbedtls: add hardware 
entropy config hooks
URL: https://github.com/apache/mynewt-core/pull/2184#issuecomment-591172204
 
 
   
   
   
   ## 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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] kasjer commented on a change in pull request #2174: Updates to crypto_test app; STM32 crypto HW driver; CBC/CTR speed

2020-02-25 Thread GitBox
kasjer commented on a change in pull request #2174: Updates to crypto_test app; 
STM32 crypto HW driver; CBC/CTR speed
URL: https://github.com/apache/mynewt-core/pull/2174#discussion_r384192790
 
 

 ##
 File path: hw/drivers/crypto/src/crypto.c
 ##
 @@ -56,8 +61,20 @@ crypto_do_ctr(struct crypto_dev *crypto, const void *key, 
uint16_t keylen,
 return sz + rc;
 }
 
-for (i = 0; i < len; i++) {
-outbuf8[i] = inbuf8[i] ^ _out[i];
+/*
+ * For full blocks increase speed by doing 32-bit XOR; maintain the
+ * stream semantics doing byte XORs for smaller sizes (end of buffer).
+ */
+if (len == AES_BLOCK_LEN) {
+inbuf32 = (uint32_t *)inbuf8;
+outbuf32 = (uint32_t *)outbuf8;
+for (i = 0; i < len / 4; i++) {
+outbuf32[i] = inbuf32[i] ^ _out32[i];
 
 Review comment:
   I'm not sure what is the usage of this function but unaligned access here 
could crash Cortex-M0


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] kasjer commented on a change in pull request #2174: Updates to crypto_test app; STM32 crypto HW driver; CBC/CTR speed

2020-02-25 Thread GitBox
kasjer commented on a change in pull request #2174: Updates to crypto_test app; 
STM32 crypto HW driver; CBC/CTR speed
URL: https://github.com/apache/mynewt-core/pull/2174#discussion_r384193747
 
 

 ##
 File path: apps/crypto_test/src/main.c
 ##
 @@ -282,6 +286,66 @@ run_benchmark(char *name, block_encrypt_func_t encfn, 
void *data, uint8_t iter)
 }
 printf("done in %lu ticks\n", os_time_get() - t);
 }
+
+static void
+run_cbc_bench(struct crypto_dev *crypto, uint8_t iter)
+{
+int i, j;
+uint8_t iv[AES_BLOCK_LEN];
+uint8_t output[AES_BLOCK_LEN];
+uint16_t blkidx;
+os_time_t t;
+
+printf("AES-128-CBC - running %d iterations of 4096 block encrypt... ", 
iter);
+t = os_time_get();
+for (i = 0; i < iter; i++) {
+memcpy(iv, aes_128_cbc_iv, AES_BLOCK_LEN);
+for (blkidx = 0; blkidx < 4096; blkidx += AES_BLOCK_LEN) {
+(void)crypto_encrypt_aes_cbc(crypto, aes_128_key, 128, iv,
+_128_input[blkidx], output, AES_BLOCK_LEN);
+if (memcmp(output, _128_cbc_expected[blkidx],
+AES_BLOCK_LEN)) {
+printf("fail... blkidx=%u\n", blkidx);
+for (j = 0; j < AES_BLOCK_LEN; j++) {
+printf("[%02x]<%02x> ", output[j],
+aes_128_cbc_expected[blkidx + j]);
+}
+return;
+}
+}
+}
+printf("done in %lu ticks\n", os_time_get() - t);
 
 Review comment:
   I would not use ticks to display time, you could not compare results of two 
different boards not knowing what tick mean on each one.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] apache-mynewt-bot removed a comment on issue #2184: crypto/mbedtls: add hardware entropy config hooks

2020-02-25 Thread GitBox
apache-mynewt-bot removed a comment on issue #2184: crypto/mbedtls: add 
hardware entropy config hooks
URL: https://github.com/apache/mynewt-core/pull/2184#issuecomment-590988642
 
 
   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    hw/drivers/trng/src/mbed_entropy_alt.c
   
   
   ```diff
   @@ -30,7 +30,7 @@
if (trng == NULL) {
return -1;
}
   -*olen  = trng_read(trng, output, len);
   +*olen = trng_read(trng, output, len);
return 0;
}
#endif
   ```
   
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] apache-mynewt-bot commented on issue #2184: crypto/mbedtls: add hardware entropy config hooks

2020-02-25 Thread GitBox
apache-mynewt-bot commented on issue #2184: crypto/mbedtls: add hardware 
entropy config hooks
URL: https://github.com/apache/mynewt-core/pull/2184#issuecomment-591105074
 
 
   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    hw/drivers/trng/src/mbed_entropy_alt.c
   
   
   ```diff
   @@ -30,7 +30,7 @@
if (trng == NULL) {
return -1;
}
   -*olen  = trng_read(trng, output, len);
   +*olen = trng_read(trng, output, len);
return 0;
}
#endif
   ```
   
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] mlaz commented on issue #2209: Fix coding style on bsp/stm32f4discovery

2020-02-25 Thread GitBox
mlaz commented on issue #2209: Fix coding style on bsp/stm32f4discovery
URL: https://github.com/apache/mynewt-core/pull/2209#issuecomment-591095519
 
 
   Ok, I'm closing this PR. IMO external sources are best kept as little 
modified as possible.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] mlaz closed pull request #2209: Fix coding style on bsp/stm32f4discovery

2020-02-25 Thread GitBox
mlaz closed pull request #2209: Fix coding style on bsp/stm32f4discovery
URL: https://github.com/apache/mynewt-core/pull/2209
 
 
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] utzig commented on issue #2184: crypto/mbedtls: add hardware entropy config hooks

2020-02-25 Thread GitBox
utzig commented on issue #2184: crypto/mbedtls: add hardware entropy config 
hooks
URL: https://github.com/apache/mynewt-core/pull/2184#issuecomment-591081875
 
 
   Looks good, If it passes CI I will merge.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] utzig opened a new pull request #2210: [DNM] Update mbedTLS from 2.16.3 to 2.16.5

2020-02-25 Thread GitBox
utzig opened a new pull request #2210: [DNM] Update mbedTLS from 2.16.3 to 
2.16.5
URL: https://github.com/apache/mynewt-core/pull/2210
 
 
   https://tls.mbed.org/tech-updates/releases/mbedtls-2.16.4-and-2.7.13-released
   https://tls.mbed.org/tech-updates/releases/mbedtls-2.16.5-and-2.7.14-released
   
   Currently under test


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] utzig commented on issue #2209: Fix coding style on bsp/stm32f4discovery

2020-02-25 Thread GitBox
utzig commented on issue #2209: Fix coding style on bsp/stm32f4discovery
URL: https://github.com/apache/mynewt-core/pull/2209#issuecomment-591080545
 
 
   > I got an email for a failed CI test, I looked for whether there was a rule 
for this and I didn't find any so I assumed it should be fixed.
   
   travis-ci sends an email if `master` fails, to the person that merged the 
last PR. But the failure doesn't seem related to the PR changes...


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] mlaz commented on issue #2209: Fix coding style on bsp/stm32f4discovery

2020-02-25 Thread GitBox
mlaz commented on issue #2209: Fix coding style on bsp/stm32f4discovery
URL: https://github.com/apache/mynewt-core/pull/2209#issuecomment-591076243
 
 
   I got an email for a failed CI test, I looked for whether there was a rule 
for this and I didn't find any so I assumed it should be fixed.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] utzig commented on a change in pull request #2184: crypto/mbedtls: add hardware entropy config hooks

2020-02-25 Thread GitBox
utzig commented on a change in pull request #2184: crypto/mbedtls: add hardware 
entropy config hooks
URL: https://github.com/apache/mynewt-core/pull/2184#discussion_r384100903
 
 

 ##
 File path: hw/drivers/trng/src/mbed_entropy_alt.c
 ##
 @@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include 
+#include "mbedtls/config_mynewt.h"
 
 Review comment:
   Is this still needed? Maybe you could just use "os/mynewt.h" now?


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:
us...@infra.apache.org


With regards,
Apache Git Services


[mynewt-core] branch master updated (b146a8a -> e0e2a35)

2020-02-25 Thread utzig
This is an automated email from the ASF dual-hosted git repository.

utzig pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git.


from b146a8a  hw/mcu/dialog: Split DCDC startup into 2 phases
 add e0e2a35  stm32f4: fix PLL clock initialization

No new revisions were added by this update.

Summary of changes:
 hw/mcu/stm/stm32f4xx/src/clock_stm32f4xx.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)



[GitHub] [mynewt-core] utzig merged pull request #2208: stm32f4: fix PLL clock initialization

2020-02-25 Thread GitBox
utzig merged pull request #2208: stm32f4: fix PLL clock initialization
URL: https://github.com/apache/mynewt-core/pull/2208
 
 
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] utzig closed issue #2193: Broken STM32F4xx clock configuration

2020-02-25 Thread GitBox
utzig closed issue #2193: Broken STM32F4xx clock configuration
URL: https://github.com/apache/mynewt-core/issues/2193
 
 
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[mynewt-core] branch master updated (eb58c69 -> b146a8a)

2020-02-25 Thread andk
This is an automated email from the ASF dual-hosted git repository.

andk pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git.


from eb58c69  Merge pull request #2203 from mlaz/stm32f411disc0
 add b146a8a  hw/mcu/dialog: Split DCDC startup into 2 phases

No new revisions were added by this update.

Summary of changes:
 hw/mcu/dialog/da1469x/include/mcu/da1469x_prail.h | 5 +
 hw/mcu/dialog/da1469x/src/da1469x_prail.c | 7 ++-
 hw/mcu/dialog/da1469x/src/hal_system.c| 5 +
 hw/mcu/dialog/da1469x/src/system_da1469x.c| 2 +-
 4 files changed, 17 insertions(+), 2 deletions(-)



[GitHub] [mynewt-core] andrzej-kaczmarek merged pull request #2205: hw/mcu/dialog: Split DCDC startup into 2 phases

2020-02-25 Thread GitBox
andrzej-kaczmarek merged pull request #2205: hw/mcu/dialog: Split DCDC startup 
into 2 phases
URL: https://github.com/apache/mynewt-core/pull/2205
 
 
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] brolan-juul closed pull request #2204: Dialog 1V8 Power Source

2020-02-25 Thread GitBox
brolan-juul closed pull request #2204: Dialog 1V8 Power Source
URL: https://github.com/apache/mynewt-core/pull/2204
 
 
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] kasjer commented on issue #2196: Full console: suppress new line when echo is disabled

2020-02-25 Thread GitBox
kasjer commented on issue #2196: Full console: suppress new line when echo is 
disabled
URL: https://github.com/apache/mynewt-core/pull/2196#issuecomment-591001807
 
 
   Hi @dwld, I tell you why this takes so much time with such simple reasonable 
change.
   For a long time console code that was modified by a few people did not 
really handled few control characters resulting in some echo while console was 
configured to be silent except for NLIP protocol.
   In late 2019 I changed it so not echo for CR LF (and other control 
characters showed) but one company that uses mynewt was affected since they 
relayed on this not so obvious behavior.
   So 153dfb8b7d13f0cf16298fd6e3b5235909fe2f30 restored echo for CR/LF just as 
not to break `backward compatibility`.
   I probably should have add conditional code for allowing this echo if 
someone really needs it, instead of always, which is not something that would 
be expected from the code.
   So that is why no one is rushing to accept this.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] apache-mynewt-bot commented on issue #2209: Fix coding style on bsp/stm32f4discovery

2020-02-25 Thread GitBox
apache-mynewt-bot commented on issue #2209: Fix coding style on 
bsp/stm32f4discovery
URL: https://github.com/apache/mynewt-core/pull/2209#issuecomment-590991704
 
 
   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    hw/bsp/stm32f411discovery/include/bsp/stm32f4xx_hal_conf.h
   
   
   ```diff
   @@ -349,7 +349,7 @@
 */
  #define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t 
*)__FILE__, __LINE__))
/* Exported functions 
--- */
   -  void assert_failed(uint8_t* file, uint32_t line);
   +void assert_failed(uint8_t * file, uint32_t line);
#else
  #define assert_param(expr) ((void)0)
#endif /* USE_FULL_ASSERT */
   ```
   
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] mlaz opened a new pull request #2209: Fix coding style on bsp/stm32f4discovery

2020-02-25 Thread GitBox
mlaz opened a new pull request #2209: Fix coding style on bsp/stm32f4discovery
URL: https://github.com/apache/mynewt-core/pull/2209
 
 
   Fixes coding style isses introduced on 
https://github.com/apache/mynewt-core/pull/2203


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] apache-mynewt-bot removed a comment on issue #2184: crypto/mbedtls: add hardware entropy config hooks

2020-02-25 Thread GitBox
apache-mynewt-bot removed a comment on issue #2184: crypto/mbedtls: add 
hardware entropy config hooks
URL: https://github.com/apache/mynewt-core/pull/2184#issuecomment-590872342
 
 
   
   
   
   ## 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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] apache-mynewt-bot commented on issue #2184: crypto/mbedtls: add hardware entropy config hooks

2020-02-25 Thread GitBox
apache-mynewt-bot commented on issue #2184: crypto/mbedtls: add hardware 
entropy config hooks
URL: https://github.com/apache/mynewt-core/pull/2184#issuecomment-590988642
 
 
   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    hw/drivers/trng/src/mbed_entropy_alt.c
   
   
   ```diff
   @@ -30,7 +30,7 @@
if (trng == NULL) {
return -1;
}
   -*olen  = trng_read(trng, output, len);
   +*olen = trng_read(trng, output, len);
return 0;
}
#endif
   ```
   
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] nkaje commented on a change in pull request #2184: crypto/mbedtls: add hardware entropy config hooks

2020-02-25 Thread GitBox
nkaje commented on a change in pull request #2184: crypto/mbedtls: add hardware 
entropy config hooks
URL: https://github.com/apache/mynewt-core/pull/2184#discussion_r384019471
 
 

 ##
 File path: crypto/mbedtls/include/mbedtls/config_mynewt.h
 ##
 @@ -292,6 +293,10 @@ extern "C" {
 #undef MBEDTLS_ENTROPY_C
 #endif
 
+#if MYNEWT_VAL(MBEDTLS_ENTROPY_HARDWARE_ALT) == 0
 
 Review comment:
   Though not used now, keeping this for completeness.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] nkaje commented on a change in pull request #2184: crypto/mbedtls: add hardware entropy config hooks

2020-02-25 Thread GitBox
nkaje commented on a change in pull request #2184: crypto/mbedtls: add hardware 
entropy config hooks
URL: https://github.com/apache/mynewt-core/pull/2184#discussion_r384019327
 
 

 ##
 File path: crypto/mbedtls/include/mbedtls/config_mynewt.h
 ##
 @@ -292,6 +293,10 @@ extern "C" {
 #undef MBEDTLS_ENTROPY_C
 #endif
 
+#if MYNEWT_VAL(MBEDTLS_ENTROPY_HARDWARE_ALT) == 0
 
 Review comment:
   Though not used now, keeping this for completeness.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] nkaje commented on a change in pull request #2184: crypto/mbedtls: add hardware entropy config hooks

2020-02-25 Thread GitBox
nkaje commented on a change in pull request #2184: crypto/mbedtls: add hardware 
entropy config hooks
URL: https://github.com/apache/mynewt-core/pull/2184#discussion_r384018867
 
 

 ##
 File path: hw/drivers/trng/src/mbed_entropy_alt.c
 ##
 @@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include 
+#include "mbedtls/config_mynewt.h"
+
+#ifdef MBEDTLS_ENTROPY_HARDWARE_ALT
+int
+mbedtls_hardware_poll(void *data, unsigned char *output, size_t len, size_t 
*olen)
+{
+struct trng_dev *trng;
+int ret;
+
+trng = (struct trng_dev *)os_dev_lookup("trng");
+ret = trng_read(trng, output, len);
+if (ret == len) {
+*olen = len;
+} else {
+*olen = 0;
+}
 
 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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] utzig commented on issue #2207: Update RTT to latest available revision

2020-02-25 Thread GitBox
utzig commented on issue #2207: Update RTT to latest available revision
URL: https://github.com/apache/mynewt-core/pull/2207#issuecomment-590972573
 
 
   @andrzej-kaczmarek If this code comes from some outside project, please add 
`hw/drivers/rtt` to `.style_ignored_dirs`.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-nimble] rymanluk commented on a change in pull request #744: [WIP] Add support for Enhanced LE CoC as per BT 5.2

2020-02-25 Thread GitBox
rymanluk commented on a change in pull request #744: [WIP] Add support for 
Enhanced LE CoC as per BT 5.2 
URL: https://github.com/apache/mynewt-nimble/pull/744#discussion_r384013357
 
 

 ##
 File path: nimble/host/src/ble_l2cap_sig.c
 ##
 @@ -634,6 +672,382 @@ ble_l2cap_sig_coc_connect_cb(struct ble_l2cap_sig_proc 
*proc, int status)
 }
 }
 
+#if MYNEWT_VAL(BLE_L2CAP_ENHANCED_COC)
+static void
+ble_l2cap_event_coc_reconfigured(uint16_t conn_handle, uint16_t status,
+ struct ble_l2cap_chan *chan, bool peer)
+{
+struct ble_l2cap_event event = { };
+
+if (peer) {
+event.type = BLE_L2CAP_EVENT_COC_PEER_RECONFIGURED;
+} else {
+event.type = BLE_L2CAP_EVENT_COC_RECONFIG_COMPLETED;
+}
+event.reconfigured.conn_handle = conn_handle;
+event.reconfigured.chan = chan;
+event.reconfigured.status = status;
+
+chan->cb(, chan->cb_arg);
+}
+
+static int
+ble_l2cap_sig_credit_base_reconfig_req_rx(uint16_t conn_handle,
+ struct ble_l2cap_sig_hdr *hdr,
+ struct os_mbuf **om)
+{
+struct ble_l2cap_chan *chan[BLE_L2CAP_MAX_COC_CONN_REQ] = {0};
+struct ble_l2cap_sig_credit_base_config_req *req;
+struct ble_l2cap_sig_credit_base_config_rsp *rsp;
+struct ble_hs_conn *conn;
+struct os_mbuf *txom;
+int i;
+int rc;
+uint8_t cid_cnt;
+uint8_t reduction_mps = 0;
+
+rc = ble_hs_mbuf_pullup_base(om, hdr->length);
+if (rc != 0) {
+return rc;
+}
+
+ble_hs_lock();
+conn = ble_hs_conn_find(conn_handle);
+if (!conn) {
+ble_hs_unlock();
+return 0;
+}
+
+rsp = ble_l2cap_sig_cmd_get(BLE_L2CAP_SIG_OP_CREDIT_RECONFIG_RSP,
+hdr->identifier, sizeof(*rsp) , );
+if (!rsp) {
+/* TODO: Reuse req bufor for the response. For now is such a case.
+ * remote will timeout.
+ */
 
 Review comment:
   thanks for catching that


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-nimble] rymanluk commented on a change in pull request #744: [WIP] Add support for Enhanced LE CoC as per BT 5.2

2020-02-25 Thread GitBox
rymanluk commented on a change in pull request #744: [WIP] Add support for 
Enhanced LE CoC as per BT 5.2 
URL: https://github.com/apache/mynewt-nimble/pull/744#discussion_r384012599
 
 

 ##
 File path: nimble/host/src/ble_hs_conn.c
 ##
 @@ -88,6 +88,24 @@ ble_hs_conn_chan_find_by_dcid(struct ble_hs_conn *conn, 
uint16_t cid)
 return NULL;
 }
 
+bool
+ble_hs_conn_chan_exist(struct ble_hs_conn *conn, struct ble_l2cap_chan *chan)
+{
+#if !NIMBLE_BLE_CONNECT
+return NULL;
 
 Review comment:
   When you look into this file, all functions does the same, is this reported 
by static analyzer?


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] nkaje commented on a change in pull request #2184: crypto/mbedtls: add hardware entropy config hooks

2020-02-25 Thread GitBox
nkaje commented on a change in pull request #2184: crypto/mbedtls: add hardware 
entropy config hooks
URL: https://github.com/apache/mynewt-core/pull/2184#discussion_r384011864
 
 

 ##
 File path: hw/drivers/trng/src/mbed_entropy_alt.c
 ##
 @@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include 
+#include "mbedtls/config_mynewt.h"
+
+#ifdef MBEDTLS_ENTROPY_HARDWARE_ALT
+int
+mbedtls_hardware_poll(void *data, unsigned char *output, size_t len, size_t 
*olen)
+{
+struct trng_dev *trng;
+int ret;
+
+trng = (struct trng_dev *)os_dev_lookup("trng");
 
 Review comment:
   will add.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] apache-mynewt-bot removed a comment on issue #2206: Update nrfx to 2.1.0

2020-02-25 Thread GitBox
apache-mynewt-bot removed a comment on issue #2206: Update nrfx to 2.1.0
URL: https://github.com/apache/mynewt-core/pull/2206#issuecomment-590934389
 
 
   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    hw/drivers/pwm/pwm_nrf52/src/pwm_nrf52.c
   
   
   ```diff
   @@ -255,11 +254,11 @@
config->output_pins[2] = NRFX_PWM_PIN_NOT_USED;
config->output_pins[3] = NRFX_PWM_PIN_NOT_USED;
config->irq_priority = 3; /* APP_IRQ_PRIORITY_LOW */
   -config->base_clock   = NRF_PWM_CLK_1MHz;
   -config->count_mode   = NRF_PWM_MODE_UP;
   -config->top_value= 1;
   -config->load_mode= NRF_PWM_LOAD_INDIVIDUAL;
   -config->step_mode= NRF_PWM_STEP_AUTO;
   +config->base_clock = NRF_PWM_CLK_1MHz;
   +config->count_mode = NRF_PWM_MODE_UP;
   +config->top_value = 1;
   +config->load_mode = NRF_PWM_LOAD_INDIVIDUAL;
   +config->step_mode = NRF_PWM_STEP_AUTO;
config->skip_gpio_cfg = false;
} else {
memcpy(config, init_conf, sizeof(nrfx_pwm_config_t));
   ```
   
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] apache-mynewt-bot commented on issue #2206: Update nrfx to 2.1.0

2020-02-25 Thread GitBox
apache-mynewt-bot commented on issue #2206: Update nrfx to 2.1.0
URL: https://github.com/apache/mynewt-core/pull/2206#issuecomment-590954663
 
 
   
   
   
   ## 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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] utzig commented on issue #2174: Updates to crypto_test app; STM32 crypto HW driver; CBC/CTR speed

2020-02-25 Thread GitBox
utzig commented on issue #2174: Updates to crypto_test app; STM32 crypto HW 
driver; CBC/CTR speed
URL: https://github.com/apache/mynewt-core/pull/2174#issuecomment-590944564
 
 
   Could someone take a look?


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] utzig commented on issue #2175: da1469x: add initial crypto driver

2020-02-25 Thread GitBox
utzig commented on issue #2175: da1469x: add initial crypto driver
URL: https://github.com/apache/mynewt-core/pull/2175#issuecomment-590942894
 
 
   @agross-korg @nkaje What would be the best way to get this in? Does one of 
you want to take over, or should I merge and fix after testing is done? I am 
open to suggestions!


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] apache-mynewt-bot commented on issue #2208: stm32f4: fix PLL clock initialization

2020-02-25 Thread GitBox
apache-mynewt-bot commented on issue #2208: stm32f4: fix PLL clock 
initialization
URL: https://github.com/apache/mynewt-core/pull/2208#issuecomment-590940428
 
 
   
   
   
   ## 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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] utzig commented on issue #2193: Broken STM32F4xx clock configuration

2020-02-25 Thread GitBox
utzig commented on issue #2193: Broken STM32F4xx clock configuration
URL: https://github.com/apache/mynewt-core/issues/2193#issuecomment-590938688
 
 
   There's a few strange things, one is that the code probably was wrongly 
added by me since it's unrelated to stm32wb55 so it was in some pre-release 
stage I think; another interesting thing is that I don't seem to have issues 
with stm32f7 initialization which I would expect to since it's very similar to 
stm32f4 clocking system. I have submitted an early fix as you suggested with 
#2208 (works for me!), but I might updated it again in the near future...


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] utzig opened a new pull request #2208: stm32f4: fix PLL clock initialization

2020-02-25 Thread GitBox
utzig opened a new pull request #2208: stm32f4: fix PLL clock initialization
URL: https://github.com/apache/mynewt-core/pull/2208
 
 
   Fix setting HSI as main clock source in pre-configuration; it was missing 
the PLLState configuration which would result in random behavior.
   
   Fixes #2193 


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] apache-mynewt-bot commented on issue #2206: Update nrfx to 2.1.0

2020-02-25 Thread GitBox
apache-mynewt-bot commented on issue #2206: Update nrfx to 2.1.0
URL: https://github.com/apache/mynewt-core/pull/2206#issuecomment-590934389
 
 
   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    hw/drivers/pwm/pwm_nrf52/src/pwm_nrf52.c
   
   
   ```diff
   @@ -255,11 +254,11 @@
config->output_pins[2] = NRFX_PWM_PIN_NOT_USED;
config->output_pins[3] = NRFX_PWM_PIN_NOT_USED;
config->irq_priority = 3; /* APP_IRQ_PRIORITY_LOW */
   -config->base_clock   = NRF_PWM_CLK_1MHz;
   -config->count_mode   = NRF_PWM_MODE_UP;
   -config->top_value= 1;
   -config->load_mode= NRF_PWM_LOAD_INDIVIDUAL;
   -config->step_mode= NRF_PWM_STEP_AUTO;
   +config->base_clock = NRF_PWM_CLK_1MHz;
   +config->count_mode = NRF_PWM_MODE_UP;
   +config->top_value = 1;
   +config->load_mode = NRF_PWM_LOAD_INDIVIDUAL;
   +config->step_mode = NRF_PWM_STEP_AUTO;
config->skip_gpio_cfg = false;
} else {
memcpy(config, init_conf, sizeof(nrfx_pwm_config_t));
   ```
   
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] apache-mynewt-bot removed a comment on issue #2206: Update nrfx to 2.1.0

2020-02-25 Thread GitBox
apache-mynewt-bot removed a comment on issue #2206: Update nrfx to 2.1.0
URL: https://github.com/apache/mynewt-core/pull/2206#issuecomment-590906069
 
 
   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    hw/drivers/adc/adc_nrf52/src/adc_nrf52.c
   
   
   ```diff
   @@ -106,7 +106,7 @@
 * Unconfigures the device registers
 */
static void
   -clear_device_regs(void )
   +clear_device_regs(void)
{
int cnum;
nrf_saadc_channel_config_t default_ch = {
   @@ -151,7 +151,7 @@
int rc = 0;
int unlock = 0;
struct adc_dev *dev = (struct adc_dev *) odev;
   -struct adc_dev_cfg *adc_config = (struct adc_dev_cfg*) arg;
   +struct adc_dev_cfg *adc_config = (struct adc_dev_cfg *) arg;

if (os_started()) {
rc = os_mutex_pend(>ad_lock, wait);
   @@ -291,7 +291,7 @@
static int
nrf52_adc_configure_channel(struct adc_dev *dev, uint8_t cnum, void 
*cfgdata)
{
   -struct adc_chan_cfg *cfg = (struct adc_chan_cfg*) cfgdata;
   +struct adc_chan_cfg *cfg = (struct adc_chan_cfg *) cfgdata;
uint16_t refmv;
nrf_saadc_resolution_t res;

   @@ -331,12 +331,12 @@
switch (cfg->reference) {
case ADC_REFERENCE_INTERNAL:
g_drv_instance.channels[cnum].nrf_chan.reference =
   -
NRF_SAADC_REFERENCE_INTERNAL;
   +NRF_SAADC_REFERENCE_INTERNAL;
refmv = 600; /* 0.6V for NRF52 */
break;
case ADC_REFERENCE_VDD_DIV_4:
g_drv_instance.channels[cnum].nrf_chan.reference =
   -NRF_SAADC_REFERENCE_VDD4;
   +NRF_SAADC_REFERENCE_VDD4;
refmv = init_cfg->nadc_refmv / 4;
break;
default:
   @@ -345,35 +345,35 @@

/* Adjust reference voltage for gain. */
switch (cfg->gain) {
   -case ADC_GAIN1_6:
   -refmv *= 6;
   -break;
   -case ADC_GAIN1_5:
   -refmv *= 5;
   -break;
   -case ADC_GAIN1_4:
   -refmv *= 4;
   -break;
   -case ADC_GAIN1_3:
   -refmv *= 3;
   -break;
   -case ADC_GAIN1_2:
   -refmv *= 2;
   -break;
   -case ADC_GAIN2:
   -refmv /= 2;
   -break;
   -case ADC_GAIN4:
   -refmv /= 4;
   -break;
   -default:
   -break;
   +case ADC_GAIN1_6:
   +refmv *= 6;
   +break;
   +case ADC_GAIN1_5:
   +refmv *= 5;
   +break;
   +case ADC_GAIN1_4:
   +refmv *= 4;
   +break;
   +case ADC_GAIN1_3:
   +refmv *= 3;
   +break;
   +case ADC_GAIN1_2:
   +refmv *= 2;
   +break;
   +case ADC_GAIN2:
   +refmv /= 2;
   +break;
   +case ADC_GAIN4:
   +refmv /= 4;
   +break;
   +default:
   +break;
}

g_drv_instance.channels[cnum].pin_p = cfg->pin;
if (cfg->differential) {
g_drv_instance.channels[cnum].nrf_chan.mode =
   -
NRF_SAADC_MODE_DIFFERENTIAL;
   +NRF_SAADC_MODE_DIFFERENTIAL;
g_drv_instance.channels[cnum].pin_n = cfg->pin_negative;
}

   @@ -466,8 +466,8 @@
assert(used_chans > 0);

if (g_drv_instance.primary_size < (used_chans * 
sizeof(nrf_saadc_value_t))) {
   -return OS_ENOMEM;
   -}
   +return OS_ENOMEM;
   +}

if ((used_chans == 1) &&
(g_drv_instance.oversample != NRF_SAADC_OVERSAMPLE_DISABLED)) {
   @@ -497,7 +497,7 @@
nrf_saadc_task_trigger(NRF_SAADC, NRF_SAADC_TASK_SAMPLE);
}

   -return 0;
   +return 0;
}

/**
   @@ -593,7 +593,7 @@
nrf52_saadc_irq_handler(void)
{
adc_event_type_t ev = ADC_EVENT_CALIBRATED;
   -void* buf = NULL;
   +void * buf = NULL;
int bufsize = 0;

if (global_adc_dev == NULL || !global_adc_dev->ad_event_handler_func) {
   ```
   
   
   
    hw/drivers/pwm/pwm_nrf52/src/pwm_nrf52.c
   
   
   ```diff
   @@ -125,20 +124,20 @@
};

#if MYNEWT_VAL(PWM_0)
   -static void handler_0(nrfx_pwm_evt_type_t event_type, void *unused)
   -{
   -switch (event_type)
   -{
   -case NRFX_PWM_EVT_END_SEQ0 :
   -case NRFX_PWM_EVT_END_SEQ1 :
   +static void
   +handler_0(nrfx_pwm_evt_type_t event_type, void *unused)
   +{
   +switch (event_type) {
   +case NRFX_PWM_EVT_END_SEQ0:
   +case NRFX_PWM_EVT_END_SEQ1:
instances[0].cycle_handler(instances[0].cycle_data);
break;

   -case NRFX_PWM_EVT_FINISHED :
   +case 

[GitHub] [mynewt-core] agross-korg commented on a change in pull request #2184: crypto/mbedtls: add hardware entropy config hooks

2020-02-25 Thread GitBox
agross-korg commented on a change in pull request #2184: crypto/mbedtls: add 
hardware entropy config hooks
URL: https://github.com/apache/mynewt-core/pull/2184#discussion_r383950998
 
 

 ##
 File path: hw/drivers/trng/src/mbed_entropy_alt.c
 ##
 @@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include 
+#include "mbedtls/config_mynewt.h"
+
+#ifdef MBEDTLS_ENTROPY_HARDWARE_ALT
 
 Review comment:
   ah thats a good point


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] andrzej-kaczmarek opened a new pull request #2207: Update RTT to latest available revision

2020-02-25 Thread GitBox
andrzej-kaczmarek opened a new pull request #2207: Update RTT to latest 
available revision
URL: https://github.com/apache/mynewt-core/pull/2207
 
 
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] apache-mynewt-bot commented on issue #2206: Update nrfx to 2.1.0

2020-02-25 Thread GitBox
apache-mynewt-bot commented on issue #2206: Update nrfx to 2.1.0
URL: https://github.com/apache/mynewt-core/pull/2206#issuecomment-590906069
 
 
   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    hw/drivers/adc/adc_nrf52/src/adc_nrf52.c
   
   
   ```diff
   @@ -106,7 +106,7 @@
 * Unconfigures the device registers
 */
static void
   -clear_device_regs(void )
   +clear_device_regs(void)
{
int cnum;
nrf_saadc_channel_config_t default_ch = {
   @@ -151,7 +151,7 @@
int rc = 0;
int unlock = 0;
struct adc_dev *dev = (struct adc_dev *) odev;
   -struct adc_dev_cfg *adc_config = (struct adc_dev_cfg*) arg;
   +struct adc_dev_cfg *adc_config = (struct adc_dev_cfg *) arg;

if (os_started()) {
rc = os_mutex_pend(>ad_lock, wait);
   @@ -291,7 +291,7 @@
static int
nrf52_adc_configure_channel(struct adc_dev *dev, uint8_t cnum, void 
*cfgdata)
{
   -struct adc_chan_cfg *cfg = (struct adc_chan_cfg*) cfgdata;
   +struct adc_chan_cfg *cfg = (struct adc_chan_cfg *) cfgdata;
uint16_t refmv;
nrf_saadc_resolution_t res;

   @@ -331,12 +331,12 @@
switch (cfg->reference) {
case ADC_REFERENCE_INTERNAL:
g_drv_instance.channels[cnum].nrf_chan.reference =
   -
NRF_SAADC_REFERENCE_INTERNAL;
   +NRF_SAADC_REFERENCE_INTERNAL;
refmv = 600; /* 0.6V for NRF52 */
break;
case ADC_REFERENCE_VDD_DIV_4:
g_drv_instance.channels[cnum].nrf_chan.reference =
   -NRF_SAADC_REFERENCE_VDD4;
   +NRF_SAADC_REFERENCE_VDD4;
refmv = init_cfg->nadc_refmv / 4;
break;
default:
   @@ -345,35 +345,35 @@

/* Adjust reference voltage for gain. */
switch (cfg->gain) {
   -case ADC_GAIN1_6:
   -refmv *= 6;
   -break;
   -case ADC_GAIN1_5:
   -refmv *= 5;
   -break;
   -case ADC_GAIN1_4:
   -refmv *= 4;
   -break;
   -case ADC_GAIN1_3:
   -refmv *= 3;
   -break;
   -case ADC_GAIN1_2:
   -refmv *= 2;
   -break;
   -case ADC_GAIN2:
   -refmv /= 2;
   -break;
   -case ADC_GAIN4:
   -refmv /= 4;
   -break;
   -default:
   -break;
   +case ADC_GAIN1_6:
   +refmv *= 6;
   +break;
   +case ADC_GAIN1_5:
   +refmv *= 5;
   +break;
   +case ADC_GAIN1_4:
   +refmv *= 4;
   +break;
   +case ADC_GAIN1_3:
   +refmv *= 3;
   +break;
   +case ADC_GAIN1_2:
   +refmv *= 2;
   +break;
   +case ADC_GAIN2:
   +refmv /= 2;
   +break;
   +case ADC_GAIN4:
   +refmv /= 4;
   +break;
   +default:
   +break;
}

g_drv_instance.channels[cnum].pin_p = cfg->pin;
if (cfg->differential) {
g_drv_instance.channels[cnum].nrf_chan.mode =
   -
NRF_SAADC_MODE_DIFFERENTIAL;
   +NRF_SAADC_MODE_DIFFERENTIAL;
g_drv_instance.channels[cnum].pin_n = cfg->pin_negative;
}

   @@ -466,8 +466,8 @@
assert(used_chans > 0);

if (g_drv_instance.primary_size < (used_chans * 
sizeof(nrf_saadc_value_t))) {
   -return OS_ENOMEM;
   -}
   +return OS_ENOMEM;
   +}

if ((used_chans == 1) &&
(g_drv_instance.oversample != NRF_SAADC_OVERSAMPLE_DISABLED)) {
   @@ -497,7 +497,7 @@
nrf_saadc_task_trigger(NRF_SAADC, NRF_SAADC_TASK_SAMPLE);
}

   -return 0;
   +return 0;
}

/**
   @@ -593,7 +593,7 @@
nrf52_saadc_irq_handler(void)
{
adc_event_type_t ev = ADC_EVENT_CALIBRATED;
   -void* buf = NULL;
   +void * buf = NULL;
int bufsize = 0;

if (global_adc_dev == NULL || !global_adc_dev->ad_event_handler_func) {
   ```
   
   
   
    hw/drivers/pwm/pwm_nrf52/src/pwm_nrf52.c
   
   
   ```diff
   @@ -125,20 +124,20 @@
};

#if MYNEWT_VAL(PWM_0)
   -static void handler_0(nrfx_pwm_evt_type_t event_type, void *unused)
   -{
   -switch (event_type)
   -{
   -case NRFX_PWM_EVT_END_SEQ0 :
   -case NRFX_PWM_EVT_END_SEQ1 :
   +static void
   +handler_0(nrfx_pwm_evt_type_t event_type, void *unused)
   +{
   +switch (event_type) {
   +case NRFX_PWM_EVT_END_SEQ0:
   +case NRFX_PWM_EVT_END_SEQ1:
instances[0].cycle_handler(instances[0].cycle_data);
break;

   -case NRFX_PWM_EVT_FINISHED :
   +case NRFX_PWM_EVT_FINISHED:

[GitHub] [mynewt-core] sjanc opened a new pull request #2206: Update nrfx to 2.1.0

2020-02-25 Thread GitBox
sjanc opened a new pull request #2206: Update nrfx to 2.1.0
URL: https://github.com/apache/mynewt-core/pull/2206
 
 
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[mynewt-core] branch master updated: Added bsp/stm32f411discovery

2020-02-25 Thread mlaz
This is an automated email from the ASF dual-hosted git repository.

mlaz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
 new ebeadf9  Added bsp/stm32f411discovery
 new eb58c69  Merge pull request #2203 from mlaz/stm32f411disc0
ebeadf9 is described below

commit ebeadf97aa7b8ba7a73bcf540cd4284ba48bc44e
Author: Miguel Azevedo 
AuthorDate: Fri Feb 21 00:23:49 2020 +

Added bsp/stm32f411discovery
---
 .../stm32f411discovery/boot-stm32f411discovery.ld  |  28 ++
 hw/bsp/stm32f411discovery/bsp.yml  |  66 
 hw/bsp/stm32f411discovery/include/bsp/bsp.h|  55 
 .../include/bsp/stm32f4xx_hal_conf.h   | 366 +
 hw/bsp/stm32f411discovery/pkg.yml  |  39 +++
 .../src/arch/cortex_m4/startup_STM32F411.s | 358 
 hw/bsp/stm32f411discovery/src/hal_bsp.c| 185 +++
 hw/bsp/stm32f411discovery/stm32f411discovery.ld|  28 ++
 .../stm32f411discovery_debug.cmd   |  22 ++
 .../stm32f411discovery/stm32f411discovery_debug.sh |  34 ++
 .../stm32f411discovery_download.cmd|  22 ++
 .../stm32f411discovery_download.sh |  38 +++
 hw/bsp/stm32f411discovery/syscfg.yml   |  66 
 13 files changed, 1307 insertions(+)

diff --git a/hw/bsp/stm32f411discovery/boot-stm32f411discovery.ld 
b/hw/bsp/stm32f411discovery/boot-stm32f411discovery.ld
new file mode 100644
index 000..0e547e4
--- /dev/null
+++ b/hw/bsp/stm32f411discovery/boot-stm32f411discovery.ld
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/* Linker script to configure memory regions. */
+MEMORY
+{
+  FLASH (rx) :  ORIGIN = 0x0800, LENGTH = 16K
+  RAM (rwx) :   ORIGIN = 0x2000, LENGTH = 128K
+}
+
+/* The bootloader does not contain an image header */
+_imghdr_size = 0x0;
diff --git a/hw/bsp/stm32f411discovery/bsp.yml 
b/hw/bsp/stm32f411discovery/bsp.yml
new file mode 100644
index 000..66bc620
--- /dev/null
+++ b/hw/bsp/stm32f411discovery/bsp.yml
@@ -0,0 +1,66 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+bsp.name: "STM32F411E-DISC0"
+bsp.url: https://www.st.com/en/evaluation-tools/32f411ediscovery.html
+bsp.maker: "STMicroelectronics"
+bsp.arch: cortex_m4
+bsp.compiler: compiler/arm-none-eabi-m4
+bsp.linkerscript:
+- "hw/bsp/stm32f411discovery/stm32f411discovery.ld"
+- "@apache-mynewt-core/hw/mcu/stm/stm32f4xx/stm32f411.ld"
+bsp.linkerscript.BOOT_LOADER.OVERWRITE:
+- "hw/bsp/stm32f411discovery/boot-stm32f411discovery.ld"
+- "@apache-mynewt-core/hw/mcu/stm/stm32f4xx/stm32f411.ld"
+bsp.downloadscript: "hw/bsp/stm32f411discovery/stm32f411discovery_download.sh"
+bsp.debugscript: "hw/bsp/stm32f411discovery/stm32f411discovery_debug.sh"
+bsp.downloadscript.WINDOWS.OVERWRITE: 
"hw/bsp/stm32f411discovery/stm32f411discovery_download.cmd"
+bsp.debugscript.WINDOWS.OVERWRITE: 
"hw/bsp/stm32f411discovery/stm32f411discovery_debug.cmd"
+
+bsp.flash_map:
+areas:
+# System areas.
+FLASH_AREA_BOOTLOADER:
+device: 0
+offset: 0x0800
+size: 16kB
+FLASH_AREA_IMAGE_0:
+device: 0
+offset: 0x0802
+size: 128kB
+FLASH_AREA_IMAGE_1:
+device: 0
+offset: 0x0804
+size: 128kB
+   

[GitHub] [mynewt-core] mlaz merged pull request #2203: Adding bsp/stm32f411discovery

2020-02-25 Thread GitBox
mlaz merged pull request #2203: Adding  bsp/stm32f411discovery 
URL: https://github.com/apache/mynewt-core/pull/2203
 
 
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] utzig commented on a change in pull request #2184: crypto/mbedtls: add hardware entropy config hooks

2020-02-25 Thread GitBox
utzig commented on a change in pull request #2184: crypto/mbedtls: add hardware 
entropy config hooks
URL: https://github.com/apache/mynewt-core/pull/2184#discussion_r383910115
 
 

 ##
 File path: hw/drivers/trng/src/mbed_entropy_alt.c
 ##
 @@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include 
+#include "mbedtls/config_mynewt.h"
+
+#ifdef MBEDTLS_ENTROPY_HARDWARE_ALT
 
 Review comment:
   I would avoid including `mbedtls/config_mynewt.h` and using instead `#if 
MYNEWT_VAL(MBEDTLS_ENTROPY_HARDWARE_ALT)` here.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] utzig commented on a change in pull request #2184: crypto/mbedtls: add hardware entropy config hooks

2020-02-25 Thread GitBox
utzig commented on a change in pull request #2184: crypto/mbedtls: add hardware 
entropy config hooks
URL: https://github.com/apache/mynewt-core/pull/2184#discussion_r383899100
 
 

 ##
 File path: hw/drivers/trng/src/mbed_entropy_alt.c
 ##
 @@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include 
+#include "mbedtls/config_mynewt.h"
+
+#ifdef MBEDTLS_ENTROPY_HARDWARE_ALT
+int
+mbedtls_hardware_poll(void *data, unsigned char *output, size_t len, size_t 
*olen)
+{
+struct trng_dev *trng;
+int ret;
+
+trng = (struct trng_dev *)os_dev_lookup("trng");
 
 Review comment:
   Maybe addding
   ```
   if (trng == NULL) {
   return -1;
   }
   ```
   What do you think?


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] utzig commented on a change in pull request #2184: crypto/mbedtls: add hardware entropy config hooks

2020-02-25 Thread GitBox
utzig commented on a change in pull request #2184: crypto/mbedtls: add hardware 
entropy config hooks
URL: https://github.com/apache/mynewt-core/pull/2184#discussion_r383898430
 
 

 ##
 File path: hw/drivers/trng/src/mbed_entropy_alt.c
 ##
 @@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include 
+#include "mbedtls/config_mynewt.h"
+
+#ifdef MBEDTLS_ENTROPY_HARDWARE_ALT
+int
+mbedtls_hardware_poll(void *data, unsigned char *output, size_t len, size_t 
*olen)
+{
+struct trng_dev *trng;
+int ret;
+
+trng = (struct trng_dev *)os_dev_lookup("trng");
+ret = trng_read(trng, output, len);
+if (ret == len) {
+*olen = len;
+} else {
+*olen = 0;
+}
 
 Review comment:
   `trng_read` does not return errors, so this testing could be eliminated by 
simply doing `*olen = trng_read(trng, output, len);`


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] apache-mynewt-bot commented on issue #2184: crypto/mbedtls: add hardware entropy config hooks

2020-02-25 Thread GitBox
apache-mynewt-bot commented on issue #2184: crypto/mbedtls: add hardware 
entropy config hooks
URL: https://github.com/apache/mynewt-core/pull/2184#issuecomment-590872342
 
 
   
   
   
   ## 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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] apache-mynewt-bot removed a comment on issue #2184: crypto/mbedtls: add hardware entropy config hooks

2020-02-25 Thread GitBox
apache-mynewt-bot removed a comment on issue #2184: crypto/mbedtls: add 
hardware entropy config hooks
URL: https://github.com/apache/mynewt-core/pull/2184#issuecomment-590610221
 
 
   
   
   
   ## 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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] nkaje commented on a change in pull request #2184: crypto/mbedtls: add hardware entropy config hooks

2020-02-25 Thread GitBox
nkaje commented on a change in pull request #2184: crypto/mbedtls: add hardware 
entropy config hooks
URL: https://github.com/apache/mynewt-core/pull/2184#discussion_r383882344
 
 

 ##
 File path: hw/drivers/trng/trng_da1469x/src/trng_da1469x.c
 ##
 @@ -105,3 +106,23 @@ da1469x_trng_init(struct os_dev *dev, void *arg)
 
 return 0;
 }
+
+#ifdef MBEDTLS_ENTROPY_HARDWARE_ALT
+int
+mbedtls_hardware_poll(void *data, unsigned char *output, size_t len, size_t 
*olen)
 
 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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] apache-mynewt-bot commented on issue #2203: Adding bsp/stm32f411discovery

2020-02-25 Thread GitBox
apache-mynewt-bot commented on issue #2203: Adding  bsp/stm32f411discovery 
URL: https://github.com/apache/mynewt-core/pull/2203#issuecomment-590866090
 
 
   
   
   
   ## RAT Report (2020-02-25 13:27:54)
   
   ## New files with unknown licenses
   
   * https://github.com/apache/mynewt-core/blob/ebeadf97aa7b8ba7a73bcf540cd4284ba48bc44e/hw/bsp/stm32f411discovery/include/bsp/stm32f4xx_hal_conf.h;>hw/bsp/stm32f411discovery/include/bsp/stm32f4xx_hal_conf.h
   * https://github.com/apache/mynewt-core/blob/ebeadf97aa7b8ba7a73bcf540cd4284ba48bc44e/hw/bsp/stm32f411discovery/src/arch/cortex_m4/startup_STM32F411.s;>hw/bsp/stm32f411discovery/src/arch/cortex_m4/startup_STM32F411.s
   
   
 Detailed analysis
   
   ## New files in this PR
   
   | License | File |
   |-|--|
   | AL | https://github.com/apache/mynewt-core/blob/ebeadf97aa7b8ba7a73bcf540cd4284ba48bc44e/hw/bsp/stm32f411discovery/boot-stm32f411discovery.ld;>hw/bsp/stm32f411discovery/boot-stm32f411discovery.ld
 |
   | AL | https://github.com/apache/mynewt-core/blob/ebeadf97aa7b8ba7a73bcf540cd4284ba48bc44e/hw/bsp/stm32f411discovery/bsp.yml;>hw/bsp/stm32f411discovery/bsp.yml
 |
   | AL | https://github.com/apache/mynewt-core/blob/ebeadf97aa7b8ba7a73bcf540cd4284ba48bc44e/hw/bsp/stm32f411discovery/include/bsp/bsp.h;>hw/bsp/stm32f411discovery/include/bsp/bsp.h
 |
   | ?  | https://github.com/apache/mynewt-core/blob/ebeadf97aa7b8ba7a73bcf540cd4284ba48bc44e/hw/bsp/stm32f411discovery/include/bsp/stm32f4xx_hal_conf.h;>hw/bsp/stm32f411discovery/include/bsp/stm32f4xx_hal_conf.h
 |
   | AL | https://github.com/apache/mynewt-core/blob/ebeadf97aa7b8ba7a73bcf540cd4284ba48bc44e/hw/bsp/stm32f411discovery/pkg.yml;>hw/bsp/stm32f411discovery/pkg.yml
 |
   | ?  | https://github.com/apache/mynewt-core/blob/ebeadf97aa7b8ba7a73bcf540cd4284ba48bc44e/hw/bsp/stm32f411discovery/src/arch/cortex_m4/startup_STM32F411.s;>hw/bsp/stm32f411discovery/src/arch/cortex_m4/startup_STM32F411.s
 |
   | AL | https://github.com/apache/mynewt-core/blob/ebeadf97aa7b8ba7a73bcf540cd4284ba48bc44e/hw/bsp/stm32f411discovery/src/hal_bsp.c;>hw/bsp/stm32f411discovery/src/hal_bsp.c
 |
   | AL | https://github.com/apache/mynewt-core/blob/ebeadf97aa7b8ba7a73bcf540cd4284ba48bc44e/hw/bsp/stm32f411discovery/stm32f411discovery.ld;>hw/bsp/stm32f411discovery/stm32f411discovery.ld
 |
   | AL | https://github.com/apache/mynewt-core/blob/ebeadf97aa7b8ba7a73bcf540cd4284ba48bc44e/hw/bsp/stm32f411discovery/stm32f411discovery_debug.cmd;>hw/bsp/stm32f411discovery/stm32f411discovery_debug.cmd
 |
   | AL | https://github.com/apache/mynewt-core/blob/ebeadf97aa7b8ba7a73bcf540cd4284ba48bc44e/hw/bsp/stm32f411discovery/stm32f411discovery_debug.sh;>hw/bsp/stm32f411discovery/stm32f411discovery_debug.sh
 |
   | AL | https://github.com/apache/mynewt-core/blob/ebeadf97aa7b8ba7a73bcf540cd4284ba48bc44e/hw/bsp/stm32f411discovery/stm32f411discovery_download.cmd;>hw/bsp/stm32f411discovery/stm32f411discovery_download.cmd
 |
   | AL | https://github.com/apache/mynewt-core/blob/ebeadf97aa7b8ba7a73bcf540cd4284ba48bc44e/hw/bsp/stm32f411discovery/stm32f411discovery_download.sh;>hw/bsp/stm32f411discovery/stm32f411discovery_download.sh
 |
   | AL | https://github.com/apache/mynewt-core/blob/ebeadf97aa7b8ba7a73bcf540cd4284ba48bc44e/hw/bsp/stm32f411discovery/syscfg.yml;>hw/bsp/stm32f411discovery/syscfg.yml
 |
   
   
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] apache-mynewt-bot removed a comment on issue #2203: Adding bsp/stm32f411discovery

2020-02-25 Thread GitBox
apache-mynewt-bot removed a comment on issue #2203: Adding  
bsp/stm32f411discovery 
URL: https://github.com/apache/mynewt-core/pull/2203#issuecomment-590486161
 
 
   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    hw/bsp/stm32f411discovery/include/bsp/stm32f4xx_hal_conf.h
   
   
   ```diff
   @@ -1,39 +1,39 @@
/**
   -  
**
   -  * @filestm32f4xx_hal_conf.h
   -  * @author  MCD Application Team
   -  * @version V1.2.4
   -  * @date06-May-2016
   -  * @brief   HAL configuration file
   -  
**
   -  * @attention
   -  *
   -  *  COPYRIGHT(c) 2016 STMicroelectronics
   -  *
   -  * Redistribution and use in source and binary forms, with or without 
modification,
   -  * are permitted provided that the following conditions are met:
   -  *   1. Redistributions of source code must retain the above copyright 
notice,
   -  *  this list of conditions and the following disclaimer.
   -  *   2. Redistributions in binary form must reproduce the above copyright 
notice,
   -  *  this list of conditions and the following disclaimer in the 
documentation
   -  *  and/or other materials provided with the distribution.
   -  *   3. Neither the name of STMicroelectronics nor the names of its 
contributors
   -  *  may be used to endorse or promote products derived from this 
software
   -  *  without specific prior written permission.
   -  *
   -  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 
IS"
   -  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
THE
   -  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
PURPOSE ARE
   -  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 
LIABLE
   -  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
CONSEQUENTIAL
   -  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
OR
   -  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
HOWEVER
   -  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
LIABILITY,
   -  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 
THE USE
   -  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   -  *
   -  
**
   -  */
   + 
**
   + * @filestm32f4xx_hal_conf.h
   + * @author  MCD Application Team
   + * @version V1.2.4
   + * @date06-May-2016
   + * @brief   HAL configuration file
   + 
**
   + * @attention
   + *
   + *  COPYRIGHT(c) 2016 STMicroelectronics
   + *
   + * Redistribution and use in source and binary forms, with or without 
modification,
   + * are permitted provided that the following conditions are met:
   + *   1. Redistributions of source code must retain the above copyright 
notice,
   + *  this list of conditions and the following disclaimer.
   + *   2. Redistributions in binary form must reproduce the above copyright 
notice,
   + *  this list of conditions and the following disclaimer in the 
documentation
   + *  and/or other materials provided with the distribution.
   + *   3. Neither the name of STMicroelectronics nor the names of its 
contributors
   + *  may be used to endorse or promote products derived from this 
software
   + *  without specific prior written permission.
   + *
   + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 
IS"
   + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
PURPOSE ARE
   + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 
LIABLE
   + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
CONSEQUENTIAL
   + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
OR
   + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
HOWEVER
   + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
LIABILITY,
   + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 
THE USE
   + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   + *
   + 
**
   + */

/* Define to prevent recursive inclusion 
-*/
#ifndef __STM32F4xx_HAL_CONF_H
   @@ -42,7 +42,7 @@
#include 

#ifdef __cplusplus
   - extern "C" {
   +extern "C" {
#endif

/* Exported types 

[GitHub] [mynewt-core] apache-mynewt-bot commented on issue #2203: Adding bsp/stm32f411discovery

2020-02-25 Thread GitBox
apache-mynewt-bot commented on issue #2203: Adding  bsp/stm32f411discovery 
URL: https://github.com/apache/mynewt-core/pull/2203#issuecomment-590866225
 
 
   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    hw/bsp/stm32f411discovery/include/bsp/stm32f4xx_hal_conf.h
   
   
   ```diff
   @@ -1,39 +1,39 @@
/**
   -  
**
   -  * @filestm32f4xx_hal_conf.h
   -  * @author  MCD Application Team
   -  * @version V1.2.4
   -  * @date06-May-2016
   -  * @brief   HAL configuration file
   -  
**
   -  * @attention
   -  *
   -  *  COPYRIGHT(c) 2016 STMicroelectronics
   -  *
   -  * Redistribution and use in source and binary forms, with or without 
modification,
   -  * are permitted provided that the following conditions are met:
   -  *   1. Redistributions of source code must retain the above copyright 
notice,
   -  *  this list of conditions and the following disclaimer.
   -  *   2. Redistributions in binary form must reproduce the above copyright 
notice,
   -  *  this list of conditions and the following disclaimer in the 
documentation
   -  *  and/or other materials provided with the distribution.
   -  *   3. Neither the name of STMicroelectronics nor the names of its 
contributors
   -  *  may be used to endorse or promote products derived from this 
software
   -  *  without specific prior written permission.
   -  *
   -  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 
IS"
   -  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
THE
   -  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
PURPOSE ARE
   -  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 
LIABLE
   -  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
CONSEQUENTIAL
   -  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
OR
   -  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
HOWEVER
   -  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
LIABILITY,
   -  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 
THE USE
   -  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   -  *
   -  
**
   -  */
   + 
**
   + * @filestm32f4xx_hal_conf.h
   + * @author  MCD Application Team
   + * @version V1.2.4
   + * @date06-May-2016
   + * @brief   HAL configuration file
   + 
**
   + * @attention
   + *
   + *  COPYRIGHT(c) 2016 STMicroelectronics
   + *
   + * Redistribution and use in source and binary forms, with or without 
modification,
   + * are permitted provided that the following conditions are met:
   + *   1. Redistributions of source code must retain the above copyright 
notice,
   + *  this list of conditions and the following disclaimer.
   + *   2. Redistributions in binary form must reproduce the above copyright 
notice,
   + *  this list of conditions and the following disclaimer in the 
documentation
   + *  and/or other materials provided with the distribution.
   + *   3. Neither the name of STMicroelectronics nor the names of its 
contributors
   + *  may be used to endorse or promote products derived from this 
software
   + *  without specific prior written permission.
   + *
   + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 
IS"
   + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
PURPOSE ARE
   + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 
LIABLE
   + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
CONSEQUENTIAL
   + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
OR
   + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
HOWEVER
   + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
LIABILITY,
   + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 
THE USE
   + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   + *
   + 
**
   + */

/* Define to prevent recursive inclusion 
-*/
#ifndef __STM32F4xx_HAL_CONF_H
   @@ -42,7 +42,7 @@
#include 

#ifdef __cplusplus
   - extern "C" {
   +extern "C" {
#endif

/* Exported types 

[GitHub] [mynewt-core] apache-mynewt-bot removed a comment on issue #2203: Adding bsp/stm32f411discovery

2020-02-25 Thread GitBox
apache-mynewt-bot removed a comment on issue #2203: Adding  
bsp/stm32f411discovery 
URL: https://github.com/apache/mynewt-core/pull/2203#issuecomment-590486413
 
 
   
   
   
   ## RAT Report (2020-02-24 18:43:18)
   
   ## New files with unknown licenses
   
   * https://github.com/apache/mynewt-core/blob/2ca1a49c962790cf6d845caa997302d1710b40b2/hw/bsp/stm32f411discovery/include/bsp/stm32f4xx_hal_conf.h;>hw/bsp/stm32f411discovery/include/bsp/stm32f4xx_hal_conf.h
   * https://github.com/apache/mynewt-core/blob/2ca1a49c962790cf6d845caa997302d1710b40b2/hw/bsp/stm32f411discovery/src/arch/cortex_m4/startup_STM32F411.s;>hw/bsp/stm32f411discovery/src/arch/cortex_m4/startup_STM32F411.s
   
   
 Detailed analysis
   
   ## New files in this PR
   
   | License | File |
   |-|--|
   | AL | https://github.com/apache/mynewt-core/blob/2ca1a49c962790cf6d845caa997302d1710b40b2/hw/bsp/stm32f411discovery/boot-stm32f411discovery.ld;>hw/bsp/stm32f411discovery/boot-stm32f411discovery.ld
 |
   | AL | https://github.com/apache/mynewt-core/blob/2ca1a49c962790cf6d845caa997302d1710b40b2/hw/bsp/stm32f411discovery/bsp.yml;>hw/bsp/stm32f411discovery/bsp.yml
 |
   | AL | https://github.com/apache/mynewt-core/blob/2ca1a49c962790cf6d845caa997302d1710b40b2/hw/bsp/stm32f411discovery/include/bsp/bsp.h;>hw/bsp/stm32f411discovery/include/bsp/bsp.h
 |
   | ?  | https://github.com/apache/mynewt-core/blob/2ca1a49c962790cf6d845caa997302d1710b40b2/hw/bsp/stm32f411discovery/include/bsp/stm32f4xx_hal_conf.h;>hw/bsp/stm32f411discovery/include/bsp/stm32f4xx_hal_conf.h
 |
   | AL | https://github.com/apache/mynewt-core/blob/2ca1a49c962790cf6d845caa997302d1710b40b2/hw/bsp/stm32f411discovery/pkg.yml;>hw/bsp/stm32f411discovery/pkg.yml
 |
   | ?  | https://github.com/apache/mynewt-core/blob/2ca1a49c962790cf6d845caa997302d1710b40b2/hw/bsp/stm32f411discovery/src/arch/cortex_m4/startup_STM32F411.s;>hw/bsp/stm32f411discovery/src/arch/cortex_m4/startup_STM32F411.s
 |
   | AL | https://github.com/apache/mynewt-core/blob/2ca1a49c962790cf6d845caa997302d1710b40b2/hw/bsp/stm32f411discovery/src/hal_bsp.c;>hw/bsp/stm32f411discovery/src/hal_bsp.c
 |
   | AL | https://github.com/apache/mynewt-core/blob/2ca1a49c962790cf6d845caa997302d1710b40b2/hw/bsp/stm32f411discovery/stm32f411discovery.ld;>hw/bsp/stm32f411discovery/stm32f411discovery.ld
 |
   | AL | https://github.com/apache/mynewt-core/blob/2ca1a49c962790cf6d845caa997302d1710b40b2/hw/bsp/stm32f411discovery/stm32f411discovery_debug.cmd;>hw/bsp/stm32f411discovery/stm32f411discovery_debug.cmd
 |
   | AL | https://github.com/apache/mynewt-core/blob/2ca1a49c962790cf6d845caa997302d1710b40b2/hw/bsp/stm32f411discovery/stm32f411discovery_debug.sh;>hw/bsp/stm32f411discovery/stm32f411discovery_debug.sh
 |
   | AL | https://github.com/apache/mynewt-core/blob/2ca1a49c962790cf6d845caa997302d1710b40b2/hw/bsp/stm32f411discovery/stm32f411discovery_download.cmd;>hw/bsp/stm32f411discovery/stm32f411discovery_download.cmd
 |
   | AL | https://github.com/apache/mynewt-core/blob/2ca1a49c962790cf6d845caa997302d1710b40b2/hw/bsp/stm32f411discovery/stm32f411discovery_download.sh;>hw/bsp/stm32f411discovery/stm32f411discovery_download.sh
 |
   | AL | https://github.com/apache/mynewt-core/blob/2ca1a49c962790cf6d845caa997302d1710b40b2/hw/bsp/stm32f411discovery/syscfg.yml;>hw/bsp/stm32f411discovery/syscfg.yml
 |
   
   
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] mlaz commented on a change in pull request #2203: Adding bsp/stm32f411discovery

2020-02-25 Thread GitBox
mlaz commented on a change in pull request #2203: Adding  
bsp/stm32f411discovery 
URL: https://github.com/apache/mynewt-core/pull/2203#discussion_r383876096
 
 

 ##
 File path: hw/bsp/stm32f411discovery/pkg.yml
 ##
 @@ -0,0 +1,42 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+pkg.name: hw/bsp/stm32f411discovery
+pkg.type: bsp
+pkg.description: BSP definition for the stm32f4 discovery board.
+pkg.author: "Apache Mynewt "
+pkg.homepage: "http://mynewt.apache.org/;
+pkg.keywords:
+- stm32
+- stm32f4
+- f411re
+- stm32f411ve
+- discovery
+
+pkg.cflags: -DSTM32F411xE
+
+pkg.cflags.HARDFLOAT:
+- -mfloat-abi=hard -mfpu=fpv4-sp-d16
+
+pkg.deps:
+- "@apache-mynewt-core/hw/mcu/stm/stm32f4xx"
+- "@apache-mynewt-core/libc/baselibc"
+
+pkg.deps.UART_0:
+- "@apache-mynewt-core/hw/drivers/uart/uart_hal"
 
 Review comment:
   fixed


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] mlaz commented on a change in pull request #2203: Adding bsp/stm32f411discovery

2020-02-25 Thread GitBox
mlaz commented on a change in pull request #2203: Adding  
bsp/stm32f411discovery 
URL: https://github.com/apache/mynewt-core/pull/2203#discussion_r383876148
 
 

 ##
 File path: hw/bsp/stm32f411discovery/src/hal_bsp.c
 ##
 @@ -0,0 +1,185 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+#include 
+
+#include "bsp/bsp.h"
+#include "os/mynewt.h"
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#if MYNEWT_VAL(PWM_0) || MYNEWT_VAL(PWM_1) || MYNEWT_VAL(PWM_2)
+#include 
+#endif
+
+const uint32_t stm32_flash_sectors[] = {
+0x0800, /* 16kB */
+0x08004000, /* 16kB */
+0x08008000, /* 16kB */
+0x0800c000, /* 16kB */
+0x0801, /* 64kB */
+0x0802, /* 128kB */
+0x0804, /* 128kB */
+0x0806, /* 128kB */
+0x0808, /* End of flash */
+};
+
+#define SZ (sizeof(stm32_flash_sectors) / sizeof(stm32_flash_sectors[0]))
+static_assert(MYNEWT_VAL(STM32_FLASH_NUM_AREAS) + 1 == SZ,
+  "STM32_FLASH_NUM_AREAS does not match flash sectors");
+
+#if MYNEWT_VAL(UART_0)
+const struct stm32_uart_cfg os_bsp_uart0_cfg = {
+.suc_uart = USART2,
+.suc_rcc_reg = >APB1ENR,
+.suc_rcc_dev = RCC_APB1ENR_USART2EN,
+.suc_pin_tx = MYNEWT_VAL(UART_0_PIN_TX),
+.suc_pin_rx = MYNEWT_VAL(UART_0_PIN_RX),
+.suc_pin_rts = MYNEWT_VAL(UART_0_PIN_RTS),
+.suc_pin_cts = MYNEWT_VAL(UART_0_PIN_CTS),
+.suc_pin_af = GPIO_AF7_USART2,
+.suc_irqn = USART2_IRQn,
+};
+#endif
+
+#if MYNEWT_VAL(UART_1)
+const struct stm32_uart_cfg os_bsp_uart1_cfg = {
+.suc_uart = USART1,
+.suc_rcc_reg = >APB2ENR,
+.suc_rcc_dev = RCC_APB2ENR_USART1EN,
+.suc_pin_tx = MYNEWT_VAL(UART_1_PIN_TX),
+.suc_pin_rx = MYNEWT_VAL(UART_1_PIN_RX),
+.suc_pin_rts = MYNEWT_VAL(UART_1_PIN_RTS),
+.suc_pin_cts = MYNEWT_VAL(UART_1_PIN_CTS),
+.suc_pin_af = GPIO_AF7_USART1,
+.suc_irqn = USART1_IRQn,
+};
+#endif
+
+#if MYNEWT_VAL(UART_2)
+const struct stm32_uart_cfg os_bsp_uart2_cfg = {
+.suc_uart = USART6,
+.suc_rcc_reg = >APB2ENR,
+.suc_rcc_dev = RCC_APB2ENR_USART6EN,
+.suc_pin_tx = MYNEWT_VAL(UART_2_PIN_TX),
+.suc_pin_rx = MYNEWT_VAL(UART_2_PIN_RX),
+.suc_pin_rts = -1,
+.suc_pin_cts = -1,
 
 Review comment:
   fixed


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] apache-mynewt-bot commented on issue #2205: hw/mcu/dialog: Split DCDC startup into 2 phases

2020-02-25 Thread GitBox
apache-mynewt-bot commented on issue #2205: hw/mcu/dialog: Split DCDC startup 
into 2 phases
URL: https://github.com/apache/mynewt-core/pull/2205#issuecomment-590857170
 
 
   
   
   
   ## 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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] apache-mynewt-bot removed a comment on issue #2205: hw/mcu/dialog: Split DCDC startup into 2 phases

2020-02-25 Thread GitBox
apache-mynewt-bot removed a comment on issue #2205: hw/mcu/dialog: Split DCDC 
startup into 2 phases
URL: https://github.com/apache/mynewt-core/pull/2205#issuecomment-590797853
 
 
   
   
   
   ## 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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] kasjer commented on issue #2201: Add base62 encoder/decoder

2020-02-25 Thread GitBox
kasjer commented on issue #2201: Add base62 encoder/decoder
URL: https://github.com/apache/mynewt-core/pull/2201#issuecomment-590852035
 
 
   it does not have / and it seems that it could be more convenient when used 
in URLs that use / to separate stuff.
   
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] utzig commented on issue #2201: Add base62 encoder/decoder

2020-02-25 Thread GitBox
utzig commented on issue #2201: Add base62 encoder/decoder
URL: https://github.com/apache/mynewt-core/pull/2201#issuecomment-590817998
 
 
   Why would someone use `base62` instead of `base64`?


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] utzig commented on a change in pull request #2203: Adding bsp/stm32f411discovery

2020-02-25 Thread GitBox
utzig commented on a change in pull request #2203: Adding  
bsp/stm32f411discovery 
URL: https://github.com/apache/mynewt-core/pull/2203#discussion_r383791984
 
 

 ##
 File path: hw/bsp/stm32f411discovery/src/hal_bsp.c
 ##
 @@ -0,0 +1,185 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+#include 
+
+#include "bsp/bsp.h"
+#include "os/mynewt.h"
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#if MYNEWT_VAL(PWM_0) || MYNEWT_VAL(PWM_1) || MYNEWT_VAL(PWM_2)
+#include 
+#endif
+
+const uint32_t stm32_flash_sectors[] = {
+0x0800, /* 16kB */
+0x08004000, /* 16kB */
+0x08008000, /* 16kB */
+0x0800c000, /* 16kB */
+0x0801, /* 64kB */
+0x0802, /* 128kB */
+0x0804, /* 128kB */
+0x0806, /* 128kB */
+0x0808, /* End of flash */
+};
+
+#define SZ (sizeof(stm32_flash_sectors) / sizeof(stm32_flash_sectors[0]))
+static_assert(MYNEWT_VAL(STM32_FLASH_NUM_AREAS) + 1 == SZ,
+  "STM32_FLASH_NUM_AREAS does not match flash sectors");
+
+#if MYNEWT_VAL(UART_0)
+const struct stm32_uart_cfg os_bsp_uart0_cfg = {
+.suc_uart = USART2,
+.suc_rcc_reg = >APB1ENR,
+.suc_rcc_dev = RCC_APB1ENR_USART2EN,
+.suc_pin_tx = MYNEWT_VAL(UART_0_PIN_TX),
+.suc_pin_rx = MYNEWT_VAL(UART_0_PIN_RX),
+.suc_pin_rts = MYNEWT_VAL(UART_0_PIN_RTS),
+.suc_pin_cts = MYNEWT_VAL(UART_0_PIN_CTS),
+.suc_pin_af = GPIO_AF7_USART2,
+.suc_irqn = USART2_IRQn,
+};
+#endif
+
+#if MYNEWT_VAL(UART_1)
+const struct stm32_uart_cfg os_bsp_uart1_cfg = {
+.suc_uart = USART1,
+.suc_rcc_reg = >APB2ENR,
+.suc_rcc_dev = RCC_APB2ENR_USART1EN,
+.suc_pin_tx = MYNEWT_VAL(UART_1_PIN_TX),
+.suc_pin_rx = MYNEWT_VAL(UART_1_PIN_RX),
+.suc_pin_rts = MYNEWT_VAL(UART_1_PIN_RTS),
+.suc_pin_cts = MYNEWT_VAL(UART_1_PIN_CTS),
+.suc_pin_af = GPIO_AF7_USART1,
+.suc_irqn = USART1_IRQn,
+};
+#endif
+
+#if MYNEWT_VAL(UART_2)
+const struct stm32_uart_cfg os_bsp_uart2_cfg = {
+.suc_uart = USART6,
+.suc_rcc_reg = >APB2ENR,
+.suc_rcc_dev = RCC_APB2ENR_USART6EN,
+.suc_pin_tx = MYNEWT_VAL(UART_2_PIN_TX),
+.suc_pin_rx = MYNEWT_VAL(UART_2_PIN_RX),
+.suc_pin_rts = -1,
+.suc_pin_cts = -1,
 
 Review comment:
   Better to use `MYNEWT_VAL(UART_2_PIN_RTS)` and `MYNEWT_VAL(UART_2_PIN_CTS)` 
here.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] utzig commented on a change in pull request #2203: Adding bsp/stm32f411discovery

2020-02-25 Thread GitBox
utzig commented on a change in pull request #2203: Adding  
bsp/stm32f411discovery 
URL: https://github.com/apache/mynewt-core/pull/2203#discussion_r383790885
 
 

 ##
 File path: hw/bsp/stm32f411discovery/pkg.yml
 ##
 @@ -0,0 +1,42 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+pkg.name: hw/bsp/stm32f411discovery
+pkg.type: bsp
+pkg.description: BSP definition for the stm32f4 discovery board.
+pkg.author: "Apache Mynewt "
+pkg.homepage: "http://mynewt.apache.org/;
+pkg.keywords:
+- stm32
+- stm32f4
+- f411re
+- stm32f411ve
+- discovery
+
+pkg.cflags: -DSTM32F411xE
+
+pkg.cflags.HARDFLOAT:
+- -mfloat-abi=hard -mfpu=fpv4-sp-d16
+
+pkg.deps:
+- "@apache-mynewt-core/hw/mcu/stm/stm32f4xx"
+- "@apache-mynewt-core/libc/baselibc"
+
+pkg.deps.UART_0:
+- "@apache-mynewt-core/hw/drivers/uart/uart_hal"
 
 Review comment:
   The driver is already included by `hw/mcu/stm/stm32_common` package so this 
can be removed.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] apache-mynewt-bot commented on issue #2205: hw/mcu/dialog: Split DCDC startup into 2 phases

2020-02-25 Thread GitBox
apache-mynewt-bot commented on issue #2205: hw/mcu/dialog: Split DCDC startup 
into 2 phases
URL: https://github.com/apache/mynewt-core/pull/2205#issuecomment-590797853
 
 
   
   
   
   ## 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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] utzig commented on issue #2184: crypto/mbedtls: Enable AES and SECP256R1

2020-02-25 Thread GitBox
utzig commented on issue #2184: crypto/mbedtls: Enable AES and SECP256R1
URL: https://github.com/apache/mynewt-core/pull/2184#issuecomment-590781703
 
 
   The name "Enable AES and SECP256R1" has no relation with the changes...


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] utzig commented on a change in pull request #2184: crypto/mbedtls: Enable AES and SECP256R1

2020-02-25 Thread GitBox
utzig commented on a change in pull request #2184: crypto/mbedtls: Enable AES 
and SECP256R1
URL: https://github.com/apache/mynewt-core/pull/2184#discussion_r383770897
 
 

 ##
 File path: hw/drivers/trng/trng_da1469x/src/trng_da1469x.c
 ##
 @@ -105,3 +106,23 @@ da1469x_trng_init(struct os_dev *dev, void *arg)
 
 return 0;
 }
+
+#ifdef MBEDTLS_ENTROPY_HARDWARE_ALT
+int
+mbedtls_hardware_poll(void *data, unsigned char *output, size_t len, size_t 
*olen)
 
 Review comment:
   This would be way better if it was located in 
`hw/drivers/trng/src/mbed_entropy_alt.c` (or any other similar name) so that it 
would be automatically usable by all `trng` drivers.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] andrzej-kaczmarek commented on issue #2204: Dialog 1V8 Power Source

2020-02-25 Thread GitBox
andrzej-kaczmarek commented on issue #2204: Dialog 1V8 Power Source
URL: https://github.com/apache/mynewt-core/pull/2204#issuecomment-590778771
 
 
   code looks good, although it does not really solve any problem since someone 
may want different DCDC configuration and there's no way to do this currently. 
since there are quite extensive settings for DCDC in Dialog, I think it would 
be the best if BSP can configure registers directly and then MCU code should 
retain them properly (to restore after wakeup) and enable DCDC. here's PR which 
allows this: https://github.com/apache/mynewt-core/pull/2205


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] andrzej-kaczmarek opened a new pull request #2205: hw/mcu/dialog: Split DCDC startup into 2 phases

2020-02-25 Thread GitBox
andrzej-kaczmarek opened a new pull request #2205: hw/mcu/dialog: Split DCDC 
startup into 2 phases
URL: https://github.com/apache/mynewt-core/pull/2205
 
 
   Currently DCDC configuration is hardcoded and it's not really possible
   to change it in BSP. This patch makes it easier by splitting DCDC
   startup into 2 phases: initialization and enabling.
   
   Initialization is done in SystemInit and it only configures registers.
   DCDC is then enabled in hal_system_init. This allows to inject extra
   configuration in BSP startup code by modifying DCDC registers between
   both calls and proper configuration will be retained on wakeup as
   expected.


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:
us...@infra.apache.org


With regards,
Apache Git Services