[GitHub] [incubator-nuttx] yamt commented on a change in pull request #274: Improve sim timer
yamt commented on a change in pull request #274: Improve sim timer URL: https://github.com/apache/incubator-nuttx/pull/274#discussion_r379289488 ## File path: arch/sim/src/sim/up_rtc.c ## @@ -0,0 +1,127 @@ +/ + * arch/sim/src/sim/up_rtc.c + * + * 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. + * + / + +/ + * Included Files + / + +#include + +#include +#include +#include + +#include "up_internal.h" + +/ + * Private Function Prototypes + / + +static int sim_rtc_rdtime(FAR struct rtc_lowerhalf_s *lower, + FAR struct rtc_time *rtctime); +static int sim_rtc_settime(FAR struct rtc_lowerhalf_s *lower, + FAR const struct rtc_time *rtctime); +static bool sim_rtc_havesettime(FAR struct rtc_lowerhalf_s *lower); + +/ + * Private Data + / + +static const struct rtc_ops_s g_sim_rtc_ops = +{ + .rdtime = sim_rtc_rdtime, + .settime = sim_rtc_settime, + .havesettime = sim_rtc_havesettime, +}; + +static struct rtc_lowerhalf_s g_sim_rtc = +{ + .ops = &g_sim_rtc_ops, +}; + +/ + * Private Functions + / + +static int sim_rtc_rdtime(FAR struct rtc_lowerhalf_s *lower, + FAR struct rtc_time *rtctime) +{ + uint64_t nsec; + time_t sec; + + + nsec = host_gettime(true); + sec = nsec / NSEC_PER_SEC; + nsec -= sec * NSEC_PER_SEC; + + gmtime_r(&sec, (FAR struct tm *)rtctime); + rtctime->tm_nsec = nsec; + + return OK; +} + +static int sim_rtc_settime(FAR struct rtc_lowerhalf_s *lower, + FAR const struct rtc_time *rtctime) +{ + uint64_t nsec; + + nsec = mktime((FAR struct tm *)rtctime); + nsec *= NSEC_PER_SEC; + nsec += rtctime->tm_nsec; + host_settime(true, nsec); Review comment: isn't host clock_settime failing for some reasons? 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] [incubator-nuttx] yamt opened a new pull request #280: tiva/lm3s6965-ek: Fix a build error with certain configurations
yamt opened a new pull request #280: tiva/lm3s6965-ek: Fix a build error with certain configurations URL: https://github.com/apache/incubator-nuttx/pull/280 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
[incubator-nuttx] branch master updated: tiva_serial.c: Make this buildable with certain configurations
This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git The following commit(s) were added to refs/heads/master by this push: new f79b47a tiva_serial.c: Make this buildable with certain configurations f79b47a is described below commit f79b47ad25e4f79e14ce737d8c80c1f45fbd2c56 Author: YAMAMOTO Takashi AuthorDate: Fri Feb 14 15:27:40 2020 +0900 tiva_serial.c: Make this buildable with certain configurations --- arch/arm/src/tiva/common/tiva_serial.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/src/tiva/common/tiva_serial.c b/arch/arm/src/tiva/common/tiva_serial.c index c852c8b..a6ccc0f 100644 --- a/arch/arm/src/tiva/common/tiva_serial.c +++ b/arch/arm/src/tiva/common/tiva_serial.c @@ -1322,7 +1322,7 @@ static bool up_txempty(struct uart_dev_s *dev) * / -#ifndef CONFIG_NO_SERIAL_CONSOLE +#ifdef USE_EARLYSERIALINIT void up_earlyserialinit(void) { /* NOTE: All GPIO configuration for the UARTs was performed in @@ -1361,7 +1361,7 @@ void up_earlyserialinit(void) up_setup(&CONSOLE_DEV); #endif } -#endif /* !CONFIG_NO_SERIAL_CONSOLE */ +#endif /* !USE_EARLYSERIALINIT */ / * Name: up_serialinit
[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #278: tiva_serial.c: Make this buildable with certain configurations
xiaoxiang781216 merged pull request #278: tiva_serial.c: Make this buildable with certain configurations URL: https://github.com/apache/incubator-nuttx/pull/278 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] [incubator-nuttx] yamt opened a new pull request #279: tiva/lm3s6965-ek: Add CONFIG_BOARD_LATE_INITIALIZE
yamt opened a new pull request #279: tiva/lm3s6965-ek: Add CONFIG_BOARD_LATE_INITIALIZE URL: https://github.com/apache/incubator-nuttx/pull/279 A shrinked copy of the sim version. 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] [incubator-nuttx] yamt opened a new pull request #278: tiva_serial.c: Make this buildable with certain configurations
yamt opened a new pull request #278: tiva_serial.c: Make this buildable with certain configurations URL: https://github.com/apache/incubator-nuttx/pull/278 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] [incubator-nuttx] liuguo09 opened a new pull request #277: sim/userfs: add worker thread config to fix build break
liuguo09 opened a new pull request #277: sim/userfs: add worker thread config to fix build break URL: https://github.com/apache/incubator-nuttx/pull/277 net/loopback.c:75:4: error: #error Worker thread support is required (CONFIG_SCHED_WORKQUEUE) # error Worker thread support is required (CONFIG_SCHED_WORKQUEUE) ^ make[1]: *** [loopback.o] Error 1 Change-Id: I549692fa271a65b1f70a80b8988e84ae0be886f4 Signed-off-by: liuhaitao 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] [incubator-nuttx-apps] xiaoxiang781216 merged pull request #67: wireless: gs2200m: Add support for setsockopt_request()
xiaoxiang781216 merged pull request #67: wireless: gs2200m: Add support for setsockopt_request() URL: https://github.com/apache/incubator-nuttx-apps/pull/67 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
[incubator-nuttx-apps] branch master updated: wireless: gs2200m: Add support for setsockopt_request()
This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git The following commit(s) were added to refs/heads/master by this push: new de4d52d wireless: gs2200m: Add support for setsockopt_request() de4d52d is described below commit de4d52d465fee9cb9ed48e8d1b8d73e8f5888519 Author: Masayuki Ishikawa AuthorDate: Fri Feb 14 13:13:06 2020 +0900 wireless: gs2200m: Add support for setsockopt_request() NOTE: Just check parameters and do nothing special Signed-off-by: Masayuki Ishikawa --- wireless/gs2200m/gs2200m_main.c | 74 +++-- 1 file changed, 72 insertions(+), 2 deletions(-) diff --git a/wireless/gs2200m/gs2200m_main.c b/wireless/gs2200m/gs2200m_main.c index 75cc71f..66c3541 100644 --- a/wireless/gs2200m/gs2200m_main.c +++ b/wireless/gs2200m/gs2200m_main.c @@ -1221,8 +1221,78 @@ err_out: static int setsockopt_request(int fd, FAR struct gs2200m_s *priv, FAR void *hdrbuf) { - DEBUGASSERT(false); - return -ENOSYS; + FAR struct usrsock_request_setsockopt_s *req = hdrbuf; + struct usrsock_message_req_ack_s resp; + FAR struct usock_s *usock; + ssize_t rlen; + int ret = 0; + int value; + + DEBUGASSERT(priv); + DEBUGASSERT(req); + + gs2200m_printf("%s: called \n", __func__); + + /* Check if this socket exists. */ + + usock = gs2200m_socket_get(priv, req->usockid); + + if (!usock) +{ + ret = -EBADFD; + goto prepare; +} + + if (req->level != SOL_SOCKET) +{ + gs2200m_printf("setsockopt: level=%d not supported\n", + __func__, req->level); + ret = -ENOPROTOOPT; + goto prepare; +} + + if (req->option != SO_REUSEADDR) +{ + gs2200m_printf("setsockopt: option=%d not supported\n", + __func__, req->option); + ret = -ENOPROTOOPT; + goto prepare; +} + + if (req->valuelen < sizeof(value)) +{ + ret = -EINVAL; + goto prepare; +} + + /* Read value. */ + + rlen = read(fd, &value, sizeof(value)); + + if (rlen < 0 || rlen < sizeof(value)) +{ + ret = -EFAULT; + goto prepare; +} + + /* Debug print */ + + gs2200m_printf("setsockopt: option=%d value=%d\n", + __func__, req->option, value); + + ret = OK; + +prepare: + + /* Send ACK response */ + + memset(&resp, 0, sizeof(resp)); + resp.result = ret; + + ret = _send_ack_common(fd, req->head.xid, &resp); + + gs2200m_printf("%s: end (ret=%d) \n", __func__, ret); + return ret; } /
[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #272: Sim: loadable module definitions
xiaoxiang781216 merged pull request #272: Sim: loadable module definitions URL: https://github.com/apache/incubator-nuttx/pull/272 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
[incubator-nuttx] branch master updated (7f1f930 -> 3df686e)
This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git. from 7f1f930 Remove unneeded dependency on USB add 3ead779 sim: Add loadable module definitions add 3df686e sim: berr() unknown relocation type No new revisions were added by this update. Summary of changes: boards/sim/sim/sim/configs/cxxtest/Make.defs | 17 + boards/sim/sim/sim/configs/nsh2/Make.defs| 17 + boards/sim/sim/sim/scripts/Make.defs | 17 + libs/libc/machine/sim/arch_elf.c | 1 + 4 files changed, 52 insertions(+)
[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #276: Fix LMS36965 memory card detection
xiaoxiang781216 merged pull request #276: Fix LMS36965 memory card detection URL: https://github.com/apache/incubator-nuttx/pull/276 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
[incubator-nuttx] branch master updated (0b25b96 -> 7f1f930)
This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git. from 0b25b96 net/netlink/netlink_route.c: Fix a typo. add 1832172 Fix wrong name for CONFIG_MMCSD_SPI add 1200c6d Using debug macros for memory card add 7f1f930 Remove unneeded dependency on USB No new revisions were added by this update. Summary of changes: boards/arm/tiva/lm3s6965-ek/src/lm_appinit.c | 29 1 file changed, 8 insertions(+), 21 deletions(-)
[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #274: Improve sim timer
xiaoxiang781216 commented on a change in pull request #274: Improve sim timer URL: https://github.com/apache/incubator-nuttx/pull/274#discussion_r379265841 ## File path: arch/sim/src/sim/up_rtc.c ## @@ -0,0 +1,127 @@ +/ + * arch/sim/src/sim/up_rtc.c + * + * 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. + * + / + +/ + * Included Files + / + +#include + +#include +#include +#include + +#include "up_internal.h" + +/ + * Private Function Prototypes + / + +static int sim_rtc_rdtime(FAR struct rtc_lowerhalf_s *lower, + FAR struct rtc_time *rtctime); +static int sim_rtc_settime(FAR struct rtc_lowerhalf_s *lower, + FAR const struct rtc_time *rtctime); +static bool sim_rtc_havesettime(FAR struct rtc_lowerhalf_s *lower); + +/ + * Private Data + / + +static const struct rtc_ops_s g_sim_rtc_ops = +{ + .rdtime = sim_rtc_rdtime, + .settime = sim_rtc_settime, + .havesettime = sim_rtc_havesettime, +}; + +static struct rtc_lowerhalf_s g_sim_rtc = +{ + .ops = &g_sim_rtc_ops, +}; + +/ + * Private Functions + / + +static int sim_rtc_rdtime(FAR struct rtc_lowerhalf_s *lower, + FAR struct rtc_time *rtctime) +{ + uint64_t nsec; + time_t sec; + + + nsec = host_gettime(true); + sec = nsec / NSEC_PER_SEC; + nsec -= sec * NSEC_PER_SEC; + + gmtime_r(&sec, (FAR struct tm *)rtctime); + rtctime->tm_nsec = nsec; + + return OK; +} + +static int sim_rtc_settime(FAR struct rtc_lowerhalf_s *lower, + FAR const struct rtc_time *rtctime) +{ + uint64_t nsec; + + nsec = mktime((FAR struct tm *)rtctime); + nsec *= NSEC_PER_SEC; + nsec += rtctime->tm_nsec; + host_settime(true, nsec); Review comment: NuttShell (NSH) NuttX-8.2 nsh> date Fri, Feb 14 06:05:26 2020 nsh> date -s "Feb 1 00:00:00 2020" nsh> date Sat, Feb 01 00:00:02 2020 nsh> date Sat, Feb 01 00:00:14 2020 nsh> poweroff xiaoxiang@xiaoxiang-VirtualBox:~/mirtos$ date 2020年 02月 14日 星期五 14:06:12 CST From the above test, nuttx get eh changed value, but host doesn't 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] [incubator-nuttx-apps] masayuki2009 opened a new pull request #67: wireless: gs2200m: Add support for setsockopt_request()
masayuki2009 opened a new pull request #67: wireless: gs2200m: Add support for setsockopt_request() URL: https://github.com/apache/incubator-nuttx-apps/pull/67 ### Summary - Due to recent refactoring, some applications (such as telnetd) call setsockopt() and caused ASSERT in gs2200m daemon. To avoid this situation, I added setsockopt_request() support in gs2200m_main.c ### Impact - This PR affects network applications which uses setsockopt() ### Limitations / TODO - Currently setsockopt() only checks parameters. ### Testing - Several network applications such as renew, telnetd, webserver and wget are tested with Spresene + GS2200M. 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] [incubator-nuttx] liuguo09 commented on issue #261: Initial checkin nuttx github action CI workflow
liuguo09 commented on issue #261: Initial checkin nuttx github action CI workflow URL: https://github.com/apache/incubator-nuttx/pull/261#issuecomment-586092802 Not yet, it just enabled and tested in my own fork. There are still some work (parallel build flock fix and check testlist update) to do before this PR merged. 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] [incubator-nuttx] maht opened a new pull request #276: Fix LMS36965 memory card detection
maht opened a new pull request #276: Fix LMS36965 memory card detection URL: https://github.com/apache/incubator-nuttx/pull/276 Some code changes to allow Stellaris LMS36965 Evaluation Kit board initialization code to run, so the MMC/SD card can be setup. 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] [incubator-nuttx] NicholasChin opened a new pull request #275: AT24 EEPROM Increase Polling Retries
NicholasChin opened a new pull request #275: AT24 EEPROM Increase Polling Retries URL: https://github.com/apache/incubator-nuttx/pull/275 I was seeing an issue with my IMXRT platform that uses an AT24 EEPROM. Driver currently polls the AT24 after a write, and knows the write is completely when the AT24 ACKS the transfer. Right now the IMXRT seems to poll the AT24 so fast that it burns through the 100 retries before the AT24 is ready to accept commands. 500 retries is the absolute max that you should need as 500 NACK'd transaction at 1MHz takes the same time as the AT24's max write 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] [incubator-nuttx] yamt commented on a change in pull request #274: Improve sim timer
yamt commented on a change in pull request #274: Improve sim timer URL: https://github.com/apache/incubator-nuttx/pull/274#discussion_r379064231 ## File path: arch/sim/src/sim/up_rtc.c ## @@ -0,0 +1,127 @@ +/ + * arch/sim/src/sim/up_rtc.c + * + * 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. + * + / + +/ + * Included Files + / + +#include + +#include +#include +#include + +#include "up_internal.h" + +/ + * Private Function Prototypes + / + +static int sim_rtc_rdtime(FAR struct rtc_lowerhalf_s *lower, + FAR struct rtc_time *rtctime); +static int sim_rtc_settime(FAR struct rtc_lowerhalf_s *lower, + FAR const struct rtc_time *rtctime); +static bool sim_rtc_havesettime(FAR struct rtc_lowerhalf_s *lower); + +/ + * Private Data + / + +static const struct rtc_ops_s g_sim_rtc_ops = +{ + .rdtime = sim_rtc_rdtime, + .settime = sim_rtc_settime, + .havesettime = sim_rtc_havesettime, +}; + +static struct rtc_lowerhalf_s g_sim_rtc = +{ + .ops = &g_sim_rtc_ops, +}; + +/ + * Private Functions + / + +static int sim_rtc_rdtime(FAR struct rtc_lowerhalf_s *lower, + FAR struct rtc_time *rtctime) +{ + uint64_t nsec; + time_t sec; + + + nsec = host_gettime(true); + sec = nsec / NSEC_PER_SEC; + nsec -= sec * NSEC_PER_SEC; + + gmtime_r(&sec, (FAR struct tm *)rtctime); + rtctime->tm_nsec = nsec; + + return OK; +} + +static int sim_rtc_settime(FAR struct rtc_lowerhalf_s *lower, + FAR const struct rtc_time *rtctime) +{ + uint64_t nsec; + + nsec = mktime((FAR struct tm *)rtctime); + nsec *= NSEC_PER_SEC; + nsec += rtctime->tm_nsec; + host_settime(true, nsec); Review comment: does this mean the sim can modify the clock of the host os? it's a surprising behavior for 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 With regards, Apache Git Services
[GitHub] [incubator-nuttx] yamt commented on a change in pull request #272: Sim: loadable module definitions
yamt commented on a change in pull request #272: Sim: loadable module definitions URL: https://github.com/apache/incubator-nuttx/pull/272#discussion_r379058649 ## File path: boards/sim/sim/sim/configs/nsh2/Make.defs ## @@ -120,6 +134,7 @@ ifeq ($(CONFIG_SIM_M32),y) LDLINKFLAGS += -melf_i386 CCLINKFLAGS += -m32 LDFLAGS += -m32 + LDMODULEFLAGS += -melf_i386 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] [incubator-nuttx] yamt commented on a change in pull request #272: Sim: loadable module definitions
yamt commented on a change in pull request #272: Sim: loadable module definitions URL: https://github.com/apache/incubator-nuttx/pull/272#discussion_r379058763 ## File path: boards/sim/sim/sim/configs/nsh2/Make.defs ## @@ -84,10 +84,24 @@ CXXFLAGS = $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) \ CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) AFLAGS = $(CFLAGS) -D__ASSEMBLY__ +# Loadable module definitions + +CMODULEFLAGS = $(CFLAGS) +# -fno-pic to avoid GOT relocations +CMODULEFLAGS += -fno-pic + +LDMODULEFLAGS = -r -e module_initialize +ifeq ($(WINTOOL),y) + LDMODULEFLAGS += -T "${shell cygpath -w $(TOPDIR)/libs/libc/modlib/gnu-elf.ld}" +else + LDMODULEFLAGS += -T $(TOPDIR)/libs/libc/modlib/gnu-elf.ld +endif # ELF module definitions CELFFLAGS = $(CFLAGS) +# -fno-pic to avoid GOT relocations +CELFFLAGS += -fno-pic CXXELFFLAGS = $(CXXFLAGS) Review comment: done for all three files 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] [incubator-nuttx] yamt commented on a change in pull request #272: Sim: loadable module definitions
yamt commented on a change in pull request #272: Sim: loadable module definitions URL: https://github.com/apache/incubator-nuttx/pull/272#discussion_r379058589 ## File path: boards/sim/sim/sim/configs/cxxtest/Make.defs ## @@ -128,6 +142,7 @@ ifeq ($(CONFIG_SIM_M32),y) LDLINKFLAGS += -melf_i386 CCLINKFLAGS += -m32 LDFLAGS += -m32 + LDMODULEFLAGS += -melf_i386 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] [incubator-nuttx] yamt commented on a change in pull request #272: Sim: loadable module definitions
yamt commented on a change in pull request #272: Sim: loadable module definitions URL: https://github.com/apache/incubator-nuttx/pull/272#discussion_r379058535 ## File path: boards/sim/sim/sim/configs/cxxtest/Make.defs ## @@ -88,10 +88,24 @@ CXXFLAGS = $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) \ CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) AFLAGS = $(CFLAGS) -D__ASSEMBLY__ +# Loadable module definitions + +CMODULEFLAGS = $(CFLAGS) +# -fno-pic to avoid GOT relocations +CMODULEFLAGS += -fno-pic + +LDMODULEFLAGS = -r -e module_initialize +ifeq ($(WINTOOL),y) + LDMODULEFLAGS += -T "${shell cygpath -w $(TOPDIR)/libs/libc/modlib/gnu-elf.ld}" +else + LDMODULEFLAGS += -T $(TOPDIR)/libs/libc/modlib/gnu-elf.ld +endif # ELF module definitions CELFFLAGS = $(CFLAGS) +# -fno-pic to avoid GOT relocations +CELFFLAGS += -fno-pic CXXELFFLAGS = $(CXXFLAGS) Review comment: oops, 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] [incubator-nuttx] xiaoxiang781216 opened a new pull request #274: Improve sim timer
xiaoxiang781216 opened a new pull request #274: Improve sim timer URL: https://github.com/apache/incubator-nuttx/pull/274 The change include: 1.Implment tickless mode with common code in drivers/timer 2.Sleep with the absolute time to avoid the time drift 3.Add RTC driver to make the complete date/time simulation 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] [incubator-nuttx] acassis merged pull request #273: net/netlink/netlink_route.c: Fix a typo.
acassis merged pull request #273: net/netlink/netlink_route.c: Fix a typo. URL: https://github.com/apache/incubator-nuttx/pull/273 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
[incubator-nuttx] branch master updated (46ad645 -> 0b25b96)
This is an automated email from the ASF dual-hosted git repository. acassis pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git. from 46ad645 mm: Add a bunch of assertions add 0b25b96 net/netlink/netlink_route.c: Fix a typo. No new revisions were added by this update. Summary of changes: net/netlink/netlink_route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #272: Sim: loadable module definitions
xiaoxiang781216 commented on a change in pull request #272: Sim: loadable module definitions URL: https://github.com/apache/incubator-nuttx/pull/272#discussion_r379018520 ## File path: boards/sim/sim/sim/configs/nsh2/Make.defs ## @@ -120,6 +134,7 @@ ifeq ($(CONFIG_SIM_M32),y) LDLINKFLAGS += -melf_i386 CCLINKFLAGS += -m32 LDFLAGS += -m32 + LDMODULEFLAGS += -melf_i386 Review comment: align with other line 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] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #272: Sim: loadable module definitions
xiaoxiang781216 commented on a change in pull request #272: Sim: loadable module definitions URL: https://github.com/apache/incubator-nuttx/pull/272#discussion_r379018268 ## File path: boards/sim/sim/sim/configs/cxxtest/Make.defs ## @@ -128,6 +142,7 @@ ifeq ($(CONFIG_SIM_M32),y) LDLINKFLAGS += -melf_i386 CCLINKFLAGS += -m32 LDFLAGS += -m32 + LDMODULEFLAGS += -melf_i386 Review comment: LDELFFLAGS need -melf_i386 too 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] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #272: Sim: loadable module definitions
xiaoxiang781216 commented on a change in pull request #272: Sim: loadable module definitions URL: https://github.com/apache/incubator-nuttx/pull/272#discussion_r379017794 ## File path: boards/sim/sim/sim/configs/cxxtest/Make.defs ## @@ -88,10 +88,24 @@ CXXFLAGS = $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) \ CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) AFLAGS = $(CFLAGS) -D__ASSEMBLY__ +# Loadable module definitions + +CMODULEFLAGS = $(CFLAGS) +# -fno-pic to avoid GOT relocations +CMODULEFLAGS += -fno-pic + +LDMODULEFLAGS = -r -e module_initialize +ifeq ($(WINTOOL),y) + LDMODULEFLAGS += -T "${shell cygpath -w $(TOPDIR)/libs/libc/modlib/gnu-elf.ld}" +else + LDMODULEFLAGS += -T $(TOPDIR)/libs/libc/modlib/gnu-elf.ld +endif # ELF module definitions CELFFLAGS = $(CFLAGS) +# -fno-pic to avoid GOT relocations +CELFFLAGS += -fno-pic CXXELFFLAGS = $(CXXFLAGS) Review comment: need -fnop-pic too 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] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #272: Sim: loadable module definitions
xiaoxiang781216 commented on a change in pull request #272: Sim: loadable module definitions URL: https://github.com/apache/incubator-nuttx/pull/272#discussion_r379018857 ## File path: boards/sim/sim/sim/configs/nsh2/Make.defs ## @@ -84,10 +84,24 @@ CXXFLAGS = $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) \ CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) AFLAGS = $(CFLAGS) -D__ASSEMBLY__ +# Loadable module definitions + +CMODULEFLAGS = $(CFLAGS) +# -fno-pic to avoid GOT relocations +CMODULEFLAGS += -fno-pic + +LDMODULEFLAGS = -r -e module_initialize +ifeq ($(WINTOOL),y) + LDMODULEFLAGS += -T "${shell cygpath -w $(TOPDIR)/libs/libc/modlib/gnu-elf.ld}" +else + LDMODULEFLAGS += -T $(TOPDIR)/libs/libc/modlib/gnu-elf.ld +endif # ELF module definitions CELFFLAGS = $(CFLAGS) +# -fno-pic to avoid GOT relocations +CELFFLAGS += -fno-pic CXXELFFLAGS = $(CXXFLAGS) Review comment: same comment as previous file 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] [incubator-nuttx] patacongo opened a new pull request #273: net/netlink/netlink_route.c: Fix a typo.
patacongo opened a new pull request #273: net/netlink/netlink_route.c: Fix a typo. URL: https://github.com/apache/incubator-nuttx/pull/273 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] [incubator-nuttx] acassis merged pull request #271: Socket can
acassis merged pull request #271: Socket can URL: https://github.com/apache/incubator-nuttx/pull/271 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
[incubator-nuttx] 02/03: include/netpacket/can.h: Add CAN socket family definitions
This is an automated email from the ASF dual-hosted git repository. acassis pushed a commit to branch SocketCAN in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git commit 0d95b1923e1e5d6ed47e47e0e40a00f3a8458d47 Author: Gregory Nutt AuthorDate: Thu Feb 13 09:58:12 2020 -0600 include/netpacket/can.h: Add CAN socket family definitions --- include/netpacket/can.h | 120 1 file changed, 120 insertions(+) diff --git a/include/netpacket/can.h b/include/netpacket/can.h new file mode 100644 index 000..b93bb21 --- /dev/null +++ b/include/netpacket/can.h @@ -0,0 +1,120 @@ +/ + * include/netpacket/can.h + * Definitions for use with AF_PACKET sockets + * + * 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. + * + / + +#ifndef __INCLUDE_NETPACKET_CAN_H +#define __INCLUDE_NETPACKET_CAN_H + +/ + * Included Files + / + +#include + +#include +#include + +/ + * Pre-processor Definitions + / + +/* Special address description flags for the CAN_ID */ + +#define CAN_EFF_FLAG 0x8000 /* EFF/SFF is set in the MSB */ +#define CAN_RTR_FLAG 0x4000 /* Remote transmission request */ +#define CAN_ERR_FLAG 0x2000 /* Error message frame */ + +/* Valid bits in CAN ID for frame formats */ + +#define CAN_SFF_MASK 0x07ff /* Standard frame format (SFF) */ +#define CAN_EFF_MASK 0x1fff /* Extended frame format (EFF) */ +#define CAN_ERR_MASK 0x1fff /* Omit EFF, RTR, ERR flags */ + +/* PF_CAN protocols */ + +#define CAN_RAW 1 /* RAW sockets */ +#define CAN_BCM 2 /* Broadcast Manager */ +#define CAN_TP16 3 /* VAG Transport Protocol v1.6 */ +#define CAN_TP20 4 /* VAG Transport Protocol v2.0 */ +#define CAN_MCNET5 /* Bosch MCNet */ +#define CAN_ISOTP6 /* ISO 15765-2 Transport Protocol */ +#define CAN_J19397 /* SAE J1939 */ +#define CAN_NPROTO 8 + +/ + * Public Types + / + +/* Controller Area Network Identifier structure + * + * Bit 0-28: CAN identifier (11/29 bit) + * Bit 29: Error message frame flag (0 = data frame, 1 = error message) + * Bit 30: Remote transmission request flag (1 = rtr frame) + * Bit 31: Frame format flag (0 = standard 11 bit, 1 = extended 29 bit) + */ + +typedef uint32_t canid_t; + +/* The sockaddr structure for CAN sockets + * + * can_family: Address family number AF_CAN. + * can_ifindex: CAN network interface index. + * can_addr:Protocol specific address information + */ + +struct sockaddr_can +{ + sa_family_t can_family; + int16_t can_ifindex; + union +{ + /* Transport protocol class address information */ + + struct + { +canid_t rx_id; +canid_t tx_id; + } tp; + + /* J1939 address information */ + + struct + { +/* 8 byte name when using dynamic addressing */ + +uint64_t name; + +/* pgn: + * 8 bit: PS in PDU2 case, else 0 + * 8 bit: PF + * 1 bit: DP + * 1 bit: reserved + */ + + uint32_t pgn; + + /* 1 byte address */ + + uint8_t addr; +} j1939; + } can_addr; +}; + +#endif /* __INCLUDE_NETPACKET_CAN_H */
[incubator-nuttx] branch SocketCAN updated (46ad645 -> c92a8b0)
This is an automated email from the ASF dual-hosted git repository. acassis pushed a change to branch SocketCAN in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git. from 46ad645 mm: Add a bunch of assertions new 4a8c4b7 include/sys/socket.h: Add CAN socket family. new 0d95b19 include/netpacket/can.h: Add CAN socket family definitions new c92a8b0 net/: Add WIP initial framework for SocketCAN sockets. The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: include/netpacket/can.h| 120 ++ include/sys/socket.h | 2 + net/Kconfig| 1 + net/Makefile | 1 + net/can/Kconfig| 26 ++ .../libc/machine/risc-v/rv64 => net/can}/Make.defs | 14 +- net/can/can.h | 154 net/can/can_conn.c | 225 +++ net/{netlink/netlink_sockif.c => can/can_sockif.c} | 423 - net/net_initialize.c | 7 + net/socket/net_sockif.c| 7 + 11 files changed, 709 insertions(+), 271 deletions(-) create mode 100644 include/netpacket/can.h create mode 100644 net/can/Kconfig copy {libs/libc/machine/risc-v/rv64 => net/can}/Make.defs (81%) create mode 100644 net/can/can.h create mode 100644 net/can/can_conn.c copy net/{netlink/netlink_sockif.c => can/can_sockif.c} (65%)
[GitHub] [incubator-nuttx] patacongo commented on a change in pull request #270: Small I2C fixups
patacongo commented on a change in pull request #270: Small I2C fixups URL: https://github.com/apache/incubator-nuttx/pull/270#discussion_r379005150 ## File path: drivers/i2c/Kconfig ## @@ -54,3 +50,7 @@ config I2CMULTIPLEXER_PCA9540BDP endmenu # I2C Multiplexer Support endif + +config ARCH_HAVE_I2CRESET Review comment: i suppose it could even go at the end of drivers/i2c/Kconfig That is not very comfortable. But I am not comfortable with the breaking of the naming convention either. The first word of the configuration name is suppose to be a clue where you can find the configuration definition. So everything in drivers/Kconfig should be named DRIVERS_, everything under drivers/i2c/Kconfig should be named I2C. This belong in arch/Kconfig. Evertything in arch/Kconfig should be named ARCH_ 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
[incubator-nuttx] 03/03: net/: Add WIP initial framework for SocketCAN sockets.
This is an automated email from the ASF dual-hosted git repository. acassis pushed a commit to branch SocketCAN in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git commit c92a8b015a77c4fe2d94203bb369050b720748b9 Author: Gregory Nutt AuthorDate: Thu Feb 13 09:59:00 2020 -0600 net/: Add WIP initial framework for SocketCAN sockets. --- net/Kconfig | 1 + net/Makefile| 1 + net/can/Kconfig | 26 ++ net/can/Make.defs | 32 ++ net/can/can.h | 154 + net/can/can_conn.c | 225 ++ net/can/can_sockif.c| 810 net/net_initialize.c| 7 + net/socket/net_sockif.c | 7 + 9 files changed, 1263 insertions(+) diff --git a/net/Kconfig b/net/Kconfig index 5019cd5..87d006d 100644 --- a/net/Kconfig +++ b/net/Kconfig @@ -344,6 +344,7 @@ source "net/socket/Kconfig" source "net/inet/Kconfig" source "net/pkt/Kconfig" source "net/local/Kconfig" +source "net/can/Kconfig" source "net/netlink/Kconfig" source "net/tcp/Kconfig" source "net/udp/Kconfig" diff --git a/net/Makefile b/net/Makefile index dfdbbb9..d1e84e9 100644 --- a/net/Makefile +++ b/net/Makefile @@ -66,6 +66,7 @@ include igmp/Make.defs include pkt/Make.defs include local/Make.defs include mld/Make.defs +include can/Make.defs include netlink/Make.defs include tcp/Make.defs include udp/Make.defs diff --git a/net/can/Kconfig b/net/can/Kconfig new file mode 100644 index 000..2ae1f7b --- /dev/null +++ b/net/can/Kconfig @@ -0,0 +1,26 @@ +# +# For a description of the syntax of this configuration file, +# see the file kconfig-language.txt in the NuttX tools repository. +# + +menu "SocketCAN Support" + +config NET_CAN + bool "SocketCAN support" + default n + ---help--- + Enable support for SocketCAN sockets that will permit. + + This logic is a WIP. Currently only fragmentary support is + available, not enough to actually do anything of consequence. + +if NET_CAN + +config CAN_CONNS + int "Number of CAN connections" + default 4 + ---help--- + Maximum number of CAN connections (all tasks). + +endif # NET_CAN +endmenu # CAN Socket Support diff --git a/net/can/Make.defs b/net/can/Make.defs new file mode 100644 index 000..bb9ef9f --- /dev/null +++ b/net/can/Make.defs @@ -0,0 +1,32 @@ + +# net/can/Make.defs +# +# 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. +# + + +# Logic specific to SocketCAN socket support + +ifeq ($(CONFIG_NET_CAN),y) + +SOCK_CSRCS += can_sockif.c +NET_CSRCS += can_conn.c + +# Include can build support + +DEPPATH += --dep-path can +VPATH += :can +endif diff --git a/net/can/can.h b/net/can/can.h new file mode 100644 index 000..6f41ce9 --- /dev/null +++ b/net/can/can.h @@ -0,0 +1,154 @@ +/ + * net/can/can.h + * + * 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. + * + / + +#ifndef __NET_CAN_CAN_H +#define __NET_CAN_CAN_H + +/ + * Included Files + / + +#include + +#i
[incubator-nuttx] 01/03: include/sys/socket.h: Add CAN socket family.
This is an automated email from the ASF dual-hosted git repository. acassis pushed a commit to branch SocketCAN in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git commit 4a8c4b712e252408653e130fc0772204a60fd283 Author: Gregory Nutt AuthorDate: Thu Feb 13 09:57:38 2020 -0600 include/sys/socket.h: Add CAN socket family. --- include/sys/socket.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/sys/socket.h b/include/sys/socket.h index bbf350a..c894acc 100644 --- a/include/sys/socket.h +++ b/include/sys/socket.h @@ -62,6 +62,7 @@ #define PF_NETLINK16 /* Netlink IPC socket */ #define PF_ROUTE PF_NETLINK /* 4.4BSD Compatibility*/ #define PF_PACKET 17 /* Low level packet interface */ +#define PF_CAN29 /* Controller Area Network (SocketCAN) */ #define PF_BLUETOOTH 31 /* Bluetooth sockets */ #define PF_IEEE802154 36 /* Low level IEEE 802.15.4 radio frame interface */ #define PF_PKTRADIO 64 /* Low level packet radio interface */ @@ -78,6 +79,7 @@ #define AF_NETLINK PF_NETLINK #define AF_ROUTE PF_ROUTE #define AF_PACKET PF_PACKET +#define AF_CAN PF_CAN #define AF_BLUETOOTH PF_BLUETOOTH #define AF_IEEE802154 PF_IEEE802154 #define AF_PKTRADIOPF_PKTRADIO
[GitHub] [incubator-nuttx] yamt opened a new pull request #272: Sim: loadable module definitions
yamt opened a new pull request #272: Sim: loadable module definitions URL: https://github.com/apache/incubator-nuttx/pull/272 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] [incubator-nuttx] NicholasChin commented on a change in pull request #270: Small I2C fixups
NicholasChin commented on a change in pull request #270: Small I2C fixups URL: https://github.com/apache/incubator-nuttx/pull/270#discussion_r379001861 ## File path: drivers/i2c/Kconfig ## @@ -54,3 +50,7 @@ config I2CMULTIPLEXER_PCA9540BDP endmenu # I2C Multiplexer Support endif + +config ARCH_HAVE_I2CRESET Review comment: This Kconfig file isn't conditionally brought in when I2C is defined. So technically ARCH_HAVE_I2CRESET is declared at the same level as it was before. If it would be preferred for these to be declared in the larger Kconfig as before, I can change 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] [incubator-nuttx] NicholasChin commented on a change in pull request #270: Small I2C fixups
NicholasChin commented on a change in pull request #270: Small I2C fixups URL: https://github.com/apache/incubator-nuttx/pull/270#discussion_r379000645 ## File path: drivers/i2c/Kconfig ## @@ -54,3 +50,7 @@ config I2CMULTIPLEXER_PCA9540BDP endmenu # I2C Multiplexer Support endif Review comment: @patacongo This is the `endif` for the corresponding `if I2c` `config ARCH_HAVE_I2CRESET` comes after it. Therefore, `ARCH_HAVE_I2CRESET` does NOT DEPEND on I2C and is unconditionally declared. This is correct. 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] [incubator-nuttx] patacongo commented on issue #270: Small I2C fixups
patacongo commented on issue #270: Small I2C fixups URL: https://github.com/apache/incubator-nuttx/pull/270#issuecomment-585866363 Yes, there is a problem. But your solution is not correct. It is worse. 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] [incubator-nuttx] patacongo commented on a change in pull request #270: Small I2C fixups
patacongo commented on a change in pull request #270: Small I2C fixups URL: https://github.com/apache/incubator-nuttx/pull/270#discussion_r378996148 ## File path: drivers/i2c/Kconfig ## @@ -54,3 +50,7 @@ config I2CMULTIPLEXER_PCA9540BDP endmenu # I2C Multiplexer Support endif + +config ARCH_HAVE_I2CRESET Review comment: You could move the ARCH_HAVE_I2CRESET item into the drivers/Kconfig file before CONFIG_I2C is selected. That would resolve the problem. I personally believe that all of the ARCH_HAVE_ definitions belong in the arch/Kconfig menu. That is were they were originally and there is where they best belong. The ARCH naming conventions is only correct if they reside in the arch/Kconfig file. But there were moved all over in a recent PR and now the naming is wrong and a lot of dependencies relationships have been broken and kludged around like this 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] [incubator-nuttx] NicholasChin commented on issue #270: Small I2C fixups
NicholasChin commented on issue #270: Small I2C fixups URL: https://github.com/apache/incubator-nuttx/pull/270#issuecomment-585863095 @patacongo ARCH_HAVE_I2CRESET is a hidden option, yes. The options that I were referring to are visible options. Currently these options show up nested under "Device Drivers" when they should nest under "I2C Driver Support": 1) I2C_SLAVE 2) I2C_POLLED 3) I2C_RESET 4) I2C_TRACE 5) I2C_DRIVER. The Kconfig must look like this: ``` menuconfig I2C ... if I2C // nested options endif config ARCH_HAVE_I2CRESET ``` For Kconfig to nest these options properly. This is what my commit 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] [incubator-nuttx] patacongo commented on issue #270: Small I2C fixups
patacongo commented on issue #270: Small I2C fixups URL: https://github.com/apache/incubator-nuttx/pull/270#issuecomment-585859504 That does not matter because that option is not visual in the menus. It is a hidden option that can only be selected by architecture code. Certainly that is not an excuse to introduce errors into the configuration. Configuration options that have no prompt string do not appear in the menus. This is internal implementation of configuration system and not part of the UI menus. Everything is correct as it is. Please do not change anything. 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] [incubator-nuttx] NicholasChin commented on issue #270: Small I2C fixups
NicholasChin commented on issue #270: Small I2C fixups URL: https://github.com/apache/incubator-nuttx/pull/270#issuecomment-585857955 @patacongo ARCH_HAVE_I2CRESET is outside the conditional. However, ARCH_HAVE_I2CRESET MUST come after the conditional. If it does not, I2C config options are nested under the "Device Drivers" menu and not under "I2C Driver Support." 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] [incubator-nuttx] patacongo commented on issue #270: Small I2C fixups
patacongo commented on issue #270: Small I2C fixups URL: https://github.com/apache/incubator-nuttx/pull/270#issuecomment-585854407 I will close this PR now. If you remove the offending commit, it may be reopened. 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] [incubator-nuttx] patacongo commented on a change in pull request #270: Small I2C fixups
patacongo commented on a change in pull request #270: Small I2C fixups URL: https://github.com/apache/incubator-nuttx/pull/270#discussion_r378983337 ## File path: drivers/i2c/Kconfig ## @@ -54,3 +50,7 @@ config I2CMULTIPLEXER_PCA9540BDP endmenu # I2C Multiplexer Support endif + +config ARCH_HAVE_I2CRESET Review comment: The reason is that ARCH_HAVE_I2CRESET is selected unconditionally in all architecture configurations that support I2C reset. That is correct, advertising that an architecture supports a feature is conditional. CONFIG_I2C is completely unnecessary to enable architecture I2C support. If conditions are added to ARCH_HAVE_I2CRESET, the errors referring to unmet dependencies will be generated on all configurations that enabled architecture-specific I2C support but don't need CONFIG_I2C. This same change was added a few weeks ago and this resulted in several new errors in build testing and had to be fixed by moving ARCH_HAVE_I2CRESET outside of I2C. It must be that way. 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] [incubator-nuttx] patacongo closed pull request #270: Small I2C fixups
patacongo closed pull request #270: Small I2C fixups URL: https://github.com/apache/incubator-nuttx/pull/270 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] [incubator-nuttx] patacongo commented on a change in pull request #270: Small I2C fixups
patacongo commented on a change in pull request #270: Small I2C fixups URL: https://github.com/apache/incubator-nuttx/pull/270#discussion_r378973957 ## File path: drivers/i2c/Kconfig ## @@ -54,3 +50,7 @@ config I2CMULTIPLEXER_PCA9540BDP endmenu # I2C Multiplexer Support endif + +config ARCH_HAVE_I2CRESET Review comment: We have been through this one before. ARCH_HAVE_I2CRESET must be outside of if I2C, otherwise Kconfig generates errors. This cannot be accepted into the repository. That same mistake was made in a previous PR and that had to be reverted because of all of the configuration errors it causes. This cannot be accepted into the repository. 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] [incubator-nuttx] NicholasChin commented on a change in pull request #270: Small I2C fixups
NicholasChin commented on a change in pull request #270: Small I2C fixups URL: https://github.com/apache/incubator-nuttx/pull/270#discussion_r378962319 ## File path: drivers/i2c/Kconfig ## @@ -53,4 +49,8 @@ config I2CMULTIPLEXER_PCA9540BDP endmenu # I2C Multiplexer Support +config ARCH_HAVE_I2CRESET Review comment: Hi Xiang, I've pulled ARCH_HAVE_I2CRESET out of the if I2C conditional. The conditional must be first in this file as menuconfigs will only nest configs if the conditional is the next block after declaring the menuconfig. 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] [incubator-nuttx] edbek commented on issue #268: to introduce a new function timerfd_settime() and timerfd_gettime()
edbek commented on issue #268: to introduce a new function timerfd_settime() and timerfd_gettime() URL: https://github.com/apache/incubator-nuttx/issues/268#issuecomment-585833546 I agree ! 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] [incubator-nuttx] patacongo commented on issue #271: Socket can
patacongo commented on issue #271: Socket can URL: https://github.com/apache/incubator-nuttx/pull/271#issuecomment-585833013 Please not that this is WIP (work-in-progres) logic as the beginning of the SocketCAN implementation. This show NOT go to master but should, instead, be merged into the SocketCAN feature branch. 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] [incubator-nuttx] patacongo opened a new pull request #271: Socket can
patacongo opened a new pull request #271: Socket can URL: https://github.com/apache/incubator-nuttx/pull/271 Initial WIP implementation for the socket layer interface (only) for SocketCAN sockets. 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] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #270: Small I2C fixups
xiaoxiang781216 commented on a change in pull request #270: Small I2C fixups URL: https://github.com/apache/incubator-nuttx/pull/270#discussion_r378932376 ## File path: drivers/i2c/Kconfig ## @@ -53,4 +49,8 @@ config I2CMULTIPLEXER_PCA9540BDP endmenu # I2C Multiplexer Support +config ARCH_HAVE_I2CRESET Review comment: ARCH_HAVE_xxx should exist unconditionally, please see the discussion here: https://github.com/apache/incubator-nuttx/pull/217 https://github.com/apache/incubator-nuttx/pull/228 https://github.com/apache/incubator-nuttx/pull/232 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] [incubator-nuttx] xiaoxiang781216 edited a comment on issue #268: to introduce a new function timerfd_settime() and timerfd_gettime()
xiaoxiang781216 edited a comment on issue #268: to introduce a new function timerfd_settime() and timerfd_gettime() URL: https://github.com/apache/incubator-nuttx/issues/268#issuecomment-585810243 We can add eventfd and signalfd to the list too, these three API set is the good addition to POSIX since they strengthen the core UNIX design principle: Everything is a file. And also simplify the signal and timer handling a lot especially if caller need deal with file/socket at the same 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] [incubator-nuttx] NicholasChin opened a new pull request #270: Small I2C fixups
NicholasChin opened a new pull request #270: Small I2C fixups URL: https://github.com/apache/incubator-nuttx/pull/270 Commit a44fb6e simply switches the place of a symbol so I2C options are nested under "I2C Driver Support" properly. Commit 0ec84b8 is for an issue I was seeing with my IMXRT platform where it seemed to poll the AT24 so fast that it burned through the 100 retries before the AT24 was ready to accept commands. 500 retries is the absolute max that you should need as 500 NACK'd transaction at 1MHz takes the same time as the AT24's max write 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] [incubator-nuttx] xiaoxiang781216 commented on issue #268: to introduce a new function timerfd_settime() and timerfd_gettime()
xiaoxiang781216 commented on issue #268: to introduce a new function timerfd_settime() and timerfd_gettime() URL: https://github.com/apache/incubator-nuttx/issues/268#issuecomment-585810243 We can add eventfd and signalfd to the list too, these three API set is the good addition to POSIX since they strengthen the core UNIX design principle: Everything is a file. 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] [incubator-nuttx] edbek commented on issue #268: to introduce a new function timerfd_settime() and timerfd_gettime()
edbek commented on issue #268: to introduce a new function timerfd_settime() and timerfd_gettime() URL: https://github.com/apache/incubator-nuttx/issues/268#issuecomment-585799191 yes, of course, the timerfd_create () function is also required. I think it would be very useful for this project to have such a set of functions: timerfd_create (); thimerfd_settime (); thimerfd_gettime (); Thank you in advance if they appear ! 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
[incubator-nuttx] branch SocketCAN created (now 46ad645)
This is an automated email from the ASF dual-hosted git repository. gnutt pushed a change to branch SocketCAN in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git. at 46ad645 mm: Add a bunch of assertions No new revisions were added by this update.
[GitHub] [incubator-nuttx] patacongo commented on issue #268: to introduce a new function timerfd_settime() and timerfd_gettime()
patacongo commented on issue #268: to introduce a new function timerfd_settime() and timerfd_gettime() URL: https://github.com/apache/incubator-nuttx/issues/268#issuecomment-585782101 The solution would also required timerfd_create(). https://linux.die.net/man/2/timerfd_settime While I don't advocate including non-standard interfaces in the OS, I would not oppose the inclusion of these GLIBC/Linux interfaces if they were properly implemented in the nuttx/fs directory (with new interfaces to sched/timer, were configurable, and had proper system calls implemented in syscall/. 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
[incubator-nuttx] branch master updated (1382ea5 -> 46ad645)
This is an automated email from the ASF dual-hosted git repository. gnutt pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git. from 1382ea5 mm/: Coding style clean-up add c1a32fb compiler.h: clang actually has long long add 46ad645 mm: Add a bunch of assertions No new revisions were added by this update. Summary of changes: include/nuttx/compiler.h | 6 +- mm/mm_heap/mm_addfreechunk.c | 5 + mm/mm_heap/mm_free.c | 1 + mm/mm_heap/mm_initialize.c | 2 ++ mm/mm_heap/mm_mallinfo.c | 21 +++-- mm/mm_heap/mm_malloc.c | 6 ++ mm/mm_heap/mm_realloc.c | 4 7 files changed, 38 insertions(+), 7 deletions(-)
[GitHub] [incubator-nuttx] patacongo merged pull request #266: Fix mm for clang
patacongo merged pull request #266: Fix mm for clang URL: https://github.com/apache/incubator-nuttx/pull/266 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] [incubator-nuttx] Ouss4 merged pull request #269: mm/: Coding style clean-up
Ouss4 merged pull request #269: mm/: Coding style clean-up URL: https://github.com/apache/incubator-nuttx/pull/269 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
[incubator-nuttx] branch master updated (3381ecb -> 1382ea5)
This is an automated email from the ASF dual-hosted git repository. aguettouche pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git. from 3381ecb Remove CONFIG_BUILTIN_PROXY_STACKSIZE from README files add 1382ea5 mm/: Coding style clean-up No new revisions were added by this update. Summary of changes: mm/iob/iob_alloc_qentry.c| 6 +++--- mm/iob/iob_clone.c | 2 +- mm/iob/iob_copyin.c | 3 ++- mm/iob/iob_free.c| 3 ++- mm/iob/iob_navail.c | 1 + mm/iob/iob_pack.c| 14 +++--- mm/iob/iob_statistics.c | 1 - mm/iob/iob_test.c| 1 + mm/mm_gran/mm_granalloc.c| 3 ++- mm/mm_gran/mm_grancritical.c | 1 - mm/mm_gran/mm_granfree.c | 4 ++-- mm/mm_gran/mm_graninfo.c | 14 +++--- mm/mm_gran/mm_granmark.c | 4 ++-- mm/mm_gran/mm_pgalloc.c | 2 ++ mm/mm_heap/mm_extend.c | 3 ++- mm/mm_heap/mm_initialize.c | 18 ++ mm/mm_heap/mm_malloc.c | 4 ++-- mm/mm_heap/mm_memalign.c | 6 -- mm/mm_heap/mm_realloc.c | 27 ++- mm/mm_heap/mm_sem.c | 8 mm/mm_heap/mm_shrinkchunk.c | 3 ++- mm/mm_heap/mm_size2ndx.c | 2 +- mm/umm_heap/umm_globals.c| 4 23 files changed, 79 insertions(+), 55 deletions(-)
[GitHub] [incubator-nuttx] patacongo opened a new pull request #269: mm/: Coding style clean-up
patacongo opened a new pull request #269: mm/: Coding style clean-up URL: https://github.com/apache/incubator-nuttx/pull/269 Run tools/nxstyle against all C files under mm/ and correct coding standard violations. 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] [incubator-nuttx] yamt commented on a change in pull request #266: Fix mm for clang
yamt commented on a change in pull request #266: Fix mm for clang URL: https://github.com/apache/incubator-nuttx/pull/266#discussion_r378871429 ## File path: mm/mm_heap/mm_mallinfo.c ## @@ -97,17 +98,29 @@ int mm_mallinfo(FAR struct mm_heap_s *heap, FAR struct mallinfo *info) if ((node->preceding & MM_ALLOC_BIT) != 0) { + DEBUGASSERT(node->size >= SIZEOF_MM_ALLOCNODE); uordblks += node->size; } else { + FAR struct mm_freenode_s *fnode; + DEBUGASSERT(node->size >= SIZEOF_MM_FREENODE); + fnode = (FAR void *)node; + DEBUGASSERT(fnode->blink->flink == fnode); + DEBUGASSERT(fnode->blink->size <= fnode->size); + DEBUGASSERT(fnode->flink == NULL || + fnode->flink->blink == fnode); + DEBUGASSERT(fnode->flink == NULL || + fnode->flink->size == 0 || + fnode->flink->size >= fnode->size); ordblks++; fordblks += node->size; if (node->size > mxordblk) { mxordblk = node->size; } } + DEBUGASSERT(prev == NULL || prev->size == (node->preceding & ~MM_ALLOC_BIT)); Review comment: thank you. 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] [incubator-nuttx] patacongo commented on issue #268: to introduce a new function timerfd_settime() and timerfd_gettime()
patacongo commented on issue #268: to introduce a new function timerfd_settime() and timerfd_gettime() URL: https://github.com/apache/incubator-nuttx/issues/268#issuecomment-585757926 I would prefer not. These are non-standard GLIBC functions. NuttX follows the standards defined at OpenGroup.org which does not include these interfaces. There are exceptions to this in the code base now, but I don't think we should proliferate non-standard interfaces. 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] [incubator-nuttx] patacongo closed issue #268: to introduce a new function timerfd_settime() and timerfd_gettime()
patacongo closed issue #268: to introduce a new function timerfd_settime() and timerfd_gettime() URL: https://github.com/apache/incubator-nuttx/issues/268 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] [incubator-nuttx] patacongo commented on a change in pull request #266: Fix mm for clang
patacongo commented on a change in pull request #266: Fix mm for clang URL: https://github.com/apache/incubator-nuttx/pull/266#discussion_r378860577 ## File path: mm/mm_heap/mm_mallinfo.c ## @@ -97,17 +98,29 @@ int mm_mallinfo(FAR struct mm_heap_s *heap, FAR struct mallinfo *info) if ((node->preceding & MM_ALLOC_BIT) != 0) { + DEBUGASSERT(node->size >= SIZEOF_MM_ALLOCNODE); uordblks += node->size; } else { + FAR struct mm_freenode_s *fnode; + DEBUGASSERT(node->size >= SIZEOF_MM_FREENODE); + fnode = (FAR void *)node; + DEBUGASSERT(fnode->blink->flink == fnode); + DEBUGASSERT(fnode->blink->size <= fnode->size); + DEBUGASSERT(fnode->flink == NULL || + fnode->flink->blink == fnode); + DEBUGASSERT(fnode->flink == NULL || + fnode->flink->size == 0 || + fnode->flink->size >= fnode->size); ordblks++; fordblks += node->size; if (node->size > mxordblk) { mxordblk = node->size; } } + DEBUGASSERT(prev == NULL || prev->size == (node->preceding & ~MM_ALLOC_BIT)); Review comment: Coding standard requires that all terminal right braces be followed by a blank line. 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] [incubator-nuttx] patacongo commented on a change in pull request #265: mm: Fix memory corruption issues in realloc
patacongo commented on a change in pull request #265: mm: Fix memory corruption issues in realloc URL: https://github.com/apache/incubator-nuttx/pull/265#discussion_r378859855 ## File path: mm/mm_heap/mm_realloc.c ## @@ -213,6 +215,28 @@ FAR void *mm_realloc(FAR struct mm_heap_s *heap, FAR void *oldmem, } } + /* Note that a free node can't be smaller than SIZEOF_MM_FREENODE. + * We have to either take the whole node, or leave at least + * SIZEOF_MM_FREENODE bytes. + * When we can't leave SIZEOF_MM_FREENODE bytes, just take the whole + * node. It might end up with returning a larger chunk than the + * caller requested. It should be ok. + */ + DEBUGASSERT(prevsize >= takeprev); + DEBUGASSERT(nextsize >= takenext); + if (prevsize - takeprev < SIZEOF_MM_FREENODE) +{ + takeprev = prevsize; +} + if (nextsize - takenext < SIZEOF_MM_FREENODE) +{ + takenext = nextsize; +} + DEBUGASSERT(prevsize == takeprev || Review comment: Needs a blank line 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] [incubator-nuttx] patacongo commented on a change in pull request #265: mm: Fix memory corruption issues in realloc
patacongo commented on a change in pull request #265: mm: Fix memory corruption issues in realloc URL: https://github.com/apache/incubator-nuttx/pull/265#discussion_r378859739 ## File path: mm/mm_heap/mm_realloc.c ## @@ -213,6 +215,28 @@ FAR void *mm_realloc(FAR struct mm_heap_s *heap, FAR void *oldmem, } } + /* Note that a free node can't be smaller than SIZEOF_MM_FREENODE. + * We have to either take the whole node, or leave at least + * SIZEOF_MM_FREENODE bytes. + * When we can't leave SIZEOF_MM_FREENODE bytes, just take the whole + * node. It might end up with returning a larger chunk than the + * caller requested. It should be ok. + */ + DEBUGASSERT(prevsize >= takeprev); + DEBUGASSERT(nextsize >= takenext); + if (prevsize - takeprev < SIZEOF_MM_FREENODE) +{ + takeprev = prevsize; +} + if (nextsize - takenext < SIZEOF_MM_FREENODE) Review comment: Coding standard requires that all terminating right braces be followed by a blank line. 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] [incubator-nuttx] patacongo commented on a change in pull request #265: mm: Fix memory corruption issues in realloc
patacongo commented on a change in pull request #265: mm: Fix memory corruption issues in realloc URL: https://github.com/apache/incubator-nuttx/pull/265#discussion_r378859408 ## File path: mm/mm_heap/mm_realloc.c ## @@ -213,6 +215,28 @@ FAR void *mm_realloc(FAR struct mm_heap_s *heap, FAR void *oldmem, } } + /* Note that a free node can't be smaller than SIZEOF_MM_FREENODE. + * We have to either take the whole node, or leave at least + * SIZEOF_MM_FREENODE bytes. + * When we can't leave SIZEOF_MM_FREENODE bytes, just take the whole + * node. It might end up with returning a larger chunk than the + * caller requested. It should be ok. + */ + DEBUGASSERT(prevsize >= takeprev); Review comment: Coding standard requires that all comments be followed by a blank line. 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] [incubator-nuttx] yamt commented on issue #261: Initial checkin nuttx github action CI workflow
yamt commented on issue #261: Initial checkin nuttx github action CI workflow URL: https://github.com/apache/incubator-nuttx/pull/261#issuecomment-585727072 is this workflow enabled? 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] [incubator-nuttx] edbek opened a new issue #268: to introduce a new function timerfd_settime() and timerfd_gettime()
edbek opened a new issue #268: to introduce a new function timerfd_settime() and timerfd_gettime() URL: https://github.com/apache/incubator-nuttx/issues/268 Is it possible to introduce a new function **timerfd_settime** () and **timerfd_gettime** ()? 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] [incubator-nuttx] xiaoxiang781216 merged pull request #267: Updates after CONFIG_BUILTIN_PROXY_STACKSIZE removal
xiaoxiang781216 merged pull request #267: Updates after CONFIG_BUILTIN_PROXY_STACKSIZE removal URL: https://github.com/apache/incubator-nuttx/pull/267 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
[incubator-nuttx] branch master updated (b21e809 -> 3381ecb)
This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git. from b21e809 sim: Use generic name (cc) than GCC specific (gcc) add ba331e8 Run refresh.sh after CONFIG_BUILTIN_PROXY_STACKSIZE removal add 3381ecb Remove CONFIG_BUILTIN_PROXY_STACKSIZE from README files No new revisions were added by this update. Summary of changes: boards/arm/lpc17xx_40xx/lx_cpu/configs/nsh/defconfig | 1 - boards/arm/samv7/same70-xplained/README.txt | 1 - boards/arm/samv7/samv71-xult/README.txt | 1 - boards/arm/stm32/nucleo-f302r8/configs/highpri/defconfig | 1 - boards/arm/stm32/nucleo-f302r8/configs/nsh/defconfig | 1 - boards/arm/stm32/nucleo-f334r8/configs/adc/defconfig | 1 - boards/arm/stm32/nucleo-f334r8/configs/highpri/defconfig | 1 - boards/arm/stm32/nucleo-f334r8/configs/nsh/defconfig | 1 - boards/arm/stm32/nucleo-f334r8/configs/spwm1/defconfig | 1 - boards/arm/stm32/nucleo-f334r8/configs/spwm2/defconfig | 1 - boards/arm/stm32/olimexino-stm32/configs/can/defconfig | 1 - boards/arm/stm32/olimexino-stm32/configs/composite/defconfig | 1 - boards/arm/stm32/olimexino-stm32/configs/nsh/defconfig | 1 - boards/arm/stm32/olimexino-stm32/configs/smallnsh/defconfig | 1 - boards/arm/stm32/olimexino-stm32/configs/tiny/defconfig | 1 - boards/arm/stm32/stm32f334-disco/configs/buckboost/defconfig | 1 - boards/arm/stm32/stm32f334-disco/configs/nsh/defconfig | 1 - boards/arm/stm32/stm32f334-disco/configs/powerled/defconfig | 1 - boards/arm/stm32f0l0g0/nucleo-f072rb/README.txt | 1 - boards/arm/stm32f0l0g0/nucleo-f091rc/README.txt | 1 - boards/arm/tiva/dk-tm4c129x/README.txt | 1 - boards/arm/tiva/tm4c1294-launchpad/README.txt| 1 - boards/risc-v/k210/maix-bit/configs/smp/defconfig| 1 - boards/sim/sim/sim/configs/pf_ieee802154/defconfig | 2 -- boards/sim/sim/sim/configs/pktradio/defconfig| 2 -- boards/sim/sim/sim/configs/sixlowpan/defconfig | 2 -- boards/sim/sim/sim/configs/tcploop/defconfig | 2 -- 27 files changed, 31 deletions(-)
[GitHub] [incubator-nuttx] yamt opened a new pull request #267: Updates after CONFIG_BUILTIN_PROXY_STACKSIZE removal
yamt opened a new pull request #267: Updates after CONFIG_BUILTIN_PROXY_STACKSIZE removal URL: https://github.com/apache/incubator-nuttx/pull/267 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] [incubator-nuttx-apps] yamt commented on issue #66: Remove unused BUILTIN_PROXY_STACKSIZE config
yamt commented on issue #66: Remove unused BUILTIN_PROXY_STACKSIZE config URL: https://github.com/apache/incubator-nuttx-apps/pull/66#issuecomment-585636897 done https://github.com/apache/incubator-nuttx/pull/267 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] [incubator-nuttx] yamt opened a new pull request #266: Fix mm for clang
yamt opened a new pull request #266: Fix mm for clang URL: https://github.com/apache/incubator-nuttx/pull/266 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] [incubator-nuttx] yamt commented on issue #265: mm: Fix memory corruption issues in realloc
yamt commented on issue #265: mm: Fix memory corruption issues in realloc URL: https://github.com/apache/incubator-nuttx/pull/265#issuecomment-585625790 hm, it seems the real issue was not here. MM_MIN_CHUNK was broken for clang. i'm closing this for 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
[GitHub] [incubator-nuttx] yamt closed pull request #265: mm: Fix memory corruption issues in realloc
yamt closed pull request #265: mm: Fix memory corruption issues in realloc URL: https://github.com/apache/incubator-nuttx/pull/265 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] [incubator-nuttx-apps] yamt commented on issue #66: Remove unused BUILTIN_PROXY_STACKSIZE config
yamt commented on issue #66: Remove unused BUILTIN_PROXY_STACKSIZE config URL: https://github.com/apache/incubator-nuttx-apps/pull/66#issuecomment-585607036 thank you. i'll try it later. 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] [incubator-nuttx-apps] xiaoxiang781216 commented on issue #66: Remove unused BUILTIN_PROXY_STACKSIZE config
xiaoxiang781216 commented on issue #66: Remove unused BUILTIN_PROXY_STACKSIZE config URL: https://github.com/apache/incubator-nuttx-apps/pull/66#issuecomment-585605869 run this command: tools/refresh.sh --silent all but some windows specific config need to bypass. 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] [incubator-nuttx] yamt commented on issue #210: Reimplement sim uart on top of serial driver framework
yamt commented on issue #210: Reimplement sim uart on top of serial driver framework URL: https://github.com/apache/incubator-nuttx/pull/210#issuecomment-585604461 i had at least two issues. 1. stack overflow (i bumped stack sizes in my config) 2. https://github.com/apache/incubator-nuttx/pull/265 maybe your change increased stack usage and triggered 1. i guess macos or clang consumes more stack than linux counterparts. 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] [incubator-nuttx] yamt opened a new pull request #265: mm: Fix memory corruption issues in realloc
yamt opened a new pull request #265: mm: Fix memory corruption issues in realloc URL: https://github.com/apache/incubator-nuttx/pull/265 Also, add a bunch of assertions. 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] [incubator-nuttx-apps] yamt commented on issue #66: Remove unused BUILTIN_PROXY_STACKSIZE config
yamt commented on issue #66: Remove unused BUILTIN_PROXY_STACKSIZE config URL: https://github.com/apache/incubator-nuttx-apps/pull/66#issuecomment-585601039 @xiaoxiang781216 is there an easy way to update a bunch of defconfigs? i mean easier than awk/sed/vi/etc 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