[GitHub] [mynewt-newt] ccollins476ad commented on a change in pull request #397: Add include_dirs setting to syscfg

2020-04-30 Thread GitBox


ccollins476ad commented on a change in pull request #397:
URL: https://github.com/apache/mynewt-newt/pull/397#discussion_r418196584



##
File path: newt/builder/buildpackage.go
##
@@ -251,6 +252,16 @@ func (bpkg *BuildPackage) publicIncludeDirs(bspPkg 
*pkg.BspPackage) []string {
 
sdkIncls := bpkg.findSdkIncludes()
incls = append(incls, sdkIncls...)
+
+   settings := b.cfg.AllSettingsForLpkg(bpkg.rpkg.Lpkg)
+
+   inclDirs, err := bpkg.rpkg.Lpkg.PkgY.GetValStringSlice(
+   "pkg.include_dirs", settings)
+   util.OneTimeWarningError(err)
+
+   for _, src := range inclDirs {

Review comment:
   nitpick: `src` is an odd name to use here.  Something like `dir` feels 
more appropriate to me.





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




[GitHub] [mynewt-mcumgr] de-nordic commented on pull request #79: zephyr: adapt to changes in flash_img.c

2020-04-30 Thread GitBox


de-nordic commented on pull request #79:
URL: https://github.com/apache/mynewt-mcumgr/pull/79#issuecomment-621891641


   Thanks!



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




[GitHub] [mynewt-core] apache-mynewt-bot commented on pull request #2279: [RFC] TinyUSB integration

2020-04-30 Thread GitBox


apache-mynewt-bot commented on pull request #2279:
URL: https://github.com/apache/mynewt-core/pull/2279#issuecomment-621873550


   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    hw/usb/tinyusb/cdc_console/src/cdc_console.c
   
   
   ```diff
   @@ -41,8 +41,9 @@
written = tud_cdc_write_char(c);
if (tud_cdc_write_available() == 0) {
tud_cdc_write_flush();
   -if (written == 0)
   +if (written == 0) {
tud_cdc_write_char(c);
   +}
}
}

   ```
   
   
   
    hw/usb/tinyusb/std_descriptors/include/tusb_config.h
   
   
   ```diff
   @@ -37,7 +37,7 @@

#include 

   -// defined by compiler flags for flexibility
   +/* defined by compiler flags for flexibility */
#ifndef CFG_TUSB_MCU
#error CFG_TUSB_MCU must be defined
#endif
   ```
   
   
   
    hw/usb/tinyusb/std_descriptors/src/std_descriptors.c
   
   
   ```diff
   @@ -48,10 +48,10 @@
#if MYNEWT_VAL(USBD_HID_REPORT_ID_KEYBOARD) || 
MYNEWT_VAL(USBD_HID_REPORT_ID_MOUSE)
const uint8_t desc_hid_report[] = {
#if MYNEWT_VAL(USBD_HID_REPORT_ID_KEYBOARD)
   -TUD_HID_REPORT_DESC_KEYBOARD( MYNEWT_VAL(USBD_HID_REPORT_ID_KEYBOARD), 
),
   +TUD_HID_REPORT_DESC_KEYBOARD(MYNEWT_VAL(USBD_HID_REPORT_ID_KEYBOARD), ),
#endif
#if MYNEWT_VAL(USBD_HID_REPORT_ID_MOUSE)
   -TUD_HID_REPORT_DESC_MOUSE   ( HID_REPORT_ID(REPORT_ID_MOUSE), )
   +TUD_HID_REPORT_DESC_MOUSE   (HID_REPORT_ID(REPORT_ID_MOUSE), )
#endif
};
#else
   @@ -108,33 +108,33 @@
#endif /* CFG_TUD_HID */

const tusb_desc_device_t desc_device = {
   -.bLength= sizeof(tusb_desc_device_t),
   -.bDescriptorType= TUSB_DESC_DEVICE,
   -.bcdUSB = 0x0200,
   +.bLength = sizeof(tusb_desc_device_t),
   +.bDescriptorType = TUSB_DESC_DEVICE,
   +.bcdUSB = 0x0200,

#if CFG_TUD_CDC
/*
 * Use Interface Association Descriptor (IAD) for CDC
 * As required by USB Specs IAD's subclass must be common class (2) and 
protocol must be IAD (1)
 */
   -.bDeviceClass   = TUSB_CLASS_MISC,
   -.bDeviceSubClass= MISC_SUBCLASS_COMMON,
   -.bDeviceProtocol= MISC_PROTOCOL_IAD,
   +.bDeviceClass = TUSB_CLASS_MISC,
   +.bDeviceSubClass = MISC_SUBCLASS_COMMON,
   +.bDeviceProtocol = MISC_PROTOCOL_IAD,
#else
   -.bDeviceClass   = 0x00,
   -.bDeviceSubClass= 0x00,
   -.bDeviceProtocol= 0x00,
   -#endif
   -
   -.bMaxPacketSize0= CFG_TUD_ENDPOINT0_SIZE,
   -
   -.idVendor   = MYNEWT_VAL(USBD_VID),
   -.idProduct  = MYNEWT_VAL(USBD_PID),
   -.bcdDevice  = USBD_PRODUCT_RELEASE_NUMBER,
   -
   -.iManufacturer  = 0x02,
   -.iProduct   = 0x03,
   -.iSerialNumber  = 0x01,
   +.bDeviceClass = 0x00,
   +.bDeviceSubClass = 0x00,
   +.bDeviceProtocol = 0x00,
   +#endif
   +
   +.bMaxPacketSize0 = CFG_TUD_ENDPOINT0_SIZE,
   +
   +.idVendor = MYNEWT_VAL(USBD_VID),
   +.idProduct = MYNEWT_VAL(USBD_PID),
   +.bcdDevice = USBD_PRODUCT_RELEASE_NUMBER,
   +
   +.iManufacturer = 0x02,
   +.iProduct = 0x03,
   +.iSerialNumber = 0x01,

.bNumConfigurations = 0x01
};
   @@ -146,12 +146,14 @@
const uint8_t *
tud_descriptor_device_cb(void)
{
   -  return (const uint8_t *)&desc_device;
   -}
   -
   -//+
   -// Configuration Descriptor
   -//+
   +return (const uint8_t *)&desc_device;
   +}
   +
   +/*
   +   +
   +   Configuration Descriptor
   +   +
   + */

enum {
#if CFG_TUD_CDC
   @@ -209,8 +211,7 @@
return desc_configuration;
}

   -const char *string_desc_arr[] =
   -{
   +const char *string_desc_arr[] = {
MYNEWT_VAL(USBD_VENDOR_STRING),
MYNEWT_VAL(USBD_PRODUCT_STRING),
MYNEWT_VAL(USBD_CDC_DECRIPTOR_STRING),
   @@ -224,7 +225,8 @@
 * Invoked when received GET STRING DESCRIPTOR request
 * Application return pointer to descriptor, whose contents must exist long 
enough for transfer to complete
 */
   -const uint16_t *tud_descriptor_string_cb(uint8_t index, uint16_t langid)
   +const uint16_t *
   +tud_descriptor_string_cb(uint8_t index, uint16_t langid)
{
int char_num = 0;
int i;
   ```
   
   



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 thi

[GitHub] [mynewt-core] kasjer opened a new pull request #2279: [RFC] TinyUSB integration

2020-04-30 Thread GitBox


kasjer opened a new pull request #2279:
URL: https://github.com/apache/mynewt-core/pull/2279


   ## TinyUSB integration ##
   TinyUSB is know for a while to have support for mynewt.
   This work makes it easier to use it with mynewt base projects.
   This work includes:
   - USB task creation
   - mynewt glue to CDC
   - mynewt glue to HID
   - hardware initialization code that could not be used as is from TinyUSB 
repository (BSP code duplicates in both repositories)
   - Console over USB that can be used instead of UART or RTT
   
   ## Before this can be merge ##
   **newt** tool needs to support **pkg.include_dirs** keyword that is 
introduced in by this PR https://github.com/apache/mynewt-newt/pull/397
   Once this is approved pull request to TinyUSB repository will be made to 
change to **pkg.yml** to use this new keyword.
   Without this it is possible to use TinyUSB but a lot of packages would need
   ```yml
   pkg.cflags:
   - "-I@tinyusb/src"
   ```



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




[mynewt-core] branch master updated: Define peripheral vectors number for STM32F401xC

2020-04-30 Thread jerzy
This is an automated email from the ASF dual-hosted git repository.

jerzy 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 1a5d05a  Define peripheral vectors number for STM32F401xC
1a5d05a is described below

commit 1a5d05a652fc71d0a41c3392c5976220a903bcbb
Author: Jerzy Kasenberg 
AuthorDate: Wed Apr 29 09:16:15 2020 +0200

Define peripheral vectors number for STM32F401xC

Number of vector was not defined for STM32F401xC MCUs.
---
 hw/mcu/stm/stm32f4xx/include/mcu/cmsis_nvic.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/mcu/stm/stm32f4xx/include/mcu/cmsis_nvic.h 
b/hw/mcu/stm/stm32f4xx/include/mcu/cmsis_nvic.h
index 78a90e9..b7f996b 100644
--- a/hw/mcu/stm/stm32f4xx/include/mcu/cmsis_nvic.h
+++ b/hw/mcu/stm/stm32f4xx/include/mcu/cmsis_nvic.h
@@ -9,7 +9,7 @@
 
 #include 
 
-#if defined(STM32F401xE) || defined(STM32F407xx) || defined(STM32F405xx)
+#if defined(STM32F401xE) || defined(STM32F401xC) || defined(STM32F407xx) || 
defined(STM32F405xx)
  #define MCU_NUM_PERIPH_VECTORS 82
 #elif defined(STM32F411xE)
  #define MCU_NUM_PERIPH_VECTORS 86



[mynewt-mcumgr] branch master updated: zephyr: adapt to changes in flash_img.c

2020-04-30 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-mcumgr.git


The following commit(s) were added to refs/heads/master by this push:
 new bde2812  zephyr: adapt to changes in flash_img.c
 new 9f6555a  Merge pull request #79 from hakonfam/stream_flash
bde2812 is described below

commit bde2812e8f1c635bdb1c1e56b8b24c1d37d3a79b
Author: Håkon Øye Amundsen 
AuthorDate: Wed Apr 29 14:15:04 2020 +0200

zephyr: adapt to changes in flash_img.c

Update member access of context.

Signed-off-by: Håkon Øye Amundsen 
---
 cmd/img_mgmt/port/zephyr/src/zephyr_img_mgmt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmd/img_mgmt/port/zephyr/src/zephyr_img_mgmt.c 
b/cmd/img_mgmt/port/zephyr/src/zephyr_img_mgmt.c
index af9abbb..e5db289 100644
--- a/cmd/img_mgmt/port/zephyr/src/zephyr_img_mgmt.c
+++ b/cmd/img_mgmt/port/zephyr/src/zephyr_img_mgmt.c
@@ -292,7 +292,7 @@ img_mgmt_impl_write_image_data(unsigned int offset, const 
void *data,
}
}
 
-   if (offset != ctx->bytes_written + ctx->buf_bytes) {
+   if (offset != ctx->stream.bytes_written + ctx->stream.buf_bytes) {
return MGMT_ERR_EUNKNOWN;
}
 



[GitHub] [mynewt-nimble] apache-mynewt-bot commented on pull request #810: WIP: use port dependent macros instead of FreeRTOS functions

2020-04-30 Thread GitBox


apache-mynewt-bot commented on pull request #810:
URL: https://github.com/apache/mynewt-nimble/pull/810#issuecomment-621762105


   
   
   
   ## 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




[GitHub] [mynewt-nimble] edoput opened a new pull request #810: WIP: use port dependent macros instead of FreeRTOS functions

2020-04-30 Thread GitBox


edoput opened a new pull request #810:
URL: https://github.com/apache/mynewt-nimble/pull/810


   Management of critical section is done through a combination of the FreeRTOS
   API and port dependent configuration.
   
   Most of the time the port uses critical section management exposed by 
FreeRTOS by
   defining as such
   
   ```C
   extern void vPortEnterCritical(void);
   #define portENTER_CRITICAL() vPortEnterCritical();
   ...
   ```
   
   Moreover FreeRTOS does not expose an API for critical section detection
   as it is port dependent. This will rely on the macro `portIS_IN_CRITICAL` 
that
   a port should implement when using nimble in conjunction with FreeRTOS.



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




[GitHub] [mynewt-nimble] edoput commented on pull request #810: WIP: use port dependent macros instead of FreeRTOS functions

2020-04-30 Thread GitBox


edoput commented on pull request #810:
URL: https://github.com/apache/mynewt-nimble/pull/810#issuecomment-621761633


   I would also like to point in the docs that this macro should be defined by 
the port
   but I'm not finding any docs for the port yet.



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




[GitHub] [mynewt-core] apache-mynewt-bot commented on pull request #2278: Define peripheral vectors number for STM32F401xC

2020-04-30 Thread GitBox


apache-mynewt-bot commented on pull request #2278:
URL: https://github.com/apache/mynewt-core/pull/2278#issuecomment-621748172


   
   
   
   ## 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




[GitHub] [mynewt-mcumgr] de-nordic commented on pull request #79: zephyr: adapt to changes in flash_img.c

2020-04-30 Thread GitBox


de-nordic commented on pull request #79:
URL: https://github.com/apache/mynewt-mcumgr/pull/79#issuecomment-621746225


   Hi @mlaz can you merge it?



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




[GitHub] [mynewt-core] kasjer opened a new pull request #2278: Define peripheral vectors number for STM32F401xC

2020-04-30 Thread GitBox


kasjer opened a new pull request #2278:
URL: https://github.com/apache/mynewt-core/pull/2278


   Number of vector was not defined for STM32F401xC MCUs.



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




[GitHub] [mynewt-newt] michal-narajowski opened a new pull request #397: Add include_dirs setting to syscfg

2020-04-30 Thread GitBox


michal-narajowski opened a new pull request #397:
URL: https://github.com/apache/mynewt-newt/pull/397


   Allows to specify directories to include in an external SDK
   that does not follow the convention used by Newt of putting
   everything under "src/ext/".



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