[GitHub] [incubator-nuttx-apps] yamt opened a new pull request #124: Nshlib nxstyle fixes

2020-03-16 Thread GitBox
yamt opened a new pull request #124: Nshlib nxstyle fixes
URL: https://github.com/apache/incubator-nuttx-apps/pull/124
 
 
   


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-testing] branch master updated (cb75fd7 -> 447f9a8)

2020-03-16 Thread xiaoxiang
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-testing.git.


from cb75fd7  cibuild.sh: make sure git log print out the last commit
 add 447f9a8  cibuild.sh: switch to use the recent bitbucket tools repo

No new revisions were added by this update.

Summary of changes:
 cibuild.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



[incubator-nuttx] branch master updated: Fix typos in comments and documentation.

2020-03-16 Thread gnutt
This is an automated email from the ASF dual-hosted git repository.

gnutt 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 a5e643b  Fix typos in comments and documentation.
a5e643b is described below

commit a5e643b0cd509af3986834486a761dbbbd715522
Author: Nathan Hartman 
AuthorDate: Mon Mar 16 15:42:34 2020 -0400

Fix typos in comments and documentation.
---
 ChangeLog  | 18 +++---
 Documentation/NuttShell.html   |  4 ++--
 Documentation/NuttXDemandPaging.html   |  4 ++--
 Documentation/NuttxPortingGuide.html   | 11 -
 INVIOLABLES.txt|  2 +-
 ReleaseNotes   |  2 +-
 TODO   |  2 +-
 arch/arm/src/arm/up_blocktask.c| 28 ++
 arch/arm/src/arm/up_head.S |  2 +-
 arch/arm/src/armv6-m/up_blocktask.c| 25 ++-
 arch/arm/src/armv7-a/arm_addrenv.c |  2 +-
 arch/arm/src/armv7-a/arm_blocktask.c   | 28 ++
 arch/arm/src/armv7-a/arm_head.S|  2 +-
 arch/arm/src/armv7-a/arm_pghead.S  |  2 +-
 arch/arm/src/armv7-m/up_blocktask.c| 28 ++
 arch/arm/src/armv7-r/arm_blocktask.c   | 28 ++
 arch/arm/src/armv7-r/arm_head.S|  2 +-
 arch/arm/src/cxd56xx/cxd56_irq.c   |  2 +-
 arch/arm/src/cxd56xx/cxd56_udmac.h |  2 +-
 arch/arm/src/dm320/dm320_usbdev.c  |  4 ++--
 arch/arm/src/efm32/efm32_irq.c |  2 +-
 arch/arm/src/imxrt/imxrt_edma.c|  2 +-
 arch/arm/src/imxrt/imxrt_ehci.c|  4 ++--
 arch/arm/src/imxrt/imxrt_irq.c |  2 +-
 arch/arm/src/kinetis/kinetis_irq.c |  2 +-
 arch/arm/src/lc823450/lc823450_irq.c   |  2 +-
 arch/arm/src/lpc17xx_40xx/lpc17_40_irq.c   |  2 +-
 arch/arm/src/lpc31xx/lpc31_ehci.c  |  4 ++--
 arch/arm/src/lpc43xx/lpc43_ehci.c  |  4 ++--
 arch/arm/src/lpc43xx/lpc43_irq.c   |  2 +-
 arch/arm/src/lpc54xx/lpc54_irq.c   |  2 +-
 arch/arm/src/max326xx/common/max326_irq.c  |  2 +-
 arch/arm/src/nrf52/nrf52_irq.c |  2 +-
 arch/arm/src/s32k1xx/s32k14x/s32k14x_irq.c |  2 +-
 arch/arm/src/s32k1xx/s32k1xx_edma.c|  2 +-
 arch/arm/src/sam34/sam4cm_oneshot.c|  2 +-
 arch/arm/src/sam34/sam_irq.c   |  2 +-
 arch/arm/src/sama5/sam_ehci.c  |  4 ++--
 arch/arm/src/sama5/sam_oneshot.c   |  2 +-
 arch/arm/src/samd2l2/sam_dmac.h|  4 ++--
 arch/arm/src/samd2l2/sam_i2c_master.c  |  2 +-
 arch/arm/src/samd5e5/sam_dmac.h|  4 ++--
 arch/arm/src/samd5e5/sam_i2c_master.c  |  2 +-
 arch/arm/src/samd5e5/sam_irq.c |  2 +-
 arch/arm/src/samv7/sam_irq.c   |  2 +-
 arch/arm/src/samv7/sam_oneshot.c   |  2 +-
 arch/arm/src/samv7/sam_serial.c|  2 +-
 arch/arm/src/stm32/stm32_irq.c |  2 +-
 arch/arm/src/stm32/stm32_oneshot.c |  2 +-
 arch/arm/src/stm32/stm32_sdadc.c   |  2 +-
 arch/arm/src/stm32f7/stm32_irq.c   |  2 +-
 arch/arm/src/stm32h7/stm32_irq.c   |  2 +-
 arch/arm/src/stm32l4/stm32l4_irq.c |  2 +-
 arch/arm/src/stm32l4/stm32l4_oneshot.c |  2 +-
 arch/arm/src/tiva/common/tiva_irq.c|  2 +-
 arch/arm/src/tiva/lm/lm3s_ethernet.c   |  2 +-
 arch/arm/src/xmc4/xmc4_irq.c   |  2 +-
 arch/avr/src/avr/up_blocktask.c| 28 ++
 arch/avr/src/avr32/up_blocktask.c  | 28 ++
 arch/hc/src/common/up_blocktask.c  | 28 ++
 arch/mips/src/mips32/up_blocktask.c| 28 ++
 arch/mips/src/pic32mz/pic32mz-oneshot.c|  2 +-
 arch/misoc/src/lm32/lm32_blocktask.c   | 28 ++
 arch/misoc/src/minerva/minerva_blocktask.c | 25 ++-
 arch/or1k/src/common/up_blocktask.c| 28 ++
 arch/renesas/src/common/up_blocktask.c | 28 ++
 arch/risc-v/src/rv32im/up_blocktask.c  | 28 ++
 arch/risc-v/src/rv64gc/up_blocktask.c  | 28 ++
 arch/sim/src/sim/up_blocktask.c| 28 ++
 

[GitHub] [incubator-nuttx] patacongo merged pull request #579: Fix typos in comments and documentation.

2020-03-16 Thread GitBox
patacongo merged pull request #579: Fix typos in comments and documentation.
URL: https://github.com/apache/incubator-nuttx/pull/579
 
 
   


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 #579: Fix typos in comments and documentation.

2020-03-16 Thread GitBox
xiaoxiang781216 commented on issue #579: Fix typos in comments and 
documentation.
URL: https://github.com/apache/incubator-nuttx/pull/579#issuecomment-599836665
 
 
   > @xiaoxiang781216 We talked in the past about cosmestic changes to files no 
being required to go through the same procedure. Is this an example? Could this 
be committed with outstanding coding standard violations.
   
   Yes, I think so. That is why we don't let build depend on check so we can 
waive the check error case by case.


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 commented on a change in pull request #118: Fix parallel buid errors in examples/elf

2020-03-16 Thread GitBox
masayuki2009 commented on a change in pull request #118: Fix parallel buid 
errors in examples/elf
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/118#discussion_r392831232
 
 

 ##
 File path: examples/elf/Makefile
 ##
 @@ -51,18 +51,11 @@ ROOTDEPPATH := --dep-path tests
 
 VPATH += :tests
 
-ifeq ($(CONFIG_EXAMPLES_ELF_ROMFS),y)
-  FSIMG_HDR = $(TESTS_DIR)/romfs.h
-else
-  FSIMG_HDR = $(TESTS_DIR)/cromfs.h
-endif
-
-elf_main.c: tests/symtab.c
-
-tests/symtab.c tests/dirlist.h $(FSIMG_HDR):
 
 Review comment:
   @xiaoxiang781216 This change was needed to fix such as
   
   ```
   riscv64-unknown-elf-ld: pthread.o: file not recognized: file truncated   

 
   Makefile:82: recipe for target 'pthread' failed  

 
   make[4]: *** [pthread] Error 1   

 
   ```
   
   Actually there was a similar error in 
   
https://github.com/apache/incubator-nuttx-apps/pull/118#issuecomment-598017857
   


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 commented on issue #123: Fix parallel build

2020-03-16 Thread GitBox
masayuki2009 commented on issue #123: Fix parallel build
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/123#issuecomment-599805000
 
 
   @xiaoxiang781216 Also, sometimes following error occurred which is the same 
as I commented in 
https://github.com/apache/incubator-nuttx-apps/pull/118#discussion_r392831232
   
   ```
   riscv64-unknown-elf-ld: task.o: file not recognized: file truncated  

   
   Makefile:82: recipe for target 'task' failed 

   
   make[4]: *** [task] Error 1  

 
   ```
   
   


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 edited a comment on issue #118: Fix parallel buid errors in examples/elf

2020-03-16 Thread GitBox
masayuki2009 edited a comment on issue #118: Fix parallel buid errors in 
examples/elf
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/118#issuecomment-598558150
 
 
   Umm, unfortunately it still fails. 
   https://builds.apache.org/job/NuttX-Nightly-Build/62/consoleText
   
   ```
   Configuration/Tool: maix-bit/elf,CONFIG_RV32IM_TOOLCHAIN_GNU_RVGL
   
   riscv64-unknown-elf-ld: 
/home/jenkins/jenkins-slave/workspace/NuttX-Nightly-Build/nuttx/staging/libapps.a(elf_main.home.jenkins.jenkins-slave.workspace.NuttX-Nightly-Build.apps.examples.elf.o):
 in function `elf_main':
   
/home/jenkins/jenkins-slave/workspace/NuttX-Nightly-Build/apps/examples/elf/elf_main.c:357:
 undefined reference to `g_elf_nexports'
   riscv64-unknown-elf-ld: 
/home/jenkins/jenkins-slave/workspace/NuttX-Nightly-Build/apps/examples/elf/elf_main.c:357:
 undefined reference to `g_elf_exports'
   make[1]: *** [nuttx] Error 1
   make: *** [pass2] Error 2
   make: Target 'all' not remade because of errors.
   ```


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 edited a comment on issue #118: Fix parallel buid errors in examples/elf

2020-03-16 Thread GitBox
masayuki2009 edited a comment on issue #118: Fix parallel buid errors in 
examples/elf
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/118#issuecomment-598038736
 
 
   Hi, @xiaoxiang781216 
   
   >it seems that this build break relate to this change:
   
   Oh, really? But I thought this PR was merged after the nightly build started.
   Actually, I can not see the change in the following log.
   ```
   https://builds.apache.org/job/NuttX-Nightly-Build/61/consoleFull
   
59 files changed, 689 insertions(+), 999 deletions(-)
   + '[' -d 
/home/jenkins/jenkins-slave/workspace/NuttX-Nightly-Build/testing/../apps ']'
   + cd 
/home/jenkins/jenkins-slave/workspace/NuttX-Nightly-Build/testing/../apps
   + git pull
   Already up to date.
   ```
   
   Is my understanding 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-apps] masayuki2009 commented on issue #123: Fix parallel build

2020-03-16 Thread GitBox
masayuki2009 commented on issue #123: Fix parallel build
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/123#issuecomment-599801635
 
 
   @xiaoxiang781216 I did parallel build aging test (from -j1 to -j24) for 
maix-bit:elf with this PR, but it failed.
   
   ```
   lf_main.c: In function 'elf_main':   

  
   elf_main.c:270:41: error: 'romfs_img' undeclared (first use in this 
function)   

 (FAR uint8_t *)romfs_img,  

   
^   

   
   elf_main.c:270:41: note: each undeclared identifier is reported only once 
for each function it appears in 
  
   elf_main.c:271:35: error: 'romfs_img_len' undeclared (first use in this 
function)   

 NSECTORS(romfs_img_len), SECTORSIZE);  

   
  ^ 

   
   elf_main.c:94:27: note: in definition of macro 'NSECTORS'

   
#  define NSECTORS(b)  (((b) + SECTORSIZE - 1) / SECTORSIZE)  
   ```
   


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 edited a comment on issue #459: stm32h7: support SDRAM via FMC peripherial

2020-03-16 Thread GitBox
patacongo edited a comment on issue #459: stm32h7: support SDRAM via FMC 
peripherial
URL: https://github.com/apache/incubator-nuttx/pull/459#issuecomment-599788169
 
 
   No, no meta-data in source files.  This has been discussed before.  The 
coding standard prohibits meta data in sources (at least in reference to 
Deoxygen, but is generalization).  Let's not go this way.  Let's keep clean C 
code with no tool-specific meta-shit.
   
   Furthermore, there is no exlusion from the file lenght in the coding 
standard.  This would essential say that it is okay to violatie the coding 
standard.  That is not a good thing.
   
   You are basically proposing to rub snot into C files so that they can freely 
violate the coding standard.


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 edited a comment on issue #459: stm32h7: support SDRAM via FMC peripherial

2020-03-16 Thread GitBox
patacongo edited a comment on issue #459: stm32h7: support SDRAM via FMC 
peripherial
URL: https://github.com/apache/incubator-nuttx/pull/459#issuecomment-599788169
 
 
   No, no meta-data in source files.  This has been discussed before.  The 
coding standard prohibits meta data in sources (at least in reference to 
Deoxygen, but is generalization).  Let's not go this way.  Let's keep clean C 
code with no tool-specific meta-shit.
   
   Furthermore, there is no exlusion from the file lenght in the coding 
standard.  This would essential say that it is okay to violatie the coding 
standard.  That is not a good thing.
   
   You are basically proposing to run snot into C files so that they can freely 
violate the coding standard.


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 edited a comment on issue #579: Fix typos in comments and documentation.

2020-03-16 Thread GitBox
patacongo edited a comment on issue #579: Fix typos in comments and 
documentation.
URL: https://github.com/apache/incubator-nuttx/pull/579#issuecomment-599791321
 
 
   @xiaoxiang781216 We talked in the past about cosmestic changes to files no 
being required to go through the same procedure.  Is this an example?  Could 
this be committed with outstanding 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] patacongo commented on issue #579: Fix typos in comments and documentation.

2020-03-16 Thread GitBox
patacongo commented on issue #579: Fix typos in comments and documentation.
URL: https://github.com/apache/incubator-nuttx/pull/579#issuecomment-599791321
 
 
   @xiaoxiang781216 We talked in the past about costmestic changes to files no 
being required to go through the same procedure.  Is this an example?  Could 
this be committed with outstanind 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] patacongo edited a comment on issue #459: stm32h7: support SDRAM via FMC peripherial

2020-03-16 Thread GitBox
patacongo edited a comment on issue #459: stm32h7: support SDRAM via FMC 
peripherial
URL: https://github.com/apache/incubator-nuttx/pull/459#issuecomment-599788169
 
 
   No, no meta-data in source files.  This has been discussed before.  The 
coding standard prohibits meta data in sources (at least in reference to 
Deoxygen, but is generalization).  Let's not go this way.  Let's keep clean C 
code with no tool-specific meta-shit.
   
   Furthermore, there is no exlusion from the file lenght in the coding 
standard.  This would essential say that it is okay to violatie the coding 
standard.  That is not a good thing.


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 #459: stm32h7: support SDRAM via FMC peripherial

2020-03-16 Thread GitBox
patacongo commented on issue #459: stm32h7: support SDRAM via FMC peripherial
URL: https://github.com/apache/incubator-nuttx/pull/459#issuecomment-599788169
 
 
   No, no meta-data in source 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] davids5 commented on issue #459: stm32h7: support SDRAM via FMC peripherial

2020-03-16 Thread GitBox
davids5 commented on issue #459: stm32h7: support SDRAM via FMC peripherial
URL: https://github.com/apache/incubator-nuttx/pull/459#issuecomment-599784780
 
 
   @johannes-nivus Here is one thing that may make sense if @patacongo is 
onboard with it. There is the `excess ` control in Nxstyle.  What in h files we 
could have a comment in the title block (like vim settings. )  `excess=N` 
   
   Then we would not have to loose infomation in the right side comments.
   
   For for what you did above without loss of information it would be a ruler 
of 100 and have a tag of 
   * excess=80
   
   Thoughts?
   


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 #579: Fix typos in comments and documentation.

2020-03-16 Thread GitBox
patacongo commented on issue #579: Fix typos in comments and documentation.
URL: https://github.com/apache/incubator-nuttx/pull/579#issuecomment-599775050
 
 
   > But I don't see three files; I see myriad files with "long line" and other 
complaints. Which three were you referring to?
   
   Oops I didn't scroll down.. thre are quite a few more than three.  The file 
name is on each 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] hartmannathan commented on issue #579: Fix typos in comments and documentation.

2020-03-16 Thread GitBox
hartmannathan commented on issue #579: Fix typos in comments and documentation.
URL: https://github.com/apache/incubator-nuttx/pull/579#issuecomment-599773884
 
 
   > PR Check CI / check (pull_request) Failing after 2m — check Details
   > 
   > Select details
   
   Strange. Earlier that was giving me a blank window. Now I see output.
   
   But I don't see three files; I see myriad files with "long line" and other 
complaints. Which three were you referring to?
   
   You're right that this is a disincentive; though the problem with typos is 
that once you find one, it's an easy matter to grep for other instances of the 
same thing and fix them all. But, that touches a lot of files. It looks like 
we'll need a systematic approach to go through files, directory by directory, 
and bring everything into compliance with nxstyle over 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] davids5 opened a new pull request #580: Add Optional in driver dma buffers for STM32{F4|F7}

2020-03-16 Thread GitBox
davids5 opened a new pull request #580: Add Optional in driver dma buffers for 
STM32{F4|F7}
URL: https://github.com/apache/incubator-nuttx/pull/580
 
 
   This add an optional ability to have buffering in the SPI driver for DMA. 
   
   If a SPI Bus uses an "in driver buffers" we will incur 2 copies,  The copy 
cost is << less the non DMA transfer time and having the buffer in the driver 
ensures DMA can be used. 
   
   This is needed for 2 reason. 
   
   1) F4 DTCM Stack based buffers would not be DMA-able. 
   2) Because the SPI API does not support passing the buffer extent, so the 
only extent is buffer + the transfer size.  This is an issue on F7 with 
caching. These can sizes be less than the cache line size, and not aligned and 
typically greater then 4 bytes, which is about the break even point for the DMA 
IO overhead.
   
   


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 #579: Fix typos in comments and documentation.

2020-03-16 Thread GitBox
patacongo commented on issue #579: Fix typos in comments and documentation.
URL: https://github.com/apache/incubator-nuttx/pull/579#issuecomment-599772167
 
 
   If you do not have time, I can make the changes for you on your behalf.  Let 
me know.


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 #579: Fix typos in comments and documentation.

2020-03-16 Thread GitBox
patacongo commented on issue #579: Fix typos in comments and documentation.
URL: https://github.com/apache/incubator-nuttx/pull/579#issuecomment-599755088
 
 
   PR Check CI / check (pull_request) Failing after 2m — check Details
   
   Select details
   


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 #579: Fix typos in comments and documentation.

2020-03-16 Thread GitBox
patacongo commented on issue #579: Fix typos in comments and documentation.
URL: https://github.com/apache/incubator-nuttx/pull/579#issuecomment-599734812
 
 
   @hartmannathan  There are three files that are failing the nxstyle check.  
The good news that is a lot of files to change to only find three problem files!
   
   With the new nxstyle qualification, it is a disincentive to modify lots of 
files, even for innocuous changes.
   
   Can you force push changes to those 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] hartmannathan opened a new pull request #579: Fix typos in comments and documentation.

2020-03-16 Thread GitBox
hartmannathan opened a new pull request #579: Fix typos in comments and 
documentation.
URL: https://github.com/apache/incubator-nuttx/pull/579
 
 
   This fixes numerous typos, grammar errors, etc., in various docs and many 
source files (comments only). No functional changes.
   
   I did not run nxstyle against the many files touched by this change. There 
should not be any new violations. Even if some of the files contain old 
violations, I think it is best to fix the typos first.


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 #437: Support to run NuttX on ESP32 QEMU

2020-03-16 Thread GitBox
patacongo commented on issue #437: Support to run NuttX on ESP32 QEMU
URL: https://github.com/apache/incubator-nuttx/pull/437#issuecomment-599678298
 
 
   @maht What is the status of this PR?  It it your intention to complete the 
requsted changes?  Or did you plan to just close this PR?


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] johannes-nivus closed pull request #569: Add possibility to add identifier whitelist to "block comments" of file…

2020-03-16 Thread GitBox
johannes-nivus closed pull request #569: Add possibility to add identifier 
whitelist to "block comments" of file…
URL: https://github.com/apache/incubator-nuttx/pull/569
 
 
   


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: esp32-core: Document how to disable RTC watchdog timer

2020-03-16 Thread gnutt
This is an automated email from the ASF dual-hosted git repository.

gnutt 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 430a217  esp32-core: Document how to disable RTC watchdog timer
430a217 is described below

commit 430a2178fbdf6988d6552146dd80c4b235dbb085
Author: YAMAMOTO Takashi 
AuthorDate: Mon Mar 16 23:19:59 2020 +0900

esp32-core: Document how to disable RTC watchdog timer
---
 boards/xtensa/esp32/esp32-core/README.txt | 5 +
 1 file changed, 5 insertions(+)

diff --git a/boards/xtensa/esp32/esp32-core/README.txt 
b/boards/xtensa/esp32/esp32-core/README.txt
index 9a13d8b..ba98f50 100644
--- a/boards/xtensa/esp32/esp32-core/README.txt
+++ b/boards/xtensa/esp32/esp32-core/README.txt
@@ -488,6 +488,11 @@ OpenOCD for the ESP32
   See https://github.com/espressif/esp-idf/tree/master/components/bootloader
   and 
https://github.com/espressif/esp-idf/tree/master/components/partition_table .
 
+  The secondary boot loader by default programs a RTC watchdog timer.
+  As NuttX doesn't know the timer, it reboots every ~9 seconds. You can
+  disable the timer by tweaking sdkconfig CONFIG_BOOTLOADER_WDT_ENABLE
+  and rebuild the boot loader.
+
   Running from IRAM with OpenOCD
   --
   Running from IRAM is a good debug option.  You should be able to load the



[GitHub] [incubator-nuttx] patacongo merged pull request #578: esp32-core: Document how to disable RTC watchdog timer

2020-03-16 Thread GitBox
patacongo merged pull request #578: esp32-core: Document how to disable RTC 
watchdog timer
URL: https://github.com/apache/incubator-nuttx/pull/578
 
 
   


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 #578: esp32-core: Document how to disable RTC watchdog timer

2020-03-16 Thread GitBox
yamt opened a new pull request #578: esp32-core: Document how to disable RTC 
watchdog timer
URL: https://github.com/apache/incubator-nuttx/pull/578
 
 
   


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] 14/14: esp32: emulate byte access for module text

2020-03-16 Thread gnutt
This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit f4e7845b8577af9ff76d66b81f35374760809ee2
Author: YAMAMOTO Takashi 
AuthorDate: Mon Mar 16 15:07:36 2020 +0900

esp32: emulate byte access for module text

Tested on ESP-EYE.
---
 arch/xtensa/include/loadstore.h  |  51 +
 arch/xtensa/src/common/xtensa.h  |   3 +-
 arch/xtensa/src/common/xtensa_assert.c   |   2 +-
 arch/xtensa/src/common/xtensa_loadstore.S|  76 +++
 arch/xtensa/src/common/xtensa_user_handler.S |  31 ++-
 arch/xtensa/src/esp32/Make.defs  |   2 +
 arch/xtensa/src/esp32/esp32_user.c   | 302 +++
 7 files changed, 459 insertions(+), 8 deletions(-)

diff --git a/arch/xtensa/include/loadstore.h b/arch/xtensa/include/loadstore.h
new file mode 100644
index 000..69d219e
--- /dev/null
+++ b/arch/xtensa/include/loadstore.h
@@ -0,0 +1,51 @@
+/
+ * arch/xtensa/include/loadstore.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 __ARCH_XTENSA_INCLUDE_LOADSTORE_H
+#define __ARCH_XTENSA_INCLUDE_LOADSTORE_H
+
+/
+ * Included Files
+ /
+
+/
+ * Pre-processor Definitions
+ /
+
+/
+ * Public Types
+ /
+
+/
+ * Inline functions
+ /
+
+/
+ * Public Data
+ /
+
+/
+ * Public Function Prototypes
+ /
+
+uint32_t l32i(const uint32_t *p);
+void s32i(uint32_t *p, uint32_t value);
+
+#endif /* __ARCH_XTENSA_INCLUDE_LOADSTORE_H */
diff --git a/arch/xtensa/src/common/xtensa.h b/arch/xtensa/src/common/xtensa.h
index ab6c1fb..bff7093 100644
--- a/arch/xtensa/src/common/xtensa.h
+++ b/arch/xtensa/src/common/xtensa.h
@@ -267,7 +267,8 @@ uint32_t *xtensa_irq_dispatch(int irq, uint32_t *regs);
 uint32_t xtensa_enable_cpuint(uint32_t *shadow, uint32_t intmask);
 uint32_t xtensa_disable_cpuint(uint32_t *shadow, uint32_t intmask);
 void xtensa_panic(int xptcode, uint32_t *regs) noreturn_function;
-void xtensa_user(int exccause, uint32_t *regs) noreturn_function;
+void xtensa_user_panic(int exccause, uint32_t *regs) noreturn_function;
+uint32_t *xtensa_user(int exccause, uint32_t *regs);
 
 /* Software interrupt handler */
 
diff --git a/arch/xtensa/src/common/xtensa_assert.c 
b/arch/xtensa/src/common/xtensa_assert.c
index e18838b..dcf9382 100644
--- a/arch/xtensa/src/common/xtensa_assert.c
+++ b/arch/xtensa/src/common/xtensa_assert.c
@@ -314,7 +314,7 @@ void xtensa_panic(int xptcode, uint32_t *regs)
  *
  /
 
-void xtensa_user(int exccause, uint32_t *regs)
+void xtensa_user_panic(int exccause, uint32_t *regs)
 {
 #if CONFIG_TASK_NAME_SIZE > 0 && defined(CONFIG_DEBUG_ALERT)
   struct tcb_s *rtcb = running_task();
diff --git a/arch/xtensa/src/common/xtensa_loadstore.S 
b/arch/xtensa/src/common/xtensa_loadstore.S
new file mode 100644
index 000..b14fdfe
--- /dev/null
+++ b/arch/xtensa/src/common/xtensa_loadstore.S
@@ -0,0 +1,76 @@
+/
+ * arch/xtensa/src/common/xtensa_loadstore.S
+ *
+ * 

[incubator-nuttx] 12/14: Adapt dlfcn/modlib to use the instruction memory allocator

2020-03-16 Thread gnutt
This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 061b796d472e8858a0e09aae4ec1b2de7b078f4a
Author: YAMAMOTO Takashi 
AuthorDate: Fri Mar 6 17:05:25 2020 +0900

Adapt dlfcn/modlib to use the instruction memory allocator
---
 include/nuttx/lib/modlib.h   |  5 +
 libs/libc/modlib/Kconfig |  1 +
 libs/libc/modlib/modlib_load.c   | 25 +
 libs/libc/modlib/modlib_unload.c | 12 
 sched/Kconfig|  1 +
 sched/init/nx_start.c|  4 
 sched/module/mod_insmod.c|  5 +
 sched/module/mod_procfs.c| 11 ++-
 sched/module/mod_rmmod.c | 20 +++-
 9 files changed, 78 insertions(+), 6 deletions(-)

diff --git a/include/nuttx/lib/modlib.h b/include/nuttx/lib/modlib.h
index 3271a94..baf969e 100644
--- a/include/nuttx/lib/modlib.h
+++ b/include/nuttx/lib/modlib.h
@@ -172,7 +172,12 @@ struct module_s
   mod_initializer_t initializer;   /* Module initializer function */
 #endif
   struct mod_info_s modinfo;   /* Module information */
+#if defined(CONFIG_ARCH_USE_MODULE_TEXT)
+  FAR void *textalloc; /* Allocated kernel text memory */
+  FAR void *dataalloc; /* Allocated kernel memory */
+#else
   FAR void *alloc; /* Allocated kernel memory */
+#endif
 #if defined(CONFIG_FS_PROCFS) && !defined(CONFIG_FS_PROCFS_EXCLUDE_MODULE)
   size_t textsize; /* Size of the kernel .text memory 
allocation */
   size_t datasize; /* Size of the kernel .bss/.data memory 
allocation */
diff --git a/libs/libc/modlib/Kconfig b/libs/libc/modlib/Kconfig
index c03fdbb..4f9e78d 100644
--- a/libs/libc/modlib/Kconfig
+++ b/libs/libc/modlib/Kconfig
@@ -7,6 +7,7 @@ config LIBC_MODLIB
bool
default n
select LIBC_ARCH_ELF
+   select ARCH_USE_MODULE_TEXT if ARCH_HAVE_MODULE_TEXT
 
 menu "Module library configuration"
depends on LIBC_MODLIB
diff --git a/libs/libc/modlib/modlib_load.c b/libs/libc/modlib/modlib_load.c
index 8e16312..ecae40d 100644
--- a/libs/libc/modlib/modlib_load.c
+++ b/libs/libc/modlib/modlib_load.c
@@ -262,6 +262,30 @@ int modlib_load(FAR struct mod_loadinfo_s *loadinfo)
 
   /* Allocate memory to hold the ELF image */
 
+#if defined(CONFIG_ARCH_USE_MODULE_TEXT)
+  if (loadinfo->textsize > 0)
+{
+  loadinfo->textalloc = (uintptr_t)
+up_module_text_alloc(loadinfo->textsize);
+  if (!loadinfo->textalloc)
+{
+  berr("ERROR: Failed to allocate memory for the module text\n");
+  ret = -ENOMEM;
+  goto errout_with_buffers;
+}
+}
+
+  if (loadinfo->datasize > 0)
+{
+  loadinfo->datastart = (uintptr_t)lib_malloc(loadinfo->datasize);
+  if (!loadinfo->datastart)
+{
+  berr("ERROR: Failed to allocate memory for the module data\n");
+  ret = -ENOMEM;
+  goto errout_with_buffers;
+}
+}
+#else
   loadinfo->textalloc = (uintptr_t)lib_malloc(loadinfo->textsize +
   loadinfo->datasize);
   if (!loadinfo->textalloc)
@@ -272,6 +296,7 @@ int modlib_load(FAR struct mod_loadinfo_s *loadinfo)
 }
 
   loadinfo->datastart = loadinfo->textalloc + loadinfo->textsize;
+#endif
 
   /* Load ELF section data into memory */
 
diff --git a/libs/libc/modlib/modlib_unload.c b/libs/libc/modlib/modlib_unload.c
index 6288971..8d31901 100644
--- a/libs/libc/modlib/modlib_unload.c
+++ b/libs/libc/modlib/modlib_unload.c
@@ -73,10 +73,22 @@ int modlib_unload(struct mod_loadinfo_s *loadinfo)
 
   /* Release memory holding the relocated ELF image */
 
+#if defined(CONFIG_ARCH_USE_MODULE_TEXT)
+  if (loadinfo->textalloc != 0)
+{
+  up_module_text_free((FAR void *)loadinfo->textalloc);
+}
+
+  if (loadinfo->datastart != 0)
+{
+  lib_free((FAR void *)loadinfo->datastart);
+}
+#else
   if (loadinfo->textalloc != 0)
 {
   lib_free((FAR void *)loadinfo->textalloc);
 }
+#endif
 
   /* Clear out all indications of the allocated address environment */
 
diff --git a/sched/Kconfig b/sched/Kconfig
index 5093b08..5cebb24 100644
--- a/sched/Kconfig
+++ b/sched/Kconfig
@@ -1572,6 +1572,7 @@ config MODULE
bool "Enable loadable OS modules"
default n
select LIBC_MODLIB
+   select ARCH_USE_MODULE_TEXT if ARCH_HAVE_MODULE_TEXT
---help---
Enable support for loadable OS modules.  Default: n
 
diff --git a/sched/init/nx_start.c b/sched/init/nx_start.c
index cffd033..bf8f724 100644
--- a/sched/init/nx_start.c
+++ b/sched/init/nx_start.c
@@ -599,6 +599,10 @@ void nx_start(void)
   kmm_initialize(heap_start, heap_size);
 #endif
 
+#ifdef CONFIG_ARCH_USE_MODULE_TEXT
+up_module_text_init();
+#endif
+
 #ifdef CONFIG_MM_PGALLOC

[incubator-nuttx] 08/14: xtensa: Implement a few relocations

2020-03-16 Thread gnutt
This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit e135c938d2466f21225966d04b337922bbfa9da8
Author: YAMAMOTO Takashi 
AuthorDate: Thu Mar 5 19:11:32 2020 +0900

xtensa: Implement a few relocations
---
 arch/xtensa/include/elf.h   |  5 ++-
 libs/libc/machine/xtensa/arch_elf.c | 65 +++--
 2 files changed, 66 insertions(+), 4 deletions(-)

diff --git a/arch/xtensa/include/elf.h b/arch/xtensa/include/elf.h
index 829b717..c46144b 100644
--- a/arch/xtensa/include/elf.h
+++ b/arch/xtensa/include/elf.h
@@ -27,6 +27,9 @@
 
 /* Relocation codes */
 
-#define R_XTENSA_NONE 0
+#define R_XTENSA_NONE   0
+#define R_XTENSA_32 1
+#define R_XTENSA_ASM_EXPAND 11
+#define R_XTENSA_SLOT0_OP   20
 
 #endif /* __ARCH_XTENSA_INCLUDE_ELF_H */
diff --git a/libs/libc/machine/xtensa/arch_elf.c 
b/libs/libc/machine/xtensa/arch_elf.c
index 9d567fb..84a8848 100644
--- a/libs/libc/machine/xtensa/arch_elf.c
+++ b/libs/libc/machine/xtensa/arch_elf.c
@@ -24,6 +24,7 @@
 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -43,6 +44,11 @@
  * Private Functions
  /
 
+static bool is_l32r(FAR const unsigned char *p)
+{
+  return (p[0] & 0xf) == 1;
+}
+
 /
  * Public Functions
  /
@@ -85,6 +91,7 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr)
   /* Verify endian-ness */
 
 #ifdef CONFIG_ENDIAN_BIG
+#error not implemented
   if (ehdr->e_ident[EI_DATA] != ELFDATA2MSB)
 #else
   if (ehdr->e_ident[EI_DATA] != ELFDATA2LSB)
@@ -146,7 +153,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const 
Elf32_Sym *sym,
   break;
 
 default:
-  berr("ERROR: Unsupported relocation: %d\n", ELF32_R_TYPE(rel->r_info));
+  berr("ERROR: Unsupported relocation: %u\n", relotype);
   return -EINVAL;
 }
 
@@ -156,6 +163,58 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const 
Elf32_Sym *sym,
 int up_relocateadd(FAR const Elf32_Rela *rel, FAR const Elf32_Sym *sym,
uintptr_t addr)
 {
-  berr("ERROR: RELA relocation not supported\n");
-  return -ENOSYS;
+  unsigned int relotype;
+  unsigned char *p;
+  uint32_t value;
+
+  relotype = ELF32_R_TYPE(rel->r_info);
+  value = sym->st_value + rel->r_addend;
+
+  /* Handle the relocation by relocation type */
+
+  switch (relotype)
+{
+case R_XTENSA_32:
+  (*(FAR uint32_t *)addr) += value;
+  break;
+
+case R_XTENSA_ASM_EXPAND:
+  bwarn("WARNING: Ignoring RELA relocation R_XTENSA_ASM_EXPAND %u\n",
+  relotype);
+  break;
+
+case R_XTENSA_SLOT0_OP:
+  p = (FAR unsigned char *)addr;
+  if (is_l32r(p))
+{
+  /* Xtensa ISA:
+   * L32R forms a virtual address by adding the 16-bit one-extended
+   * constant value encoded in the instruction word shifted left by
+   * two to the address of the L32R plus three with the two least
+   * significant bits cleared.
+   */
+
+  uintptr_t base = (addr + 3) & ~3;
+  uint16_t imm = (value - base) >> 2;
+  if (base + (0xfffc | ((uint32_t)imm << 2)) != value)
+{
+  berr("ERROR: Out of range rellocation at %p\n", p);
+  return -EINVAL;
+}
+
+  p[1] = imm & 0xff;
+  p[2] = (imm >> 8) & 0xff;
+  break;
+}
+
+  bwarn("WARNING: Ignoring RELA relocation R_XTENSA_SLOT0_OP %u\n",
+relotype);
+  break;
+
+default:
+  berr("ERROR: RELA relocation %u not supported\n", relotype);
+  return -EINVAL;
+}
+
+  return OK;
 }



[incubator-nuttx] 13/14: xtensa/arch_elf.c: Ignore R_XTENSA_NONE

2020-03-16 Thread gnutt
This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit df44909b30a5a864777477a202027e78cad2768d
Author: YAMAMOTO Takashi 
AuthorDate: Tue Mar 10 18:46:06 2020 +0900

xtensa/arch_elf.c: Ignore R_XTENSA_NONE

Now examples/sotest passes on qemu.
---
 libs/libc/machine/xtensa/arch_elf.c | 19 ++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/libs/libc/machine/xtensa/arch_elf.c 
b/libs/libc/machine/xtensa/arch_elf.c
index 84a8848..7d63840 100644
--- a/libs/libc/machine/xtensa/arch_elf.c
+++ b/libs/libc/machine/xtensa/arch_elf.c
@@ -167,13 +167,30 @@ int up_relocateadd(FAR const Elf32_Rela *rel, FAR const 
Elf32_Sym *sym,
   unsigned char *p;
   uint32_t value;
 
+  /* All relocations except NONE depend upon having valid symbol
+   * information.
+   */
+
   relotype = ELF32_R_TYPE(rel->r_info);
-  value = sym->st_value + rel->r_addend;
+  if (sym == NULL)
+{
+  if (relotype != R_XTENSA_NONE)
+{
+  return -EINVAL;
+}
+}
+  else
+{
+  value = sym->st_value + rel->r_addend;
+}
 
   /* Handle the relocation by relocation type */
 
   switch (relotype)
 {
+case R_XTENSA_NONE:
+  break;
+
 case R_XTENSA_32:
   (*(FAR uint32_t *)addr) += value;
   break;



[incubator-nuttx] 09/14: Add -mtext-section-literals to avoid out of range relocations

2020-03-16 Thread gnutt
This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit bf2cfd4b1ae8cccad8278195d4d49dc66ba4736a
Author: YAMAMOTO Takashi 
AuthorDate: Thu Mar 5 19:14:54 2020 +0900

Add -mtext-section-literals to avoid out of range relocations
---
 boards/xtensa/esp32/esp32-core/scripts/Make.defs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/boards/xtensa/esp32/esp32-core/scripts/Make.defs 
b/boards/xtensa/esp32/esp32-core/scripts/Make.defs
index d85b550..c230ad6 100644
--- a/boards/xtensa/esp32/esp32-core/scripts/Make.defs
+++ b/boards/xtensa/esp32/esp32-core/scripts/Make.defs
@@ -104,7 +104,7 @@ LDNXFLATFLAGS = -e main -s 2048
 
 # Loadable module definitions
 
-CMODULEFLAGS = $(CFLAGS)
+CMODULEFLAGS = $(CFLAGS) -mtext-section-literals
 
 LDMODULEFLAGS = -r -e module_initialize
 ifeq ($(WINTOOL),y)
@@ -115,8 +115,8 @@ endif
 
 # ELF module definitions
 
-CELFFLAGS = $(CFLAGS)
-CXXELFFLAGS = $(CXXFLAGS)
+CELFFLAGS = $(CFLAGS) -mtext-section-literals
+CXXELFFLAGS = $(CXXFLAGS) -mtext-section-literals
 
 LDELFFLAGS = -r -e main
 ifeq ($(WINTOOL),y)



[incubator-nuttx] 04/14: xtensa: Add modlib boilerplate

2020-03-16 Thread gnutt
This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 5e1b24f01204aa1cb7cb922750243fdc20098e9c
Author: YAMAMOTO Takashi 
AuthorDate: Thu Mar 5 11:26:21 2020 +0900

xtensa: Add modlib boilerplate

This is a modified copy of armv6-m/armv7-m version.
---
 libs/libc/machine/Kconfig|   3 +
 libs/libc/machine/Make.defs  |   3 +
 libs/libc/machine/xtensa/Kconfig |   4 +
 libs/libc/machine/{ => xtensa}/Make.defs |  20 ++--
 libs/libc/machine/xtensa/arch_elf.c  | 174 +++
 5 files changed, 192 insertions(+), 12 deletions(-)

diff --git a/libs/libc/machine/Kconfig b/libs/libc/machine/Kconfig
index aea5619..f0c34ac 100644
--- a/libs/libc/machine/Kconfig
+++ b/libs/libc/machine/Kconfig
@@ -162,5 +162,8 @@ endif
 if ARCH_X86
 source libs/libc/machine/x86/Kconfig
 endif
+if ARCH_XTENSA
+source libs/libc/machine/xtensa/Kconfig
+endif
 
 endmenu # Architecture-Specific Support
diff --git a/libs/libc/machine/Make.defs b/libs/libc/machine/Make.defs
index efe95aa..8cfd702 100644
--- a/libs/libc/machine/Make.defs
+++ b/libs/libc/machine/Make.defs
@@ -45,3 +45,6 @@ endif
 ifeq ($(CONFIG_ARCH_X86),y)
 include ${TOPDIR}/libs/libc/machine/x86/Make.defs
 endif
+ifeq ($(CONFIG_ARCH_XTENSA),y)
+include ${TOPDIR}/libs/libc/machine/xtensa/Make.defs
+endif
diff --git a/libs/libc/machine/xtensa/Kconfig b/libs/libc/machine/xtensa/Kconfig
new file mode 100644
index 000..f72f3c0
--- /dev/null
+++ b/libs/libc/machine/xtensa/Kconfig
@@ -0,0 +1,4 @@
+#
+# For a description of the syntax of this configuration file,
+# see the file kconfig-language.txt in the NuttX tools repository.
+#
diff --git a/libs/libc/machine/Make.defs b/libs/libc/machine/xtensa/Make.defs
similarity index 82%
copy from libs/libc/machine/Make.defs
copy to libs/libc/machine/xtensa/Make.defs
index efe95aa..fc8c884 100644
--- a/libs/libc/machine/Make.defs
+++ b/libs/libc/machine/xtensa/Make.defs
@@ -1,5 +1,5 @@
 
-# libs/libc/machine/Make.defs
+# libs/libc/machine/arm/armv6-m/Make.defs
 #
 #   Copyright (C) 2017 Gregory Nutt. All rights reserved.
 #   Author: Gregory Nutt 
@@ -33,15 +33,11 @@
 #
 
 
-ifeq ($(CONFIG_ARCH_ARM),y)
-include ${TOPDIR}/libs/libc/machine/arm/Make.defs
-endif
-ifeq ($(CONFIG_ARCH_RISCV),y)
-include ${TOPDIR}/libs/libc/machine/risc-v/Make.defs
-endif
-ifeq ($(CONFIG_ARCH_SIM),y)
-include ${TOPDIR}/libs/libc/machine/sim/Make.defs
-endif
-ifeq ($(CONFIG_ARCH_X86),y)
-include ${TOPDIR}/libs/libc/machine/x86/Make.defs
+ifeq ($(CONFIG_LIBC_ARCH_ELF),y)
+
+CSRCS += arch_elf.c
+
+DEPPATH += --dep-path machine/xtensa
+VPATH += :machine/xtensa
+
 endif
diff --git a/libs/libc/machine/xtensa/arch_elf.c 
b/libs/libc/machine/xtensa/arch_elf.c
new file mode 100644
index 000..97fdbc2
--- /dev/null
+++ b/libs/libc/machine/xtensa/arch_elf.c
@@ -0,0 +1,174 @@
+/
+ * libs/libc/machine/arm/armv6-m/arch_elf.c
+ *
+ *   Copyright (C) 2013-2014, 2017 Gregory Nutt. All rights reserved.
+ *   Author: Gregory Nutt 
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in
+ *the documentation and/or other materials provided with the
+ *distribution.
+ * 3. Neither the name NuttX nor the names of its contributors may be
+ *used to endorse or promote products derived from this software
+ *without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ /
+

[incubator-nuttx] 06/14: Update file paths of copy-and-paste'ed files

2020-03-16 Thread gnutt
This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit b2627225bdb17764267d8f4d6043f3a4cc8879fe
Author: YAMAMOTO Takashi 
AuthorDate: Fri Mar 6 11:28:03 2020 +0900

Update file paths of copy-and-paste'ed files
---
 boards/xtensa/esp32/esp32-core/scripts/gnu-elf.ld | 2 +-
 libs/libc/machine/xtensa/Make.defs| 2 +-
 libs/libc/machine/xtensa/arch_elf.c   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/boards/xtensa/esp32/esp32-core/scripts/gnu-elf.ld 
b/boards/xtensa/esp32/esp32-core/scripts/gnu-elf.ld
index 95c7d2e..880537c 100644
--- a/boards/xtensa/esp32/esp32-core/scripts/gnu-elf.ld
+++ b/boards/xtensa/esp32/esp32-core/scripts/gnu-elf.ld
@@ -1,5 +1,5 @@
 /
- * binfmt/libelf/gnu-elf.ld
+ * boards/xtensa/esp32/esp32-core/scripts/gnu-elf.ld
  *
  *   Copyright (C) 2012 Gregory Nutt. All rights reserved.
  *   Author: Gregory Nutt 
diff --git a/libs/libc/machine/xtensa/Make.defs 
b/libs/libc/machine/xtensa/Make.defs
index fc8c884..a3b2444 100644
--- a/libs/libc/machine/xtensa/Make.defs
+++ b/libs/libc/machine/xtensa/Make.defs
@@ -1,5 +1,5 @@
 
-# libs/libc/machine/arm/armv6-m/Make.defs
+# libs/libc/machine/xtensa/Make.defs
 #
 #   Copyright (C) 2017 Gregory Nutt. All rights reserved.
 #   Author: Gregory Nutt 
diff --git a/libs/libc/machine/xtensa/arch_elf.c 
b/libs/libc/machine/xtensa/arch_elf.c
index 464e9a8..ea385a3 100644
--- a/libs/libc/machine/xtensa/arch_elf.c
+++ b/libs/libc/machine/xtensa/arch_elf.c
@@ -1,5 +1,5 @@
 /
- * libs/libc/machine/arm/armv6-m/arch_elf.c
+ * libs/libc/machine/xtensa/arch_elf.c
  *
  *   Copyright (C) 2013-2014, 2017 Gregory Nutt. All rights reserved.
  *   Author: Gregory Nutt 



[incubator-nuttx] 02/14: include/elf.h: Add EM_XTENSA

2020-03-16 Thread gnutt
This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit d6244342822ed879bff891161565a14a33682cbe
Author: YAMAMOTO Takashi 
AuthorDate: Thu Mar 5 11:21:28 2020 +0900

include/elf.h: Add EM_XTENSA
---
 include/elf.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/elf.h b/include/elf.h
index f931826..bff9a49 100644
--- a/include/elf.h
+++ b/include/elf.h
@@ -81,6 +81,7 @@
 #define EM_CRIS76 /* Axis Communications 32-bit embedded 
processor */
 #define EM_V85087 /* NEC v850 */
 #define EM_M32R88 /* Renesas M32R */
+#define EM_XTENSA  94 /* Tensilica Xtensa */
 #define EM_RISCV   243/* RISC-V */
 #define EM_ALPHA   0x9026
 #define EM_CYGNUS_V850 0x9080



[GitHub] [incubator-nuttx] patacongo merged pull request #447: ESP32 module support

2020-03-16 Thread GitBox
patacongo merged pull request #447: ESP32 module support
URL: https://github.com/apache/incubator-nuttx/pull/447
 
 
   


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/14: arch/xtensa/include/elf.h: Initial version

2020-03-16 Thread gnutt
This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 865730588305c5a6512e742e78eb360c6b8379ab
Author: YAMAMOTO Takashi 
AuthorDate: Thu Mar 5 11:23:21 2020 +0900

arch/xtensa/include/elf.h: Initial version
---
 arch/xtensa/include/elf.h | 32 
 1 file changed, 32 insertions(+)

diff --git a/arch/xtensa/include/elf.h b/arch/xtensa/include/elf.h
new file mode 100644
index 000..829b717
--- /dev/null
+++ b/arch/xtensa/include/elf.h
@@ -0,0 +1,32 @@
+/
+ * arch/xtensa/include/elf.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 __ARCH_XTENSA_INCLUDE_ELF_H
+#define __ARCH_XTENSA_INCLUDE_ELF_H
+
+/
+ * Pre-processor Definitions
+ /
+
+/* Relocation codes */
+
+#define R_XTENSA_NONE 0
+
+#endif /* __ARCH_XTENSA_INCLUDE_ELF_H */



[incubator-nuttx] 11/14: Introduce instruction memory allocator

2020-03-16 Thread gnutt
This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 855751b534403877e31c286a672d696826165c05
Author: YAMAMOTO Takashi 
AuthorDate: Fri Mar 6 14:48:15 2020 +0900

Introduce instruction memory allocator

Necessary for dlfcn etc on ESP32, which has separate memory regions
for instruction and data.

known issues/todo
 * consider something similar to dual heaps for PROTOECTED
 * consider to adapt binfmt as well
---
 arch/xtensa/src/esp32/Make.defs|  4 +
 arch/xtensa/src/esp32/esp32_modtext.c  | 86 ++
 .../xtensa/esp32/esp32-core/scripts/esp32.template |  4 +
 .../xtensa/esp32/esp32-core/scripts/esp32_flash.ld |  4 +
 .../xtensa/esp32/esp32-core/scripts/esp32_iram.ld  |  3 +
 include/nuttx/arch.h   | 37 ++
 6 files changed, 138 insertions(+)

diff --git a/arch/xtensa/src/esp32/Make.defs b/arch/xtensa/src/esp32/Make.defs
index 2d8d84b..d8c71d8 100644
--- a/arch/xtensa/src/esp32/Make.defs
+++ b/arch/xtensa/src/esp32/Make.defs
@@ -106,3 +106,7 @@ endif
 ifeq ($(CONFIG_ESP32_UART),y)
 CMN_CSRCS += esp32_serial.c
 endif
+
+ifeq ($(CONFIG_ARCH_USE_MODULE_TEXT),y)
+CHIP_CSRCS += esp32_modtext.c
+endif
diff --git a/arch/xtensa/src/esp32/esp32_modtext.c 
b/arch/xtensa/src/esp32/esp32_modtext.c
new file mode 100644
index 000..fc7d78d
--- /dev/null
+++ b/arch/xtensa/src/esp32/esp32_modtext.c
@@ -0,0 +1,86 @@
+/
+ * arch/xtensa/src/esp32/esp32_modtext.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 
+
+/
+ * Public Data
+ /
+
+extern uint32_t _smodtext;
+extern uint32_t _emodtext;
+
+/
+ * Private Data
+ /
+
+struct mm_heap_s g_module_text;
+
+/
+ * Public Functions
+ /
+
+/
+ * Name: up_module_text_init
+ *
+ * Description:
+ *   Initialize the module text allocator
+ *
+ /
+
+void up_module_text_init()
+{
+  mm_initialize(_module_text, &_smodtext, &_emodtext - &_smodtext);
+}
+
+/
+ * Name: up_module_text_alloc
+ *
+ * Description:
+ *   Allocate memory for module text.
+ *
+ /
+
+FAR void *up_module_text_alloc(size_t size)
+{
+  return mm_malloc(_module_text, size);
+}
+
+/
+ * Name: up_module_text_free
+ *
+ * Description:
+ *   Free memory for module text.
+ *
+ /
+
+void up_module_text_free(FAR void *p)
+{
+  return mm_free(_module_text, p);
+}
diff --git a/boards/xtensa/esp32/esp32-core/scripts/esp32.template 
b/boards/xtensa/esp32/esp32-core/scripts/esp32.template
index e7099a0..7bb7395 100644
--- a/boards/xtensa/esp32/esp32-core/scripts/esp32.template
+++ b/boards/xtensa/esp32/esp32-core/scripts/esp32.template
@@ -60,3 +60,7 @@ MEMORY
 /* Heap ends at top of dram0_0_seg */
 
 _eheap = 0x4000 - CONFIG_ESP32_TRACEMEM_RESERVE_DRAM;
+
+/* Module text area ends at top of dram0_0_seg */
+
+_emodtext = 0x400a;
diff --git 

[incubator-nuttx] 01/14: xtensa: Add module/elf definitions

2020-03-16 Thread gnutt
This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 3f80f806ef8d50a9d1f07953d0af6c5b9ea615c4
Author: YAMAMOTO Takashi 
AuthorDate: Thu Mar 5 10:07:57 2020 +0900

xtensa: Add module/elf definitions
---
 boards/xtensa/esp32/esp32-core/scripts/Make.defs  |  23 
 boards/xtensa/esp32/esp32-core/scripts/gnu-elf.ld | 130 ++
 2 files changed, 153 insertions(+)

diff --git a/boards/xtensa/esp32/esp32-core/scripts/Make.defs 
b/boards/xtensa/esp32/esp32-core/scripts/Make.defs
index 1f6682c..d85b550 100644
--- a/boards/xtensa/esp32/esp32-core/scripts/Make.defs
+++ b/boards/xtensa/esp32/esp32-core/scripts/Make.defs
@@ -102,6 +102,29 @@ NXFLATLDFLAGS1 = -r -d -warn-common
 NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) 
-T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections
 LDNXFLATFLAGS = -e main -s 2048
 
+# Loadable module definitions
+
+CMODULEFLAGS = $(CFLAGS)
+
+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)
+CXXELFFLAGS = $(CXXFLAGS)
+
+LDELFFLAGS = -r -e main
+ifeq ($(WINTOOL),y)
+  LDELFFLAGS += -T "${shell cygpath -w 
$(TOPDIR)/boards/$(CONFIG_ARCH)/$(CONFIG_ARCH_CHIP)/$(CONFIG_ARCH_BOARD)/scripts/gnu-elf.ld}"
+else
+  LDELFFLAGS += -T 
$(TOPDIR)/boards/$(CONFIG_ARCH)/$(CONFIG_ARCH_CHIP)/$(CONFIG_ARCH_BOARD)/scripts/gnu-elf.ld
+endif
+
 ASMEXT = .S
 OBJEXT = .o
 LIBEXT = .a
diff --git a/boards/xtensa/esp32/esp32-core/scripts/gnu-elf.ld 
b/boards/xtensa/esp32/esp32-core/scripts/gnu-elf.ld
new file mode 100644
index 000..95c7d2e
--- /dev/null
+++ b/boards/xtensa/esp32/esp32-core/scripts/gnu-elf.ld
@@ -0,0 +1,130 @@
+/
+ * binfmt/libelf/gnu-elf.ld
+ *
+ *   Copyright (C) 2012 Gregory Nutt. All rights reserved.
+ *   Author: Gregory Nutt 
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in
+ *the documentation and/or other materials provided with the
+ *distribution.
+ * 3. Neither the name NuttX nor the names of its contributors may be
+ *used to endorse or promote products derived from this software
+ *without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ /
+
+SECTIONS
+{
+  .text 0x :
+{
+  _stext = . ;
+  *(.text)
+  *(.text.*)
+  *(.gnu.warning)
+  *(.stub)
+  *(.glue_7)
+  *(.glue_7t)
+  *(.jcr)
+
+  /* C++ support:  The .init and .fini sections contain specific logic
+   * to manage static constructors and destructors.
+   */
+
+  *(.gnu.linkonce.t.*)
+  *(.init) /* Old ABI */
+  *(.fini) /* Old ABI */
+  _etext = . ;
+}
+
+  .rodata :
+{
+  _srodata = . ;
+  *(.rodata)
+  *(.rodata1)
+  *(.rodata.*)
+  *(.gnu.linkonce.r*)
+  _erodata = . ;
+}
+
+  .data :
+{
+  _sdata = . ;
+  *(.data)
+  *(.data1)
+  *(.data.*)
+  *(.gnu.linkonce.d*)
+  . = ALIGN(4);
+  _edata = . ;
+}
+
+  /* C++ support. For each global and static local C++ object,
+   * GCC creates a small subroutine to construct the object. Pointers
+   * to these routines (not the routines themselves) are stored as
+   * simple, linear arrays in the .ctors section of the object file.
+   * Similarly, pointers to global/static destructor routines are
+   * stored in .dtors.
+   */
+
+  .ctors :
+{
+  _sctors = . ;
+  *(.ctors)   /* Old ABI:  

[incubator-nuttx] 07/14: Replace a few Gregory Nutt's copyright notices with Apache 2.0

2020-03-16 Thread gnutt
This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 2776a5bbea3bba4c851f960c1a136f0f027d7acc
Author: YAMAMOTO Takashi 
AuthorDate: Fri Mar 6 11:33:16 2020 +0900

Replace a few Gregory Nutt's copyright notices with Apache 2.0

The text was copied from sched/sched/sched_getcpu.c.
---
 boards/xtensa/esp32/esp32-core/scripts/gnu-elf.ld | 39 +++
 libs/libc/machine/xtensa/Make.defs| 39 +++
 libs/libc/machine/xtensa/arch_elf.c   | 39 +++
 3 files changed, 36 insertions(+), 81 deletions(-)

diff --git a/boards/xtensa/esp32/esp32-core/scripts/gnu-elf.ld 
b/boards/xtensa/esp32/esp32-core/scripts/gnu-elf.ld
index 880537c..e867083 100644
--- a/boards/xtensa/esp32/esp32-core/scripts/gnu-elf.ld
+++ b/boards/xtensa/esp32/esp32-core/scripts/gnu-elf.ld
@@ -1,35 +1,20 @@
 /
  * boards/xtensa/esp32/esp32-core/scripts/gnu-elf.ld
  *
- *   Copyright (C) 2012 Gregory Nutt. All rights reserved.
- *   Author: Gregory Nutt 
+ * 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
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * 1. Redistributions of source code must retain the above copyright
- *notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *notice, this list of conditions and the following disclaimer in
- *the documentation and/or other materials provided with the
- *distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- *used to endorse or promote products derived from this software
- *without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * 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.
  *
  /
 
diff --git a/libs/libc/machine/xtensa/Make.defs 
b/libs/libc/machine/xtensa/Make.defs
index a3b2444..8f33a82 100644
--- a/libs/libc/machine/xtensa/Make.defs
+++ b/libs/libc/machine/xtensa/Make.defs
@@ -1,35 +1,20 @@
 
 # libs/libc/machine/xtensa/Make.defs
 #
-#   Copyright (C) 2017 Gregory Nutt. All rights reserved.
-#   Author: Gregory Nutt 
+# 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
 #
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-# 1. Redistributions of source code must retain the above copyright
-#notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-#notice, this list of conditions and the following disclaimer in
-#the documentation and/or 

[incubator-nuttx] branch master updated (5a716b7 -> f4e7845)

2020-03-16 Thread gnutt
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 5a716b7  xtensa_user_handler: rsync after wsr.ps
 new 3f80f80  xtensa: Add module/elf definitions
 new d624434  include/elf.h: Add EM_XTENSA
 new 8657305  arch/xtensa/include/elf.h: Initial version
 new 5e1b24f  xtensa: Add modlib boilerplate
 new c7526e5  arch_elf.c: Appease nxstyle errors
 new b262722  Update file paths of copy-and-paste'ed files
 new 2776a5b  Replace a few Gregory Nutt's copyright notices with Apache 2.0
 new e135c93  xtensa: Implement a few relocations
 new bf2cfd4  Add -mtext-section-literals to avoid out of range relocations
 new 03a916a  Kconfig: Add kconfig options for module text allocator
 new 855751b  Introduce instruction memory allocator
 new 061b796  Adapt dlfcn/modlib to use the instruction memory allocator
 new df44909  xtensa/arch_elf.c: Ignore R_XTENSA_NONE
 new f4e7845  esp32: emulate byte access for module text

The 14 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:
 arch/Kconfig   |  14 +
 arch/xtensa/Kconfig|   1 +
 include/sys/file.h => arch/xtensa/include/elf.h|  26 +-
 .../up_lowputs.c => xtensa/include/loadstore.h}|  32 +--
 arch/xtensa/src/common/xtensa.h|   3 +-
 arch/xtensa/src/common/xtensa_assert.c |   2 +-
 .../src/common/xtensa_loadstore.S} |  55 ++--
 arch/xtensa/src/common/xtensa_user_handler.S   |  31 ++-
 arch/xtensa/src/esp32/Make.defs|   6 +
 .../src/esp32/esp32_modtext.c} |  61 +++--
 arch/xtensa/src/esp32/esp32_user.c | 302 +
 boards/xtensa/esp32/esp32-core/scripts/Make.defs   |  23 ++
 .../xtensa/esp32/esp32-core/scripts/esp32.template |   4 +
 .../xtensa/esp32/esp32-core/scripts/esp32_flash.ld |   4 +
 .../xtensa/esp32/esp32-core/scripts/esp32_iram.ld  |   3 +
 .../esp32/esp32-core}/scripts/gnu-elf.ld   |   4 +-
 include/elf.h  |   1 +
 include/nuttx/arch.h   |  37 +++
 include/nuttx/lib/modlib.h |   5 +
 libs/libc/machine/Kconfig  |   3 +
 libs/libc/machine/Make.defs|   3 +
 {net/procfs => libs/libc/machine/xtensa}/Kconfig   |   0
 .../libc/machine/{risc-v/rv64 => xtensa}/Make.defs |   6 +-
 libs/libc/machine/xtensa/arch_elf.c| 237 
 libs/libc/modlib/Kconfig   |   1 +
 libs/libc/modlib/modlib_load.c |  25 ++
 libs/libc/modlib/modlib_unload.c   |  12 +
 sched/Kconfig  |   1 +
 sched/init/nx_start.c  |   4 +
 sched/module/mod_insmod.c  |   5 +
 sched/module/mod_procfs.c  |  11 +-
 sched/module/mod_rmmod.c   |  20 +-
 32 files changed, 849 insertions(+), 93 deletions(-)
 copy include/sys/file.h => arch/xtensa/include/elf.h (73%)
 copy arch/{x86_64/src/common/up_lowputs.c => xtensa/include/loadstore.h} (85%)
 copy arch/{x86_64/src/common/up_interruptcontext.c => 
xtensa/src/common/xtensa_loadstore.S} (76%)
 copy arch/{x86_64/src/common/up_mdelay.c => xtensa/src/esp32/esp32_modtext.c} 
(75%)
 create mode 100644 arch/xtensa/src/esp32/esp32_user.c
 copy boards/{risc-v/k210/maix-bit => 
xtensa/esp32/esp32-core}/scripts/gnu-elf.ld (97%)
 copy {net/procfs => libs/libc/machine/xtensa}/Kconfig (100%)
 copy libs/libc/machine/{risc-v/rv64 => xtensa}/Make.defs (89%)
 create mode 100644 libs/libc/machine/xtensa/arch_elf.c



[incubator-nuttx] 05/14: arch_elf.c: Appease nxstyle errors

2020-03-16 Thread gnutt
This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit c7526e551e1ce2060de86dbb88a83d6451c84ee8
Author: YAMAMOTO Takashi 
AuthorDate: Tue Mar 10 15:06:34 2020 +0900

arch_elf.c: Appease nxstyle errors
---
 libs/libc/machine/xtensa/arch_elf.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libs/libc/machine/xtensa/arch_elf.c 
b/libs/libc/machine/xtensa/arch_elf.c
index 97fdbc2..464e9a8 100644
--- a/libs/libc/machine/xtensa/arch_elf.c
+++ b/libs/libc/machine/xtensa/arch_elf.c
@@ -92,7 +92,8 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr)
 
   if (ehdr->e_ident[EI_CLASS] != ELFCLASS32)
 {
-  berr("ERROR: Need 32-bit objects: e_ident[EI_CLASS]=%02x\n", 
ehdr->e_ident[EI_CLASS]);
+  berr("ERROR: Need 32-bit objects: e_ident[EI_CLASS]=%02x\n",
+   ehdr->e_ident[EI_CLASS]);
   return false;
 }
 
@@ -104,7 +105,8 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr)
   if (ehdr->e_ident[EI_DATA] != ELFDATA2LSB)
 #endif
 {
-  berr("ERROR: Wrong endian-ness: e_ident[EI_DATA]=%02x\n", 
ehdr->e_ident[EI_DATA]);
+  berr("ERROR: Wrong endian-ness: e_ident[EI_DATA]=%02x\n",
+   ehdr->e_ident[EI_DATA]);
   return false;
 }
 



[incubator-nuttx] 10/14: Kconfig: Add kconfig options for module text allocator

2020-03-16 Thread gnutt
This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 03a916acb8b5d3656bce055808fb3f0abc31d606
Author: YAMAMOTO Takashi 
AuthorDate: Mon Mar 9 13:03:49 2020 +0900

Kconfig: Add kconfig options for module text allocator

Enable it for ESP32.
---
 arch/Kconfig| 14 ++
 arch/xtensa/Kconfig |  1 +
 2 files changed, 15 insertions(+)

diff --git a/arch/Kconfig b/arch/Kconfig
index aaf1c61..15421c6 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -213,6 +213,10 @@ config ARCH_NEED_ADDRENV_MAPPING
bool
default n
 
+config ARCH_HAVE_MODULE_TEXT
+   bool "Special memory region for dynamic code loading"
+   default n
+
 config ARCH_HAVE_MULTICPU
bool
default n
@@ -321,6 +325,16 @@ config ARCH_USE_MPU
is enabled by other, platform-specific logic.  In those cases, 
this
selection will always be forced.
 
+config ARCH_USE_MODULE_TEXT
+   bool "Enable module text allocator"
+   default n
+   depends on ARCH_HAVE_MODULE_TEXT
+   ---help---
+   This option enable architecture-sepecific memory allocator
+   for dynamic code loading. For example, ESP32 has a separate 
memory
+   regions for instruction and data and the memory region used for
+   usual malloc doesn't work for instruction.
+
 menuconfig ARCH_ADDRENV
bool "Address environments"
default n
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
index 1bedd53..5569e1b 100644
--- a/arch/xtensa/Kconfig
+++ b/arch/xtensa/Kconfig
@@ -14,6 +14,7 @@ config ARCH_CHIP_ESP32
select ARCH_FAMILY_LX6
select XTENSA_HAVE_INTERRUPTS
select ARCH_HAVE_MULTICPU
+   select ARCH_HAVE_MODULE_TEXT
select ARCH_TOOLCHAIN_GNU
select ARCH_GLOBAL_IRQDISABLE
---help---



[GitHub] [incubator-nuttx] patacongo commented on issue #447: ESP32 module support

2020-03-16 Thread GitBox
patacongo commented on issue #447: ESP32 module support
URL: https://github.com/apache/incubator-nuttx/pull/447#issuecomment-599549280
 
 
   Okay... let's now worry about squashing.  I will rebase.  i saw only a few 
commits that would be better 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] yamt commented on issue #447: ESP32 module support

2020-03-16 Thread GitBox
yamt commented on issue #447: ESP32 module support
URL: https://github.com/apache/incubator-nuttx/pull/447#issuecomment-599548467
 
 
   @patacongo i can do some squash. but i want to keep some of them separate. 
eg. 
https://github.com/apache/incubator-nuttx/pull/447/commits/cd5ea8d891843dc41342590f5a05fdd8b0269922
   after all i'm not sure what's wrong with 14.


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 #447: ESP32 module support

2020-03-16 Thread GitBox
patacongo commented on issue #447: ESP32 module support
URL: https://github.com/apache/incubator-nuttx/pull/447#issuecomment-599546523
 
 
   > @patacongo this part 
[6699f5d](https://github.com/apache/incubator-nuttx/commit/6699f5d70f4991a84616a5ce689254b4846e14ec)
 needs your explicit approval.
   > otherwise there are no known blocking issues.
   
   Everyone has my explicit approval to change the old BSD heaers to the new 
Apache headers provided that I am the only person claiming a Copyright.
   


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 #447: ESP32 module support

2020-03-16 Thread GitBox
patacongo commented on issue #447: ESP32 module support
URL: https://github.com/apache/incubator-nuttx/pull/447#issuecomment-599546920
 
 
   There are 14 commits for one functional change.  I would say that this PR is 
a candiate for squashing.


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 #447: ESP32 module support

2020-03-16 Thread GitBox
yamt commented on issue #447: ESP32 module support
URL: https://github.com/apache/incubator-nuttx/pull/447#issuecomment-599545251
 
 
   @patacongo this part 
https://github.com/apache/incubator-nuttx/pull/447/commits/6699f5d70f4991a84616a5ce689254b4846e14ec
 needs your explicit approval.
   otherwise there are no known blocking issues.


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 #447: ESP32 module support

2020-03-16 Thread GitBox
patacongo commented on issue #447: ESP32 module support
URL: https://github.com/apache/incubator-nuttx/pull/447#issuecomment-599543310
 
 
   Is this PR ready to be merged (when it finishes the current checks).  If 
there are no open issue then we should take cared of this.  It has been open 
for some time.  Is there any reason why I should not 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


With regards,
Apache Git Services


[GitHub] [incubator-nuttx] jerpelea commented on issue #447: ESP32 module support

2020-03-16 Thread GitBox
jerpelea commented on issue #447: ESP32 module support
URL: https://github.com/apache/incubator-nuttx/pull/447#issuecomment-599537061
 
 
   +1


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 #447: ESP32 module support

2020-03-16 Thread GitBox
yamt commented on issue #447: ESP32 module support
URL: https://github.com/apache/incubator-nuttx/pull/447#issuecomment-599533846
 
 
   this now works on a real hardware. tested on ESP-EYE.


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: xtensa_user_handler: rsync after wsr.ps

2020-03-16 Thread xiaoxiang
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 5a716b7  xtensa_user_handler: rsync after wsr.ps
5a716b7 is described below

commit 5a716b799b477e4d9041e446ebc61fcd3c81ee63
Author: YAMAMOTO Takashi 
AuthorDate: Mon Mar 16 17:54:23 2020 +0900

xtensa_user_handler: rsync after wsr.ps
---
 arch/xtensa/src/common/xtensa_user_handler.S | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/xtensa/src/common/xtensa_user_handler.S 
b/arch/xtensa/src/common/xtensa_user_handler.S
index 47658ee..b8e9adb 100644
--- a/arch/xtensa/src/common/xtensa_user_handler.S
+++ b/arch/xtensa/src/common/xtensa_user_handler.S
@@ -224,6 +224,7 @@ _xtensa_user_handler:
movia0, PS_INTLEVEL(XCHAL_EXCM_LEVEL) | PS_UM | PS_WOE
 #endif
wsr a0, PS
+   rsync
 
/* Call xtensa_user, passing both the EXCCAUSE and a pointer to the
 * beginning of the register save area.



[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #577: xtensa_user_handler: rsync after wsr.ps

2020-03-16 Thread GitBox
xiaoxiang781216 merged pull request #577: xtensa_user_handler: rsync after 
wsr.ps
URL: https://github.com/apache/incubator-nuttx/pull/577
 
 
   


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 #576: xtensa_user_handler: Save PS correctly

2020-03-16 Thread GitBox
xiaoxiang781216 merged pull request #576: xtensa_user_handler: Save PS correctly
URL: https://github.com/apache/incubator-nuttx/pull/576
 
 
   


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: xtensa_user_handler: Save PS correctly

2020-03-16 Thread xiaoxiang
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 3b528c6  xtensa_user_handler: Save PS correctly
 new 9a996b1  Merge pull request #576 from yamt/xtensa-user-handler-save-ps
3b528c6 is described below

commit 3b528c6010036193ec9fc52a67105bda8d417218
Author: YAMAMOTO Takashi 
AuthorDate: Mon Mar 16 18:38:57 2020 +0900

xtensa_user_handler: Save PS correctly

"EPS" is not a real register. It's just a base value of EPS_{2..7}.
---
 arch/xtensa/src/common/xtensa_user_handler.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/xtensa/src/common/xtensa_user_handler.S 
b/arch/xtensa/src/common/xtensa_user_handler.S
index bc7c0cc..47658ee 100644
--- a/arch/xtensa/src/common/xtensa_user_handler.S
+++ b/arch/xtensa/src/common/xtensa_user_handler.S
@@ -196,7 +196,7 @@ _xtensa_user_handler:
mov a0, sp  
/* sp == a1 */
addisp, sp, -(4 * XCPTCONTEXT_SIZE) /* Allocate interrupt stack 
frame */
s32ia0, sp, (4 * REG_A1)/* Save pre-interrupt 
SP */
-   rsr a0, EPS 
/* Save interruptee's PS */
+   rsr a0, PS  
/* Save interruptee's PS */
s32ia0, sp, (4 * REG_PS)
rsr a0, EPC_1   
/* Save interruptee's PC */
s32ia0, sp, (4 * REG_PC)



[GitHub] [incubator-nuttx] yamt opened a new pull request #577: xtensa_user_handler: rsync after wsr.ps

2020-03-16 Thread GitBox
yamt opened a new pull request #577: xtensa_user_handler: rsync after wsr.ps
URL: https://github.com/apache/incubator-nuttx/pull/577
 
 
   


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 #576: xtensa_user_handler: Save PS correctly

2020-03-16 Thread GitBox
yamt opened a new pull request #576: xtensa_user_handler: Save PS correctly
URL: https://github.com/apache/incubator-nuttx/pull/576
 
 
   "EPS" is not a real register. It's just a base value of EPS_{2..7}.


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 #448: Add a sample of git pre-commit hook

2020-03-16 Thread GitBox
xiaoxiang781216 commented on issue #448: Add a sample of git pre-commit hook
URL: https://github.com/apache/incubator-nuttx/pull/448#issuecomment-599450523
 
 
   Let's close this until nxstyle is fully ready.


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 closed pull request #448: Add a sample of git pre-commit hook

2020-03-16 Thread GitBox
xiaoxiang781216 closed pull request #448: Add a sample of git pre-commit hook
URL: https://github.com/apache/incubator-nuttx/pull/448
 
 
   


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: xtensa_user_handler: Fix registers in comments

2020-03-16 Thread xiaoxiang
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 951cfbd  xtensa_user_handler: Fix registers in comments
951cfbd is described below

commit 951cfbd1d52497a6a788a5cc036b3acf70afd580
Author: YAMAMOTO Takashi 
AuthorDate: Mon Mar 16 18:00:39 2020 +0900

xtensa_user_handler: Fix registers in comments
---
 arch/xtensa/src/common/xtensa_user_handler.S | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/xtensa/src/common/xtensa_user_handler.S 
b/arch/xtensa/src/common/xtensa_user_handler.S
index 14acfc1..bc7c0cc 100644
--- a/arch/xtensa/src/common/xtensa_user_handler.S
+++ b/arch/xtensa/src/common/xtensa_user_handler.S
@@ -231,11 +231,11 @@ _xtensa_user_handler:
 
 #ifdef __XTENSA_CALL0_ABI__
rsr a2, EXCCAUSE/* 
Argument 1 (a2) = EXCCAUSE */
-   mov a3, sp  
/* Argument 2 (a2) = pointer to register save area */
+   mov a3, sp  
/* Argument 2 (a3) = pointer to register save area */
calx0   xtensa_user /* Call 
xtensa_user */
 #else
-   rsr a6, EXCCAUSE/* 
Argument 1 (a2) = EXCCAUSE */
-   mov a7, sp  
/* Argument 2 (a2) = pointer to register save area */
+   rsr a6, EXCCAUSE/* 
Argument 1 (a6) = EXCCAUSE */
+   mov a7, sp  
/* Argument 2 (a7) = pointer to register save area */
call4   xtensa_user /* Call 
xtensa_user */
 #endif
 



[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #575: xtensa_user_handler: Fix registers in comments

2020-03-16 Thread GitBox
xiaoxiang781216 merged pull request #575: xtensa_user_handler: Fix registers in 
comments
URL: https://github.com/apache/incubator-nuttx/pull/575
 
 
   


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 a change in pull request #118: Fix parallel buid errors in examples/elf

2020-03-16 Thread GitBox
xiaoxiang781216 commented on a change in pull request #118: Fix parallel buid 
errors in examples/elf
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/118#discussion_r392884849
 
 

 ##
 File path: examples/elf/Makefile
 ##
 @@ -51,18 +51,11 @@ ROOTDEPPATH := --dep-path tests
 
 VPATH += :tests
 
-ifeq ($(CONFIG_EXAMPLES_ELF_ROMFS),y)
-  FSIMG_HDR = $(TESTS_DIR)/romfs.h
-else
-  FSIMG_HDR = $(TESTS_DIR)/cromfs.h
-endif
-
-elf_main.c: tests/symtab.c
-
-tests/symtab.c tests/dirlist.h $(FSIMG_HDR):
 
 Review comment:
   here: https://github.com/apache/incubator-nuttx-apps/pull/123


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 opened a new pull request #123: Fix parallel build

2020-03-16 Thread GitBox
xiaoxiang781216 opened a new pull request #123: Fix parallel build
URL: https://github.com/apache/incubator-nuttx-apps/pull/123
 
 
   


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 #575: xtensa_user_handler: Fix registers in comments

2020-03-16 Thread GitBox
yamt opened a new pull request #575: xtensa_user_handler: Fix registers in 
comments
URL: https://github.com/apache/incubator-nuttx/pull/575
 
 
   


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 commented on a change in pull request #118: Fix parallel buid errors in examples/elf

2020-03-16 Thread GitBox
masayuki2009 commented on a change in pull request #118: Fix parallel buid 
errors in examples/elf
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/118#discussion_r392861367
 
 

 ##
 File path: examples/elf/Makefile
 ##
 @@ -51,18 +51,11 @@ ROOTDEPPATH := --dep-path tests
 
 VPATH += :tests
 
-ifeq ($(CONFIG_EXAMPLES_ELF_ROMFS),y)
-  FSIMG_HDR = $(TESTS_DIR)/romfs.h
-else
-  FSIMG_HDR = $(TESTS_DIR)/cromfs.h
-endif
-
-elf_main.c: tests/symtab.c
-
-tests/symtab.c tests/dirlist.h $(FSIMG_HDR):
 
 Review comment:
   Hi, @xiaoxiang781216 
   
   >And tests folder build multiple time concurrently. Is the right fix like 
this?
   
   Hmm, I'm still not sure. Can you create another PR so that we can try?
   


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 a change in pull request #118: Fix parallel buid errors in examples/elf

2020-03-16 Thread GitBox
xiaoxiang781216 commented on a change in pull request #118: Fix parallel buid 
errors in examples/elf
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/118#discussion_r392838774
 
 

 ##
 File path: examples/elf/Makefile
 ##
 @@ -51,18 +51,11 @@ ROOTDEPPATH := --dep-path tests
 
 VPATH += :tests
 
-ifeq ($(CONFIG_EXAMPLES_ELF_ROMFS),y)
-  FSIMG_HDR = $(TESTS_DIR)/romfs.h
-else
-  FSIMG_HDR = $(TESTS_DIR)/cromfs.h
-endif
-
-elf_main.c: tests/symtab.c
-
-tests/symtab.c tests/dirlist.h $(FSIMG_HDR):
 
 Review comment:
   I think this error is because:
   tests/symtab.c tests/dirlist.h $(FSIMG_HDR):
  @$(MAKE) -C tests TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" 
CROSSDEV=$(CROSSDEV)
   equals to:
   tests/symtab.c:
  @$(MAKE) -C tests TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" 
CROSSDEV=$(CROSSDEV)
   tests/dirlist.h:
  @$(MAKE) -C tests TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" 
CROSSDEV=$(CROSSDEV)
   $(FSIMG_HDR):
  @$(MAKE) -C tests TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" 
CROSSDEV=$(CROSSDEV)
   And tests folder build multiple time concurrently. Is the right fix like 
this?
   common:
  @$(MAKE) -C tests TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" 
CROSSDEV=$(CROSSDEV)
   
   tests/symtab.c tests/dirlist.h $(FSIMG_HDR): common


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 issue #574: _xtensa_panic clobbers the exception code

2020-03-16 Thread GitBox
yamt opened a new issue #574: _xtensa_panic clobbers the exception code
URL: https://github.com/apache/incubator-nuttx/issues/574
 
 
   _xtensa_panic saves the exception code in EXCSAVE_1 and then calls 
_xtensa_context_save, which uses EXCSAVE_1 for its own purpose and thus 
clobbers the saved exception code.
   


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 commented on a change in pull request #118: Fix parallel buid errors in examples/elf

2020-03-16 Thread GitBox
masayuki2009 commented on a change in pull request #118: Fix parallel buid 
errors in examples/elf
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/118#discussion_r392831232
 
 

 ##
 File path: examples/elf/Makefile
 ##
 @@ -51,18 +51,11 @@ ROOTDEPPATH := --dep-path tests
 
 VPATH += :tests
 
-ifeq ($(CONFIG_EXAMPLES_ELF_ROMFS),y)
-  FSIMG_HDR = $(TESTS_DIR)/romfs.h
-else
-  FSIMG_HDR = $(TESTS_DIR)/cromfs.h
-endif
-
-elf_main.c: tests/symtab.c
-
-tests/symtab.c tests/dirlist.h $(FSIMG_HDR):
 
 Review comment:
   @xiaoxiang781216 This change was needed to fix such as
   
   riscv64-unknown-elf-ld: pthread.o: file not recognized: file truncated   

 
   Makefile:82: recipe for target 'pthread' failed  

 
   make[4]: *** [pthread] Error 1   

 
   
   Actually there was a similar error in 
   
https://github.com/apache/incubator-nuttx-apps/pull/118#issuecomment-598017857
   


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: xtensa_user_handler: Fix registers in comments

2020-03-16 Thread xiaoxiang
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 7aebcc4  xtensa_user_handler: Fix registers in comments
7aebcc4 is described below

commit 7aebcc4bf62d84b8034729135a7f9448ca1e61c2
Author: YAMAMOTO Takashi 
AuthorDate: Mon Mar 16 14:15:14 2020 +0900

xtensa_user_handler: Fix registers in comments
---
 arch/xtensa/src/common/xtensa_user_handler.S | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/xtensa/src/common/xtensa_user_handler.S 
b/arch/xtensa/src/common/xtensa_user_handler.S
index 065baef..14acfc1 100644
--- a/arch/xtensa/src/common/xtensa_user_handler.S
+++ b/arch/xtensa/src/common/xtensa_user_handler.S
@@ -337,7 +337,7 @@ _xtensa_syscall_handler:
mov a3, sp  
/* Argument 2: Top of stack = register save area */
call0   xtensa_irq_dispatch /* Call 
xtensa_int_decode */
 
-   /* On return from xtensa_irq_dispatch, a2 will contain the address of 
the new
+   /* On return from xtensa_irq_dispatch, A2 will contain the address of 
the new
 * register save area.  Usually this would be the same as the current 
SP.
 * But in the event of a context switch, A2 will instead refer to the 
TCB
 * register save area.
@@ -348,9 +348,9 @@ _xtensa_syscall_handler:
mov a7, sp  
/* Argument 2: Top of stack = register save area */
call4   xtensa_irq_dispatch /* Call 
xtensa_int_decode */
 
-   /* On return from xtensa_irq_dispatch, a5 will contain the address of 
the new
+   /* On return from xtensa_irq_dispatch, A6 will contain the address of 
the new
 * register save area.  Usually this would be the same as the current 
SP.
-* But in the event of a context switch, A2 will instead refer to the 
TCB
+* But in the event of a context switch, A6 will instead refer to the 
TCB
 * register save area.
 */
 



[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #573: xtensa_user_handler: Fix registers in comments

2020-03-16 Thread GitBox
xiaoxiang781216 merged pull request #573: xtensa_user_handler: Fix registers in 
comments
URL: https://github.com/apache/incubator-nuttx/pull/573
 
 
   


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 a change in pull request #118: Fix parallel buid errors in examples/elf

2020-03-16 Thread GitBox
xiaoxiang781216 commented on a change in pull request #118: Fix parallel buid 
errors in examples/elf
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/118#discussion_r392825862
 
 

 ##
 File path: examples/elf/Makefile
 ##
 @@ -51,18 +51,11 @@ ROOTDEPPATH := --dep-path tests
 
 VPATH += :tests
 
-ifeq ($(CONFIG_EXAMPLES_ELF_ROMFS),y)
-  FSIMG_HDR = $(TESTS_DIR)/romfs.h
-else
-  FSIMG_HDR = $(TESTS_DIR)/cromfs.h
-endif
-
-elf_main.c: tests/symtab.c
-
-tests/symtab.c tests/dirlist.h $(FSIMG_HDR):
 
 Review comment:
   @masayuki2009 why we change the target to context here? What problem can be 
fixed by this change?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services